Add various missing BuildRequires, switch to pkgconfig() syntax

- Backport upstream patch which fixes a crasher in some applications
This commit is contained in:
Colin Walters 2013-01-22 11:11:34 -05:00
parent 384df46c6b
commit 56d248ef06
2 changed files with 39 additions and 7 deletions

View File

@ -0,0 +1,28 @@
From 42d871eb0b08ee6d55e95cc7e4b90844919555b9 Mon Sep 17 00:00:00 2001
From: Ivan Stankovic <ivan.stankovic@avl.com>
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

View File

@ -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 <walters@redhat.com> - 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ä <ville.skytta@iki.fi> - 2.28.6-7
- Add ldconfig post(un)install scriptlets.