[packages/python-PyKDE4] - Patch wich allows package to build using python 4.14 with API v9.0.
draenog
draenog at pld-linux.org
Fri Nov 16 19:12:07 CET 2012
commit 8d07ebd8712e1507b10ff66f1dae1fce296cc780
Author: Lukasz Masko <lmasko at pld-linux.org>
Date: Fri Nov 16 15:37:21 2012 +0100
- Patch wich allows package to build using python 4.14 with API v9.0.
python-PyKDE4-typedefs.patch | 80 ++++++++++++++++++++++++++++++++++++++++++++
python-PyKDE4.spec | 6 ++--
2 files changed, 84 insertions(+), 2 deletions(-)
---
diff --git a/python-PyKDE4.spec b/python-PyKDE4.spec
index a6afd3b..eeda79f 100644
--- a/python-PyKDE4.spec
+++ b/python-PyKDE4.spec
@@ -3,18 +3,19 @@
%define _state stable
%define orgname pykde4
%define qtver 4.8.0
-%define sipver 2:4.13
+%define sipver 2:4.14
%define pyqtver 4.9
Summary: PyKDE4 - Python bindings for KDE 4
Summary(pl.UTF-8): PyKDE4 - dowiązania KDE 4 dla Pythona
Name: python-PyKDE4
Version: 4.9.2
-Release: 1
+Release: 2
License: GPL
Group: Libraries/Python
Source0: ftp://ftp.kde.org/pub/kde/%{_state}/%{version}/src/%{orgname}-%{version}.tar.xz
# Source0-md5: 176fe3a693b4722a3bf7e22f1365ab59
+Patch0: %{name}-typedefs.patch
BuildRequires: cmake >= 2.8.0
BuildRequires: kde4-kdebase-workspace-devel >= %{version}
BuildRequires: python-PyQt4-devel >= %{pyqtver}
@@ -79,6 +80,7 @@ Przykłady dla PyKDE4.
%prep
%setup -q -n %{orgname}-%{version}
+%patch0 -p1
%build
install -d build
diff --git a/python-PyKDE4-typedefs.patch b/python-PyKDE4-typedefs.patch
new file mode 100644
index 0000000..2c8f9ab
--- /dev/null
+++ b/python-PyKDE4-typedefs.patch
@@ -0,0 +1,80 @@
+--- pykde4-4.9.2/sip/kdecore/typedefs.sip~ 2012-09-28 02:18:24.000000000 +0200
++++ pykde4-4.9.2/sip/kdecore/typedefs.sip 2012-11-16 14:14:42.000000000 +0100
+@@ -951,77 +951,3 @@
+ %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
+-};
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-PyKDE4.git/commitdiff/8d07ebd8712e1507b10ff66f1dae1fce296cc780
More information about the pld-cvs-commit
mailing list