# HG changeset patch # User Michael Schloh von Bennewitz # Date 1344000082 -7200 # Node ID eb5f1f7ac5ffb4471328362f6930b78b505cfc6b # Parent e99334bd789c4a876d7ad40e2dca2e7855ffb215 Correct various defects in the build configuration including: Improve SVR5 portability, support nonpkgconfig libelf(3), debug recently introduced upstream gresource code, and use parallel make. diff -r e99334bd789c -r eb5f1f7ac5ff glib/glib.patch --- a/glib/glib.patch Fri Aug 03 15:16:43 2012 +0200 +++ b/glib/glib.patch Fri Aug 03 15:21:22 2012 +0200 @@ -141,3 +141,34 @@ } static void +diff -Nau gio/gsocket.c.orig gio/gsocket.c +Index: gio/gsocket.c +--- gio/gsocket.c.orig 2012-08-03 11:38:08.419548195 +0200 ++++ gio/gsocket.c 2012-08-03 11:38:11.307357875 +0200 +@@ -48,6 +48,10 @@ + #include + #endif + ++#if defined (__SVR4) && defined (__sun) ++#include ++#endif ++ + #include "gcancellable.h" + #include "gioenumtypes.h" + #include "ginetaddress.h" +diff -Nau gio/gresource-tool.c.orig gio/gresource-tool.c +Index: gio/gresource-tool.c +--- gio/gresource-tool.c.orig 2012-08-03 11:25:31.632225248 +0200 ++++ gio/gresource-tool.c 2012-08-03 11:38:12.657797557 +0200 +@@ -31,6 +31,11 @@ + #include + + #ifdef HAVE_LIBELF ++/* Solaris libelf does not support largefile in 32-bit mode */ ++#if defined (__SVR4) && defined (__sun) && defined (__i386) ++#undef _FILE_OFFSET_BITS ++#define _FILE_OFFSET_BITS 32 ++#endif + #include + #include + #include diff -r e99334bd789c -r eb5f1f7ac5ff glib/glib.spec --- a/glib/glib.spec Fri Aug 03 15:16:43 2012 +0200 +++ b/glib/glib.spec Fri Aug 03 15:21:22 2012 +0200 @@ -36,7 +36,7 @@ Group: Algorithm License: GPL Version: %{V_major}.%{V_minor} -Release: 20120713 +Release: 20120800 # package options %option with_threads yes @@ -105,10 +105,21 @@ -e 's;/gio-2\.0;/gio;g' \ -e 's;-l\(g[a-z]*\)-2\.0;-l\1;g' \ *-2.0.pc.in + %{l_shtool} subst \ + -e 's;\(#define _XOPEN_SOURCE\) 600;\1 601;' \ + glib/tests/strfuncs.c + case "%{l_platform -t}" in + *-sunos* ) + %{l_shtool} subst \ + -e 's;^\(LIBELF_LIBS =\);\1 -lelf;' \ + gio/Makefile.in + ;; + esac libs="" %if "%{with_threads}" == "yes" case "%{l_platform -t}" in *-netbsd* ) libs="-lpthread" ;; + *-sunos* ) libs="-lnsl -lsocket" ;; esac %endif CC="%{l_cc}" \ @@ -138,7 +149,7 @@ --disable-shared # build package - %{l_make} %{l_mflags} + %{l_make} %{l_mflags -O} %install # install package