diff options
author | jmmv <jmmv> | 2004-04-17 10:37:12 +0000 |
---|---|---|
committer | jmmv <jmmv> | 2004-04-17 10:37:12 +0000 |
commit | dd51515e7661141b25cb83233f72fd4439d78db1 (patch) | |
tree | c254b3554ddfb45208c384e75c68fef385dad9b4 /devel/glib2 | |
parent | 3eb30576aa97fead1d54b72b2c80b8f5d2941a5f (diff) | |
download | pkgsrc-dd51515e7661141b25cb83233f72fd4439d78db1.tar.gz |
Update to 2.4.0nb2:
Add a workaround for broken dlopen(NULL, 0) implementations, like NetBSD's
one, which don't search in modules opened at runtime to locate symbols
requested through the global handle. The workaround consists in querying
all open modules (not just the main one) when finding a symbol through the
global handle.
This should be fixed in NetBSD, but the check and workaround are needed to
let this work on not-so-old versions of it. The patch has been submitted
to glib developers, too.
This problem exposes, at least, in evolution's settings dialog, where many
widgets can't be created because of missing functions.
Diffstat (limited to 'devel/glib2')
-rw-r--r-- | devel/glib2/Makefile | 4 | ||||
-rw-r--r-- | devel/glib2/distinfo | 6 | ||||
-rw-r--r-- | devel/glib2/patches/patch-aa | 111 | ||||
-rw-r--r-- | devel/glib2/patches/patch-ab | 69 | ||||
-rw-r--r-- | devel/glib2/patches/patch-ae | 16 |
5 files changed, 197 insertions, 9 deletions
diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile index 6c6a89848b6..f8324c40fea 100644 --- a/devel/glib2/Makefile +++ b/devel/glib2/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.47 2004/04/15 01:49:41 xtraeme Exp $ +# $NetBSD: Makefile,v 1.48 2004/04/17 10:37:12 jmmv Exp $ DISTNAME= glib-2.4.0 PKGNAME= ${DISTNAME:S/glib/glib2/} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= devel MASTER_SITES= ftp://ftp.gtk.org/pub/gtk/v2.4/ \ ftp://ftp.cs.umn.edu/pub/gimp/gtk/v2.4/ \ diff --git a/devel/glib2/distinfo b/devel/glib2/distinfo index 8f3fb17741a..d7e0bacfecc 100644 --- a/devel/glib2/distinfo +++ b/devel/glib2/distinfo @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.27 2004/04/06 07:15:53 jmmv Exp $ +$NetBSD: distinfo,v 1.28 2004/04/17 10:37:12 jmmv Exp $ SHA1 (glib-2.4.0.tar.bz2) = 17822e7180791f18c1723110e9e757dc5526440c Size (glib-2.4.0.tar.bz2) = 2034272 bytes -SHA1 (patch-aa) = 4cc23e11bc01318b5ce8c1da9ee74b3cb9726896 +SHA1 (patch-aa) = 53ae00ea0fcd545d80c4ba7e94e0a234ad482427 +SHA1 (patch-ab) = a231346877b6246e086312fda107a90dffdd0adb SHA1 (patch-ac) = 5f3d1446a41e71f1bf5556a1dd2a2a04e77d45da SHA1 (patch-ad) = c926d96bdc9ddf4f434fc57af0adbe11002cffc3 +SHA1 (patch-ae) = 09f16e8e14bdea3ee0e478d335f65cb66939e5f5 diff --git a/devel/glib2/patches/patch-aa b/devel/glib2/patches/patch-aa index b6d5ad01ab5..d6b3dc02f25 100644 --- a/devel/glib2/patches/patch-aa +++ b/devel/glib2/patches/patch-aa @@ -1,8 +1,28 @@ -$NetBSD: patch-aa,v 1.11 2004/04/06 07:15:53 jmmv Exp $ +$NetBSD: patch-aa,v 1.12 2004/04/17 10:37:12 jmmv Exp $ + +http://bugzilla.gnome.org/show_bug.cgi?id=139567 +http://bugzilla.gnome.org/show_bug.cgi?id=140329 --- configure.orig 2004-03-16 18:13:21.000000000 +0100 -+++ configure -@@ -31048,13 +31048,13 @@ cat >>conftest.$ac_ext <<_ACEOF ++++ configure 2004-04-17 10:06:39.000000000 +0200 +@@ -465,7 +465,7 @@ + # include <unistd.h> + #endif" + +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot GLIB_MAJOR_VERSION GLIB_MINOR_VERSION GLIB_MICRO_VERSION GLIB_VERSION GLIB_INTERFACE_AGE GLIB_BINARY_AGE LT_RELEASE LT_CURRENT LT_REVISION LT_AGE LT_CURRENT_MINUS_AGE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os OS_WIN32_TRUE OS_WIN32_FALSE G_LIB_WIN32_RESOURCE G_MODULE_WIN32_RESOURCE G_OBJECT_WIN32_RESOURCE G_THREAD_WIN32_RESOURCE GLIB_DEF GMODULE_DEF GOBJECT_DEF GTHREAD_DEF TESTGMODULE_EXP ms_librarian MS_LIB_AVAILABLE_TRUE MS_LIB_AVAILABLE_FALSE ENABLE_GC_FRIENDLY DISABLE_MEM_POOLS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE HAVE_CXX_TRUE HAVE_CXX_FALSE PKG_CONFIG PERL INDENT REBUILD PERL_PATH CPP EGREP USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS GETTEXT_PACKAGE ICONV_LIBS LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ALLOCA GLIBC21 HAVE_GOOD_PRINTF_TRUE HAVE_GOOD_PRINTF_FALSE G_MODULE_SUPPORTED G_MODULE_IMPL G_MODULE_LIBS G_MODULE_LIBS_EXTRA G_MODULE_PLUGIN_LIBS G_MODULE_LDFLAGS G_MODULE_HAVE_DLERROR G_MODULE_BROKEN_RTLD_GLOBAL G_MODULE_NEED_USCORE GLIB_DEBUG_FLAGS GSPAWN GIO PLATFORMDEP ENABLE_TIMELOOP_TRUE ENABLE_TIMELOOP_FALSE PLATFORM_WIN32_TRUE PLATFORM_WIN32_FALSE GTHREAD_COMPILE_IMPL_DEFINES G_THREAD_CFLAGS G_THREAD_LIBS G_THREAD_LIBS_FOR_GTHREAD G_THREAD_LIBS_EXTRA G_LIBS_EXTRA CROSS_COMPILING_TRUE CROSS_COMPILING_FALSE GLIB_GENMARSHAL HTML_DIR ENABLE_GTK_DOC_TRUE ENABLE_GTK_DOC_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_USE_LIBTOOL_FALSE XSLTPROC XML_CATALOG_FILE XMLCATALOG ENABLE_MAN_TRUE ENABLE_MAN_FALSE LIBOBJS LTLIBOBJS' ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot GLIB_MAJOR_VERSION GLIB_MINOR_VERSION GLIB_MICRO_VERSION GLIB_VERSION GLIB_INTERFACE_AGE GLIB_BINARY_AGE LT_RELEASE LT_CURRENT LT_REVISION LT_AGE LT_CURRENT_MINUS_AGE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os OS_WIN32_TRUE OS_WIN32_FALSE G_LIB_WIN32_RESOURCE G_MODULE_WIN32_RESOURCE G_OBJECT_WIN32_RESOURCE G_THREAD_WIN32_RESOURCE GLIB_DEF GMODULE_DEF GOBJECT_DEF GTHREAD_DEF TESTGMODULE_EXP ms_librarian MS_LIB_AVAILABLE_TRUE MS_LIB_AVAILABLE_FALSE ENABLE_GC_FRIENDLY DISABLE_MEM_POOLS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE HAVE_CXX_TRUE HAVE_CXX_FALSE PKG_CONFIG PERL INDENT REBUILD PERL_PATH CPP EGREP USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS GETTEXT_PACKAGE ICONV_LIBS LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ALLOCA GLIBC21 HAVE_GOOD_PRINTF_TRUE HAVE_GOOD_PRINTF_FALSE G_MODULE_SUPPORTED G_MODULE_IMPL G_MODULE_LIBS G_MODULE_LIBS_EXTRA G_MODULE_PLUGIN_LIBS G_MODULE_LDFLAGS G_MODULE_HAVE_DLERROR G_MODULE_BROKEN_RTLD_GLOBAL G_MODULE_BROKEN_DLOPEN_NULL G_MODULE_NEED_USCORE GLIB_DEBUG_FLAGS GSPAWN GIO PLATFORMDEP ENABLE_TIMELOOP_TRUE ENABLE_TIMELOOP_FALSE PLATFORM_WIN32_TRUE PLATFORM_WIN32_FALSE GTHREAD_COMPILE_IMPL_DEFINES G_THREAD_CFLAGS G_THREAD_LIBS G_THREAD_LIBS_FOR_GTHREAD G_THREAD_LIBS_EXTRA G_LIBS_EXTRA CROSS_COMPILING_TRUE CROSS_COMPILING_FALSE GLIB_GENMARSHAL HTML_DIR ENABLE_GTK_DOC_TRUE ENABLE_GTK_DOC_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_USE_LIBTOOL_FALSE XSLTPROC XML_CATALOG_FILE XMLCATALOG ENABLE_MAN_TRUE ENABLE_MAN_FALSE LIBOBJS LTLIBOBJS' + ac_subst_files='' + + # Initialize some variables set by options. +@@ -30441,6 +30441,7 @@ + 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 +@@ -31048,13 +31049,13 @@ #ifndef RTLD_LAZY # define RTLD_LAZY 0 #endif @@ -20,7 +40,80 @@ $NetBSD: patch-aa,v 1.11 2004/04/06 07:15:53 jmmv Exp $ return global == local; } _ACEOF -@@ -31714,7 +31714,7 @@ if test x"$have_threads" != xno; then +@@ -31090,6 +31091,72 @@ + else + G_MODULE_BROKEN_RTLD_GLOBAL=0 + fi ++ echo "$as_me:$LINENO: checking for dlopen(NULL, 0) brokenness" >&5 ++echo $ECHO_N "checking for dlopen(NULL, 0) brokenness... $ECHO_C" >&6 ++if test "${glib_cv_dlopennull_broken+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ if test "$cross_compiling" = yes; then ++ glib_cv_dlopennull_broken=no ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.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 ("libintl.so", RTLD_GLOBAL | RTLD_LAZY); ++ if (!handle) return 0; ++ handle = dlopen (NULL, 0); ++ if (!handle) return 0; ++ handle = dlsym (handle, "gettext"); ++ return handle == NULL; ++} ++_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_cv_dlopennull_broken=no ++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_cv_dlopennull_broken=yes ++fi ++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++fi ++ rm -f plugin.c plugin.o plugin.lo ++ ++fi ++echo "$as_me:$LINENO: result: $glib_cv_dlopennull_broken" >&5 ++echo "${ECHO_T}$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 + 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 +@@ -31714,7 +31781,7 @@ # 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. @@ -29,7 +122,7 @@ $NetBSD: patch-aa,v 1.11 2004/04/06 07:15:53 jmmv Exp $ glib_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -$flag" if test "$cross_compiling" = yes; then -@@ -34181,7 +34181,7 @@ fi +@@ -34181,7 +34248,7 @@ # b) libtool doesn't recognize -pthread as a library dependency. # case $host in @@ -38,3 +131,11 @@ $NetBSD: patch-aa,v 1.11 2004/04/06 07:15:53 jmmv Exp $ G_THREAD_LIBS_FOR_GTHREAD="`echo $G_THREAD_LIBS | sed s/-pthread/-lpthread/`" ;; *) +@@ -38406,6 +38473,7 @@ + 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 ++s,@G_MODULE_BROKEN_DLOPEN_NULL@,$G_MODULE_BROKEN_DLOPEN_NULL,;t t + s,@G_MODULE_NEED_USCORE@,$G_MODULE_NEED_USCORE,;t t + s,@GLIB_DEBUG_FLAGS@,$GLIB_DEBUG_FLAGS,;t t + s,@GSPAWN@,$GSPAWN,;t t diff --git a/devel/glib2/patches/patch-ab b/devel/glib2/patches/patch-ab new file mode 100644 index 00000000000..2f58cfe9f9a --- /dev/null +++ b/devel/glib2/patches/patch-ab @@ -0,0 +1,69 @@ +$NetBSD: patch-ab,v 1.10 2004/04/17 10:37:12 jmmv Exp $ + +http://bugzilla.gnome.org/show_bug.cgi?id=140329 + +--- gmodule/gmodule.c.orig 2004-02-24 15:00:19.000000000 +0100 ++++ gmodule/gmodule.c 2004-04-17 11:43:31.000000000 +0200 +@@ -521,6 +521,24 @@ + return g_static_private_get (&module_error_private); + } + ++static void ++g_module_symbol_aux (GModule *module, ++ const gchar *symbol_name, ++ gpointer *symbol) ++{ ++#ifdef G_MODULE_NEED_USCORE ++ { ++ gchar *name; ++ ++ name = g_strconcat ("_", symbol_name, NULL); ++ *symbol = _g_module_symbol (module->handle, name); ++ g_free (name); ++ } ++#else /* !G_MODULE_NEED_USCORE */ ++ *symbol = _g_module_symbol (module->handle, symbol_name); ++#endif /* !G_MODULE_NEED_USCORE */ ++} ++ + gboolean + g_module_symbol (GModule *module, + const gchar *symbol_name, +@@ -538,17 +556,28 @@ + + g_static_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 --git a/devel/glib2/patches/patch-ae b/devel/glib2/patches/patch-ae new file mode 100644 index 00000000000..469c2f2a5f0 --- /dev/null +++ b/devel/glib2/patches/patch-ae @@ -0,0 +1,16 @@ +$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 + } |