pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/glib2 Fix detection of RTLD_GLOBAL, which was be...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ca83a9f93573
branches:  trunk
changeset: 472181:ca83a9f93573
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Tue Apr 06 07:15:53 2004 +0000

description:
Fix detection of RTLD_GLOBAL, which was beeing incorrectly detected in NetBSD
and caused lots of obscure problems in programs loading plugins (specially,
gstreamer).

The problem is that the check in the configure script tries to dlopen the
libpthread.so library, but the test program is not linked against libpthread
itself.  So it crashes, because this is not supported in NetBSD (the program
was "initialized" as a non-threaded one).  I've changed the test program to
use libintl, which seems to work fine.

Bump PKGREVISION to 1.

diffstat:

 devel/glib2/Makefile         |   3 ++-
 devel/glib2/distinfo         |   4 ++--
 devel/glib2/patches/patch-aa |  28 +++++++++++++++++++++++-----
 3 files changed, 27 insertions(+), 8 deletions(-)

diffs (69 lines):

diff -r 06d52c18a273 -r ca83a9f93573 devel/glib2/Makefile
--- a/devel/glib2/Makefile      Tue Apr 06 04:39:00 2004 +0000
+++ b/devel/glib2/Makefile      Tue Apr 06 07:15:53 2004 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.45 2004/04/01 18:13:31 jmmv Exp $
+# $NetBSD: Makefile,v 1.46 2004/04/06 07:15:53 jmmv Exp $
 
 DISTNAME=              glib-2.4.0
 PKGNAME=               ${DISTNAME:S/glib/glib2/}
+PKGREVISION=           1
 CATEGORIES=            devel
 MASTER_SITES=          ftp://ftp.gtk.org/pub/gtk/v2.4/ \
                        ftp://ftp.cs.umn.edu/pub/gimp/gtk/v2.4/ \
diff -r 06d52c18a273 -r ca83a9f93573 devel/glib2/distinfo
--- a/devel/glib2/distinfo      Tue Apr 06 04:39:00 2004 +0000
+++ b/devel/glib2/distinfo      Tue Apr 06 07:15:53 2004 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.26 2004/04/01 18:13:31 jmmv Exp $
+$NetBSD: distinfo,v 1.27 2004/04/06 07:15:53 jmmv Exp $
 
 SHA1 (glib-2.4.0.tar.bz2) = 17822e7180791f18c1723110e9e757dc5526440c
 Size (glib-2.4.0.tar.bz2) = 2034272 bytes
-SHA1 (patch-aa) = 62ef4cd4908314d843b99aa792d94b3865c439f2
+SHA1 (patch-aa) = 4cc23e11bc01318b5ce8c1da9ee74b3cb9726896
 SHA1 (patch-ac) = 5f3d1446a41e71f1bf5556a1dd2a2a04e77d45da
 SHA1 (patch-ad) = c926d96bdc9ddf4f434fc57af0adbe11002cffc3
diff -r 06d52c18a273 -r ca83a9f93573 devel/glib2/patches/patch-aa
--- a/devel/glib2/patches/patch-aa      Tue Apr 06 04:39:00 2004 +0000
+++ b/devel/glib2/patches/patch-aa      Tue Apr 06 07:15:53 2004 +0000
@@ -1,8 +1,26 @@
-$NetBSD: patch-aa,v 1.10 2004/03/31 19:41:21 tron Exp $
+$NetBSD: patch-aa,v 1.11 2004/04/06 07:15:53 jmmv Exp $
 
---- configure.orig     2003-08-26 18:42:14.000000000 +0200
-+++ configure  2004-03-31 21:33:30.000000000 +0200
-@@ -28920,7 +28920,7 @@
+--- configure.orig     2004-03-16 18:13:21.000000000 +0100
++++ configure
+@@ -31048,13 +31048,13 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #ifndef RTLD_LAZY
+ #  define RTLD_LAZY 0
+ #endif
+-int pthread_create;
++int gettext;
+ int main () {
+     void *handle, *global, *local;
+-    global = &pthread_create;
+-    handle = dlopen ("libpthread.so", RTLD_GLOBAL | RTLD_LAZY);
++    global = &gettext;
++    handle = dlopen ("libintl.so", RTLD_GLOBAL | RTLD_LAZY);
+     if (!handle) return 0;
+-    local = dlsym (handle, "pthread_create");
++    local = dlsym (handle, "gettext");
+     return global == local;
+ }
+ _ACEOF
+@@ -31714,7 +31714,7 @@ if test x"$have_threads" != xno; then
      # both CPPFLAG and LIBS.
      # One of them does for most gcc versions and some other platforms/compilers
      # too and could be considered as the canonical way to go.
@@ -11,7 +29,7 @@
        glib_save_CFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS -$flag"
        if test "$cross_compiling" = yes; then
-@@ -31199,7 +31199,7 @@
+@@ -34181,7 +34181,7 @@ fi
  #  b) libtool doesn't recognize -pthread as a library dependency.
  #
  case $host in



Home | Main Index | Thread Index | Old Index