Package: qgis
Version: 1.7.4+1.7.5~20120320-1.1
Severity: important
Tags: patch
Hi,
On armel/armhf qreal is typedef'ed to float not double, that leads to a
few packages failing to build. the attached patch implements (when
#ifdef QT_ARCH_ARM) the missing methods and the package builds fine on
armel/armhf.
Regards
Konstantinos
diff -ruN qgis-1.7.4+1.7.5~20120320/python/core/symbology-ng-core.sip qgis-1.7.4+1.7.5~20120320.mine/python/core/symbology-ng-core.sip
--- qgis-1.7.4+1.7.5~20120320/python/core/symbology-ng-core.sip 2012-03-17 13:48:08.000000000 +0000
+++ qgis-1.7.4+1.7.5~20120320.mine/python/core/symbology-ng-core.sip 2012-10-24 10:11:37.137446442 +0000
@@ -1134,9 +1134,8 @@
static QString encodePoint( QPointF point );
static QPointF decodePoint( QString str );
-
- static QString encodeRealVector( const QVector<double>& v );
- static QVector<double> decodeRealVector( const QString& s );
+ static QString encodeRealVector( const QVector<qreal>& v );
+ static QVector<qreal> decodeRealVector( const QString& s );
static QString encodeOutputUnit( QgsSymbolV2::OutputUnit unit );
static QgsSymbolV2::OutputUnit decodeOutputUnit( QString str );
diff -ruN qgis-1.7.4+1.7.5~20120320/src/core/qgscoordinatetransform.cpp qgis-1.7.4+1.7.5~20120320.mine/src/core/qgscoordinatetransform.cpp
--- qgis-1.7.4+1.7.5~20120320/src/core/qgscoordinatetransform.cpp 2012-03-17 13:48:08.000000000 +0000
+++ qgis-1.7.4+1.7.5~20120320.mine/src/core/qgscoordinatetransform.cpp 2012-10-24 09:42:46.901186927 +0000
@@ -316,6 +316,15 @@
}
}
+#ifdef QT_ARCH_ARM
+void QgsCoordinateTransform::transformInPlace( qreal& x, qreal& y, double& z,
+ TransformDirection direction ) const
+{
+ double xd = (double) x, yd = (double) y;
+ transformInPlace(xd, yd, z, direction);
+}
+#endif
+
void QgsCoordinateTransform::transformInPlace( std::vector<double>& x,
std::vector<double>& y, std::vector<double>& z,
TransformDirection direction ) const
diff -ruN qgis-1.7.4+1.7.5~20120320/src/core/qgscoordinatetransform.h qgis-1.7.4+1.7.5~20120320.mine/src/core/qgscoordinatetransform.h
--- qgis-1.7.4+1.7.5~20120320/src/core/qgscoordinatetransform.h 2012-03-17 13:48:08.000000000 +0000
+++ qgis-1.7.4+1.7.5~20120320.mine/src/core/qgscoordinatetransform.h 2012-10-24 08:54:34.683223915 +0000
@@ -154,6 +154,9 @@
// and y variables in place. The second one works with good old-fashioned
// C style arrays.
void transformInPlace( double& x, double& y, double &z, TransformDirection direction = ForwardTransform ) const;
+#ifdef QT_ARCH_ARM
+ void transformInPlace( qreal& x, qreal& y, double &z, TransformDirection direction = ForwardTransform ) const;
+#endif
void transformInPlace( std::vector<double>& x, std::vector<double>& y, std::vector<double>& z,
TransformDirection direction = ForwardTransform ) const;
diff -ruN qgis-1.7.4+1.7.5~20120320/src/core/qgsmaptopixel.cpp qgis-1.7.4+1.7.5~20120320.mine/src/core/qgsmaptopixel.cpp
--- qgis-1.7.4+1.7.5~20120320/src/core/qgsmaptopixel.cpp 2012-03-17 13:48:08.000000000 +0000
+++ qgis-1.7.4+1.7.5~20120320.mine/src/core/qgsmaptopixel.cpp 2012-10-24 09:37:59.874286106 +0000
@@ -137,6 +137,14 @@
y = yMax - ( y - yMin ) / mMapUnitsPerPixel;
}
+#ifdef QT_ARCH_ARM
+void QgsMapToPixel::transformInPlace( qreal& x, qreal& y ) const
+{
+ double xd = (double)x, yd = (double) y;
+ transformInPlace(xd, yd);
+}
+#endif
+
void QgsMapToPixel::transformInPlace( std::vector<double>& x,
std::vector<double>& y ) const
{
diff -ruN qgis-1.7.4+1.7.5~20120320/src/core/qgsmaptopixel.h qgis-1.7.4+1.7.5~20120320.mine/src/core/qgsmaptopixel.h
--- qgis-1.7.4+1.7.5~20120320/src/core/qgsmaptopixel.h 2012-03-17 13:48:08.000000000 +0000
+++ qgis-1.7.4+1.7.5~20120320.mine/src/core/qgsmaptopixel.h 2012-10-24 08:57:02.961450978 +0000
@@ -67,6 +67,9 @@
given coordinates in place. Intended as a fast way to do the
transform. */
void transformInPlace( double& x, double& y ) const;
+#ifdef QT_ARCH_ARM
+ void transformInPlace( qreal& x, qreal& y ) const;
+#endif
/* Transform device coordinates to map coordinates. Modifies the
given coordinates in place. Intended as a fast way to do the