diff options
author | tcberner <tcberner@FreeBSD.org> | 2017-01-20 20:20:14 +0800 |
---|---|---|
committer | tcberner <tcberner@FreeBSD.org> | 2017-01-20 20:20:14 +0800 |
commit | 78596460298234ed35dc410a826655d446caaec8 (patch) | |
tree | 375a0d3e098b30df07d2f0056cb8829e54373282 /devel | |
parent | ca7cc84943ef1af8da0a253be73d7cf0ff78d391 (diff) | |
download | freebsd-ports-gnome-78596460298234ed35dc410a826655d446caaec8.tar.gz freebsd-ports-gnome-78596460298234ed35dc410a826655d446caaec8.tar.zst freebsd-ports-gnome-78596460298234ed35dc410a826655d446caaec8.zip |
Fix py-pykde4 against newest clang
PyList_SET_ITEM() is supposed to be void, but as a macro it's an
expression and has a pointer value. Clang 4.0 trips on the bogus
pointer comparison; given the comparison, it should be PyList_SetItem()
which returns -1 on failure.
As the produced code may be changed by this, bump PORTREVISION.
PR: 216253
Submitted by: Adriaan de Groot <groot@kde.org>
Reported by: jbeich
Reviewed by: rakuco, tcberner
Approved by: rakuco (mentor)
Differential Revision: https://reviews.freebsd.org/D9253
Diffstat (limited to 'devel')
-rw-r--r-- | devel/py-pykde4/Makefile | 2 | ||||
-rw-r--r-- | devel/py-pykde4/files/patch-sip_phonon_abstractvideodataoutput.sip | 16 | ||||
-rw-r--r-- | devel/py-pykde4/files/patch-sip_solid_powermanagement.sip | 13 | ||||
-rw-r--r-- | devel/py-pykde4/files/patch-sip_solid_predicate.sip | 13 |
4 files changed, 43 insertions, 1 deletions
diff --git a/devel/py-pykde4/Makefile b/devel/py-pykde4/Makefile index 41fce26f526e..a07f7cb46b45 100644 --- a/devel/py-pykde4/Makefile +++ b/devel/py-pykde4/Makefile @@ -2,7 +2,7 @@ PORTNAME= pykde4 PORTVERSION= ${KDE4_VERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel kde kde-kde4 python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/devel/py-pykde4/files/patch-sip_phonon_abstractvideodataoutput.sip b/devel/py-pykde4/files/patch-sip_phonon_abstractvideodataoutput.sip new file mode 100644 index 000000000000..8580740467e7 --- /dev/null +++ b/devel/py-pykde4/files/patch-sip_phonon_abstractvideodataoutput.sip @@ -0,0 +1,16 @@ +PyList_SET_ITEM() is supposed to be void, but as a macro it's an +expression and has a pointer value. Clang 4.0 trips on the bogus +pointer comparison; given the comparison, it should be PyList_SetItem() +which returns -1 on failure. + +--- sip/phonon/abstractvideodataoutput.sip.orig 2014-08-14 20:17:11 UTC ++++ sip/phonon/abstractvideodataoutput.sip +@@ -72,7 +72,7 @@ protected: + foreach (Phonon::Experimental::VideoFrame2::Format value, set) + { + PyObject *obj = PyInt_FromLong ((long) value); +- if (obj == NULL || PyList_SET_ITEM (l, i, obj) < 0) ++ if (obj == NULL || PyList_SetItem (l, i, obj) < 0) + { + Py_DECREF(l); + diff --git a/devel/py-pykde4/files/patch-sip_solid_powermanagement.sip b/devel/py-pykde4/files/patch-sip_solid_powermanagement.sip new file mode 100644 index 000000000000..2b628d90c222 --- /dev/null +++ b/devel/py-pykde4/files/patch-sip_solid_powermanagement.sip @@ -0,0 +1,13 @@ +See patch-sip_phonon_abstractvideodataoutput.sip + +--- sip/solid/powermanagement.sip.orig 2014-08-14 20:17:11 UTC ++++ sip/solid/powermanagement.sip +@@ -83,7 +83,7 @@ bool stopSuppressingS + #else + PyObject *obj = PyInt_FromLong ((long) value); + #endif +- if (obj == NULL || PyList_SET_ITEM (l, i, obj) < 0) ++ if (obj == NULL || PyList_SetItem (l, i, obj) < 0) + { + Py_DECREF(l); + diff --git a/devel/py-pykde4/files/patch-sip_solid_predicate.sip b/devel/py-pykde4/files/patch-sip_solid_predicate.sip new file mode 100644 index 000000000000..d4759268e38b --- /dev/null +++ b/devel/py-pykde4/files/patch-sip_solid_predicate.sip @@ -0,0 +1,13 @@ +See patch-sip_phonon_abstractvideodataoutput.sip + +--- sip/solid/predicate.sip.orig 2014-08-14 20:17:11 UTC ++++ sip/solid/predicate.sip +@@ -112,7 +112,7 @@ Py_BEGIN_ALLOW_THREADS + #else + PyObject *obj = PyInt_FromLong ((long) value); + #endif +- if (obj == NULL || PyList_SET_ITEM (l, i, obj) < 0) ++ if (obj == NULL || PyList_SetItem (l, i, obj) < 0) + { + Py_DECREF(l); + |