Fix the build on ARMv7hl, thanks to Sandro Mani!

- Updated the removing of executable permissions from source code files
- Add qscintilla-python-devel as BR
- Don't build the dxf converter plug-in
- Remove the Python directory definitions that were necessary on EL5
This commit is contained in:
Volker Fröhlich 2014-11-13 01:08:31 +01:00
parent 1808355c58
commit 5fdefefee9
3 changed files with 68 additions and 52 deletions

47
qgis-2.6.0-qreal.patch Normal file
View File

@ -0,0 +1,47 @@
diff -rupN qgis-2.6.0/src/core/composer/qgscomposerhtml.cpp qgis-2.6.0-new/src/core/composer/qgscomposerhtml.cpp
--- qgis-2.6.0/src/core/composer/qgscomposerhtml.cpp 2014-10-31 15:17:19.000000000 +0100
+++ qgis-2.6.0-new/src/core/composer/qgscomposerhtml.cpp 2014-11-12 14:22:46.152730089 +0100
@@ -233,7 +233,7 @@ double QgsComposerHtml::maxFrameWidth()
QList<QgsComposerFrame*>::const_iterator frameIt = mFrameItems.constBegin();
for ( ; frameIt != mFrameItems.constEnd(); ++frameIt )
{
- maxWidth = qMax( maxWidth, ( *frameIt )->boundingRect().width() );
+ maxWidth = qMax( maxWidth, ( double ) ( ( *frameIt )->boundingRect().width() ) );
}
return maxWidth;
diff -rupN qgis-2.6.0/src/core/layertree/qgslayertreemodellegendnode.cpp qgis-2.6.0-new/src/core/layertree/qgslayertreemodellegendnode.cpp
--- qgis-2.6.0/src/core/layertree/qgslayertreemodellegendnode.cpp 2014-10-31 15:17:19.000000000 +0100
+++ qgis-2.6.0-new/src/core/layertree/qgslayertreemodellegendnode.cpp 2014-11-12 14:20:59.325919209 +0100
@@ -62,7 +62,7 @@ QgsLayerTreeModelLegendNode::ItemMetrics
// itemHeight here is not realy item height, it is only for symbol
// vertical alignment purpose, i.e. ok take single line height
// if there are more lines, thos run under the symbol
- double itemHeight = qMax( settings.symbolSize().height(), textHeight );
+ double itemHeight = qMax( ( double ) settings.symbolSize().height(), textHeight );
ItemMetrics im;
im.symbolSize = drawSymbol( settings, ctx, itemHeight );
@@ -334,8 +334,8 @@ QSizeF QgsSymbolV2LegendNode::drawSymbol
p->restore();
}
- return QSizeF( qMax( width + 2 * widthOffset, settings.symbolSize().width() ),
- qMax( height + 2 * heightOffset, settings.symbolSize().height() ) );
+ return QSizeF( qMax( width + 2 * widthOffset, ( double ) settings.symbolSize().width() ),
+ qMax( height + 2 * heightOffset, ( double ) settings.symbolSize().height() ) );
}
diff -rupN qgis-2.6.0/src/core/qgslegendrenderer.cpp qgis-2.6.0-new/src/core/qgslegendrenderer.cpp
--- qgis-2.6.0/src/core/qgslegendrenderer.cpp 2014-10-31 15:17:19.000000000 +0100
+++ qgis-2.6.0-new/src/core/qgslegendrenderer.cpp 2014-11-12 14:21:35.895213582 +0100
@@ -375,7 +375,7 @@ QSizeF QgsLegendRenderer::drawTitle( QPa
switch ( halignment )
{
case Qt::AlignHCenter:
- textBoxWidth = ( qMin( point.x(), legendWidth - point.x() ) - mSettings.boxSpace() ) * 2.0;
+ textBoxWidth = ( qMin( ( double ) point.x(), legendWidth - point.x() ) - mSettings.boxSpace() ) * 2.0;
textBoxLeft = point.x() - textBoxWidth / 2.;
break;
case Qt::AlignRight:

View File

@ -1,38 +0,0 @@
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 5223038..099d881 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -132,7 +132,7 @@ ENDIF(NOT PYQT4_VERSION_NUM LESS 264453)
# core module
FILE(GLOB_RECURSE sip_files_core core/*.sip)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core})
-SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.core.api)
+SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -a ${CMAKE_BINARY_DIR}/python/qgis.core.api)
ADD_SIP_PYTHON_MODULE(qgis._core core/core.sip qgis_core)
# additional gui includes
@@ -147,7 +147,7 @@ INCLUDE_DIRECTORIES(
# gui module
FILE(GLOB_RECURSE sip_files_gui gui/*.sip)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_gui})
-SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.gui.api)
+SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -a ${CMAKE_BINARY_DIR}/python/qgis.gui.api)
IF(QSCI_SIP_DIR)
SET(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -I ${QSCI_SIP_DIR})
ELSE(QSCI_SIP_DIR)
@@ -182,13 +182,13 @@ FILE(GLOB sip_files_analysis
analysis/interpolation/*.sip
)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_analysis})
-SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.analysis.api)
+SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -a ${CMAKE_BINARY_DIR}/python/qgis.analysis.api)
ADD_SIP_PYTHON_MODULE(qgis._analysis analysis/analysis.sip qgis_core qgis_analysis)
# network-analysis module
FILE(GLOB_RECURSE sip_files_network_analysis analysis/network/*.sip)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_network_analysis})
-SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.networkanalysis.api)
+SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -a ${CMAKE_BINARY_DIR}/python/qgis.networkanalysis.api)
ADD_SIP_PYTHON_MODULE(qgis._networkanalysis analysis/network/networkanalysis.sip qgis_core qgis_networkanalysis)
SET(QGIS_PYTHON_DIR ${PYTHON_SITE_PACKAGES_DIR}/qgis)

View File

@ -1,10 +1,6 @@
# Shared lib calls exit # Shared lib calls exit
# https://hub.qgis.org/issues/2854 # https://hub.qgis.org/issues/2854
%if 0%{?rhel} < 6
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
# libspatialite is present for PPC and PPC64 in Fedora and EL7, but not in older EL # libspatialite is present for PPC and PPC64 in Fedora and EL7, but not in older EL
%global configure_with_spatialite -D WITH_QSPATIALITE:BOOL=TRUE -D WITH_INTERNAL_SPATIALITE:BOOL=FALSE %global configure_with_spatialite -D WITH_QSPATIALITE:BOOL=TRUE -D WITH_INTERNAL_SPATIALITE:BOOL=FALSE
%if 0%{?rhel} <= 6 %if 0%{?rhel} <= 6
@ -17,7 +13,7 @@
Name: qgis Name: qgis
Version: 2.6.0 Version: 2.6.0
Release: 1%{?dist} Release: 2%{?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
@ -40,8 +36,8 @@ Source5: %{name}-mime.xml
# Fix detection problem for GRASS libraries # Fix detection problem for GRASS libraries
Patch0: %{name}-2.4.0-grass.patch Patch0: %{name}-2.4.0-grass.patch
# Drop -o option from SIP, as versions older than 4.10 don't have it # Provided by Sandro Mani, not submitted yet
Patch1: %{name}-2.6.0-sip.patch Patch1: %{name}-2.6.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:
@ -76,6 +72,7 @@ BuildRequires: PyQwt-devel
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: qextserialport-devel BuildRequires: qextserialport-devel
BuildRequires: qscintilla-devel BuildRequires: qscintilla-devel
BuildRequires: qscintilla-python-devel
BuildRequires: qt4-devel BuildRequires: qt4-devel
BuildRequires: qt4-webkit-devel BuildRequires: qt4-webkit-devel
BuildRequires: qwt-devel BuildRequires: qwt-devel
@ -176,21 +173,24 @@ Please refer to %{name}-mapserver-README.fedora for details!
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .grass~ %patch0 -p1 -b .grass~
%patch1 -p1 -b .sip~ %patch1 -p1 -b .qreal~
# Solved for releases after 2.4.0 # Remove executable permissions from source code files
chmod -x src/gui/qgscolorbutton.cpp src/core/composer/qgscomposershape.h \ find . \( -name "*.cpp" -o -name "*.h" \) -type f -perm /111 -execdir chmod -x {} \+
src/app/qgisapp.h src/gui/qgscolorbutton.h src/gui/qgsmapcanvas.h
# Readme file for QGIS mapserver configuration and Lighttpd example # Readme file for QGIS mapserver configuration and Lighttpd example
install -pm0644 %{SOURCE4} . install -pm0644 %{SOURCE4} .
# Delete bundled libs # Delete bundled libs
rm -rf src/core/spatialite rm -rf src/core/spatialite/
rm -rf src/core/gps/qwtpolar-{0.1,1.0} rm -rf src/core/gps/qwtpolar-{0.1,1.0}/
rm -rf src/core/gps/qextserialport rm -rf src/core/gps/qextserialport/
rm -rf src/core/gps/qextserialport/
rm -rf "python/ext-libs/!(CMakeLists.txt|tests)" rm -rf "python/ext-libs/!(CMakeLists.txt|tests)"
rm -rf src/plugins/dxf2shp_converter/
sed -i '/dxf2shp_converter/d' src/plugins/CMakeLists.txt
gzip ChangeLog gzip ChangeLog
@ -393,6 +393,13 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%changelog %changelog
* Sun Nov 2 2014 Volker Fröhlich <volker27@gmx.at> - 2.6.0-2
- Fix the build on ARMv7hl, thanks to Sandro Mani!
- Updated the removing of executable permissions from source code files
- Add qscintilla-python-devel as BR
- Don't build the dxf converter plug-in
- Remove the Python directory definitions that were necessary on EL5
* Sun Nov 2 2014 Volker Fröhlich <volker27@gmx.at> - 2.6.0-1 * Sun Nov 2 2014 Volker Fröhlich <volker27@gmx.at> - 2.6.0-1
- New upstream release, drop obsolete patch, update the sip patch - New upstream release, drop obsolete patch, update the sip patch