summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2010-01-16 11:28:43 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2010-01-16 11:28:43 +0000
commitb059e2bd9a209989e92cd64dbca373fd7c43140d (patch)
treecce44859e6aa2fddfc902881d05f711228b1b730 /kde-base
parentversion bump, bug 301169 by Tim O'Kelly <bugs_gentoo_org DOT Tim_OKelly AT ne... (diff)
downloadhistorical-b059e2bd9a209989e92cd64dbca373fd7c43140d.tar.gz
historical-b059e2bd9a209989e92cd64dbca373fd7c43140d.tar.bz2
historical-b059e2bd9a209989e92cd64dbca373fd7c43140d.zip
Add patch to build against latest sip and PyQt4 releases. Bug #301106
Package-Manager: portage-2.2_rc61/cvs/Linux x86_64
Diffstat (limited to 'kde-base')
-rw-r--r--kde-base/pykde4/ChangeLog8
-rw-r--r--kde-base/pykde4/Manifest5
-rw-r--r--kde-base/pykde4/files/pykde4-4.3.4-typedefs.sip.patch385
-rw-r--r--kde-base/pykde4/pykde4-4.3.4.ebuild5
4 files changed, 397 insertions, 6 deletions
diff --git a/kde-base/pykde4/ChangeLog b/kde-base/pykde4/ChangeLog
index 16c4cf38a866..23a824fe1695 100644
--- a/kde-base/pykde4/ChangeLog
+++ b/kde-base/pykde4/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for kde-base/pykde4
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/pykde4/ChangeLog,v 1.45 2009/12/27 15:27:05 armin76 Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/kde-base/pykde4/ChangeLog,v 1.46 2010/01/16 11:28:43 hwoarang Exp $
+
+ 16 Jan 2010; <hwoarang@gentoo.org> pykde4-4.3.4.ebuild,
+ +files/pykde4-4.3.4-typedefs.sip.patch:
+ Add patch to build against latest sip and PyQt4 releases. Bug #301106
23 Dec 2009; Jonathan Callen <abcd@gentoo.org> pykde4-4.3.4.ebuild:
Pull in changes from overlay and prefix support
diff --git a/kde-base/pykde4/Manifest b/kde-base/pykde4/Manifest
index 70d981737b02..f4ef962d002e 100644
--- a/kde-base/pykde4/Manifest
+++ b/kde-base/pykde4/Manifest
@@ -1,6 +1,7 @@
+AUX pykde4-4.3.4-typedefs.sip.patch 8212 RMD160 19788bb5089963ae703b1391e28c649bbc9fea6a SHA1 6d9a569df288d63f1c957e25db562cbe86f2afea SHA256 9b3eafc7e6954c0be578d979713de9874f448b73f3ff51e60568469902ad398d
DIST kdebindings-4.3.3.tar.bz2 4881799 RMD160 587fd37cc2369a39fb1cf97e164afc40294f97b2 SHA1 34ddcfd5d338962b8623b9dd9c2b850a621e4040 SHA256 d182e110201ac9dc63dbdbc1baecf845b90a56d6ba2c9c0a5b34dee211358f8d
DIST kdebindings-4.3.4.tar.bz2 4880929 RMD160 71bf95f667a5e3d7b165987e582ef9deafad0145 SHA1 0c7bf45bd3d81bf6aa1d2b085c17b4ce925c656b SHA256 bd07532289e9caa5b56d6adf8008babbe301d6e48bc378b4f3a9e96f685f3b1e
EBUILD pykde4-4.3.3.ebuild 2022 RMD160 b42b523a1eb39e7fc3762bf97139aae30c1df984 SHA1 b8f8fd6be192c5e60c4fed002ff27ac856ad40ec SHA256 8312c2a9c572ac71a6fc7b3f522382765dd951cfb815b011cd598e431839d301
-EBUILD pykde4-4.3.4.ebuild 1942 RMD160 d762bc9e2b75d573cfdfbd8c4f0f425ec3f2d4dc SHA1 434c8c1a49356ccef3212d8fcbe2345a542fab37 SHA256 564dc969ff3374e8c59345f250b83f20d3dd77a5590bb419af0b6a7417eda0b8
-MISC ChangeLog 5665 RMD160 0f5a45a3b4e65ef3f42a104b28a52f2006417a7e SHA1 7d083eb80c9c5d9b3efc699cab4e86c58018ea92 SHA256 02dfa4a535210f526a7ccc86a07e728cfa0307c6d28e222382accb8b9c95d07c
+EBUILD pykde4-4.3.4.ebuild 1989 RMD160 d9fcea0153fd4b4aa56c9290b235919aabe34cda SHA1 c5af4ddea60f306f0627ec3036bcfe1707f06b49 SHA256 76835f3385c39e0e75ba3a262d952cec58387b4343da6dd6eba66594a3614360
+MISC ChangeLog 5839 RMD160 5979291c82708e400bdf1b56d91b0d1b60795022 SHA1 d0ec087679c1667da0cd7961d21cef4f9cfa6e5a SHA256 6faa247c7bc88c8ee417e8e820deb030fa0cc04b158e3f4b5f6f42515b12adb7
MISC metadata.xml 238 RMD160 9be6416ded548e9463d81433e049e86c83de9402 SHA1 7bc6a39f1c1f6779317ead72ee7bd5943948823a SHA256 f46f6479e5a9633b119177919fa9772becea973d8ce1dba589eafbeb923cdb4e
diff --git a/kde-base/pykde4/files/pykde4-4.3.4-typedefs.sip.patch b/kde-base/pykde4/files/pykde4-4.3.4-typedefs.sip.patch
new file mode 100644
index 000000000000..1245cadfb28f
--- /dev/null
+++ b/kde-base/pykde4/files/pykde4-4.3.4-typedefs.sip.patch
@@ -0,0 +1,385 @@
+--- trunk/KDE/kdebindings/python/pykde4/sip/kdecore/typedefs.sip 2009/10/11 11:55:17 1033861
++++ trunk/KDE/kdebindings/python/pykde4/sip/kdecore/typedefs.sip 2010/01/16 10:06:39 1075490
+@@ -215,6 +215,122 @@
+ %End
+ };
+
++template <TYPE1,int>
++%MappedType QMap<TYPE1,int>
++{
++%TypeHeaderCode
++#include <qmap.h>
++%End
++
++%ConvertFromTypeCode
++ // Create the dictionary.
++ PyObject *d = PyDict_New();
++
++ if (!d)
++ return NULL;
++
++ // Set the dictionary elements.
++ QMap<TYPE1, int>::const_iterator i = sipCpp->constBegin();
++
++ while (i != sipCpp->constEnd())
++ {
++ TYPE1 *t1 = new TYPE1(i.key());
++ int t2 = i.value();
++
++ PyObject *t1obj = sipConvertFromNewType(t1, sipType_TYPE1, sipTransferObj);
++#if PY_MAJOR_VERSION >= 3
++ PyObject *t2obj = PyLong_FromLong(t2);
++#else
++ PyObject *t2obj = PyInt_FromLong(t2);
++#endif
++
++ if (t1obj == NULL || t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
++ {
++ Py_DECREF(d);
++
++ if (t1obj) {
++ Py_DECREF(t1obj);
++ } else {
++ delete t1;
++ }
++
++ if (t2obj) {
++ Py_DECREF(t2obj);
++ }
++ return NULL;
++ }
++
++ Py_DECREF(t1obj);
++ Py_DECREF(t2obj);
++
++ ++i;
++ }
++
++ return d;
++%End
++
++%ConvertToTypeCode
++ PyObject *t1obj;
++ PyObject *t2obj;
++ SIP_SSIZE_T i = 0;
++
++ // Check the type if that is all that is required.
++ if (sipIsErr == NULL)
++ {
++ if (!PyDict_Check(sipPy))
++ return 0;
++
++ while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
++ {
++ if (!sipCanConvertToType(t1obj, sipType_TYPE1, SIP_NOT_NONE))
++ return 0;
++
++#if PY_MAJOR_VERSION >= 3
++ if (!PyNumber_Check(t2obj))
++#else
++ if (!PyInt_Check(t2obj))
++#endif
++ return 0;
++ }
++
++ return 1;
++ }
++
++ QMap<TYPE1, int> *qm = new QMap<TYPE1, int>;
++
++ i = 0;
++ while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
++ {
++ int state1;
++
++ TYPE1 *t1 = reinterpret_cast<TYPE1 *>(sipConvertToType(t1obj, sipType_TYPE1, sipTransferObj, SIP_NOT_NONE, &state1, sipIsErr));
++
++#if PY_MAJOR_VERSION >= 3
++ int t2 = PyLong_AsLong (t2obj);
++#else
++ int t2 = PyInt_AS_LONG (t2obj);
++#endif
++
++ if (*sipIsErr)
++ {
++ sipReleaseType(t1, sipType_TYPE1, state1);
++
++ delete qm;
++ return 0;
++ }
++
++ qm->insert(*t1, t2);
++
++ sipReleaseType(t1, sipType_TYPE1, state1);
++ }
++
++ *sipCppPtr = qm;
++
++ return sipGetState(sipTransferObj);
++%End
++};
++
++
+ class KShared;
+
+ template <TYPE>
+@@ -239,10 +355,10 @@
+
+ %ConvertToTypeCode
+ // Convert a Python instance to a Ptr on the heap.
+-
+- if (sipIsErr == NULL)
+- return PyInstance_Check(sipPy);
+-
++ if (sipIsErr == NULL) {
++ return 1;
++ }
++
+ int iserr = 0;
+ TYPE *cpp = (TYPE *)sipForceConvertToType(sipPy, sipType_TYPE, NULL, 0, NULL, &iserr);
+
+@@ -466,91 +582,6 @@
+ %End
+ };
+
+-
+-template <TYPE*>
+-%MappedType QSet<TYPE*>
+-{
+-%TypeHeaderCode
+-#include <qset.h>
+-%End
+-
+-%ConvertFromTypeCode
+- // Create the list.
+- PyObject *l;
+-
+- if ((l = PyList_New(sipCpp->size())) == NULL)
+- return NULL;
+-
+- // Set the list elements.
+- QSet<TYPE*> 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<TYPE*> *qs = new QSet<TYPE*>;
+-
+- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- {
+- int state;
+-
+- TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM (l, 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 <TYPE>
+ %MappedType QSet<TYPE>
+ {
+@@ -716,12 +747,14 @@
+ return NULL;
+
+ // Set the list elements.
+- for (int i = 0; i < sipCpp->size(); ++i)
+- {
++ for (int i = 0; i < sipCpp->size(); ++i) {
+ PyObject *pobj;
+
+- if ((pobj = PyInt_FromLong(sipCpp->value(i))) == NULL)
+- {
++#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;
+@@ -740,9 +773,14 @@
+
+ QList<uint> *ql = new QList<uint>;
+
+- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
++ 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);
+@@ -824,3 +862,116 @@
+ %End
+ };
+
++%MappedType QHash<int,int>
++{
++%TypeHeaderCode
++#include <qhash.h>
++%End
++
++%ConvertFromTypeCode
++ // Create the dictionary.
++ PyObject *d = PyDict_New();
++
++ if (!d)
++ return NULL;
++
++ // Set the dictionary elements.
++ QHash<int, int>::const_iterator i = sipCpp->constBegin();
++
++ while (i != sipCpp->constEnd())
++ {
++ int t1 = i.key();
++ int t2 = i.value();
++
++#if PY_MAJOR_VERSION >= 3
++ PyObject *t1obj = PyLong_FromLong ((long)t1);
++ PyObject *t2obj = PyLong_FromLong ((long)t2);
++#else
++ PyObject *t1obj = PyInt_FromLong ((long)t1);
++ PyObject *t2obj = PyInt_FromLong ((long)t2);
++#endif
++
++ if (PyDict_SetItem(d, t1obj, t2obj) < 0)
++ {
++ Py_DECREF(d);
++
++ if (t1obj)
++ Py_DECREF(t1obj);
++
++ if (t2obj)
++ Py_DECREF(t2obj);
++
++ return NULL;
++ }
++
++ Py_DECREF(t1obj);
++ Py_DECREF(t2obj);
++
++ ++i;
++ }
++
++ return d;
++%End
++
++%ConvertToTypeCode
++ PyObject *t1obj, *t2obj;
++ SIP_SSIZE_T i = 0;
++
++ // Check the type if that is all that is required.
++ if (sipIsErr == NULL)
++ {
++ if (!PyDict_Check(sipPy))
++ return 0;
++
++ while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
++ {
++#if PY_MAJOR_VERSION >= 3
++ if (!PyNumber_Check (t1obj))
++#else
++ if (!PyInt_Check (t1obj))
++#endif
++ return 0;
++
++#if PY_MAJOR_VERSION >= 3
++ if (!PyNumber_Check (t2obj))
++#else
++ if (!PyInt_Check (t2obj))
++#endif
++ return 0;
++ }
++
++ return 1;
++ }
++
++ QHash<int, int> *qm = new QHash<int, int>;
++
++ while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
++ {
++ int state2;
++
++#if PY_MAJOR_VERSION >= 3
++ int t1 = PyLong_AsLong (t1obj);
++#else
++ int t1 = PyInt_AS_LONG (t1obj);
++#endif
++
++#if PY_MAJOR_VERSION >= 3
++ int t2 = PyLong_AsLong (t2obj);
++#else
++ int t2 = PyInt_AS_LONG (t2obj);
++#endif
++
++ if (*sipIsErr)
++ {
++ delete qm;
++ return 0;
++ }
++
++ qm->insert(t1, t2);
++ }
++
++ *sipCppPtr = qm;
++
++ return sipGetState(sipTransferObj);
++%End
++};
diff --git a/kde-base/pykde4/pykde4-4.3.4.ebuild b/kde-base/pykde4/pykde4-4.3.4.ebuild
index 1c0a38f72881..a6c2458414a2 100644
--- a/kde-base/pykde4/pykde4-4.3.4.ebuild
+++ b/kde-base/pykde4/pykde4-4.3.4.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/pykde4/pykde4-4.3.4.ebuild,v 1.4 2009/12/27 15:27:05 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/pykde4/pykde4-4.3.4.ebuild,v 1.5 2010/01/16 11:28:43 hwoarang Exp $
EAPI="2"
@@ -38,6 +38,7 @@ src_prepare() {
sed -e '/^ADD_SUBDIRECTORY(examples)/s/^/# DISABLED /' -i python/${PN}/CMakeLists.txt \
|| die "Failed to disable examples"
fi
+ epatch "${FILESDIR}"/${P}-typedefs.sip.patch
}
src_configure() {