Solve build issues with SIP 4.15

This commit is contained in:
Volker Fröhlich 2013-10-19 21:16:32 +02:00
parent e09e205560
commit acb30eec9e
3 changed files with 207 additions and 5 deletions

160
qgis-2.0.1-sip-4.15.patch Normal file
View File

@ -0,0 +1,160 @@
diff -ur qgis-2.0.1/python/CMakeLists.txt qgis-2.0.1-sip/python/CMakeLists.txt
--- qgis-2.0.1/python/CMakeLists.txt 2013-09-11 01:06:52.000000000 +0200
+++ qgis-2.0.1-sip/python/CMakeLists.txt 2013-10-19 20:49:29.597349650 +0200
@@ -75,7 +75,7 @@
# 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
@@ -90,7 +90,13 @@
# 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(UNIX AND NOT SIP_VERSION_NUM LESS 265984)
+ SET(SIP_EXTRA_OPTIONS -P ${SIP_EXTRA_OPTIONS})
+ ADD_DEFINITIONS(-Dprotected=public)
+ENDIF(UNIX AND NOT SIP_VERSION_NUM LESS 265984)
+
ADD_SIP_PYTHON_MODULE(qgis.gui gui/gui.sip qgis_core qgis_gui)
# additional analysis includes
@@ -113,13 +119,13 @@
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)
Only in qgis-2.0.1-sip/python: CMakeLists.txt.orig
Only in qgis-2.0.1-sip/python: CMakeLists.txt.rej
diff -ur qgis-2.0.1/python/gui/qgsmaptooltouch.sip qgis-2.0.1-sip/python/gui/qgsmaptooltouch.sip
--- qgis-2.0.1/python/gui/qgsmaptooltouch.sip 2013-09-11 01:06:52.000000000 +0200
+++ qgis-2.0.1-sip/python/gui/qgsmaptooltouch.sip 2013-10-19 20:47:47.412374663 +0200
@@ -24,5 +24,7 @@
virtual void canvasDoubleClickEvent( QMouseEvent * e );
virtual bool isTransient();
+
+ bool gestureEvent( QGestureEvent *event );
};
%End
Only in qgis-2.0.1-sip: qgis-2.0.1
diff -ur qgis-2.0.1/src/core/qgsmaplayerregistry.h qgis-2.0.1-sip/src/core/qgsmaplayerregistry.h
--- qgis-2.0.1/src/core/qgsmaplayerregistry.h 2013-09-11 01:06:52.000000000 +0200
+++ qgis-2.0.1-sip/src/core/qgsmaplayerregistry.h 2013-10-19 20:47:47.410374765 +0200
@@ -239,6 +239,11 @@
//! protected constructor
QgsMapLayerRegistry( QObject * parent = 0 );
+ /** debugging member
+ invoked when a connect() is made to this object
+ */
+ void connectNotify( const char * signal );
+
private:
static QgsMapLayerRegistry* mInstance;
@@ -246,10 +251,6 @@
QMap<QString, QgsMapLayer*> mMapLayers;
QSet<QgsMapLayer*> mOwnedLayers;
- /** debugging member
- invoked when a connect() is made to this object
- */
- void connectNotify( const char * signal );
}; // class QgsMapLayerRegistry
diff -ur qgis-2.0.1/src/gui/qgsattributedialog.h qgis-2.0.1-sip/src/gui/qgsattributedialog.h
--- qgis-2.0.1/src/gui/qgsattributedialog.h 2013-09-11 01:06:52.000000000 +0200
+++ qgis-2.0.1-sip/src/gui/qgsattributedialog.h 2013-10-19 20:47:47.410374765 +0200
@@ -59,9 +59,10 @@
void dialogDestroyed();
- private:
+ protected:
bool eventFilter( QObject *obj, QEvent *event );
+ private:
QDialog *mDialog;
QString mSettingsPath;
// Used to sync multiple widgets for the same field
diff -ur qgis-2.0.1/src/gui/qgsmapcanvas.h qgis-2.0.1-sip/src/gui/qgsmapcanvas.h
--- qgis-2.0.1/src/gui/qgsmapcanvas.h 2013-09-11 01:06:52.000000000 +0200
+++ qgis-2.0.1-sip/src/gui/qgsmapcanvas.h 2013-10-19 20:47:47.411374714 +0200
@@ -410,6 +410,11 @@
/// Handle pattern for implementation object
std::auto_ptr<CanvasProperties> mCanvasProperties;
+ /**debugging member
+ invoked when a connect() is made to this object
+ */
+ void connectNotify( const char * signal );
+
private slots:
void crsTransformEnabled( bool );
@@ -459,11 +464,6 @@
the last entry in case a lot of resize events arrive in short time*/
QList< QPair<int, int> > mResizeQueue;
- /**debugging member
- invoked when a connect() is made to this object
- */
- void connectNotify( const char * signal );
-
//! current layer in legend
QgsMapLayer* mCurrentLayer;
diff -ur qgis-2.0.1/src/gui/qgsmaptooltouch.h qgis-2.0.1-sip/src/gui/qgsmaptooltouch.h
--- qgis-2.0.1/src/gui/qgsmaptooltouch.h 2013-09-11 01:06:52.000000000 +0200
+++ qgis-2.0.1-sip/src/gui/qgsmaptooltouch.h 2013-10-19 20:47:47.412374663 +0200
@@ -49,13 +49,14 @@
virtual bool isTransient() { return true; }
+ bool gestureEvent( QGestureEvent *event );
+
private:
//! Flag to indicate a map canvas drag operation is taking place
bool mDragging;
//! Flag to indicate a pinch gesture is taking place
bool mPinching;
- bool gestureEvent( QGestureEvent *event );
void pinchTriggered( QPinchGesture *gesture );
};
diff -ur qgis-2.0.1/src/gui/qgsmessagelogviewer.h qgis-2.0.1-sip/src/gui/qgsmessagelogviewer.h
--- qgis-2.0.1/src/gui/qgsmessagelogviewer.h 2013-09-11 01:06:52.000000000 +0200
+++ qgis-2.0.1-sip/src/gui/qgsmessagelogviewer.h 2013-10-19 20:47:47.411374714 +0200
@@ -42,10 +42,11 @@
public slots:
void logMessage( QString message, QString tag, QgsMessageLog::MessageLevel level );
- private:
+ protected:
void showEvent( QShowEvent * );
void hideEvent( QHideEvent * );
+ private:
QToolButton *mButton;
int mCount;

