# HG changeset patch # User Michael Schloh von Bennewitz # Date 1287746997 -7200 # Node ID ea0bfdfbb4ad723b64bca2da1dd2c32f8653a2ac # Parent f96f4c1a2d1aac68cae369c944ee0eaeb6aecccd Import package vendor original specs for necessary manipulations. diff -r f96f4c1a2d1a -r ea0bfdfbb4ad glib2/glib2.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/glib2/glib2.patch Fri Oct 22 13:29:57 2010 +0200 @@ -0,0 +1,74 @@ +Index: configure +--- configure.orig 2010-03-16 03:52:21.000000000 +0100 ++++ configure 2010-03-17 20:07:17.000000000 +0100 +@@ -25810,7 +25810,7 @@ + add_thread_lib="-l$thread_lib" + IN=" in -l$thread_lib" + fi +- LIBS="$add_thread_lib $glib_save_LIBS" ++ LIBS="$add_thread_lib `echo x$glib_save_LIBS | sed -e 's;^x;;' -e 's;-lrt;;'`" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_get_priority_min$IN" >&5 + $as_echo_n "checking for sched_get_priority_min$IN... " >&6; } +Index: glib-2.0.pc.in +--- glib-2.0.pc.in.orig 2009-04-01 01:04:20.000000000 +0200 ++++ glib-2.0.pc.in 2010-03-17 20:07:17.000000000 +0100 +@@ -9,6 +9,7 @@ + + Name: GLib + Description: C Utility Library ++Requires: libpcre + Version: @VERSION@ + Libs: -L${libdir} -lglib-2.0 @INTLLIBS@ + Libs.private: @ICONV_LIBS@ +Index: gmodule/gmodule-dl.c +--- gmodule/gmodule-dl.c.orig 2009-04-01 01:04:20.000000000 +0200 ++++ gmodule/gmodule-dl.c 2010-03-17 20:07:17.000000000 +0100 +@@ -107,6 +107,7 @@ + static gpointer + _g_module_self (void) + { ++#ifndef __FreeBSD__ + gpointer handle; + + /* to query symbols from the program itself, special link options +@@ -118,6 +119,9 @@ + g_module_set_error (fetch_dlerror (TRUE)); + + return handle; ++#else ++ return RTLD_DEFAULT; ++#endif + } + + static void +Index: tests/errorcheck-mutex-test.c +--- tests/errorcheck-mutex-test.c.orig 2009-04-01 01:04:20.000000000 +0200 ++++ tests/errorcheck-mutex-test.c 2010-03-17 20:07:17.000000000 +0100 +@@ -1,3 +1,5 @@ ++#ifdef G_THREADS_ENABLED ++ + #undef G_DISABLE_ASSERT + #undef G_LOG_DOMAIN + #define G_ERRORCHECK_MUTEXES +@@ -102,9 +104,12 @@ + timed_wait_on_otherwise_locked_mutex} + }; + ++#endif ++ + int + main (int argc, char* argv[]) + { ++#ifdef G_THREADS_ENABLED + int i; + + if (argc == 2) +@@ -126,6 +131,7 @@ + { + fprintf (stderr, " %s\n", func_table[i].name); + } ++#endif + + return 0; + } diff -r f96f4c1a2d1a -r ea0bfdfbb4ad glib2/glib2.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/glib2/glib2.spec Fri Oct 22 13:29:57 2010 +0200 @@ -0,0 +1,160 @@ +## +## glib2.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2010 OpenPKG Foundation e.V. +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package version +%define V_glib2_major 2.25 +%define V_glib2_minor 13 + +# package information +Name: glib2 +Summary: The Gtk Utility Library +URL: http://www.gtk.org/ +Vendor: The Gtk Project +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: BASE +Group: Algorithm +License: GPL +Version: %{V_glib2_major}.%{V_glib2_minor} +Release: 20100807 + +# package options +%option with_threads yes + +# list of sources +Source0: ftp://ftp.gnome.org/pub/gnome/sources/glib/%{V_glib2_major}/glib-%{version}.tar.gz +Patch0: glib2.patch + +# build information +BuildPreReq: OpenPKG, openpkg >= 20100101, perl, make, pkgconfig +PreReq: OpenPKG, openpkg >= 20100101, perl +BuildPreReq: gettext, libiconv, pcre, pcre::with_utf8 = yes +PreReq: gettext, libiconv, pcre, pcre::with_utf8 = yes + +%description + GLib is the low-level core library that originally was split out + from Gtk+. 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. + +%track + prog glib2 = { + version = %{version} + url = ftp://ftp.gnome.org/pub/gnome/sources/glib/%{V_glib2_major}/ + regex = glib-(__VER__)\.tar\.(gz|bz2) + } + +%prep + %setup -q -n glib-%{version} + %patch -p0 + +%build + # configure package + %{l_shtool} subst \ + -e 's;\$export_dynamic_flag_spec;;g' \ + -e 's;eval echo \\\\;eval echo ;' \ + configure + %{l_shtool} subst \ + -e 's;/glib-2\.0\.pc;/glib-x.x.pc;g' \ + -e 's;/gobject-2\.0\.pc;/gobject-x.x.pc;g' \ + -e 's;/gthread-2\.0\.pc;/gthread-x.x.pc;g' \ + -e 's;/gmodule-2\.0\.pc;/gmodule-x.x.pc;g' \ + -e 's;/gio-unix-2\.0\.pc;/gio-unix-x.x.pc;g' \ + -e 's;/gio-2\.0\.pc;/gio-x.x.pc;g' \ + -e 's;/glib-2\.0;/glib2;g' \ + -e 's;/gobject-2\.0;/gobject2;g' \ + -e 's;/gthread-2\.0;/gthread2;g' \ + -e 's;/gmodule-2\.0;/gmodule2;g' \ + -e 's;/gio-unix-2\.0;/gio-unix2;g' \ + -e 's;/gio-2\.0;/gio2;g' \ + -e 's;/glib-x\.x\.pc;/glib-2.0.pc;g' \ + -e 's;/gobject-x\.x\.pc;/gobject-2.0.pc;g' \ + -e 's;/gthread-x\.x\.pc;/gthread-2.0.pc;g' \ + -e 's;/gmodule-x\.x\.pc;/gmodule-2.0.pc;g' \ + -e 's;/gio-unix-x\.x\.pc;/gio-unix-2.0.pc;g' \ + -e 's;/gio-x\.x\.pc;/gio-2.0.pc;g' \ + -e 's;lib\(g[a-z]*\)-2\.0;lib\12;g' \ + `find . -name Makefile.in -print` \ + m4macros/glib-2.0.m4 + %{l_shtool} subst \ + -e 's;/glib-2\.0;/glib2;g' \ + -e 's;/gobject-2\.0;/gobject2;g' \ + -e 's;/gthread-2\.0;/gthread2;g' \ + -e 's;/gmodule-2\.0;/gmodule2;g' \ + -e 's;/gio-unix-2\.0;/gio-unix2;g' \ + -e 's;/gio-2\.0;/gio2;g' \ + -e 's;-l\(g[a-z]*\)-2\.0;-l\12;g' \ + *-2.0.pc.in + libs="" +%if "%{with_threads}" == "yes" + case "%{l_platform -t}" in + *-netbsd* ) libs="-lpthread" ;; + esac +%endif + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + LIBS="$libs" \ + PERL="%{l_prefix}/bin/perl" \ + PERL_PATH="%{l_prefix}/bin/perl" \ + GREP="grep" \ + ./configure \ + --prefix=%{l_prefix} \ + --mandir=%{l_prefix}/man \ + --with-libiconv=gnu \ + --disable-debug \ + --disable-shared \ + --with-pcre=system \ +%if "%{with_threads}" == "yes" + --enable-threads \ +%else + --disable-threads \ +%endif + --disable-gtk-doc \ + --disable-dtrace + + # build package + %{l_make} %{l_mflags} + +%install + # install package + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + + # strip down installation + rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/glib-2.0 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gtk-doc + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gdb + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + rm $RPM_BUILD_ROOT%{l_prefix}/lib/*.la + + # determine installation files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean +