From 56d248ef065958fac21cdbb1a979dd3395771bcd Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Jan 22 2013 16:11:34 +0000 Subject: Add various missing BuildRequires, switch to pkgconfig() syntax - Backport upstream patch which fixes a crasher in some applications --- diff --git a/0001-Fix-set_qdata-warning-on-accessing-NULL-gobject-prop.patch b/0001-Fix-set_qdata-warning-on-accessing-NULL-gobject-prop.patch new file mode 100644 index 0000000..e20c7be --- /dev/null +++ b/0001-Fix-set_qdata-warning-on-accessing-NULL-gobject-prop.patch @@ -0,0 +1,28 @@ +From 42d871eb0b08ee6d55e95cc7e4b90844919555b9 Mon Sep 17 00:00:00 2001 +From: Ivan Stankovic +Date: Tue, 21 Feb 2012 12:24:58 +0100 +Subject: [PATCH] Fix set_qdata warning on accessing NULL gobject property + +https://bugzilla.gnome.org/show_bug.cgi?id=661155 +--- + gobject/pygobject.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/gobject/pygobject.c b/gobject/pygobject.c +index 6c2f06c..70dc89a 100644 +--- a/gobject/pygobject.c ++++ b/gobject/pygobject.c +@@ -991,7 +991,9 @@ pygobject_new(GObject *obj) + PyObject * + pygobject_new_sunk(GObject *obj) + { +- g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1)); ++ if (obj) ++ g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1)); ++ + return pygobject_new_full(obj, TRUE, NULL); + } + +-- +1.7.1 + diff --git a/pygobject2.spec b/pygobject2.spec index 1d7b7c1..86e68f2 100644 --- a/pygobject2.spec +++ b/pygobject2.spec @@ -1,12 +1,8 @@ -# Last updated for version 2.21.0 -%define glib2_version 2.22.4 -%define python2_version 2.3.5 - ### Abstract ### Name: pygobject2 Version: 2.28.6 -Release: 7%{?dist} +Release: 8%{?dist} License: LGPLv2+ Group: Development/Languages Summary: Python 2 bindings for GObject @@ -21,11 +17,14 @@ Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-%{versio # in fact it is of type 'GFlags' # using upstream patch (rhbz#790053) Patch1: fix-gio-flags.patch +Patch2: 0001-Fix-set_qdata-warning-on-accessing-NULL-gobject-prop.patch ### Build Dependencies ### -BuildRequires: glib2-devel >= %{glib2_version} -BuildRequires: python2-devel >= %{python2_version} +BuildRequires: pkgconfig(gio-unix-2.0) +BuildRequires: pkgconfig(gobject-introspection-1.0) +BuildRequires: pkgconfig(python2) +BuildRequires: pkgconfig(cairo-gobject) # Bootstrap requirements BuildRequires: automake autoconf libtool @@ -65,6 +64,7 @@ This package contains documentation files for %{name}. %prep %setup -q -n pygobject-%{version} %patch1 -p1 +%patch2 -p1 find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|' @@ -123,6 +123,10 @@ rm examples/Makefile* %{_datadir}/pygobject/xsl %changelog +* Tue Jan 22 2013 Colin Walters - 2.28.6-8 +- Add various missing BuildRequires, switch to pkgconfig() syntax +- Backport upstream patch which fixes a crasher in some applications + * Fri Jul 27 2012 Ville Skyttä - 2.28.6-7 - Add ldconfig post(un)install scriptlets.