[gobject-introspection/f16] add fix for PPC failure, bugzilla 749604
Karsten Hopp
karsten at fedoraproject.org
Mon Dec 5 10:41:28 UTC 2011
commit 5bc747273de4e3472c02ccde0e55bddba8a2fd5a
Author: Karsten Hopp <karsten at redhat.com>
Date: Mon Dec 5 11:42:34 2011 +0100
add fix for PPC failure, bugzilla 749604
gobject-introspection-1.30.0-749604.patch | 83 +++++++++++++++++++++++++++++
gobject-introspection.spec | 7 ++-
2 files changed, 89 insertions(+), 1 deletions(-)
---
diff --git a/gobject-introspection-1.30.0-749604.patch b/gobject-introspection-1.30.0-749604.patch
new file mode 100644
index 0000000..69d61b2
--- /dev/null
+++ b/gobject-introspection-1.30.0-749604.patch
@@ -0,0 +1,83 @@
+diff -up gobject-introspection-1.30.0/girepository/girffi.c.enum-fixes gobject-introspection-1.30.0/girepository/girffi.c
+--- gobject-introspection-1.30.0/girepository/girffi.c.enum-fixes 2011-11-29 12:30:04.759106057 -0600
++++ gobject-introspection-1.30.0/girepository/girffi.c 2011-11-29 11:06:26.540248521 -0600
+@@ -30,16 +30,10 @@
+ #include "girepository.h"
+ #include "girepository-private.h"
+
+-/**
+- * gi_type_tag_get_ffi_type:
+- * @tag: A #GITypeTag
+- * @is_pointer: Whether or not this is a pointer type
+- *
+- * Returns: A #ffi_type corresponding to the platform default C ABI for @tag and @is_pointer.
+- */
+-ffi_type *
+-gi_type_tag_get_ffi_type (GITypeTag tag,
+- gboolean is_pointer)
++static ffi_type *
++gi_type_tag_get_ffi_type_internal (GITypeInfo *info,
++ GITypeTag tag,
++ gboolean is_pointer)
+ {
+ switch (tag)
+ {
+@@ -77,12 +71,27 @@ gi_type_tag_get_ffi_type (GITypeTag ta
+ case GI_TYPE_TAG_UTF8:
+ case GI_TYPE_TAG_FILENAME:
+ case GI_TYPE_TAG_ARRAY:
+- case GI_TYPE_TAG_INTERFACE:
+ case GI_TYPE_TAG_GLIST:
+ case GI_TYPE_TAG_GSLIST:
+ case GI_TYPE_TAG_GHASH:
+ case GI_TYPE_TAG_ERROR:
+ return &ffi_type_pointer;
++ case GI_TYPE_TAG_INTERFACE:
++ {
++ /* This is for compat, but is broken! */
++ if (info == NULL)
++ return &ffi_type_pointer;
++
++ GIBaseInfo *interface = g_type_info_get_interface (info);
++ switch (g_base_info_get_type (interface))
++ {
++ case GI_INFO_TYPE_ENUM:
++ case GI_INFO_TYPE_FLAGS:
++ return &ffi_type_sint32;
++ default:
++ return &ffi_type_pointer;
++ }
++ }
+ case GI_TYPE_TAG_VOID:
+ if (is_pointer)
+ return &ffi_type_pointer;
+@@ -96,6 +105,20 @@ gi_type_tag_get_ffi_type (GITypeTag ta
+ }
+
+ /**
++ * gi_type_tag_get_ffi_type:
++ * @tag: A #GITypeTag
++ * @is_pointer: Whether or not this is a pointer type
++ *
++ * Returns: A #ffi_type corresponding to the platform default C ABI for @tag and @is_pointer.
++ */
++ffi_type *
++gi_type_tag_get_ffi_type (GITypeTag tag,
++ gboolean is_pointer)
++{
++ return gi_type_tag_get_ffi_type_internal (NULL, tag, is_pointer);
++}
++
++/**
+ * g_type_info_get_ffi_type:
+ * @info: A #GITypeInfo
+ *
+@@ -104,7 +127,7 @@ gi_type_tag_get_ffi_type (GITypeTag ta
+ ffi_type *
+ g_type_info_get_ffi_type (GITypeInfo *info)
+ {
+- return gi_type_tag_get_ffi_type (g_type_info_get_tag (info), g_type_info_is_pointer (info));
++ return gi_type_tag_get_ffi_type_internal (info, g_type_info_get_tag (info), g_type_info_is_pointer (info));
+ }
+
+ /**
diff --git a/gobject-introspection.spec b/gobject-introspection.spec
index c2a7aa7..fe81b9f 100644
--- a/gobject-introspection.spec
+++ b/gobject-introspection.spec
@@ -3,7 +3,7 @@
Name: gobject-introspection
Version: 1.30.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Introspection system for GObject-based libraries
Group: Development/Libraries
@@ -11,6 +11,7 @@ License: GPLv2+, LGPLv2+, MIT
URL: http://live.gnome.org/GObjectIntrospection
#VCS: git:git://git.gnome.org/gobject-introspection
Source0: http://download.gnome.org/sources/gobject-introspection/1.30/%{name}-%{version}.tar.xz
+Patch0: gobject-introspection-1.30.0-749604.patch
Obsoletes: gir-repository
@@ -52,6 +53,7 @@ Libraries and headers for gobject-introspection
%prep
%setup -q
+%patch0 -p1 -b .538194
%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
@@ -92,6 +94,9 @@ find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
%{_datadir}/gtk-doc/html/gi/*
%changelog
+* Mon Dec 05 2011 Karsten Hopp <karsten at redhat.com> 1.30.0-2
+- add fix for PPC failure, bugzilla 749604
+
* Mon Sep 26 2011 Ray <rstrode at redhat.com> - 1.30.0-1
- Update to 1.30.0
More information about the scm-commits
mailing list