pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: devel/glib2 (2.12.3) on Linux



On Thu, Oct 05, 2006 at 04:02:09PM +0200, Joerg Sonnenberger wrote:
> On Wed, Oct 04, 2006 at 06:23:56PM -0700, David Simas wrote:
> > The package 'devel/glib2' (version 2.12.3) doesn't build on my Linux
> > system - CentOS 4.1 (RHEL clone) i386.
> 
> Please try the attached patch.

The package builds for me with the patch.

DGS

> 
> wiz -- what do you think? I'll give it some more testing, but I think
> this is much better than before.
> 
> Joerg

> ? glib2.diff
> Index: distinfo
> ===================================================================
> RCS file: /cvsroot/pkgsrc/devel/glib2/distinfo,v
> retrieving revision 1.68
> diff -u -r1.68 distinfo
> --- distinfo  8 Sep 2006 09:32:57 -0000       1.68
> +++ distinfo  5 Oct 2006 14:01:34 -0000
> @@ -3,7 +3,7 @@
>  SHA1 (glib-2.12.3.tar.bz2) = 117abb0e73fddb46650f0f38bfbbddc658dc2ddf
>  RMD160 (glib-2.12.3.tar.bz2) = 65c6d717742add451af769299428f4597effb4a8
>  Size (glib-2.12.3.tar.bz2) = 2896345 bytes
> -SHA1 (patch-aa) = b5b6d8fd2247d46d885947fad4b7f89a48ee088c
> +SHA1 (patch-aa) = f13835bd67e8c9e23264b56f10893c7c0274002b
>  SHA1 (patch-ab) = a765c6e43856ce858f23f237ffd5b48cb6d029e6
>  SHA1 (patch-ac) = 43a30df9822e90e0f84df4458cc20de286509961
>  SHA1 (patch-ad) = c926d96bdc9ddf4f434fc57af0adbe11002cffc3
> Index: patches/patch-aa
> ===================================================================
> RCS file: /cvsroot/pkgsrc/devel/glib2/patches/patch-aa,v
> retrieving revision 1.28
> diff -u -r1.28 patch-aa
> --- patches/patch-aa  4 Sep 2006 09:45:36 -0000       1.28
> +++ patches/patch-aa  5 Oct 2006 14:01:34 -0000
> @@ -1,11 +1,8 @@
> -$NetBSD: patch-aa,v 1.28 2006/09/04 09:45:36 tron Exp $
> +$NetBSD$
>  
> -http://bugzilla.gnome.org/show_bug.cgi?id=140329
> -http://bugzilla.gnome.org/show_bug.cgi?id=141256
> -
> ---- configure.orig   2006-08-30 06:46:14.000000000 +0100
> -+++ configure        2006-09-04 10:43:16.000000000 +0100
> -@@ -465,7 +465,7 @@
> +--- configure.orig   2006-10-05 15:32:01.000000000 +0200
> ++++ configure
> +@@ -465,7 +465,7 @@ ac_includes_default="\
>   # include <unistd.h>
>   #endif"
>   
> @@ -14,7 +11,7 @@
>   ac_subst_files=''
>   
>   # Initialize some variables set by options.
> -@@ -33430,6 +33430,7 @@
> +@@ -33430,6 +33430,7 @@ else
>   fi
>   G_MODULE_NEED_USCORE=0
>   G_MODULE_BROKEN_RTLD_GLOBAL=0
> @@ -22,7 +19,7 @@
>   G_MODULE_HAVE_DLERROR=0
>   if test -z "$G_MODULE_IMPL"; then
>     case "$host" in
> -@@ -34083,6 +34084,72 @@
> +@@ -34083,6 +34084,72 @@ echo "${ECHO_T}$glib_cv_rtldglobal_broke
>       else
>               G_MODULE_BROKEN_RTLD_GLOBAL=0
>       fi
> @@ -95,75 +92,112 @@
>       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
> -@@ -34645,9 +34712,34 @@
> +@@ -34645,102 +34712,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
> - 
> -@@ -34736,11 +34828,12 @@
> - 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
> -@@ -34793,6 +34886,15 @@
> - 
> -   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
> - 
> -@@ -36746,6 +36848,10 @@
> +@@ -36746,6 +36719,10 @@ case $host in
>     *)
>       G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS"
>       ;;
> @@ -174,7 +208,7 @@
>   esac
>   
>   
> -@@ -41020,6 +41126,7 @@
> +@@ -41020,6 +40997,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





Home | Main Index | Thread Index | Old Index