Summary: A library of handy utility functions Name: glib2 Version: 2.12.4 Release: 2 License: LGPLv2+ Group: System Environment/Libraries URL: http://www.gtk.org Source: glib-%{version}.tar.bz2 Patch0: glib-2.12.4-aix.patch Patch1: glib-2.12.4-autotools.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: gettext BuildRequires: pkg-config >= 0.19 Obsoletes: glib-gtkbeta # Use --define 'no64 1' on the command line to disable 64bit build %{!?no64:%define BUILD64 1} %{?no64:%define BUILD64 0} %define prefix64 %{_prefix}/64 %description GLib is the low-level core library that forms the basis for projects such as GTK+ and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system. This package provides version 2 of GLib. The library is available as 32-bit and 64-bit. %package devel Summary: A library of handy utility functions Group: Development/Libraries Requires: pkg-config Requires: %{name} = %{version}-%{release} %description devel The glib2-devel package includes the header files for version 2 of the GLib library. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc_r -q64" or "gcc -maix64". %prep %setup -q -n glib-%{version} if test x$PATCH = x ; then PATCH=patch ; fi $PATCH -p2 -s < %{_sourcedir}/glib-2.12.4-aix.patch $PATCH -p2 -s < %{_sourcedir}/glib-2.12.4-autotools.patch %if %{BUILD64} == 1 # Prep 64-bit build in 64bit subdirectory mkdir 64bit cd 64bit bzip2 -dc %{SOURCE0} | tar -xf - cd glib-2.12.4 $PATCH -p2 -s < %{_sourcedir}/glib-2.12.4-aix.patch $PATCH -p2 -s < %{_sourcedir}/glib-2.12.4-autotools.patch %endif %build # now build the 32-bit version export OBJECT_MODE=32 export CC="xlc_r -q32" PATH=%{_bindir}:$PATH ./configure --prefix=%{_prefix} --disable-gtk-doc PATH=%{_bindir}:$PATH make # now build the 64-bit version %if %{BUILD64} == 1 cd 64bit/glib-2.12.4 export OBJECT_MODE=64 export CC="xlc_r -q64" PATH=%{_bindir}:$PATH ./configure --prefix=%{_prefix} --disable-gtk-doc PATH=%{_bindir}:$PATH make # Go back to 32-bit library and add our 64bit shared object # into same archive cd ../.. pwd rm -f glib/.libs/libglib-2.0.a /usr/bin/ar -X32_64 -r glib/.libs/libglib-2.0.a glib/.libs/libglib-2.0.so.0 ./64bit/glib-2.12.4/glib/.libs/libglib-2.0.so.0 /usr/bin/ar -X32_64 -q gmodule/.libs/libgmodule-2.0.a ./64bit/glib-2.12.4/gmodule/.libs/libgmodule-2.0.so.0 /usr/bin/ar -X32_64 -q gobject/.libs/libgobject-2.0.a ./64bit/glib-2.12.4/gobject/.libs/libgobject-2.0.so.0 /usr/bin/ar -X32_64 -q gthread/.libs/libgthread-2.0.a ./64bit/glib-2.12.4/gthread/.libs/libgthread-2.0.so.0 %endif #BUILD64 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install-strip # make links ( cd ${RPM_BUILD_ROOT} pwd for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) #Add links for 64-bit library members %if %{BUILD64} == 1 ( mkdir -p $RPM_BUILD_ROOT/%{prefix64}/lib cd $RPM_BUILD_ROOT/%{prefix64}/lib ln -s ../../lib/*.a . ) %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system -) %doc AUTHORS COPYING NEWS %{_libdir}/*.a /usr/lib/*.a %{_datadir}/locale/*/LC_MESSAGES/glib20.mo %files devel %defattr(-, root, system) %doc %{_datadir}/gtk-doc/html/* %{_libdir}/glib-2.0 %{_libdir}/lib*.la /usr/lib/*.la %{_includedir}/* %{_datadir}/aclocal/* %{_libdir}/pkgconfig/* %{_datadir}/glib-2.0 /usr/include/* %{_bindir}/* /usr/bin/* %{_mandir}/man1/* %changelog * Thu Nov 16 2006 BULL - Release 1 - New version version: 2.12.4 - gnome 2.16.1 * Wed Sep 13 2006 BULL - Release 4 - New version version: 2.10.1 - added tag to support the build 64 bit - changed type long -> int to support 64 bit in fonction g_get_current_dir - packaging fixes perl at /usr/lib/ * Fri Dec 23 2005 BULL - Release 3 - Prototype gtk 64 bit * Tue Dec 06 2005 BULL - Release 2 - correct UTF8 conversion problem that for example prevent metacity to launch at startup. * Tue Nov 15 2005 BULL - Release 1 - New version version: 2.8.1 * Tue Aug 09 2005 BULL - Release 4 - Create symlinks between /usr/share and /opt/freeware/share * Thu Jun 23 2005 BULL - Release 3 * Wed May 25 2005 BULL - Release 1 - New version version: 2.6.3 * Wed Feb 16 2005 BULL - Release 2 - Move setting of G_BROKEN_FILENAMES in /etc/environment from gedit to glib * Wed Nov 24 2004 BULL - Release 1 - New version version: 2.4.7 * Tue Nov 23 2004 BULL - Release 3 * Mon Sep 20 2004 BULL - Release 2 - Do not core when dlerror() returns NIL