From 2e8a28cc6109afa8b119c2c2fdbe5d8128bc2b386ba3daedbee49a6e68b64dbd Mon Sep 17 00:00:00 2001 From: Otto Dassau Date: Tue, 15 Mar 2011 20:50:42 +0000 Subject: [PATCH] added pyqt4 patch (fixed in qgis trunk) OBS-URL: https://build.opensuse.org/package/show/Application:Geo/qgis?expand=0&rev=126 --- qgis.spec | 14 ++--- qgis15_pyqt4.patch | 13 ----- qgis16_pyqt4.patch | 132 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 139 insertions(+), 20 deletions(-) delete mode 100644 qgis15_pyqt4.patch create mode 100644 qgis16_pyqt4.patch diff --git a/qgis.spec b/qgis.spec index 45c2b7d..18012e2 100644 --- a/qgis.spec +++ b/qgis.spec @@ -6,7 +6,7 @@ Group: Applications/GIS Source: %{name}-%{version}.tar.bz2 Source1: %{name}.desktop Source2: %{name}.rpmlintrc -#Patch0: qgis15_pyqt4.patch +Patch0: qgis16_pyqt4.patch Url: http://www.qgis.org/ Summary: Quantum GIS (QGIS) is a Geographic Information System (GIS) Packager: Otto Dassau @@ -39,8 +39,6 @@ BuildRequires: libproj-devel BuildRequires: postgresql-devel >= 8 BuildRequires: grass BuildRequires: grass-devel -## not necessary for qgis >= 1.5 anymore -#BuildRequires: libgdal-grass >= 1.4 BuildRequires: libqt4-devel >= 4.3 BuildRequires: libqt4-qt3support >= 4.3 BuildRequires: libQtWebKit-devel >= 4.3 @@ -80,9 +78,9 @@ GRASS plugin for Quantum GIS development branch 1.x required to interface with G %prep %setup -#%if 0%{?suse_version} > 1130 -#%patch0 -p1 -#%endif +%if 0%{?suse_version} > 1130 +%patch0 -p1 +%endif %build export CFLAGS="$RPM_OPT_FLAGS" @@ -173,7 +171,9 @@ rm -rf %{buildroot} %postun -p /sbin/ldconfig %changelog -n qgis -* Fri Nov 12 2010 Otto Dassau 1.6 +* Tue Mar 15 2011 Otto Dassau 1.6 +- added pyqt 4.8.2 support for 1.6 release (fixed in 1.7) +* Fri Nov 12 2010 Otto Dassau 1.6 - added FastCGI for new 1.6 release * Mon Nov 08 2010 Otto Dassau 1.5 - added qgis15_pyqt4.patch to support pyqt4 >= 4.7.5 diff --git a/qgis15_pyqt4.patch b/qgis15_pyqt4.patch deleted file mode 100644 index e908c7c..0000000 --- a/qgis15_pyqt4.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- qgis-1.5.0/python/CMakeLists.txt 2010-05-15 10:21:42.000000000 +0200 -+++ qgis-1.5.0_new/python/CMakeLists.txt 2010-11-10 15:26:08.394946082 +0100 -@@ -39,6 +39,10 @@ - SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} PROXY_FACTORY) - ENDIF(PYQT4_VERSION_NUM LESS 263680) - -+IF(NOT PYQT4_VERSION_NUM LESS 263941) # 0x040705 -+ SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QSETINT_CONVERSION) -+ENDIF(NOT PYQT4_VERSION_NUM LESS 263941) -+ - # core module - FILE(GLOB sip_files_core core/*.sip) - set(SIP_EXTRA_FILES_DEPEND ${sip_files_core}) diff --git a/qgis16_pyqt4.patch b/qgis16_pyqt4.patch new file mode 100644 index 0000000..c7852ac --- /dev/null +++ b/qgis16_pyqt4.patch @@ -0,0 +1,132 @@ +--- qgis-1.6.0/python/CMakeLists.txt 2010-10-04 22:05:12.000000000 +0200 ++++ qgis_trunk/python/CMakeLists.txt 2011-03-15 21:42:01.776231982 +0100 +@@ -1,6 +1,8 @@ + SUBDIRS(plugins) + + IF (WITH_INTERNAL_SPATIALITE) ++ SUBDIRS(pyspatialite) ++ + INCLUDE_DIRECTORIES( + ../src/core/spatialite/headers + ../src/core/spatialite/headers/spatialite +@@ -43,6 +45,10 @@ + SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QSETINT_CONVERSION) + ENDIF(NOT PYQT4_VERSION_NUM LESS 263941) + ++IF(NOT PYQT4_VERSION_NUM LESS 264194) # 0x040802 ++ SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QSETTYPE_CONVERSION) ++ENDIF(NOT PYQT4_VERSION_NUM LESS 264194) ++ + # core module + FILE(GLOB sip_files_core core/*.sip) + set(SIP_EXTRA_FILES_DEPEND ${sip_files_core}) +--- qgis-1.6.0/python/core/conversions.sip 2010-10-03 11:11:28.000000000 +0200 ++++ qgis_trunk/python/core/conversions.sip 2011-03-15 21:42:19.106229754 +0100 +@@ -15,6 +15,7 @@ + */ + + %Feature QSETINT_CONVERSION ++%Feature QSETTYPE_CONVERSION + + %ModuleHeaderCode + // From Python 2.5, some functions use Py_ssize_t instead of int +@@ -35,6 +36,8 @@ + #include + #if (SIP_VERSION >= 0x040900) + #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString)) ++#endif ++#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) + #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) + #endif + %End +@@ -115,6 +118,8 @@ + #include + #if (SIP_VERSION >= 0x040900) + #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString)) ++#endif ++#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) + #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) + #endif + %End +@@ -273,6 +278,8 @@ + #include + #if (SIP_VERSION >= 0x040900) + #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString)) ++#endif ++#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) + #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) + #endif + %End +@@ -320,7 +327,7 @@ + }; + %End + +- ++%If (QSETTYPE_CONVERSION) + template + %MappedType QSet + { +@@ -328,6 +335,8 @@ + #include + #if (SIP_VERSION >= 0x040900) + #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString)) ++#endif ++#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) + #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) + #endif + %End +@@ -394,8 +403,7 @@ + %End + + }; +- +- ++%End + + template + %MappedType QMap > +@@ -404,6 +412,8 @@ + #include + #if (SIP_VERSION >= 0x040900) + #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString)) ++#endif ++#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) + #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) + #endif + %End +@@ -525,6 +535,8 @@ + #include + #if (SIP_VERSION >= 0x040900) + #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString)) ++#endif ++#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) + #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) + #endif + %End +@@ -630,6 +642,8 @@ + #include + #if (SIP_VERSION >= 0x040900) + #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString)) ++#endif ++#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) + #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) + #endif + %End +@@ -842,6 +856,8 @@ + #include + #if (SIP_VERSION >= 0x040900) + #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString)) ++#endif ++#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) + #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) + #endif + %End +@@ -964,6 +980,8 @@ + #include + #if (SIP_VERSION >= 0x040900) + #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString)) ++#endif ++#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) + #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) + #endif + %End