pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/glib2 glib2's gobject subsystem is essentially a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3d128944fce7
branches:  trunk
changeset: 313734:3d128944fce7
user:      prlw1 <prlw1%pkgsrc.org@localhost>
date:      Mon Oct 08 10:12:05 2018 +0000

description:
glib2's gobject subsystem is essentially a wrapper for dlopen. In
view of comments in PR lib/49791 which can be summarised as
"RTLD_GLOBAL is a bug", make gobject use RTLD_DEFAULT instead.

diffstat:

 devel/glib2/Makefile                              |   4 +-
 devel/glib2/distinfo                              |  14 ++-
 devel/glib2/patches/patch-aa                      |  77 +----------------------
 devel/glib2/patches/patch-ab                      |  76 ----------------------
 devel/glib2/patches/patch-ac                      |  21 ------
 devel/glib2/patches/patch-ae                      |  16 ----
 devel/glib2/patches/patch-ak                      |  59 +-----------------
 devel/glib2/patches/patch-gmodule_gmodule-ar.c    |  29 ++++++++
 devel/glib2/patches/patch-gmodule_gmodule-dl.c    |  57 +++++++++++++++++
 devel/glib2/patches/patch-gmodule_gmodule-dyld.c  |  32 +++++++++
 devel/glib2/patches/patch-gmodule_gmodule-win32.c |  16 ++++
 devel/glib2/patches/patch-gmodule_gmodule.c       |  57 +++++++++++++++++
 12 files changed, 203 insertions(+), 255 deletions(-)

diffs (truncated from 572 to 300 lines):

diff -r 06baf62d27ff -r 3d128944fce7 devel/glib2/Makefile
--- a/devel/glib2/Makefile      Mon Oct 08 05:06:07 2018 +0000
+++ b/devel/glib2/Makefile      Mon Oct 08 10:12:05 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.242 2018/08/22 09:43:31 wiz Exp $
+# $NetBSD: Makefile,v 1.243 2018/10/08 10:12:05 prlw1 Exp $
 
-PKGREVISION= 1
+PKGREVISION= 2
 .include "Makefile.common"
 
 CATEGORIES=            devel gnome
diff -r 06baf62d27ff -r 3d128944fce7 devel/glib2/distinfo
--- a/devel/glib2/distinfo      Mon Oct 08 05:06:07 2018 +0000
+++ b/devel/glib2/distinfo      Mon Oct 08 10:12:05 2018 +0000
@@ -1,18 +1,15 @@
-$NetBSD: distinfo,v 1.235 2018/08/19 18:32:27 wiz Exp $
+$NetBSD: distinfo,v 1.236 2018/10/08 10:12:05 prlw1 Exp $
 
 SHA1 (glib-2.56.2.tar.xz) = 8b18a92f81a8d033abfb43a628bae3bbaf71800c
 RMD160 (glib-2.56.2.tar.xz) = 8fe9fd51a84ebe0f61b5cb2ab97325baa51c4eb3
 SHA512 (glib-2.56.2.tar.xz) = 8201ea82d3613d2e879284abe01520b766da30957c5a1a22f3e6019b0cce6bf95d25beae78867b6a133401c4165153c0c92974dd459ab12f9e0e9dd0c95df5d4
 Size (glib-2.56.2.tar.xz) = 8041756 bytes
 SHA1 (patch-Makefile.in) = 4d587eb9ff27ff2b3489c59388319142e2fb6ced
-SHA1 (patch-aa) = 5aac049588b3f2cb63d86259cf9ebeed61081c52
-SHA1 (patch-ab) = 04bde955a2a588011a8c77ada4923d5464a0d544
-SHA1 (patch-ac) = 96e153339675457356f71e35d20375bed669d337
-SHA1 (patch-ae) = 09f16e8e14bdea3ee0e478d335f65cb66939e5f5
+SHA1 (patch-aa) = 01bdbcb6e49e440eefba966471a986215daec2e9
 SHA1 (patch-af) = f21f5c5f799189885a3826fde8ad079f599ae26b
 SHA1 (patch-ah) = d523967c88fc06f46de1d7f2eb04be65db04ada2
 SHA1 (patch-aha) = ade66edd87a5e76a1256bd8bcdc9bc3dd614885c
