From 600fbb07feb21c1b40c8f9c0ce509b0dfc7c647a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 13 Jul 2007 01:54:21 +0000 Subject: [PATCH] fix build issues on ppc --- glib2.spec | 8 +++++++- ppc-cast.patch | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 ppc-cast.patch diff --git a/glib2.spec b/glib2.spec index 416ecd2..ad1dbba 100644 --- a/glib2.spec +++ b/glib2.spec @@ -3,13 +3,15 @@ Summary: A library of handy utility functions Name: glib2 Version: 2.13.7 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL Group: System Environment/Libraries URL: http://www.gtk.org Source: http://download.gnome.org/sources/glib/2.13/glib-%{version}.tar.bz2 Source2: glib2.sh Source3: glib2.csh +# fixed in upstream svn +Patch0: ppc-cast.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pkgconfig >= 1:0.14 BuildRequires: gettext @@ -45,6 +47,7 @@ of version 2 of the GLib library. %prep %setup -q -n glib-%{version} +%patch0 -p1 -b .ppc-cast %build for i in config.guess config.sub ; do @@ -117,6 +120,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/lib*.a %changelog +* Thu Jul 12 2007 Matthias Clasen - 2.13.7-2 +- Fix build issues on ppc + * Thu Jul 12 2007 Matthias Clasen - 2.13.7-1 - Update to 2.13.7 diff --git a/ppc-cast.patch b/ppc-cast.patch new file mode 100644 index 0000000..6ed5cf2 --- /dev/null +++ b/ppc-cast.patch @@ -0,0 +1,38 @@ +diff -up glib-2.13.7/glib/gthread.c.ppc-cast glib-2.13.7/glib/gthread.c +--- glib-2.13.7/glib/gthread.c.ppc-cast 2007-07-12 21:43:31.000000000 -0400 ++++ glib-2.13.7/glib/gthread.c 2007-07-12 21:43:45.000000000 -0400 +@@ -223,11 +223,11 @@ void + g_once_init_leave (volatile gsize *value_location, + gsize initialization_value) + { +- g_return_if_fail (g_atomic_pointer_get (value_location) == 0); ++ g_return_if_fail (g_atomic_pointer_get ((void*) value_location) == 0); + g_return_if_fail (initialization_value != 0); + g_return_if_fail (g_once_init_list != NULL); + +- g_atomic_pointer_set (value_location, initialization_value); ++ g_atomic_pointer_set ((void*) value_location, (void*) initialization_value); + g_mutex_lock (g_once_mutex); + g_once_init_list = g_slist_remove (g_once_init_list, (void*) value_location); + g_cond_broadcast (g_once_cond); +@@ -255,7 +255,7 @@ g_static_mutex_get_mutex_impl (GMutex** + g_mutex_lock (g_once_mutex); + + if (!(*mutex)) +- g_atomic_pointer_set (mutex, g_mutex_new()); ++ g_atomic_pointer_set ((void*) mutex, g_mutex_new()); + + g_mutex_unlock (g_once_mutex); + +diff -up glib-2.13.7/glib/gthread.h.ppc-cast glib-2.13.7/glib/gthread.h +--- glib-2.13.7/glib/gthread.h.ppc-cast 2007-07-12 21:43:27.000000000 -0400 ++++ glib-2.13.7/glib/gthread.h 2007-07-12 21:43:43.000000000 -0400 +@@ -332,7 +332,7 @@ void g_once_init_leav + G_INLINE_FUNC gboolean + g_once_init_enter (volatile gsize *value_location) + { +- if G_LIKELY (g_atomic_pointer_get (value_location) !=0) ++ if G_LIKELY (g_atomic_pointer_get ((void*) value_location) !=0) + return FALSE; + else + return g_once_init_enter_impl (value_location);