diff options
author | wiz <wiz@pkgsrc.org> | 2012-10-11 13:17:09 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2012-10-11 13:17:09 +0000 |
commit | 1ba40196e36205f894bd66015255adfb5e2a72cd (patch) | |
tree | 2aae8e752b13308f1ce17114526dca7196b44e4d /x11 | |
parent | c3432bab19d5d7772db47d9a1ce2c7b9f3842e74 (diff) | |
download | pkgsrc-1ba40196e36205f894bd66015255adfb5e2a72cd.tar.gz |
Fix build with latest py-qt4.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/py-kde4/Makefile | 8 | ||||
-rw-r--r-- | x11/py-kde4/distinfo | 3 | ||||
-rw-r--r-- | x11/py-kde4/patches/patch-sip_kdecore_typedefs.sip | 84 |
3 files changed, 92 insertions, 3 deletions
diff --git a/x11/py-kde4/Makefile b/x11/py-kde4/Makefile index 0e46d3acca8..4f3467bbf3b 100644 --- a/x11/py-kde4/Makefile +++ b/x11/py-kde4/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2012/10/08 23:02:38 adam Exp $ +# $NetBSD: Makefile,v 1.17 2012/10/11 13:17:09 wiz Exp $ PKGNAME= ${PYPKGPREFIX}-kde4-${_KDE_VERSION} DISTNAME= pykde4-${_KDE_VERSION} @@ -25,11 +25,15 @@ REPLACE_PYTHON+= \ SUBST_CLASSES+= pykdeuic4 SUBST_STAGE.pykdeuic4= post-build SUBST_FILES.pykdeuic4= tools/pykdeuic4/pykdeuic4.py -SUBST_SED.pykdeuic4= 's:/usr/bin/env python$$:${PYTHONBIN}:' +SUBST_SED.pykdeuic4= -e 's:/usr/bin/env python$$:${PYTHONBIN}:' #post-extract: # ${CP} ${FILESDIR}/FindPolkitQt.cmake ${WRKSRC}/cmake/modules +# remove when file not patched any longer +post-install: + ${RM} -f ${DESTDIR}${PREFIX}/share/sip2.7/PyKDE4/kdecore/typedefs.sip.orig + .include "../../meta-pkgs/kde4/kde4.mk" .include "../../lang/python/application.mk" diff --git a/x11/py-kde4/distinfo b/x11/py-kde4/distinfo index 0cda7c552fe..1b2d7e906c8 100644 --- a/x11/py-kde4/distinfo +++ b/x11/py-kde4/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.3 2012/06/16 04:45:39 markd Exp $ +$NetBSD: distinfo,v 1.4 2012/10/11 13:17:09 wiz Exp $ SHA1 (pykde4-4.8.4.tar.xz) = e629d7a1d7d1aa1d1dd24769dc5412a60b6ac256 RMD160 (pykde4-4.8.4.tar.xz) = 563cca881a3f9c298be1c18979b6fcbc5eb8dcc0 Size (pykde4-4.8.4.tar.xz) = 2111428 bytes SHA1 (patch-CMakeLists.txt) = 6981a91671511739e63568d7bc2ee8899d28f8a9 SHA1 (patch-__init__.py) = 721287a0ec82b79ea4a502526ed98ba44c6d979f +SHA1 (patch-sip_kdecore_typedefs.sip) = 7e8332a4c0d661f564a4cfea800f4fcee945df4c diff --git a/x11/py-kde4/patches/patch-sip_kdecore_typedefs.sip b/x11/py-kde4/patches/patch-sip_kdecore_typedefs.sip new file mode 100644 index 00000000000..b81c977f993 --- /dev/null +++ b/x11/py-kde4/patches/patch-sip_kdecore_typedefs.sip @@ -0,0 +1,84 @@ +$NetBSD: patch-sip_kdecore_typedefs.sip,v 1.1 2012/10/11 13:17:09 wiz Exp $ + +py-qt4 defines this itself since about 4.9.5; avoid conflict. + +--- sip/kdecore/typedefs.sip.orig 2011-07-27 18:37:15.000000000 +0000 ++++ sip/kdecore/typedefs.sip +@@ -951,77 +951,3 @@ template <TYPE1> + %End + }; + +-%MappedType QVector<int> +-{ +-%TypeHeaderCode +-#include <qvector.h> +-%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) +- { +- int t = (sipCpp->at(i)); +- +-#if PY_MAJOR_VERSION >= 3 +- PyObject *tobj = PyLong_FromLong(t); +-#else +- PyObject *tobj = PyInt_FromLong(t); +-#endif +- +- PyList_SET_ITEM(l, i, tobj); +- } +- +- return l; +-%End +- +-%ConvertToTypeCode +- // 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) { +- PyObject *tobj = PyList_GET_ITEM(sipPy, i); +-#if PY_MAJOR_VERSION >= 3 +- if (!PyNumber_Check(tobj)) +-#else +- if (!PyInt_Check(tobj)) +-#endif +- return 0; +- } +- return 1; +- } +- +- QVector<int> *qv = new QVector<int>; +- +- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) +- { +- PyObject *tobj = PyList_GET_ITEM(sipPy, i); +- #if PY_MAJOR_VERSION >= 3 +- int t = PyLong_AsLong (tobj); +-#else +- int t = PyInt_AS_LONG (tobj); +-#endif +- +- if (*sipIsErr) +- { +- delete qv; +- return 0; +- } +- +- qv->append(t); +- } +- +- *sipCppPtr = qv; +- +- return sipGetState(sipTransferObj); +-%End +-}; |