-SHA1 (patch-ak) = a7dd9b100b05424a76476754c2ee9896b5ae6d26
+SHA1 (patch-ak) = 040c679220988b31bd9d3e5c80a4fc6c2551e067
 SHA1 (patch-al) = af8428eeb6ce5e4dd70ddf972693df18d6c26d50
 SHA1 (patch-am) = 99f54927d76580dfeda2a6b1909e1bea5dbdc293
 SHA1 (patch-an) = 47986cfa2374ad4a89887bee5896d477a31f651f
@@ -28,6 +25,11 @@
 SHA1 (patch-glib_gmain.c) = d09ff66e475ee52d37ac0dcb463110f690ce6511
 SHA1 (patch-glib_gthread-posix.c) = ca93c8dc358453eb79b518c884464c90d7628888
 SHA1 (patch-glib_gtimezone.c) = 3f72bc2ed4447d60871e66984a5e3a80ca8c75f4
+SHA1 (patch-gmodule_gmodule-ar.c) = e382a0ada232e083d51cbede7f689a50ebeff4d8
+SHA1 (patch-gmodule_gmodule-dl.c) = b678a04debbc79ebb67d91db7716990658e76da4
+SHA1 (patch-gmodule_gmodule-dyld.c) = 5adf62970d9cff22d451307aaa0b00d975dab138
+SHA1 (patch-gmodule_gmodule-win32.c) = 477a861f8590a62c3dbc0aa4ad728cc86ebb34dd
+SHA1 (patch-gmodule_gmodule.c) = 55c5f9d16e3517f3fdc04d40922f50d9c66b0b9a
 SHA1 (patch-gobject_Makefile.am) = 6eed6b57f5ff0aa0dfb623110b23a3ff78aa4e75
 SHA1 (patch-gobject_Makefile.in) = a4768ff7b0607a8a4dfbb2cff087a987b451fd18
 SHA1 (patch-gobject_glib-genmarshal.in) = f21ca416d4eb4ad5a8ce3ffa053f8bcd2be8953a
diff -r 06baf62d27ff -r 3d128944fce7 devel/glib2/patches/patch-aa
--- a/devel/glib2/patches/patch-aa      Mon Oct 08 05:06:07 2018 +0000
+++ b/devel/glib2/patches/patch-aa      Mon Oct 08 10:12:05 2018 +0000
@@ -1,20 +1,10 @@
-$NetBSD: patch-aa,v 1.61 2018/08/01 17:43:25 jperkin Exp $
+$NetBSD: patch-aa,v 1.62 2018/10/08 10:12:06 prlw1 Exp $
 
 - solaris sun studio check and fix
 - use pkgsrc libtool
-- broken dlopen(NULL,0) detection and workaround
-  http://bugzilla.gnome.org/show_bug.cgi?id=140329
 
 --- configure.orig     2018-04-07 02:37:11.000000000 +0000
 +++ configure
-@@ -736,6 +736,7 @@ GIO
- GSPAWN
- GLIB_DEBUG_FLAGS
- G_MODULE_NEED_USCORE
-+G_MODULE_BROKEN_DLOPEN_NULL
- G_MODULE_BROKEN_RTLD_GLOBAL
- G_MODULE_HAVE_DLERROR
- G_MODULE_LDFLAGS
 @@ -5512,6 +5513,9 @@ $as_echo_n "checking for Mac OS X Carbon
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
@@ -105,14 +95,6 @@
  esac
  
  if test "$ac_cv_func_statfs" = yes; then :
-@@ -25692,6 +25733,7 @@ else
- fi
- G_MODULE_NEED_USCORE=0
- G_MODULE_BROKEN_RTLD_GLOBAL=0
-+G_MODULE_BROKEN_DLOPEN_NULL=0
- G_MODULE_HAVE_DLERROR=0
- if test -z "$G_MODULE_IMPL"; then
-   case "$host" in
 @@ -25817,9 +25859,9 @@ if  test "$G_MODULE_IMPL" = "G_MODULE_IM
        LIBS="$G_MODULE_LIBS $LIBS"
        LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
