Restore ARM build (Sandro Mani)

This commit is contained in:
Volker Fröhlich 2014-07-29 08:04:08 +02:00
parent 86ac0a8a4c
commit c2afe39d97
2 changed files with 121 additions and 2 deletions

96
qgis-2.4.0-qreal.patch Normal file
View File

@ -0,0 +1,96 @@
diff -rupN qgis-2.4.0/python/core/composer/qgsatlascomposition.sip qgis-2.4.0-new/python/core/composer/qgsatlascomposition.sip
--- qgis-2.4.0/python/core/composer/qgsatlascomposition.sip 2014-06-27 14:00:08.000000000 +0200
+++ qgis-2.4.0-new/python/core/composer/qgsatlascomposition.sip 2014-07-27 00:10:44.629582944 +0200
@@ -155,7 +155,7 @@ public:
* @see setPredefinedScales
* @see QgsComposerMap::atlasScalingMode
*/
- const QVector<double>& predefinedScales() const;
+ const QVector<qreal>& predefinedScales() const;
/**Sets the list of predefined scales for the atlas. This is used
* for maps which are set to the predefined atlas scaling mode.
@@ -163,7 +163,7 @@ public:
* @see predefinedScales
* @see QgsComposerMap::atlasScalingMode
*/
- void setPredefinedScales( const QVector<double>& scales );
+ void setPredefinedScales( const QVector<qreal>& scales );
/** Begins the rendering. Returns true if successful, false if no matching atlas
features found.*/
diff -rupN qgis-2.4.0/src/app/composer/qgscomposer.cpp qgis-2.4.0-new/src/app/composer/qgscomposer.cpp
--- qgis-2.4.0/src/app/composer/qgscomposer.cpp 2014-06-27 14:00:08.000000000 +0200
+++ qgis-2.4.0-new/src/app/composer/qgscomposer.cpp 2014-07-27 00:10:29.977583595 +0200
@@ -3594,7 +3594,7 @@ void QgsComposer::loadAtlasPredefinedSca
return;
}
QgsAtlasComposition& atlasMap = mComposition->atlasComposition();
- QVector<double> pScales;
+ QVector<qreal> pScales;
// first look at project's scales
QStringList scales( QgsProject::instance()->readListEntry( "Scales", "/ScalesList" ) );
bool hasProjectScales( QgsProject::instance()->readBoolEntry( "Scales", "/useProjectScales" ) );
diff -rupN qgis-2.4.0/src/core/composer/qgsatlascomposition.cpp qgis-2.4.0-new/src/core/composer/qgsatlascomposition.cpp
--- qgis-2.4.0/src/core/composer/qgsatlascomposition.cpp 2014-06-27 14:00:08.000000000 +0200
+++ qgis-2.4.0-new/src/core/composer/qgsatlascomposition.cpp 2014-07-27 00:10:32.027583504 +0200
@@ -491,7 +491,7 @@ void QgsAtlasComposition::prepareMap( Qg
// choose one of the predefined scales
double newWidth = mOrigExtent.width();
double newHeight = mOrigExtent.height();
- const QVector<double>& scales = mPredefinedScales;
+ const QVector<qreal>& scales = mPredefinedScales;
for ( int i = 0; i < scales.size(); i++ )
{
double ratio = scales[i] / originalScale;
@@ -747,7 +747,7 @@ bool QgsAtlasComposition::evalFeatureFil
return true;
}
-void QgsAtlasComposition::setPredefinedScales( const QVector<double>& scales )
+void QgsAtlasComposition::setPredefinedScales( const QVector<qreal>& scales )
{
mPredefinedScales = scales;
// make sure the list is sorted
diff -rupN qgis-2.4.0/src/core/composer/qgsatlascomposition.h qgis-2.4.0-new/src/core/composer/qgsatlascomposition.h
--- qgis-2.4.0/src/core/composer/qgsatlascomposition.h 2014-06-27 14:00:08.000000000 +0200
+++ qgis-2.4.0-new/src/core/composer/qgsatlascomposition.h 2014-07-27 00:10:33.057583458 +0200
@@ -183,7 +183,7 @@ class CORE_EXPORT QgsAtlasComposition :
* @see setPredefinedScales
* @see QgsComposerMap::atlasScalingMode
*/
- const QVector<double>& predefinedScales() const { return mPredefinedScales; }
+ const QVector<qreal>& predefinedScales() const { return mPredefinedScales; }
/**Sets the list of predefined scales for the atlas. This is used
* for maps which are set to the predefined atlas scaling mode.
@@ -191,7 +191,7 @@ class CORE_EXPORT QgsAtlasComposition :
* @see predefinedScales
* @see QgsComposerMap::atlasScalingMode
*/
- void setPredefinedScales( const QVector<double>& scales );
+ void setPredefinedScales( const QVector<qreal>& scales );
/** Begins the rendering. Returns true if successful, false if no matching atlas
features found.*/
@@ -320,7 +320,7 @@ class CORE_EXPORT QgsAtlasComposition :
void computeExtent( QgsComposerMap *map );
//list of predefined scales
- QVector<double> mPredefinedScales;
+ QVector<qreal> mPredefinedScales;
};
#endif
diff -rupN qgis-2.4.0/src/gui/qgscomposerview.cpp qgis-2.4.0-new/src/gui/qgscomposerview.cpp
--- qgis-2.4.0/src/gui/qgscomposerview.cpp 2014-06-27 14:00:08.000000000 +0200
+++ qgis-2.4.0-new/src/gui/qgscomposerview.cpp 2014-07-26 21:40:14.809984197 +0200
@@ -869,7 +869,7 @@ void QgsComposerView::mouseReleaseEvent(
else
{
QgsComposerAttributeTable* newTable = new QgsComposerAttributeTable( composition() );
- newTable->setSceneRect( QRectF( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), qMax( mRubberBandItem->rect().height(), 15.0 ) ) );
+ newTable->setSceneRect( QRectF( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), qMax( mRubberBandItem->rect().height(), qreal(15.0) ) ) );
QList<const QgsComposerMap*> mapItemList = composition()->composerMapItems();
if ( mapItemList.size() > 0 )
{

View File

@ -17,7 +17,7 @@
Name: qgis Name: qgis
Version: 2.4.0 Version: 2.4.0
Release: 2%{?dist} Release: 3%{?dist}
Summary: A user friendly Open Source Geographic Information System Summary: A user friendly Open Source Geographic Information System
Group: Applications/Engineering Group: Applications/Engineering
@ -43,6 +43,25 @@ Patch0: %{name}-2.4.0-grass.patch
# Drop -o option from SIP, as versions older than 4.10 don't have it # Drop -o option from SIP, as versions older than 4.10 don't have it
Patch1: %{name}-2.4.0-sip.patch Patch1: %{name}-2.4.0-sip.patch
# Restore ARM build
# Thanks to Sandro Mani for supplying this patch:
#>This patch should not cause any problems for other arches, since qreal is double for those, hence no change.
#>
#>The patch is not upstream yet. The part with the
#>
#>qMax( mRubberBandItem->rect().height(), qreal(15.0) )
#>
#>is clean and ok and can be upstreamed. The rest is all because sip errors out in core/composer/qgsatlascomposition.sip on
#>
#>const QVector<double>& predefinedScales()
#>
#>with the error
#>
#>unsupported function return type - provide %MethodCode and a C++ signature.
#>
#>I'm not really sure why this is the case though, since double exists on ARM, it is just qreal which is not typedefed for double but for float.
Patch2: %{name}-2.4.0-qreal.patch
# Some plug-ins need Pyspatialite (bundled) # Some plug-ins need Pyspatialite (bundled)
# The license is not totally clear, see: # The license is not totally clear, see:
# http://code.google.com/p/pyspatialite/issues/detail?id=3 # http://code.google.com/p/pyspatialite/issues/detail?id=3
@ -177,6 +196,7 @@ Please refer to %{name}-mapserver-README.fedora for details!
%setup -q %setup -q
%patch0 -p1 -b .grass~ %patch0 -p1 -b .grass~
%patch1 -p1 -b .sip~ %patch1 -p1 -b .sip~
%patch2 -p1 -b .qreal~
# Solved for releases after 2.4.0 # Solved for releases after 2.4.0
chmod -x src/gui/qgscolorbutton.cpp src/core/composer/qgscomposershape.h \ chmod -x src/gui/qgscolorbutton.cpp src/core/composer/qgscomposershape.h \
@ -393,8 +413,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog %changelog
* Mon Jul 28 2014 Volker Fröhlich <volker27@gmx.at> - 2.4.0-3
- Restore ARM build (Thanks to Sandro Mani for the patch!)
* Fri Jul 25 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.4.0-2 * Fri Jul 25 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.4.0-2
rebuild (libspatialite) - rebuild (libspatialite)
* Sat Jun 28 2014 Volker Fröhlich <volker27@gmx.at> - 2.4.0-1 * Sat Jun 28 2014 Volker Fröhlich <volker27@gmx.at> - 2.4.0-1
- New upstream release, drop obsolete patches, update remaining - New upstream release, drop obsolete patches, update remaining