summaryrefslogtreecommitdiffstats
path: root/kde4-bindings/pykde4/sip-4.14.patch
diff options
context:
space:
mode:
Diffstat (limited to 'kde4-bindings/pykde4/sip-4.14.patch')
-rw-r--r--kde4-bindings/pykde4/sip-4.14.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/kde4-bindings/pykde4/sip-4.14.patch b/kde4-bindings/pykde4/sip-4.14.patch
new file mode 100644
index 0000000000..cb328555a9
--- /dev/null
+++ b/kde4-bindings/pykde4/sip-4.14.patch
@@ -0,0 +1,69 @@
+# See http://python.6.n6.nabble.com/latest-pykde4-4-9-2-build-fails-against-new-sip-4-14-PyQt-4-9-5-td4990652.html
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 80e0fde..c5bb90d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -26,15 +26,16 @@ FIND_PACKAGE(PythonLibrary REQUIRED)
+ INCLUDE(PythonMacros)
+
+ FIND_PACKAGE(SIP REQUIRED)
+-IF(SIP_VERSION STRLESS "040d01") # These version numbers also appear in ../CMakeLists.txt
+- MESSAGE(FATAL_ERROR "The version of SIP found is too old. 4.13.1 or later is needed.")
+-ENDIF(SIP_VERSION STRLESS "040d01")
++IF(SIP_VERSION STRLESS "040e00") # These version numbers also appear in ../CMakeLists.txt
++ MESSAGE(FATAL_ERROR "The version of SIP found is too old. 4.14 or later is needed.")
++ENDIF(SIP_VERSION STRLESS "040e00")
+ INCLUDE(SIPMacros)
+
+ FIND_PACKAGE(PyQt4 REQUIRED)
+-IF(PYQT4_VERSION STRLESS "040900") # These version numbers also appear in ../CMakeLists.txt
++IF(PYQT4_VERSION STRLESS "040905") # These version numbers also appear in ../CMakeLists.txt
+ MESSAGE(FATAL_ERROR "The version of PyQt found is too old. 4.9 or later is required.")
+-ENDIF(PYQT4_VERSION STRLESS "040900")
++ENDIF(PYQT4_VERSION STRLESS "040905")
++
+
+
+ SET(SOPRANO_MIN_VERSION "2.0")
+@@ -93,9 +94,19 @@ SET(SIP_DISABLE_FEATURES VendorID PyQt_NoPrintRangeBug)
+
+ # Use an extra option when compiling on Python 3.
+ IF (PYTHON_3)
+- SET(SIP_EXTRA_OPTIONS -g -x Py_v3)
++ IF(PYQT4_VERSION STRGREATER "040904")
++ # Disable for newer PyQt
++ SET(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector -x Py_v3)
++ ELSE (PYQT4_VERSION STRGREATER "040904")
++ SET(SIP_EXTRA_OPTIONS -g -x Py_v3)
++ ENDIF(PYQT4_VERSION STRGREATER "040904")
+ ELSE (PYTHON_3)
+- SET(SIP_EXTRA_OPTIONS -g)
++ IF(PYQT4_VERSION STRGREATER "040904")
++ # Disable for newer PyQt
++ SET(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector)
++ ELSE (PYQT4_VERSION STRGREATER "040904")
++ SET(SIP_EXTRA_OPTIONS -g)
++ ENDIF(PYQT4_VERSION STRGREATER "040904")
+ ENDIF (PYTHON_3)
+
+ ADD_DEFINITIONS(-D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DUSING_SOPRANO_NRLMODEL_UNSTABLE_API)
+diff --git a/sip/kdecore/typedefs.sip b/sip/kdecore/typedefs.sip
+index 5a0a080..af53f85 100644
+--- a/sip/kdecore/typedefs.sip
++++ b/sip/kdecore/typedefs.sip
+@@ -951,6 +951,9 @@ template <TYPE1>
+ %End
+ };
+
++%Feature PyKDE_QVector
++
++%If(PyKDE_QVector)
+ %MappedType QVector<int>
+ {
+ %TypeHeaderCode
+@@ -1025,3 +1028,4 @@ template <TYPE1>
+ return sipGetState(sipTransferObj);
+ %End
+ };
++%End
+\ No newline at end of file