From e7f76f424ef43369745b07a70deea6548a1f8ca5 Mon Sep 17 00:00:00 2001 From: sibel Date: Fri, 28 Jan 2011 23:50:34 +0100 Subject: kdebindings, correction 4.6.0 --- kde/kdebindings/.md5sum | 1 + kde/kdebindings/Pkgfile | 27 +++--- kde/kdebindings/kdebindings-sip.patch | 156 ++++++++++++++++++++++++++++++++++ 3 files changed, 173 insertions(+), 11 deletions(-) create mode 100644 kde/kdebindings/kdebindings-sip.patch diff --git a/kde/kdebindings/.md5sum b/kde/kdebindings/.md5sum index 87e3084b6..66e594ff2 100644 --- a/kde/kdebindings/.md5sum +++ b/kde/kdebindings/.md5sum @@ -1 +1,2 @@ 4ec0e648b825916ee4be025a74cc6684 kdebindings-4.6.0.tar.bz2 +a09eb7cace5bfa9ea62be1a7d8d73cb0 kdebindings-sip.patch diff --git a/kde/kdebindings/Pkgfile b/kde/kdebindings/Pkgfile index c2880dec0..2f24e163e 100755 --- a/kde/kdebindings/Pkgfile +++ b/kde/kdebindings/Pkgfile @@ -2,30 +2,35 @@ # URL: http://www.kde.org # Maintainer: NuTyX packager team # Packager: lesibel at free dot fr -# Depends on: sip,ruby, kdepim-runtime, kdegraphics, qscintilla +# Depends on: cmake, automoc4, boost, sip, ruby, kdepim-runtime, kdegraphics, qscintilla, docbook-xsl # Run on: ruby,kdepim-runtime,kdegraphics,qscintilla name=kdebindings version=4.6.0 -release=1 -_pydir=python2.7 +release=2 +pydir=python2.7 -source=(ftp://ftp.kde.org/pub/kde/stable/$version/src/$name-$version.tar.bz2) +source=(ftp://ftp.kde.org/pub/kde/stable/$version/src/$name-$version.tar.bz2 + kdebindings-sip.patch) build() { cd $name-* + patch -Np0 -i ../kdebindings-sip.patch + # fix ruby + for f in `find ruby -name CMakeLists.txt`; do + sed -i "s|\${RUBY_INCLUDE_PATH}|\${RUBY_INCLUDE_PATH} /usr/include/ruby-1.9.1/${_ARCHITECTURE}-linux|" "${f}" + done mkdir build cd build cmake ../ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SKIP_RPATH=ON \ - -DWITH_PolkitQt=ON - -# -DPYTHON_EXECUTABLE=/usr/bin/$_pybin \ -# -DPYTHON_INCLUDE_DIR=/usr/include/$_pydir \ -# -DPYTHON_LIBRARY=/usr/lib/lib$_pydir.so + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SKIP_RPATH=ON \ + -DWITH_PolkitQt=ON \ + -DPYTHON_EXECUTABLE=/usr/bin/$_pybin \ + -DPYTHON_INCLUDE_DIR=/usr/include/$_pydir \ + -DPYTHON_LIBRARY=/usr/lib/lib$_pydir.so make make DESTDIR=$PKG install diff --git a/kde/kdebindings/kdebindings-sip.patch b/kde/kdebindings/kdebindings-sip.patch new file mode 100644 index 000000000..cc06db01b --- /dev/null +++ b/kde/kdebindings/kdebindings-sip.patch @@ -0,0 +1,156 @@ +--- /tmp/work/src/kdebindings-4.5.4/python/pykde4/sip/kdecore/typedefs.sip 2010-11-02 13:51:10.000000000 +0100 ++++ /tmp/work/src/kdebindings-4.5.4/python/pykde4/sip/kdecore/typedefs.sip.new 2011-01-03 12:45:29.000000000 +0100 +@@ -582,90 +582,6 @@ + %End + }; + +-template +-%MappedType QSet +-{ +-%TypeHeaderCode +-#include +-%End +- +-%ConvertFromTypeCode +- // Create the list. +- PyObject *l; +- +- if ((l = PyList_New(sipCpp->size())) == NULL) +- return NULL; +- +- // Set the list elements. +- QSet set = *sipCpp; +- int i = 0; +- foreach (TYPE value, set) +- { +- PyObject *obj = sipConvertFromNewType(&value, sipType_TYPE, sipTransferObj); +- if (obj == NULL || PyList_SET_ITEM (l, i, obj) < 0) +- { +- Py_DECREF(l); +- +- if (obj) +- Py_DECREF(obj); +- +- return NULL; +- } +- +- Py_DECREF(obj); +- i++; +- } +- +- return l; +-%End +- +-%ConvertToTypeCode +- // Check the type if that is all that is required. +- if (sipIsErr == NULL) +- { +- if (!PyList_Check(sipPy)) +- return 0; +- } +- +- // Check the type if that is all that is required. +- if (sipIsErr == NULL) +- { +- if (!PyList_Check(sipPy)) +- return 0; +- +- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) +- if (!sipCanConvertToType(PyList_GET_ITEM (sipPy, i), sipType_TYPE, SIP_NOT_NONE)) +- return 0; +- } +- +- QSet *qs = new QSet; +- +- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) +- { +- int state; +- +- TYPE *t = reinterpret_cast(sipConvertToType(PyList_GET_ITEM (sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); +- +- if (*sipIsErr) +- { +- sipReleaseType(t, sipType_TYPE, state); +- +- delete qs; +- return 0; +- } +- +- *qs << *t; +- +- sipReleaseType(t, sipType_TYPE, state); +- } +- +- *sipCppPtr = qs; +- +- return sipGetState(sipTransferObj); +-%End +-}; +- +- + template + %MappedType QPair + { +@@ -732,62 +648,6 @@ + %End + }; + +- +-%MappedType QList +-{ +-%TypeHeaderCode +-#include +-%End +- +-%ConvertFromTypeCode +- // Create the list. +- PyObject *l; +- +- if ((l = PyList_New(sipCpp->size())) == NULL) +- return NULL; +- +- // Set the list elements. +- for (int i = 0; i < sipCpp->size(); ++i) { +- PyObject *pobj; +- +-#if PY_MAJOR_VERSION >= 3 +- if ((pobj = PyLong_FromLong(sipCpp->value(i))) == NULL) { +-#else +- if ((pobj = PyInt_FromLong(sipCpp->value(i))) == NULL) { +-#endif +- Py_DECREF(l); +- +- return NULL; +- } +- +- PyList_SET_ITEM(l, i, pobj); +- } +- +- return l; +-%End +- +-%ConvertToTypeCode +- // Check the type if that is all that is required. +- if (sipIsErr == NULL) +- return PyList_Check(sipPy); +- +- QList *ql = new QList; +- +- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) { +-#if PY_MAJOR_VERSION >= 3 +- ql->append(PyLong_AsLong(PyList_GET_ITEM(sipPy, i))); +-#else +- ql->append(PyInt_AsLong(PyList_GET_ITEM(sipPy, i))); +-#endif +- } +- +- *sipCppPtr = ql; +- +- return sipGetState(sipTransferObj); +-%End +-}; +- +- + template + %MappedType QStack + { -- cgit v1.2.3-70-g09d2