27
qgis-2.0.1-sip-8601.patch Normal file
View File

@ -0,0 +1,27 @@
From 2301c9145afbbbb2f3f31bd751498f9893eabc1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dra=C5=BEen=20Odoba=C5=A1i=C4=87?= <dodobasic@gmail.com>
Date: Sun, 22 Sep 2013 22:41:20 +0200
Subject: [PATCH 3/4] apply #8601
---
python/gui/qgsfieldvalidator.sip | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/python/gui/qgsfieldvalidator.sip b/python/gui/qgsfieldvalidator.sip
index 5d5de30..6237e3e 100644
--- a/python/gui/qgsfieldvalidator.sip
+++ b/python/gui/qgsfieldvalidator.sip
@@ -9,6 +9,8 @@ class QgsFieldValidator : QValidator
QgsFieldValidator( QObject *parent, const QgsField &field, QString dateFormat = "yyyy-MM-dd" );
~QgsFieldValidator();
- virtual State validate( QString &, int & ) const;
- virtual void fixup( QString & ) const;
+ virtual State validate(QString & /In,Out/, int & /In,Out/) const = 0 /API=QString:2 - /;
+ virtual State validate(QString & /Constrained/, int & /In,Out/) const = 0 /API=QString: - 2/;
+ virtual void fixup(QString &input /In,Out/) const /API=QString:2 - /;
+ virtual void fixup(QString & /Constrained/) const /API=QString: - 2/;
};
--
1.8.1.4

View File

@ -19,7 +19,7 @@
Name: qgis
Version: 2.0.1
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A user friendly Open Source Geographic Information System
# Update FSF address or ship a GPLv3+ license file
@ -42,12 +42,21 @@ Source5: %{name}-mime.xml
# Fix detection problem for GRASS libraries
Patch0: %{name}-1.5.0-grass.patch
# Drop -o option from SIP, as versions older than 4.10 don't have it
Patch1: %{name}-2.0.0-sip410.patch
# Remove httplib2 from the build system
Patch2: %{name}-2.0.1-httplib2.patch
# Compilation failure with sip 4.15
# https://hub.qgis.org/issues/8507
# https://github.com/qgis/QGIS/commit/6734ab443a41b5ab5a730651754d9365cf4eaf04
# 8385386493d3b19223825ce2ac9137d6d079a1c2
# 349a4c974fab88fdda0d612dea8defe037ec50ba
# Drop -o option from SIP, as versions older than 4.10 don't have it
Patch3: %{name}-2.0.1-sip-4.15.patch
# sip: QgsFieldValidator::fixup has versioned and unversioned overloads
# https://hub.qgis.org/issues/8601
Patch4: %{name}-2.0.1-sip-8601.patch
# Leaving it to make life easier for ELGIS, as long as they target RHEL 5
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@ -162,8 +171,9 @@ Please refer to %{name}-mapserver-README.fedora for details!
%prep
%setup -q
%patch0 -p1 -b .grass~
%patch1 -p1 -b .sip410~
%patch2 -p1 -b .httplib2~
%patch3 -p1 -b .sip415~
%patch4 -p1 -b .field_val_overload~
# Readme file for QGIS mapserver configuration and Lighttpd sample
install -pm0644 %{SOURCE4} .
@ -375,6 +385,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_libexecdir}/%{name}
%changelog
* Tue Sep 24 2013 Volker Fröhlich <volker27@gmx.at> - 2.0.1-2
- Patch QGIS #8507 -- QGIS trunk failed to compile with sip 4.15
- Patch QGIS #8601 -- sip: QgsFieldValidator::fixup has versioned and
unversioned overloads
* Tue Sep 24 2013 Volker Fröhlich <volker27@gmx.at> - 2.0.1-1
- New upstream release