Mon Jun 10 15:37:37 2013 UTC ()
Implement QList<long> for SunOS 32-bit pid_t.

Bump PKGREVISION.


(jperkin)
diff -r1.66 -r1.67 pkgsrc/x11/py-qt4/Makefile
diff -r1.28 -r1.29 pkgsrc/x11/py-qt4/distinfo
diff -r0 -r1.1 pkgsrc/x11/py-qt4/patches/patch-sip_QtCore_qlist.sip

cvs diff -r1.66 -r1.67 pkgsrc/x11/py-qt4/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/x11/py-qt4/Attic/Makefile 2013/06/06 12:55:20 1.66
+++ pkgsrc/x11/py-qt4/Attic/Makefile 2013/06/10 15:37:36 1.67
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.66 2013/06/06 12:55:20 wiz Exp $ 1# $NetBSD: Makefile,v 1.67 2013/06/10 15:37:36 jperkin Exp $
2 2
3PKGNAME= ${PYPKGPREFIX}-qt4-${PYQT_VERSION} 3PKGNAME= ${PYPKGPREFIX}-qt4-${PYQT_VERSION}
4PYQT_VERSION= 4.10.1 4PYQT_VERSION= 4.10.1
5PKGREVISION= 3 5PKGREVISION= 4
6CATEGORIES= x11 python 6CATEGORIES= x11 python
7#MASTER_SITES= http://www.riverbankcomputing.com/static/Downloads/PyQt4/ 7#MASTER_SITES= http://www.riverbankcomputing.com/static/Downloads/PyQt4/
8MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pyqt/} 8MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pyqt/}
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11COMMENT= Python binding for Qt4 11COMMENT= Python binding for Qt4
12HOMEPAGE= http://www.riverbankcomputing.com/software/pyqt/intro 12HOMEPAGE= http://www.riverbankcomputing.com/software/pyqt/intro
13 13
14USE_LIBTOOL= yes 14USE_LIBTOOL= yes
15USE_TOOLS+= gmake pkg-config 15USE_TOOLS+= gmake pkg-config
16USE_LANGUAGES= c c++ 16USE_LANGUAGES= c c++
17 17
18CONFIGURE_ARGS+= -b ${PREFIX}/bin 18CONFIGURE_ARGS+= -b ${PREFIX}/bin

cvs diff -r1.28 -r1.29 pkgsrc/x11/py-qt4/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/x11/py-qt4/Attic/distinfo 2013/05/03 15:48:17 1.28
+++ pkgsrc/x11/py-qt4/Attic/distinfo 2013/06/10 15:37:36 1.29
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
1$NetBSD: distinfo,v 1.28 2013/05/03 15:48:17 drochner Exp $ 1$NetBSD: distinfo,v 1.29 2013/06/10 15:37:36 jperkin Exp $
2 2
3SHA1 (PyQt-x11-gpl-4.10.1.tar.gz) = c7dad20194905d22f110c7d3ab905cd25d69e887 3SHA1 (PyQt-x11-gpl-4.10.1.tar.gz) = c7dad20194905d22f110c7d3ab905cd25d69e887
4RMD160 (PyQt-x11-gpl-4.10.1.tar.gz) = 31cbb5a59accbee5a9c4e2dc4e5b0b07a5157905 4RMD160 (PyQt-x11-gpl-4.10.1.tar.gz) = 31cbb5a59accbee5a9c4e2dc4e5b0b07a5157905
5Size (PyQt-x11-gpl-4.10.1.tar.gz) = 11279330 bytes 5Size (PyQt-x11-gpl-4.10.1.tar.gz) = 11279330 bytes
6SHA1 (patch-aa) = 726a9be11f0fa8a275daa61358557cf37a6bf531 6SHA1 (patch-aa) = 726a9be11f0fa8a275daa61358557cf37a6bf531
 7SHA1 (patch-sip_QtCore_qlist.sip) = 4fb548d4ee755cbc955ec32a6b1702a71a9815f1

File Added: pkgsrc/x11/py-qt4/patches/Attic/patch-sip_QtCore_qlist.sip
$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"/
 {