[qgis] 03/05: Replace patch to fix arm FTBFS by upstream one.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Mon Mar 9 19:18:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository qgis.

commit a5f97688fe88b351253162c766e5473998b09e3d
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Mon Mar 9 19:09:55 2015 +0100

    Replace patch to fix arm FTBFS by upstream one.
---
 debian/changelog                        |   2 +-
 debian/patches/0001-fix-arm-build.patch | 418 ++++++++++++++++++++++++++++++++
 debian/patches/arm-qreal.patch          | 205 ----------------
 debian/patches/series                   |   2 +-
 4 files changed, 420 insertions(+), 207 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 408b87c..0da02e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ qgis (2.8.1+dfsg1-1~exp2) UNRELEASED; urgency=medium
 
   * Don't build internal PySpatiaLite, use Debian package instead.
     (closes: #779933)
-  * Add patch to cast doubles to qreal to fix FTBFS on arm*.
+  * Add patch to fix FTBFS on arm*.
 
  -- Bas Couwenberg <sebastic at debian.org>  Thu, 05 Mar 2015 22:51:10 +0100
 
diff --git a/debian/patches/0001-fix-arm-build.patch b/debian/patches/0001-fix-arm-build.patch
new file mode 100644
index 0000000..04bf77a
--- /dev/null
+++ b/debian/patches/0001-fix-arm-build.patch
@@ -0,0 +1,418 @@
+From 1aff7335d004bc410eb61e1436ee7648716f9319 Mon Sep 17 00:00:00 2001
+From: "Juergen E. Fischer" <jef at norbit.de>
+Date: Mon, 9 Mar 2015 09:27:27 +0100
+Subject: fix arm build
+Origin: https://github.com/qgis/QGIS/commit/1aff7335d004bc410eb61e1436ee7648716f9319
+
+---
+ src/app/qgsdecorationgrid.cpp              |   16 ++++++------
+ src/app/qgsdecorationgrid.h                |    6 ++---
+ src/app/qgsmapmouseevent.cpp               |    3 +--
+ src/core/composer/qgscomposermapgrid.cpp   |    4 +--
+ src/core/qgsgeometry.cpp                   |    2 +-
+ src/core/qgsgeometry.h                     |    9 +++++++
+ src/core/qgsmaptopixel.cpp                 |   38 ++++++++++------------------
+ src/core/qgsmaptopixel.h                   |    4 +--
+ src/core/qgspallabeling.cpp                |    2 +-
+ src/core/qgspointlocator.cpp               |    8 +++---
+ src/core/symbology-ng/qgsrendererv2.cpp    |   12 +++------
+ src/gui/qgsmapcanvasitem.cpp               |    2 +-
+ src/gui/qgsmaptool.cpp                     |    2 +-
+ src/providers/wcs/qgswcsprovider.cpp       |    2 +-
+ tests/src/core/testqgsatlascomposition.cpp |    8 +++---
+ 15 files changed, 56 insertions(+), 62 deletions(-)
+
+--- a/src/app/qgsdecorationgrid.cpp
++++ b/src/app/qgsdecorationgrid.cpp
+@@ -217,14 +217,14 @@ void QgsDecorationGrid::render( QPainter
+ 
+   // p->setPen( mGridPen );
+ 
+-  QList< QPair< double, QLineF > > verticalLines;
++  QList< QPair< qreal, QLineF > > verticalLines;
+   yGridLines( verticalLines );
+-  QList< QPair< double, QLineF > > horizontalLines;
++  QList< QPair< qreal, QLineF > > horizontalLines;
+   xGridLines( horizontalLines );
+   //QgsDebugMsg( QString("grid has %1 vertical and %2 horizontal lines").arg( verticalLines.size() ).arg( horizontalLines.size() ) );
+ 
+-  QList< QPair< double, QLineF > >::const_iterator vIt = verticalLines.constBegin();
+-  QList< QPair< double, QLineF > >::const_iterator hIt = horizontalLines.constBegin();
++  QList< QPair< qreal, QLineF > >::const_iterator vIt = verticalLines.constBegin();
++  QList< QPair< qreal, QLineF > >::const_iterator hIt = horizontalLines.constBegin();
+ 
+   //simpler approach: draw vertical lines first, then horizontal ones
+   if ( mGridStyle == QgsDecorationGrid::Line )
+@@ -338,7 +338,7 @@ void QgsDecorationGrid::render( QPainter
+   }
+ }
+ 
+-void QgsDecorationGrid::drawCoordinateAnnotations( QPainter* p, const QList< QPair< double, QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines )
++void QgsDecorationGrid::drawCoordinateAnnotations( QPainter* p, const QList< QPair< qreal, QLineF > >& hLines, const QList< QPair< qreal, QLineF > >& vLines )
+ {
+   if ( !p )
+   {
+@@ -346,7 +346,7 @@ void QgsDecorationGrid::drawCoordinateAn
+   }
+ 
+   QString currentAnnotationString;
+-  QList< QPair< double, QLineF > >::const_iterator it = hLines.constBegin();
++  QList< QPair< qreal, QLineF > >::const_iterator it = hLines.constBegin();
+   for ( ; it != hLines.constEnd(); ++it )
+   {
+     currentAnnotationString = QString::number( it->first, 'f', mGridAnnotationPrecision );
+@@ -566,7 +566,7 @@ QPolygonF canvasExtent()
+   return poly;
+ }
+ 
+-int QgsDecorationGrid::xGridLines( QList< QPair< double, QLineF > >& lines ) const
++int QgsDecorationGrid::xGridLines( QList< QPair< qreal, QLineF > >& lines ) const
+ {
+   // prepare horizontal lines
+   lines.clear();
+@@ -612,7 +612,7 @@ int QgsDecorationGrid::xGridLines( QList
+   return 0;
+ }
+ 
+-int QgsDecorationGrid::yGridLines( QList< QPair< double, QLineF > >& lines ) const
++int QgsDecorationGrid::yGridLines( QList< QPair< qreal, QLineF > >& lines ) const
+ {
+   // prepare vertical lines
+ 
+--- a/src/app/qgsdecorationgrid.h
++++ b/src/app/qgsdecorationgrid.h
+@@ -199,7 +199,7 @@ class APP_EXPORT QgsDecorationGrid: publ
+         @param p drawing painter
+     @param hLines horizontal coordinate lines in item coordinates
+         @param vLines vertical coordinate lines in item coordinates*/
+-    void drawCoordinateAnnotations( QPainter* p, const QList< QPair< double, QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines );
++    void drawCoordinateAnnotations( QPainter* p, const QList< QPair< qreal, QLineF > >& hLines, const QList< QPair< qreal, QLineF > >& vLines );
+     void drawCoordinateAnnotation( QPainter* p, const QPointF& pos, QString annotationString );
+     /**Draws a single annotation
+         @param p drawing painter
+@@ -209,10 +209,10 @@ class APP_EXPORT QgsDecorationGrid: publ
+     void drawAnnotation( QPainter* p, const QPointF& pos, int rotation, const QString& annotationText );
+     /**Returns the grid lines with associated coordinate value
+         @return 0 in case of success*/
+-    int xGridLines( QList< QPair< double, QLineF > >& lines ) const;
++    int xGridLines( QList< QPair< qreal, QLineF > >& lines ) const;
+     /**Returns the grid lines for the y-coordinates. Not vertical in case of rotation
+         @return 0 in case of success*/
+-    int yGridLines( QList< QPair< double, QLineF > >& lines ) const;
++    int yGridLines( QList< QPair< qreal, QLineF > >& lines ) const;
+     /**Returns the item border of a point (in item coordinates)*/
+     Border borderForLineCoord( const QPointF& point, QPainter* p ) const;
+ 
+--- a/src/app/qgsmapmouseevent.cpp
++++ b/src/app/qgsmapmouseevent.cpp
+@@ -86,8 +86,7 @@ void QgsMapMouseEvent::snapPoint()
+ 
+ QPoint QgsMapMouseEvent::mapToPixelCoordinates( QgsMapCanvas* canvas, const QgsPoint& point )
+ {
+-  double x = point.x();
+-  double y = point.y();
++  qreal x = point.x(), y = point.y();
+ 
+   canvas->mapSettings().mapToPixel().transformInPlace( x, y );
+ 
+--- a/src/core/composer/qgscomposermapgrid.cpp
++++ b/src/core/composer/qgscomposermapgrid.cpp
+@@ -1838,7 +1838,7 @@ bool QgsComposerMapGrid::shouldShowDivis
+          || ( mode == QgsComposerMapGrid::LongitudeOnly && coordinate == QgsComposerMapGrid::Longitude );
+ }
+ 
+-bool sortByDistance( const QPair<double, QgsComposerMapGrid::BorderSide>& a, const QPair<double, QgsComposerMapGrid::BorderSide>& b )
++bool sortByDistance( const QPair<qreal , QgsComposerMapGrid::BorderSide>& a, const QPair<qreal , QgsComposerMapGrid::BorderSide>& b )
+ {
+   return a.first < b.first;
+ }
+@@ -1885,7 +1885,7 @@ QgsComposerMapGrid::BorderSide QgsCompos
+   }
+ 
+   //otherwise, guess side based on closest map side to point
+-  QList< QPair<double, QgsComposerMapGrid::BorderSide > > distanceToSide;
++  QList< QPair<qreal, QgsComposerMapGrid::BorderSide > > distanceToSide;
+   distanceToSide << qMakePair( p.x(), QgsComposerMapGrid::Left );
+   distanceToSide << qMakePair( mComposerMap->rect().width() - p.x(), QgsComposerMapGrid::Right );
+   distanceToSide << qMakePair( p.y(), QgsComposerMapGrid::Top );
+--- a/src/core/qgsgeometry.cpp
++++ b/src/core/qgsgeometry.cpp
+@@ -4679,7 +4679,7 @@ bool QgsGeometry::convertToMultiType()
+ 
+ void QgsGeometry::transformVertex( QgsWkbPtr &wkbPtr, const QTransform& trans, bool hasZValue )
+ {
+-  double x, y, rotated_x, rotated_y;
++  qreal x, y, rotated_x, rotated_y;
+ 
+   QgsWkbPtr tmp = wkbPtr;
+   tmp >> x >> y;
+--- a/src/core/qgsgeometry.h
++++ b/src/core/qgsgeometry.h
+@@ -686,12 +686,18 @@ class CORE_EXPORT QgsWkbPtr
+     inline const QgsWkbPtr &operator>>( unsigned int &v ) const { memcpy( &v, mP, sizeof( v ) ); mP += sizeof( v ); return *this; }
+     inline const QgsWkbPtr &operator>>( char &v ) const { memcpy( &v, mP, sizeof( v ) ); mP += sizeof( v ); return *this; }
+     inline const QgsWkbPtr &operator>>( QGis::WkbType &v ) const { memcpy( &v, mP, sizeof( v ) ); mP += sizeof( v ); return *this; }
++#ifdef QT_ARCH_ARM
++    inline const QgsWkbPtr &operator>>( qreal &v ) const { double d; memcpy( &d, mP, sizeof( d ) ); mP += sizeof( d ); v=d; return *this; }
++#endif
+ 
+     inline QgsWkbPtr &operator<<( const double &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
+     inline QgsWkbPtr &operator<<( const int &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
+     inline QgsWkbPtr &operator<<( const unsigned int &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
+     inline QgsWkbPtr &operator<<( const char &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
+     inline QgsWkbPtr &operator<<( const QGis::WkbType &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
++#ifdef QT_ARCH_ARM
++    inline QgsWkbPtr &operator<<( const qreal &v ) { double d = v; memcpy( mP, &d, sizeof( d ) ); mP += sizeof( d ); return *this; }
++#endif
+ 
+     inline void operator+=( int n ) { mP += n; }
+ 
+@@ -710,6 +716,9 @@ class CORE_EXPORT QgsConstWkbPtr
+     inline const QgsConstWkbPtr &operator>>( unsigned int &v ) const { memcpy( &v, mP, sizeof( v ) ); mP += sizeof( v ); return *this; }
+     inline const QgsConstWkbPtr &operator>>( char &v ) const { memcpy( &v, mP, sizeof( v ) ); mP += sizeof( v ); return *this; }
+     inline const QgsConstWkbPtr &operator>>( QGis::WkbType &v ) const { memcpy( &v, mP, sizeof( v ) ); mP += sizeof( v ); return *this; }
++#ifdef QT_ARCH_ARM
++    inline const QgsConstWkbPtr &operator>>( qreal &v ) const { double d; memcpy( &d, mP, sizeof( d ) ); mP += sizeof( d ); v=d; return *this; }
++#endif
+ 
+     inline void operator+=( int n ) { mP += n; }
+ 
+--- a/src/core/qgsmaptopixel.cpp
++++ b/src/core/qgsmaptopixel.cpp
+@@ -114,22 +114,18 @@ void QgsMapToPixel::updateMatrix()
+   mMatrix = QTransform::fromTranslate( cx, cy )
+             .rotate( rotation )
+             .scale( 1 / mMapUnitsPerPixel, -1 / mMapUnitsPerPixel )
+-            .translate( -xCenter, -yCenter )
+-            ;
++            .translate( -xCenter, -yCenter );
+ }
+ 
+-QgsPoint QgsMapToPixel::toMapPoint( double x, double y ) const
++QgsPoint QgsMapToPixel::toMapPoint( qreal x, qreal y ) const
+ {
+   bool invertible;
+   QTransform matrix = mMatrix.inverted( &invertible );
+   assert( invertible );
+-  double mx, my;
++  qreal mx, my;
+   matrix.map( x, y, &mx, &my );
+-  QgsPoint ret( mx, my );
+-
+   //QgsDebugMsg(QString("XXX toMapPoint x:%1 y:%2 -> x:%3 y:%4").arg(x).arg(y).arg(mx).arg(my));
+-
+-  return ret;
++  return QgsPoint( mx, my );
+ }
+ 
+ QgsPoint QgsMapToPixel::toMapCoordinates( QPoint p ) const
+@@ -232,42 +228,34 @@ QString QgsMapToPixel::showParameters()
+   << " rotation: " << mRotation
+   << " size: " << mWidth << "x" << mHeight;
+   return rep;
+-
+ }
+ 
+-
+-QgsPoint QgsMapToPixel::transform( double x, double y ) const
++QgsPoint QgsMapToPixel::transform( qreal x, qreal y ) const
+ {
+   transformInPlace( x, y );
+   return QgsPoint( x, y );
+ }
+ 
+-QgsPoint QgsMapToPixel::transform( const QgsPoint& p ) const
++QgsPoint QgsMapToPixel::transform( const QgsPoint &p ) const
+ {
+-  double dx = p.x();
+-  double dy = p.y();
+-  transformInPlace( dx, dy );
+-
++  qreal x = p.x(), y = p.y();
++  transformInPlace( x, y );
+ // QgsDebugMsg(QString("Point to pixel...X : %1-->%2, Y: %3 -->%4").arg(p.x()).arg(dx).arg(p.y()).arg(dy));
+-  return QgsPoint( dx, dy );
++  return QgsPoint( x, y );
+ }
+ 
+-void QgsMapToPixel::transform( QgsPoint* p ) const
++void QgsMapToPixel::transform( QgsPoint *p ) const
+ {
+-  double x = p->x();
+-  double y = p->y();
++  qreal x = p->x(), y = p->y();
+   transformInPlace( x, y );
+-
+-#ifdef QGISDEBUG
+ // QgsDebugMsg(QString("Point to pixel...X : %1-->%2, Y: %3 -->%4").arg(p->x()).arg(x).arg(p->y()).arg(y));
+-#endif
+   p->set( x, y );
+ }
+ 
+-void QgsMapToPixel::transformInPlace( qreal& x, qreal& y ) const
++void QgsMapToPixel::transformInPlace( qreal &x, qreal &y ) const
+ {
+   // Map 2 Pixel
+-  double mx, my;
++  qreal mx, my;
+   mMatrix.map( x, y, &mx, &my );
+   //QgsDebugMsg(QString("XXX transformInPlace X : %1-->%2, Y: %3 -->%4").arg(x).arg(mx).arg(y).arg(my));
+   x = mx; y = my;
+--- a/src/core/qgsmaptopixel.h
++++ b/src/core/qgsmaptopixel.h
+@@ -74,7 +74,7 @@ class CORE_EXPORT QgsMapToPixel
+      * @param y y coordinate of point to transform
+      * @return QgsPoint in device coordinates
+     */
+-    QgsPoint transform( double x, double y ) const;
++    QgsPoint transform( qreal x, qreal y ) const;
+     /*! Transform device coordinates to map (world) coordinates
+     * @param x x coordinate of point to be converted to map cooordinates
+     * @param y y coordinate of point to be converted to map cooordinates
+@@ -110,7 +110,7 @@ class CORE_EXPORT QgsMapToPixel
+      */
+     QgsPoint toMapCoordinates( QPoint p ) const;
+ 
+-    QgsPoint toMapPoint( double x, double y ) const;
++    QgsPoint toMapPoint( qreal x, qreal y ) const;
+ 
+     /*! Set map units per pixel
+     * @param mapUnitsPerPixel Map units per pixel
+--- a/src/core/qgspallabeling.cpp
++++ b/src/core/qgspallabeling.cpp
+@@ -2105,7 +2105,7 @@ void QgsPalLayerSettings::registerFeatur
+           QTransform t = QTransform::fromTranslate( center.x(), center.y() );
+           t.rotate( -m2p.mapRotation() );
+           t.translate( -center.x(), -center.y() );
+-          double xPosR, yPosR;
++          qreal xPosR, yPosR;
+           t.map( xPos, yPos, &xPosR, &yPosR );
+           xPos = xPosR; yPos = yPosR;
+         }
+--- a/src/core/qgspointlocator.cpp
++++ b/src/core/qgspointlocator.cpp
+@@ -268,6 +268,8 @@ struct _CohenSutherland
+           y = y0 + ( y1 - y0 ) * ( mRect.xMinimum() - x0 ) / ( x1 - x0 );
+           x = mRect.xMinimum();
+         }
++        else
++          break;
+ 
+         // Now we move outside point to intersection point to clip
+         // and get ready for next pass.
+@@ -536,13 +538,13 @@ class QgsPointLocator_DumpTree : public
+       if ( !n )
+         return;
+ 
+-      qDebug( "NODE: %ld", n->getIdentifier() );
++      QgsDebugMsg( QString( "NODE: %1" ).arg( n->getIdentifier() ) );
+       if ( n->getLevel() > 0 )
+       {
+         // inner nodes
+         for ( uint32_t cChild = 0; cChild < n->getChildrenCount(); cChild++ )
+         {
+-          qDebug( "- CH: %ld", n->getChildIdentifier( cChild ) );
++          QgsDebugMsg( QString( "- CH: %1" ).arg( n->getChildIdentifier( cChild ) ) );
+           ids.push( n->getChildIdentifier( cChild ) );
+         }
+       }
+@@ -551,7 +553,7 @@ class QgsPointLocator_DumpTree : public
+         // leaves
+         for ( uint32_t cChild = 0; cChild < n->getChildrenCount(); cChild++ )
+         {
+-          qDebug( "- L: %ld", n->getChildIdentifier( cChild ) );
++          QgsDebugMsg( QString( "- L: %1" ).arg( n->getChildIdentifier( cChild ) ) );
+         }
+       }
+ 
+--- a/src/core/symbology-ng/qgsrendererv2.cpp
++++ b/src/core/symbology-ng/qgsrendererv2.cpp
+@@ -39,10 +39,7 @@ const unsigned char* QgsFeatureRendererV
+ {
+   QgsConstWkbPtr wkbPtr( wkb + 1 );
+   unsigned int wkbType;
+-  wkbPtr >> wkbType;
+-
+-  double x, y;
+-  wkbPtr >> x >> y;
++  wkbPtr >> wkbType >> pt.rx() >> pt.ry();
+ 
+   if ( wkbType == QGis::WKBPoint25D )
+     wkbPtr += sizeof( double );
+@@ -50,12 +47,11 @@ const unsigned char* QgsFeatureRendererV
+   if ( context.coordinateTransform() )
+   {
+     double z = 0; // dummy variable for coordiante transform
+-    context.coordinateTransform()->transformInPlace( x, y, z );
++    context.coordinateTransform()->transformInPlace( pt.rx(), pt.ry(), z );
+   }
+ 
+-  context.mapToPixel().transformInPlace( x, y );
++  context.mapToPixel().transformInPlace( pt.rx(), pt.ry() );
+ 
+-  pt = QPointF( x, y );
+   return wkbPtr;
+ }
+ 
+@@ -65,7 +61,7 @@ const unsigned char* QgsFeatureRendererV
+   unsigned int wkbType, nPoints;
+   wkbPtr >> wkbType >> nPoints;
+ 
+-  bool hasZValue = ( wkbType == QGis::WKBLineString25D );
++  bool hasZValue = wkbType == QGis::WKBLineString25D;
+ 
+   double x, y;
+   const QgsCoordinateTransform* ct = context.coordinateTransform();
+--- a/src/gui/qgsmapcanvasitem.cpp
++++ b/src/gui/qgsmapcanvasitem.cpp
+@@ -63,7 +63,7 @@ QgsPoint QgsMapCanvasItem::toMapCoordina
+ 
+ QPointF QgsMapCanvasItem::toCanvasCoordinates( const QgsPoint& point ) const
+ {
+-  double x = point.x(), y = point.y();
++  qreal x = point.x(), y = point.y();
+   mMapCanvas->getCoordinateTransform()->transformInPlace( x, y );
+   return QPointF( x, y ) + mPanningOffset;
+ }
+--- a/src/gui/qgsmaptool.cpp
++++ b/src/gui/qgsmaptool.cpp
+@@ -68,7 +68,7 @@ QgsRectangle QgsMapTool::toLayerCoordina
+ 
+ QPoint QgsMapTool::toCanvasCoordinates( const QgsPoint& point )
+ {
+-  double x = point.x(), y = point.y();
++  qreal x = point.x(), y = point.y();
+   mCanvas->getCoordinateTransform()->transformInPlace( x, y );
+   return QPoint( qRound( x ), qRound( y ) );
+ }
+--- a/src/providers/wcs/qgswcsprovider.cpp
++++ b/src/providers/wcs/qgswcsprovider.cpp
+@@ -516,7 +516,7 @@ void QgsWcsProvider::readBlock( int band
+   // TODO: set block to null values, move that to function and call only if fails
+   memset( block, 0, pixelWidth * pixelHeight * QgsRasterBlock::typeSize( dataType( bandNo ) ) );
+ 
+-  // Requested extent must at least partialy overlap coverage extent, otherwise
++  // Requested extent must at least partially overlap coverage extent, otherwise
+   // server gives error. QGIS usually does not request blocks outside raster extent
+   // (higher level checks) but it is better to do check here as well
+   if ( !viewExtent.intersects( mCoverageExtent ) )
+--- a/tests/src/core/testqgsatlascomposition.cpp
++++ b/tests/src/core/testqgsatlascomposition.cpp
+@@ -308,13 +308,13 @@ void TestQgsAtlasComposition::predefined
+   mAtlasMap->setAtlasDriven( true );
+   mAtlasMap->setAtlasScalingMode( QgsComposerMap::Predefined );
+ 
+-  QVector<double> scales;
+-  scales << 1800000;
+-  scales << 5000000;
++  QVector<qreal> scales;
++  scales << 1800000.0;
++  scales << 5000000.0;
+   mAtlas->setPredefinedScales( scales );
+ 
+   {
+-    const QVector<double>& setScales = mAtlas->predefinedScales();
++    const QVector<qreal> &setScales = mAtlas->predefinedScales();
+     for ( int i = 0; i < setScales.size(); i++ )
+     {
+       QVERIFY( setScales[i] == scales[i] );
diff --git a/debian/patches/arm-qreal.patch b/debian/patches/arm-qreal.patch
deleted file mode 100644
index 3b23392..0000000
--- a/debian/patches/arm-qreal.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-Description: Fix FTBFS on arm* by casting doubles to qreal.
- In qt4 on arm architectures qreal is defined as float while on other
- architectures it is defined as double.
-Author: Bas Couwenberg <sebastic at debian.org>
-
---- a/src/core/symbology-ng/qgsrendererv2.cpp
-+++ b/src/core/symbology-ng/qgsrendererv2.cpp
-@@ -53,7 +53,10 @@ const unsigned char* QgsFeatureRendererV
-     context.coordinateTransform()->transformInPlace( x, y, z );
-   }
- 
--  context.mapToPixel().transformInPlace( x, y );
-+  qreal qx = (qreal) x;
-+  qreal qy = (qreal) y;
-+
-+  context.mapToPixel().transformInPlace( qx, qy );
- 
-   pt = QPointF( x, y );
-   return wkbPtr;
---- a/src/core/qgsgeometry.cpp
-+++ b/src/core/qgsgeometry.cpp
-@@ -4683,7 +4683,13 @@ void QgsGeometry::transformVertex( QgsWk
- 
-   QgsWkbPtr tmp = wkbPtr;
-   tmp >> x >> y;
--  trans.map( x, y, &rotated_x, &rotated_y );
-+
-+  qreal qx = (qreal) x;
-+  qreal qy = (qreal) y;
-+  qreal qrx = (qreal) rotated_x;
-+  qreal qry = (qreal) rotated_y;
-+
-+  trans.map( qx, qy, &qrx, &qry );
-   wkbPtr << rotated_x << rotated_y;
- 
-   if ( hasZValue )
---- a/src/core/qgsmaptopixel.cpp
-+++ b/src/core/qgsmaptopixel.cpp
-@@ -124,7 +124,16 @@ QgsPoint QgsMapToPixel::toMapPoint( doub
-   QTransform matrix = mMatrix.inverted( &invertible );
-   assert( invertible );
-   double mx, my;
--  matrix.map( x, y, &mx, &my );
-+
-+  qreal qx = (qreal) x;
-+  qreal qy = (qreal) y;
-+  qreal qmx, qmy;
-+
-+  matrix.map( qx, qy, &qmx, &qmy );
-+
-+  mx = (double) qmx;
-+  my = (double) qmy;
-+
-   QgsPoint ret( mx, my );
- 
-   //QgsDebugMsg(QString("XXX toMapPoint x:%1 y:%2 -> x:%3 y:%4").arg(x).arg(y).arg(mx).arg(my));
-@@ -238,7 +247,14 @@ QString QgsMapToPixel::showParameters()
- 
- QgsPoint QgsMapToPixel::transform( double x, double y ) const
- {
--  transformInPlace( x, y );
-+  qreal qx = (qreal) x;
-+  qreal qy = (qreal) y;
-+
-+  transformInPlace( qx, qy );
-+  
-+  x = (double) qx;
-+  y = (double) qy;
-+
-   return QgsPoint( x, y );
- }
- 
-@@ -246,7 +262,14 @@ QgsPoint QgsMapToPixel::transform( const
- {
-   double dx = p.x();
-   double dy = p.y();
--  transformInPlace( dx, dy );
-+  
-+  qreal qdx = (qreal) dx;
-+  qreal qdy = (qreal) dy;
-+
-+  transformInPlace( qdx, qdy );
-+
-+  dx = (double) qdx;
-+  dy = (double) qdy;
- 
- // QgsDebugMsg(QString("Point to pixel...X : %1-->%2, Y: %3 -->%4").arg(p.x()).arg(dx).arg(p.y()).arg(dy));
-   return QgsPoint( dx, dy );
-@@ -256,7 +279,14 @@ void QgsMapToPixel::transform( QgsPoint*
- {
-   double x = p->x();
-   double y = p->y();
--  transformInPlace( x, y );
-+
-+  qreal qx = (qreal) x;
-+  qreal qy = (qreal) y;
-+
-+  transformInPlace( qx, qy );
-+
-+  x = (double) qx;
-+  y = (double) qy;
- 
- #ifdef QGISDEBUG
- // QgsDebugMsg(QString("Point to pixel...X : %1-->%2, Y: %3 -->%4").arg(p->x()).arg(x).arg(p->y()).arg(y));
-@@ -267,7 +297,7 @@ void QgsMapToPixel::transform( QgsPoint*
- void QgsMapToPixel::transformInPlace( qreal& x, qreal& y ) const
- {
-   // Map 2 Pixel
--  double mx, my;
-+  qreal mx, my;
-   mMatrix.map( x, y, &mx, &my );
-   //QgsDebugMsg(QString("XXX transformInPlace X : %1-->%2, Y: %3 -->%4").arg(x).arg(mx).arg(y).arg(my));
-   x = mx; y = my;
---- a/src/core/qgspallabeling.cpp
-+++ b/src/core/qgspallabeling.cpp
-@@ -2106,7 +2106,16 @@ void QgsPalLayerSettings::registerFeatur
-           t.rotate( -m2p.mapRotation() );
-           t.translate( -center.x(), -center.y() );
-           double xPosR, yPosR;
--          t.map( xPos, yPos, &xPosR, &yPosR );
-+
-+          qreal qxPos = (qreal) xPos;
-+          qreal qyPos = (qreal) yPos;
-+          qreal qxPosR, qyPosR;
-+
-+          t.map( qxPos, qyPos, &qxPosR, &qyPosR );
-+
-+          xPosR = (double) qxPosR;
-+          yPosR = (double) qyPosR;
-+
-           xPos = xPosR; yPos = yPosR;
-         }
- 
---- a/src/core/composer/qgscomposermapgrid.cpp
-+++ b/src/core/composer/qgscomposermapgrid.cpp
-@@ -1886,10 +1886,10 @@ QgsComposerMapGrid::BorderSide QgsCompos
- 
-   //otherwise, guess side based on closest map side to point
-   QList< QPair<double, QgsComposerMapGrid::BorderSide > > distanceToSide;
--  distanceToSide << qMakePair( p.x(), QgsComposerMapGrid::Left );
--  distanceToSide << qMakePair( mComposerMap->rect().width() - p.x(), QgsComposerMapGrid::Right );
--  distanceToSide << qMakePair( p.y(), QgsComposerMapGrid::Top );
--  distanceToSide << qMakePair( mComposerMap->rect().height() - p.y(), QgsComposerMapGrid::Bottom );
-+  distanceToSide << qMakePair( (double)p.x(), QgsComposerMapGrid::Left );
-+  distanceToSide << qMakePair( (double)(mComposerMap->rect().width() - p.x()), QgsComposerMapGrid::Right );
-+  distanceToSide << qMakePair( (double)p.y(), QgsComposerMapGrid::Top );
-+  distanceToSide << qMakePair( (double)(mComposerMap->rect().height() - p.y()), QgsComposerMapGrid::Bottom );
- 
-   qSort( distanceToSide.begin(), distanceToSide.end(), sortByDistance );
-   return distanceToSide.at( 0 ).second;
---- a/src/gui/qgsmapcanvasitem.cpp
-+++ b/src/gui/qgsmapcanvasitem.cpp
-@@ -63,7 +63,7 @@ QgsPoint QgsMapCanvasItem::toMapCoordina
- 
- QPointF QgsMapCanvasItem::toCanvasCoordinates( const QgsPoint& point ) const
- {
--  double x = point.x(), y = point.y();
-+  qreal x = point.x(), y = point.y();
-   mMapCanvas->getCoordinateTransform()->transformInPlace( x, y );
-   return QPointF( x, y ) + mPanningOffset;
- }
---- a/src/gui/qgsmaptool.cpp
-+++ b/src/gui/qgsmaptool.cpp
-@@ -68,7 +68,7 @@ QgsRectangle QgsMapTool::toLayerCoordina
- 
- QPoint QgsMapTool::toCanvasCoordinates( const QgsPoint& point )
- {
--  double x = point.x(), y = point.y();
-+  qreal x = point.x(), y = point.y();
-   mCanvas->getCoordinateTransform()->transformInPlace( x, y );
-   return QPoint( qRound( x ), qRound( y ) );
- }
---- a/src/app/qgsdecorationgrid.cpp
-+++ b/src/app/qgsdecorationgrid.cpp
-@@ -605,7 +605,7 @@ int QgsDecorationGrid::xGridLines( QList
-     QLineF line( p0, p1 );
-     clipByRect( line, canvasPoly );
-     line = QLineF( m2p.transform( QgsPoint( line.pointAt( 0 ) ) ).toQPointF(), m2p.transform( QgsPoint( line.pointAt( 1 ) ) ).toQPointF() );
--    lines.push_back( qMakePair( p0.y(), line ) );
-+    lines.push_back( qMakePair( (double)p0.y(), line ) );
-     dist += mGridIntervalY;
-   }
- 
-@@ -652,7 +652,7 @@ int QgsDecorationGrid::yGridLines( QList
-     QLineF line( p0, p1 );
-     clipByRect( line, canvasPoly );
-     line = QLineF( m2p.transform( QgsPoint( line.pointAt( 0 ) ) ).toQPointF(), m2p.transform( QgsPoint( line.pointAt( 1 ) ) ).toQPointF() );
--    lines.push_back( qMakePair( p0.x(), line ) );
-+    lines.push_back( qMakePair( (double)p0.x(), line ) );
-     dist += mGridIntervalX;
-   }
- 
---- a/src/app/qgsmapmouseevent.cpp
-+++ b/src/app/qgsmapmouseevent.cpp
-@@ -86,8 +86,8 @@ void QgsMapMouseEvent::snapPoint()
- 
- QPoint QgsMapMouseEvent::mapToPixelCoordinates( QgsMapCanvas* canvas, const QgsPoint& point )
- {
--  double x = point.x();
--  double y = point.y();
-+  qreal x = point.x();
-+  qreal y = point.y();
- 
-   canvas->mapSettings().mapToPixel().transformInPlace( x, y );
- 
diff --git a/debian/patches/series b/debian/patches/series
index 04f93b5..23b8638 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,6 +4,6 @@ disable-doxygen.patch
 developersmap-use-debian-package.patch
 exclude-dxf2shp-plugin.patch
 exclude-elvensword-resources.patch
-arm-qreal.patch
+0001-fix-arm-build.patch
 0001-processing-correctly-handle-tiny-polygons-smaller-th.patch
 0001-backport-ada01603cb7b10786436aa0ed2361743b52ce48f.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/qgis.git



More information about the Pkg-grass-devel mailing list