@@ -125,63 +107,6 @@
                ${LDFLAGS} -module -o plugin.la -export-dynamic \
                -shrext ".o" -avoid-version plugin.lo \
                -rpath /dont/care >/dev/null 2>&1
-@@ -25957,6 +25999,56 @@ fi
-       LIBS="$LIBS_orig"
- 
- fi
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen(NULL, 0) brokenness" >&5
-+$as_echo_n "checking for dlopen(NULL, 0) brokenness... " >&6; }
-+if ${glib_cv_dlopennull_broken+:} false; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+              if test "$cross_compiling" = yes; then :
-+  glib_cv_dlopennull_broken=no
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+#include <stdio.h>
-+#include <dlfcn.h>
-+#ifndef RTLD_GLOBAL
-+#  define RTLD_GLOBAL 0
-+#endif
-+#ifndef RTLD_LAZY
-+#  define RTLD_LAZY 0
-+#endif
-+int gettext;
-+int main () {
-+    void *handle;
-+    handle = dlopen ("libm.so", RTLD_GLOBAL | RTLD_LAZY);
-+    if (!handle) return 0;
-+    handle = dlopen (NULL, 0);
-+    if (!handle) return 0;
-+    handle = dlsym (handle, "sin");
-+    return handle == NULL;
-+}
-+
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  glib_cv_dlopennull_broken=no
-+else
-+  glib_cv_dlopennull_broken=yes
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glib_cv_dlopennull_broken" >&5
-+$as_echo "$glib_cv_dlopennull_broken" >&6; }
-+      if test "x$glib_cv_dlopennull_broken" = "xyes"; then
-+              G_MODULE_BROKEN_DLOPEN_NULL=1
-+      else
-+              G_MODULE_BROKEN_DLOPEN_NULL=0
-+      fi
- if test -z "$G_MODULE_IMPL"; then
-       G_MODULE_IMPL=0
-         G_MODULE_SUPPORTED=false
 @@ -25989,6 +26081,7 @@ fi
  
  
