[merkaartor] fix FTBFS on arm (#992224)

Rex Dieter rdieter at fedoraproject.org
Tue Dec 3 18:45:53 UTC 2013


commit 10689f6949b5baa38ba27f4fcc0b8f6bb641319f
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Tue Dec 3 12:45:47 2013 -0600

    fix FTBFS on arm (#992224)

 merkaartor-arm_qreal_build_fix.patch |   71 ++++++++++++++++++++++++++++++++++
 merkaartor.spec                      |   11 +++++-
 2 files changed, 81 insertions(+), 1 deletions(-)
---
diff --git a/merkaartor-arm_qreal_build_fix.patch b/merkaartor-arm_qreal_build_fix.patch
new file mode 100644
index 0000000..539dbfd
--- /dev/null
+++ b/merkaartor-arm_qreal_build_fix.patch
@@ -0,0 +1,71 @@
+806029c2d1ac26e92c5d683360452e71986e9187
+--- a/src/Features/Node.cpp
++++ b/src/Features/Node.cpp
+@@ -697,13 +697,13 @@ void PhotoNode::drawTouchup(QPainter& th
+     QRect box(me - QPoint(5, 3), QSize(10, 6));
+     thePainter.drawRect(box);
+     if (theView->renderOptions().options.testFlag(RendererOptions::PhotosVisible) && theView->pixelPerM() > M_PREFS->getRegionalZoom()) {
+-        qreal rt = qBound(0.2, theView->pixelPerM(), 1.0);
++        qreal rt = qBound(0.2, (double)theView->pixelPerM(), 1.0);
+         QPoint phPt;
+ 
+         if (photoLocationBR) {
+             phPt = me + QPoint(10*rt, 10*rt);
+         } else {
+-            qreal rt = qBound(0.2, theView->pixelPerM(), 1.0);
++            qreal rt = qBound(0.2, (double)theView->pixelPerM(), 1.0);
+             qreal phRt = 1. * Photo->width() / Photo->height();
+             phPt = me - QPoint(10*rt, 10*rt) - QPoint(M_PREFS->getMaxGeoPicWidth()*rt, M_PREFS->getMaxGeoPicWidth()*rt/phRt);
+         }
+@@ -723,7 +723,7 @@ void PhotoNode::drawHover(QPainter& theP
+     if (TEST_RFLAGS(RendererOptions::PhotosVisible) && theView->pixelPerM() > M_PREFS->getRegionalZoom()) {
+         QPoint me(theView->toView(this));
+ 
+-        qreal rt = qBound(0.2, theView->pixelPerM(), 1.0);
++        qreal rt = qBound(0.2, (double)theView->pixelPerM(), 1.0);
+         qreal phRt = 1. * Photo->width() / Photo->height();
+         QPoint phPt;
+         if (photoLocationBR) {
+@@ -742,7 +742,7 @@ qreal PhotoNode::pixelDistance(const QPo
+     QPoint me = theView->toView(const_cast<PhotoNode*>(this));
+ #ifdef GEOIMAGE
+     if (TEST_RFLAGS(RendererOptions::PhotosVisible) && theView->pixelPerM() > M_PREFS->getRegionalZoom()) {
+-        qreal rt = qBound(0.2, theView->pixelPerM(), 1.0);
++        qreal rt = qBound(0.2, (double)theView->pixelPerM(), 1.0);
+         qreal phRt = 1. * Photo->width() / Photo->height();
+         QPoint phPt;
+         if (photoLocationBR) {
+--- a/src/common/Projection.cpp
++++ b/src/common/Projection.cpp
+@@ -151,17 +151,17 @@ void Projection::projTransform(ProjProje
+                                ProjProjection dstdefn,
+                                long point_count, int point_offset, qreal *x, qreal *y, qreal *z )
+ {
+-    pj_transform(srcdefn, dstdefn, point_count, point_offset, x, y, z);
++    pj_transform(srcdefn, dstdefn, point_count, point_offset, (double *)x, (double *)y, (double *)z);
+ }
+ 
+ void Projection::projTransformFromWGS84(long point_count, int point_offset, qreal *x, qreal *y, qreal *z ) const
+ {
+-    pj_transform (theWGS84Proj, theProj, point_count, point_offset, x, y, z);
++    pj_transform (theWGS84Proj, theProj, point_count, point_offset, (double *)x, (double *)y, (double *)z);
+ }
+ 
+ void Projection::projTransformToWGS84(long point_count, int point_offset, qreal *x, qreal *y, qreal *z ) const
+ {
+-    pj_transform(theProj, theWGS84Proj, point_count, point_offset, x, y, z);
++    pj_transform(theProj, theWGS84Proj, point_count, point_offset, (double *)x, (double *)y, (double *)z);
+ }
+ 
+ QPointF Projection::projProject(const QPointF & Map) const
+--- a/plugins/background/MSpatialiteBackground/PrimitiveFeature.h
++++ b/plugins/background/MSpatialiteBackground/PrimitiveFeature.h
+@@ -41,7 +41,7 @@ public:
+     virtual IFeature* getParent(int) { return NULL; }
+     virtual const IFeature* getParent(int) const { return NULL; }
+ 
+-    virtual bool hasPainter(double) const { return false; }
++    virtual bool hasPainter(qreal) const { return false; }
+ 
+     /** Give the id of the feature.
+      *  If the feature has no id, a random id is generated
diff --git a/merkaartor.spec b/merkaartor.spec
index cd107f5..5de437d 100644
--- a/merkaartor.spec
+++ b/merkaartor.spec
@@ -1,6 +1,6 @@
 Name:           merkaartor
 Version:        0.18.1
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Qt-Based OpenStreetMap editor
 
 Group:          Applications/Productivity
@@ -8,6 +8,10 @@ License:        GPLv2
 URL:            http://www.merkaartor.be
 Source0:        %{name}-%{version}.tar.bz2
 
+# FTBFS on arm, fix qreal = double assumptions
+# borrowed from debian
+Patch1: merkaartor-arm_qreal_build_fix.patch
+
 Requires:       hicolor-icon-theme
 
 BuildRequires:  qt4-devel >= 4.4, qt4-webkit-devel
@@ -30,6 +34,8 @@ transparent display of map features like roads and curved roads.
 %prep
 %setup -q -n %{name}-%{version}
 
+%patch1 -p1 -b .arm_qreal_build_fix
+
 %build
 # Use packaged qtsingleappicaton instead of bundled version
 rm -rf 3rdparty/qtsingleapplication-2.6_1-opensource
@@ -76,6 +82,9 @@ fi
 %doc AUTHORS CHANGELOG HACKING LICENSE
 
 %changelog
+* Tue Dec 03 2013 Rex Dieter <rdieter at fedoraproject.org> 0.18.1-7
+- fix FTBFS on arm (#992224)
+
 * Tue Dec 03 2013 Rex Dieter <rdieter at fedoraproject.org> - 0.18.1-6
 - rebuild (exiv2)
 


More information about the scm-commits mailing list