diff options
author | Eric Sandall | 2012-10-16 14:43:18 -0700 |
---|---|---|
committer | Eric Sandall | 2012-10-16 14:43:18 -0700 |
commit | cc192c725f34bc606314de5db39c1bca3cf54f0c (patch) | |
tree | e3dad43f85ac5d33e46aeb7a1cbfb992de971e39 | |
parent | 11785c6375bb31eeb8b9e482eafadea48f8c8886 (diff) |
pykde4: Apply sip-4.14.patch
Fix compilation with sip 4.14+ (affects pykde4 4.9.1 as well).
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
pykde4 4.9.1/4.9.2:
[ 13%] Generating sip/kdecore/sipkdecorepart0.cpp,
sip/kdecore/sipkdecorepart1.cpp, sip/kdecore/sipkdecorepart2.cpp,
sip/kdecore/sipkdecorepart3.cpp, sip/kdecore/sipkdecorepart4.cpp,
sip/kdecore/sipkdecorepart5.cpp, sip/kdecore/sipkdecorepart6.cpp,
sip/kdecore/sipkdecorepart7.cpp
sip: /usr/src/pykde4-4.9.2/sip/kdecore/typedefs.sip:955: Mapped type has
already been defined in another module
make[2]: *** [sip/kdecore/sipkdecorepart0.cpp] Error 1
make[1]: *** [CMakeFiles/python_module_PyKDE4_kdecore.dir/all] Error 2
make: *** [all] Error 2
-rw-r--r-- | kde4-bindings/pykde4/HISTORY | 3 | ||||
-rwxr-xr-x | kde4-bindings/pykde4/PRE_BUILD | 4 | ||||
-rw-r--r-- | kde4-bindings/pykde4/sip-4.14.patch | 69 |
3 files changed, 76 insertions, 0 deletions
diff --git a/kde4-bindings/pykde4/HISTORY b/kde4-bindings/pykde4/HISTORY index f2f911a65d..b7f46a560e 100644 --- a/kde4-bindings/pykde4/HISTORY +++ b/kde4-bindings/pykde4/HISTORY @@ -1,5 +1,8 @@ 2012-10-16 Eric Sandall <sandalle@sourcemage.org> * DETAILS: Updated to 4.9.2 + * PRE_BUILD: Apply sip-4.14.patch + * sip-4.14.patch: Fix compilation with sip 4.14+ (affects pykde4 + 4.9.1 as well). 2012-09-07 Tommy Boatman <tboatman@sourcemage.org> * DETAILS: 4.9.1 diff --git a/kde4-bindings/pykde4/PRE_BUILD b/kde4-bindings/pykde4/PRE_BUILD new file mode 100755 index 0000000000..c72fc80ca5 --- /dev/null +++ b/kde4-bindings/pykde4/PRE_BUILD @@ -0,0 +1,4 @@ +default_pre_build && +cd "${SOURCE_DIRECTORY}" && +message "${MESSAGE_COLOR}Fix compilation with sip 4.14+...${DEFAULT_COLOR}" && +patch -p1 < "${SCRIPT_DIRECTORY}"/sip-4.14.patch 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 |