diff -r 06baf62d27ff -r 3d128944fce7 devel/glib2/patches/patch-ab
--- a/devel/glib2/patches/patch-ab      Mon Oct 08 05:06:07 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-$NetBSD: patch-ab,v 1.14 2012/04/30 13:53:48 drochner Exp $
-
-http://bugzilla.gnome.org/show_bug.cgi?id=140329
-
---- gmodule/gmodule.c.orig     2012-03-12 00:42:42.000000000 +0000
-+++ gmodule/gmodule.c
-@@ -800,6 +800,31 @@ g_module_error (void)
-   return g_private_get (&module_error_private);
- }
- 
-+static void
-+g_module_symbol_aux (GModule           *module,
-+                    const gchar        *symbol_name,
-+                    gpointer           *symbol)
-+{
-+  gpointer hdl = module->handle;
-+#if defined (G_MODULE_BROKEN_DLOPEN_NULL) && defined(__NetBSD__) && defined(RTLD_DEFAULT)
-+  /* use some special handle to access global namespace */
-+  if (module == main_module)
-+    hdl = RTLD_DEFAULT;
-+#endif
-+
-+#ifdef G_MODULE_NEED_USCORE
-+  {
-+    gchar *name;
-+
-+    name = g_strconcat ("_", symbol_name, NULL);
-+    *symbol = _g_module_symbol (module->handle, name);
-+    g_free (name);
-+  }
-+#else
-+  *symbol = _g_module_symbol (module->handle, symbol_name);
-+#endif
-+}
-+
- /**
-  * g_module_symbol:
-  * @module: a #GModule
-@@ -828,17 +853,28 @@ g_module_symbol (GModule     *module,
-   
-   g_rec_mutex_lock (&g_module_global_lock);
- 
--#ifdef        G_MODULE_NEED_USCORE
-+#ifdef        G_MODULE_BROKEN_DLOPEN_NULL
-+  if (module == main_module)
-   {
--    gchar *name;
--
--    name = g_strconcat ("_", symbol_name, NULL);
--    *symbol = _g_module_symbol (module->handle, name);
--    g_free (name);
-+      g_module_symbol_aux(module, symbol_name, symbol);
-+      if (*symbol == NULL)
-+        {
-+          for (module = modules; module; module = module->next)
-+            {
-+              g_module_symbol_aux(module, symbol_name, symbol);
-+              if (*symbol != NULL)
-+                {
-+                  g_module_set_error (NULL);
-+                  break;
-   }
--#else /* !G_MODULE_NEED_USCORE */
--  *symbol = _g_module_symbol (module->handle, symbol_name);
--#endif        /* !G_MODULE_NEED_USCORE */
-+            }
-+        }
-+    }
-+  else
-+    g_module_symbol_aux(module, symbol_name, symbol);
-+#else  /* !G_MODULE_BROKEN_DLOPEN_NULL */
-+  g_module_symbol_aux(module, symbol_name, symbol);
-+#endif /* G_MODULE_BROKEN_DLOPEN_NULL */
-   
-   module_error = g_module_error ();
-   if (module_error)
diff -r 06baf62d27ff -r 3d128944fce7 devel/glib2/patches/patch-ac
--- a/devel/glib2/patches/patch-ac      Mon Oct 08 05:06:07 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-$NetBSD: patch-ac,v 1.10 2008/09/06 11:07:20 obache Exp $
-
-http://bugzilla.gnome.org/show_bug.cgi?id=107626
-
---- gmodule/gmodule-dyld.c.orig        2008-09-02 15:09:12.000000000 +0000
-+++ gmodule/gmodule-dyld.c
-@@ -120,7 +120,13 @@ _g_module_symbol (gpointer     handle,
-       if (NSIsSymbolNameDefined (symbol_name))
-       sym = NSLookupAndBindSymbol (symbol_name);
-       else
--      sym = NULL;
-+      {
-+        GModule *mod;
-+        for (mod = modules, sym = NULL; mod && !sym; mod = mod->next)
-+          {
-+            sym = NSLookupSymbolInModule (mod->handle, symbol_name);
-+          }
-+      }
-     }
-   else
-     sym = NSLookupSymbolInModule (handle, symbol_name);
diff -r 06baf62d27ff -r 3d128944fce7 devel/glib2/patches/patch-ae
--- a/devel/glib2/patches/patch-ae      Mon Oct 08 05:06:07 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-ae,v 1.5 2004/04/17 10:37:12 jmmv Exp $
-
-http://bugzilla.gnome.org/show_bug.cgi?id=140329
-
---- gmodule/gmoduleconf.h.in.orig      2004-02-24 15:00:19.000000000 +0100
-+++ gmodule/gmoduleconf.h.in
-@@ -45,6 +45,9 @@ extern "C" {
- #if   (@G_MODULE_BROKEN_RTLD_GLOBAL@)
- #define G_MODULE_BROKEN_RTLD_GLOBAL
- #endif
-+#if   (@G_MODULE_BROKEN_DLOPEN_NULL@)
-+#define G_MODULE_BROKEN_DLOPEN_NULL
-+#endif
- 
- #ifdef __cplusplus
- }
diff -r 06baf62d27ff -r 3d128944fce7 devel/glib2/patches/patch-ak
--- a/devel/glib2/patches/patch-ak      Mon Oct 08 05:06:07 2018 +0000
+++ b/devel/glib2/patches/patch-ak      Mon Oct 08 10:12:05 2018 +0000
@@ -1,9 +1,7 @@
-$NetBSD: patch-ak,v 1.20 2017/10/13 15:35:10 prlw1 Exp $
+$NetBSD: patch-ak,v 1.21 2018/10/08 10:12:06 prlw1 Exp $
 
 - solaris sun studio check and fix
 - use pkgsrc libtool
-- broken dlopen(NULL,0) detection and workaround
-  http://bugzilla.gnome.org/show_bug.cgi?id=140329
 
 --- configure.ac.orig  2017-06-22 13:15:19.000000000 +0000
 +++ configure.ac
@@ -43,14 +41,6 @@
  esac
  
  dnl
-@@ -1383,6 +1395,7 @@ fi
- dnl G_MODULE_IMPL= don't reset, so cmd-line can override
- G_MODULE_NEED_USCORE=0
- G_MODULE_BROKEN_RTLD_GLOBAL=0



Home | Main Index | Thread Index | Old Index