diff --git a/python-gtkextra-1.1.0-PyCObject.patch b/python-gtkextra-1.1.0-PyCObject.patch new file mode 100644 index 0000000..ff88cab --- /dev/null +++ b/python-gtkextra-1.1.0-PyCObject.patch @@ -0,0 +1,29 @@ +diff -urN python-gtkextra/gtkextra/gtkextra.override python-gtkextra-1.1.0/gtkextra/gtkextra.override +--- python-gtkextra/gtkextra/gtkextra.override 2011-02-04 16:08:23.221670318 +0100 ++++ python-gtkextra-1.1.0/gtkextra/gtkextra.override 2011-02-04 16:18:48.674149417 +0100 +@@ -595,6 +595,16 @@ + Py_XDECREF(py_plot); + } + ++static void ++pycapsule_strfreev(PyObject *capsule) ++{ ++ gchar **v; ++ ++ v = PyCapsule_GetPointer(capsule, NULL); ++ if (v != NULL) ++ g_strfreev (v); ++} ++ + /* ---------------------------------------------------------------------- */ + %% + modulename gtkextra +@@ -977,7 +987,7 @@ + } + + labels = g_new0(char *, num_labels+1); +- py_c_obj = PyCObject_FromVoidPtr(labels, (void*) g_strfreev); ++ py_c_obj = PyCapsule_New(labels, NULL, pycapsule_strfreev); + pygtkextra_set_data(self, labels_key, py_c_obj); + Py_DECREF(py_c_obj); + diff --git a/python-gtkextra.spec b/python-gtkextra.spec index eae828e..8c50a8d 100644 --- a/python-gtkextra.spec +++ b/python-gtkextra.spec @@ -3,7 +3,7 @@ Summary: Python bindings for gtkextra Name: python-gtkextra Version: 1.1.0 -Release: 13%{?dist} +Release: 14%{?dist} # FIXME: the license is not quite clear, using the most restrictive license # for this field. See # http://sourceforge.net/tracker/index.php?func=detail&aid=1941652&group_id=35371&atid=414148 @@ -15,6 +15,8 @@ Patch0: python-gtkextra-1.1.0-update.patch Patch1: python-gtkextra-1.1.0-codegenmoved.patch # https://sourceforge.net/tracker/?func=detail&aid=2805069&group_id=35371&atid=414148 Patch2: python-gtkextra-1.1.0-Makefile.patch +# https://sourceforge.net/tracker/?func=detail&aid=3172768&group_id=35371&atid=414148 +Patch3: python-gtkextra-1.1.0-PyCObject.patch BuildRequires: gtk+extra-devel, pygtk2-devel, python2-devel # For autoreconf BuildRequires: autoconf, automake, libtool @@ -31,6 +33,7 @@ This package provides a Python interface to the GtkExtra2 widget set for GTK2. %patch0 -p1 -b .update %patch1 -p1 -b .codegenmoved %patch2 -p1 -b .Makefile +%patch3 -p1 -b .PyCObject autoreconf -fi %build @@ -55,6 +58,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/pygtk/2.0/defs/gtkextra*.defs %changelog +* Fri Feb 4 2011 Miloslav Trmač - 1.1.0-14 +- Port from PyCObject to PyCapsule (but pygtk's use of PyCObject remains) + * Thu Jul 22 2010 David Malcolm - 1.1.0-13 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild