[merkaartor] fix the ARM fix (#992224) to also do the right thing at runtime

Kevin Kofler kkofler at fedoraproject.org
Wed Dec 4 17:14:24 UTC 2013


commit 71b8c5bbfd44e68cfbbbe1ace2861508657e62c1
Author: Kevin Kofler <Kevin at tigcc.ticalc.org>
Date:   Wed Dec 4 18:14:13 2013 +0100

    fix the ARM fix (#992224) to also do the right thing at runtime
    
    * Wed Dec 04 2013 Kevin Kofler <Kevin at tigcc.ticalc.org> - 0.18.1-8
    - fix the ARM fix (#992224) to also do the right thing at runtime

 merkaartor-0.18.1-arm_qreal_build_fix.patch |  117 +++++++++++++++++++++++++++
 merkaartor-arm_qreal_build_fix.patch        |   71 ----------------
 merkaartor.spec                             |    7 +-
 3 files changed, 122 insertions(+), 73 deletions(-)
---
diff --git a/merkaartor-0.18.1-arm_qreal_build_fix.patch b/merkaartor-0.18.1-arm_qreal_build_fix.patch
new file mode 100644
index 0000000..ad73ef9
--- /dev/null
+++ b/merkaartor-0.18.1-arm_qreal_build_fix.patch
@@ -0,0 +1,117 @@
+diff -ur merkaartor-0.18.1/plugins/background/MSpatialiteBackground/PrimitiveFeature.h merkaartor-0.18.1-arm_qreal_build_fix/plugins/background/MSpatialiteBackground/PrimitiveFeature.h
+--- merkaartor-0.18.1/plugins/background/MSpatialiteBackground/PrimitiveFeature.h	2012-06-11 17:01:23.000000000 +0200
++++ merkaartor-0.18.1-arm_qreal_build_fix/plugins/background/MSpatialiteBackground/PrimitiveFeature.h	2013-12-04 18:02:44.000000000 +0100
+@@ -41,7 +41,7 @@
+     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 -ur merkaartor-0.18.1/src/common/Projection.cpp merkaartor-0.18.1-arm_qreal_build_fix/src/common/Projection.cpp
+--- merkaartor-0.18.1/src/common/Projection.cpp	2012-06-11 17:01:23.000000000 +0200
++++ merkaartor-0.18.1-arm_qreal_build_fix/src/common/Projection.cpp	2013-12-04 18:09:29.000000000 +0100
+@@ -149,39 +149,39 @@
+ 
+ void Projection::projTransform(ProjProjection srcdefn,
+                                ProjProjection dstdefn,
+-                               long point_count, int point_offset, qreal *x, qreal *y, qreal *z )
++                               long point_count, int point_offset, double *x, double *y, double *z )
+ {
+     pj_transform(srcdefn, dstdefn, point_count, point_offset, x, y, z);
+ }
+ 
+-void Projection::projTransformFromWGS84(long point_count, int point_offset, qreal *x, qreal *y, qreal *z ) const
++void Projection::projTransformFromWGS84(long point_count, int point_offset, double *x, double *y, double *z ) const
+ {
+     pj_transform (theWGS84Proj, theProj, point_count, point_offset, x, y, z);
+ }
+ 
+-void Projection::projTransformToWGS84(long point_count, int point_offset, qreal *x, qreal *y, qreal *z ) const
++void Projection::projTransformToWGS84(long point_count, int point_offset, double *x, double *y, double *z ) const
+ {
+     pj_transform(theProj, theWGS84Proj, point_count, point_offset, x, y, z);
+ }
+ 
+ QPointF Projection::projProject(const QPointF & Map) const
+ {
+-    qreal x = angToRad(Map.x());
+-    qreal y = angToRad(Map.y());
++    double x = (double) angToRad(Map.x());
++    double y = (double) angToRad(Map.y());
+ 
+     projTransformFromWGS84(1, 0, &x, &y, NULL);
+ 
+-    return QPointF(x, y);
++    return QPointF((qreal) x, (qreal) y);
+ }
+ 
+ Coord Projection::projInverse(const QPointF & pProj) const
+ {
+-    qreal x = pProj.x();
+-    qreal y = pProj.y();
++    double x = (double) pProj.x();
++    double y = (double) pProj.y();
+ 
+     projTransformToWGS84(1, 0, &x, &y, NULL);
+ 
+-    return Coord(radToAng(x), radToAng(y));
++    return Coord(radToAng((qreal) x), radToAng((qreal) y));
+ }
+ #endif // _MOBILE
+ 
+diff -ur merkaartor-0.18.1/src/common/Projection.h merkaartor-0.18.1-arm_qreal_build_fix/src/common/Projection.h
+--- merkaartor-0.18.1/src/common/Projection.h	2012-06-11 17:01:23.000000000 +0200
++++ merkaartor-0.18.1-arm_qreal_build_fix/src/common/Projection.h	2013-12-04 18:07:09.000000000 +0100
+@@ -46,9 +46,9 @@
+     static ProjProjection getProjection(QString projString);
+     static void projTransform(ProjProjection srcdefn,
+                               ProjProjection dstdefn,
+-                              long point_count, int point_offset, qreal *x, qreal *y, qreal *z );
+-    void projTransformToWGS84(long point_count, int point_offset, qreal *x, qreal *y, qreal *z ) const;
+-    void projTransformFromWGS84(long point_count, int point_offset, qreal *x, qreal *y, qreal *z ) const;
++                              long point_count, int point_offset, double *x, double *y, double *z );
++    void projTransformToWGS84(long point_count, int point_offset, double *x, double *y, double *z ) const;
++    void projTransformFromWGS84(long point_count, int point_offset, double *x, double *y, double *z ) const;
+ 
+ #endif
+     bool toXML(QXmlStreamWriter& stream);
+diff -ur merkaartor-0.18.1/src/Features/Node.cpp merkaartor-0.18.1-arm_qreal_build_fix/src/Features/Node.cpp
+--- merkaartor-0.18.1/src/Features/Node.cpp	2012-06-11 17:01:23.000000000 +0200
++++ merkaartor-0.18.1-arm_qreal_build_fix/src/Features/Node.cpp	2013-12-04 18:02:44.000000000 +0100
+@@ -697,13 +697,13 @@
+     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 @@
+     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 @@
+     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) {
diff --git a/merkaartor.spec b/merkaartor.spec
index 5de437d..a0c0f34 100644
--- a/merkaartor.spec
+++ b/merkaartor.spec
@@ -1,6 +1,6 @@
 Name:           merkaartor
 Version:        0.18.1
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        Qt-Based OpenStreetMap editor
 
 Group:          Applications/Productivity
@@ -82,7 +82,10 @@ fi
 %doc AUTHORS CHANGELOG HACKING LICENSE
 
 %changelog
-* Tue Dec 03 2013 Rex Dieter <rdieter at fedoraproject.org> 0.18.1-7
+* Wed Dec 04 2013 Kevin Kofler <Kevin at tigcc.ticalc.org> - 0.18.1-8
+- fix the ARM fix (#992224) to also do the right thing at runtime
+
+* 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


More information about the scm-commits mailing list