pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/py-kde4 Fix build with latest py-qt4.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/746ac1aab821
branches:  trunk
changeset: 609850:746ac1aab821
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Thu Oct 11 13:17:09 2012 +0000

description:
Fix build with latest py-qt4.

diffstat:

 x11/py-kde4/Makefile                               |   8 +-
 x11/py-kde4/distinfo                               |   3 +-
 x11/py-kde4/patches/patch-sip_kdecore_typedefs.sip |  84 ++++++++++++++++++++++
 3 files changed, 92 insertions(+), 3 deletions(-)

diffs (127 lines):

diff -r 1f43870d4158 -r 746ac1aab821 x11/py-kde4/Makefile
--- a/x11/py-kde4/Makefile      Thu Oct 11 13:03:38 2012 +0000
+++ b/x11/py-kde4/Makefile      Thu Oct 11 13:17:09 2012 +0000
@@ -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 @@
 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 -r 1f43870d4158 -r 746ac1aab821 x11/py-kde4/distinfo
--- a/x11/py-kde4/distinfo      Thu Oct 11 13:03:38 2012 +0000
+++ b/x11/py-kde4/distinfo      Thu Oct 11 13:17:09 2012 +0000
@@ -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 -r 1f43870d4158 -r 746ac1aab821 x11/py-kde4/patches/patch-sip_kdecore_typedefs.sip
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/py-kde4/patches/patch-sip_kdecore_typedefs.sip        Thu Oct 11 13:17:09 2012 +0000
@@ -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
+-};



Home | Main Index | Thread Index | Old Index