diff options
author | jperkin <jperkin@pkgsrc.org> | 2013-06-10 15:37:36 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2013-06-10 15:37:36 +0000 |
commit | 64a7405811eaaaa35abbfe791f2b52eadee0d587 (patch) | |
tree | 8ccfe1b983ff8d57d3fcc5adad9faaa8c822fc4c /x11 | |
parent | 9d4d42d5d8b3744af9fbac59620d53c962236e66 (diff) | |
download | pkgsrc-64a7405811eaaaa35abbfe791f2b52eadee0d587.tar.gz |
Implement QList<long> for SunOS 32-bit pid_t.
Bump PKGREVISION.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/py-qt4/Makefile | 4 | ||||
-rw-r--r-- | x11/py-qt4/distinfo | 3 | ||||
-rw-r--r-- | x11/py-qt4/patches/patch-sip_QtCore_qlist.sip | 75 |
3 files changed, 79 insertions, 3 deletions
diff --git a/x11/py-qt4/Makefile b/x11/py-qt4/Makefile index b1ba001957d..d6fe7ba9ed6 100644 --- a/x11/py-qt4/Makefile +++ b/x11/py-qt4/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.66 2013/06/06 12:55:20 wiz Exp $ +# $NetBSD: Makefile,v 1.67 2013/06/10 15:37:36 jperkin Exp $ PKGNAME= ${PYPKGPREFIX}-qt4-${PYQT_VERSION} PYQT_VERSION= 4.10.1 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= x11 python #MASTER_SITES= http://www.riverbankcomputing.com/static/Downloads/PyQt4/ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pyqt/} diff --git a/x11/py-qt4/distinfo b/x11/py-qt4/distinfo index c52883a2ee3..4622004fc95 100644 --- a/x11/py-qt4/distinfo +++ b/x11/py-qt4/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.28 2013/05/03 15:48:17 drochner Exp $ +$NetBSD: distinfo,v 1.29 2013/06/10 15:37:36 jperkin Exp $ SHA1 (PyQt-x11-gpl-4.10.1.tar.gz) = c7dad20194905d22f110c7d3ab905cd25d69e887 RMD160 (PyQt-x11-gpl-4.10.1.tar.gz) = 31cbb5a59accbee5a9c4e2dc4e5b0b07a5157905 Size (PyQt-x11-gpl-4.10.1.tar.gz) = 11279330 bytes SHA1 (patch-aa) = 726a9be11f0fa8a275daa61358557cf37a6bf531 +SHA1 (patch-sip_QtCore_qlist.sip) = 4fb548d4ee755cbc955ec32a6b1702a71a9815f1 diff --git a/x11/py-qt4/patches/patch-sip_QtCore_qlist.sip b/x11/py-qt4/patches/patch-sip_QtCore_qlist.sip new file mode 100644 index 00000000000..bff0c1db8d8 --- /dev/null +++ b/x11/py-qt4/patches/patch-sip_QtCore_qlist.sip @@ -0,0 +1,75 @@ +$NetBSD: patch-sip_QtCore_qlist.sip,v 1.1 2013/06/10 15:37:36 jperkin Exp $ + +Implement QList<long> for SunOS 32-bit pid_t. + +--- sip/QtCore/qlist.sip.orig 2013-04-21 12:02:19.000000000 +0000 ++++ sip/QtCore/qlist.sip +@@ -683,6 +683,68 @@ template<qreal, TYPE> + return sipGetState(sipTransferObj); + %End + }; ++// QList<long> is implemented as a Python list of integers. ++%MappedType QList<long> /DocType="list-of-long"/ ++{ ++%TypeHeaderCode ++#include <qlist.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) ++ { ++ PyObject *pobj; ++ ++ if ((pobj = SIPLong_FromLong(sipCpp->value(i))) == NULL) ++ { ++ 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 (PySequence_Check(sipPy) && PySequence_Size(sipPy) >= 0); ++ ++ QList<long> *ql = new QList<long>; ++ SIP_SSIZE_T len = PySequence_Size(sipPy); ++ ++ for (SIP_SSIZE_T i = 0; i < len; ++i) ++ { ++ PyObject *itm = PySequence_ITEM(sipPy, i); ++ ++ if (!itm) ++ { ++ delete ql; ++ *sipIsErr = 1; ++ ++ return 0; ++ } ++ ++ ql->append(SIPLong_AsLong(itm)); ++ ++ Py_DECREF(itm); ++ } ++ ++ *sipCppPtr = ql; ++ ++ return sipGetState(sipTransferObj); ++%End ++}; + // QList<unsigned> is implemented as a Python list of unsigned longs. + %MappedType QList<unsigned> /DocType="list-of-int"/ + { |