diff options
author | joerg <joerg> | 2006-10-08 11:56:18 +0000 |
---|---|---|
committer | joerg <joerg> | 2006-10-08 11:56:18 +0000 |
commit | c19e52acfbcbcf3058ab7b676fc9c095781ad6b8 (patch) | |
tree | c1531bbcc48509c976dca75ef9543e0493f0e945 /devel | |
parent | 59ea9801028f7807b16359644cefeaee898028d7 (diff) | |
download | pkgsrc-c19e52acfbcbcf3058ab7b676fc9c095781ad6b8.tar.gz |
Use pkgsrc pthread magic and only that. Fixes build on Linux.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/glib2/distinfo | 4 | ||||
-rw-r--r-- | devel/glib2/patches/patch-aa | 164 |
2 files changed, 101 insertions, 67 deletions
diff --git a/devel/glib2/distinfo b/devel/glib2/distinfo index 67b2489a2ae..57ac6d5f017 100644 --- a/devel/glib2/distinfo +++ b/devel/glib2/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.71 2006/10/06 18:05:22 wiz Exp $ +$NetBSD: distinfo,v 1.72 2006/10/08 11:56:18 joerg Exp $ SHA1 (glib-2.12.4.tar.bz2) = 35be8f8a7ce47bb0f53ffcd50605a6f9596ebd04 RMD160 (glib-2.12.4.tar.bz2) = 3aac5f23cedcef25f7fd7acb6d4ebfa744e38edc Size (glib-2.12.4.tar.bz2) = 2868828 bytes -SHA1 (patch-aa) = cf9e6efb01acdff5988e65952ba42faa73ad9838 +SHA1 (patch-aa) = c592aea9ed27bec4fed4d14a2756538003845c39 SHA1 (patch-ab) = a765c6e43856ce858f23f237ffd5b48cb6d029e6 SHA1 (patch-ac) = 43a30df9822e90e0f84df4458cc20de286509961 SHA1 (patch-ad) = c926d96bdc9ddf4f434fc57af0adbe11002cffc3 diff --git a/devel/glib2/patches/patch-aa b/devel/glib2/patches/patch-aa index 42ef1e70398..524e7844df5 100644 --- a/devel/glib2/patches/patch-aa +++ b/devel/glib2/patches/patch-aa @@ -1,9 +1,6 @@ -$NetBSD: patch-aa,v 1.29 2006/10/06 18:05:22 wiz Exp $ +$NetBSD: patch-aa,v 1.30 2006/10/08 11:56:18 joerg Exp $ -http://bugzilla.gnome.org/show_bug.cgi?id=140329 -http://bugzilla.gnome.org/show_bug.cgi?id=141256 - ---- configure.orig 2006-10-01 23:05:29.000000000 +0000 +--- configure.orig 2006-10-02 01:05:29.000000000 +0200 +++ configure @@ -465,7 +465,7 @@ ac_includes_default="\ # include <unistd.h> @@ -95,75 +92,112 @@ http://bugzilla.gnome.org/show_bug.cgi?id=141256 echo "$as_me:$LINENO: checking for preceeding underscore in symbols" >&5 echo $ECHO_N "checking for preceeding underscore in symbols... $ECHO_C" >&6 if test "${glib_cv_uscore+set}" = set; then -@@ -33779,9 +33846,34 @@ if test x"$have_threads" != xno; then +@@ -33779,102 +33846,8 @@ if test x"$have_threads" != xno; then # skip cygwin and darwin -pthread or -pthreads test ;; *) - for flag in pthread pthreads mt; do -+ case $LDFLAGS in -+ -lpthread|*" -lpthread"|*" -lpthread "*) -+ G_THREAD_LIBS=-lpthread -+ esac -+ case $LIBS in -+ -lpthread|*" -lpthread"|*" -lpthread "*) -+ G_THREAD_LIBS=-lpthread -+ esac -+ case $CFLAGS in -+ -pthread|*" -pthread"|*" -pthread "*) -+ G_THREAD_CFLAGS=-pthread -+ G_THREAD_LIBS=-pthread -+ ;; -+ -pthreads|*" -pthreads"|*" -pthreads "*) -+ G_THREAD_CFLAGS=-pthreads -+ G_THREAD_LIBS=-pthreads -+ ;; -+ esac -+ if test x"$G_THREAD_CFLAGS" = x; then -+ -+ for flag in pthreads pthread mt ""; do -+ case $flag in -+ "") flag= ;; -+ *) flag="-$flag" ;; -+ esac -+ - glib_save_CFLAGS="$CFLAGS" +- glib_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -$flag" -+ CFLAGS="$CFLAGS $flag" - if test "$cross_compiling" = yes; then - cat >conftest.$ac_ext <<_ACEOF - -@@ -33870,11 +33962,12 @@ rm -f core *.core gmon.out bb.out confte - fi - CFLAGS="$glib_save_CFLAGS" - if test $glib_flag_works = yes ; then +- if test "$cross_compiling" = yes; then +- cat >conftest.$ac_ext <<_ACEOF +- +-#include <pthread.h> +-int check_me = 0; +-void* func(void* data) {check_me = 42; return &check_me;} +-int main() +- { pthread_t t; +- void *ret; +- pthread_create (&t, 0, func, 0); +- pthread_join (t, &ret); +- return (check_me != 42 || ret != &check_me); +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- glib_flag_works=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-glib_flag_works=no +-fi +-rm -f conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include <pthread.h> +-int check_me = 0; +-void* func(void* data) {check_me = 42; return &check_me;} +-int main() +- { pthread_t t; +- void *ret; +- pthread_create (&t, 0, func, 0); +- pthread_join (t, &ret); +- return (check_me != 42 || ret != &check_me); +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- glib_flag_works=yes +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-glib_flag_works=no +-fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- CFLAGS="$glib_save_CFLAGS" +- if test $glib_flag_works = yes ; then - G_THREAD_CFLAGS=-$flag - G_THREAD_LIBS=-$flag -+ G_THREAD_CFLAGS=$flag -+ G_THREAD_LIBS=$flag - break; - fi - done -+ fi +- break; +- fi +- done ++ G_THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" ++ G_THREAD_CFLAGS="${PTHREAD_CFLAGS}" ;; esac fi -@@ -33927,6 +34020,15 @@ fi - - fi - -+# for some reason, the test for -pthread "succeeds" on gcc3.3 for interix -+# even though the option is wrong and invalid -+case $host in -+*-interix*) -+ G_THREAD_CFLAGS="-D_REENTRANT" -+ G_THREAD_LIBS="-lpthread" -+ ;; -+esac -+ - # if we are not finding the localtime_r function, then we probably are - # not using the proper multithread flag - -@@ -35880,6 +35982,10 @@ case $host in +@@ -35880,6 +35853,10 @@ case $host in *) G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS" ;; @@ -174,7 +208,7 @@ http://bugzilla.gnome.org/show_bug.cgi?id=141256 esac -@@ -40154,6 +40260,7 @@ s,@G_MODULE_PLUGIN_LIBS@,$G_MODULE_PLUGI +@@ -40154,6 +40131,7 @@ s,@G_MODULE_PLUGIN_LIBS@,$G_MODULE_PLUGI s,@G_MODULE_LDFLAGS@,$G_MODULE_LDFLAGS,;t t s,@G_MODULE_HAVE_DLERROR@,$G_MODULE_HAVE_DLERROR,;t t s,@G_MODULE_BROKEN_RTLD_GLOBAL@,$G_MODULE_BROKEN_RTLD_GLOBAL,;t t |