summaryrefslogtreecommitdiff
path: root/devel/glib2
diff options
context:
space:
mode:
authorjmmv <jmmv>2011-10-09 19:40:02 +0000
committerjmmv <jmmv>2011-10-09 19:40:02 +0000
commit3023ecc16fd8ccfa545a9ab1340495a75d4c165c (patch)
tree1cca353cea82c4fc64d625cf4a6fbe7a83373346 /devel/glib2
parent589c79331d3d9a794a8bf5bc872e8d98a89a023a (diff)
downloadpkgsrc-3023ecc16fd8ccfa545a9ab1340495a75d4c165c.tar.gz
Add support for kqueue by using the patches written by Dmitry Matveev during
the Google Summer of Code 2011 program. Congratulations, Dmitry! :-) This comes in the form of a new 'kqueue' build-time option. This should NOT be an option, but it is for two reasons: - I consider this still experimental for it to be enabled on everyone's machines, and the code is not "official". - The patch requires us to run automake/autoconf during the pre-configure stage, and I don't want to add these dependencies on the default package build. When these patches get integrated upstream, we can get rid of the option altogether. Also note that I had to backport some of our custom changes to Makefile.in files and some to configure to the original Makefile.am files and configure.ac. This is to prevent our custom patches from being lost during the automake/autoconf invocations we now do when 'kqueue' is enabled. Bump PKGREVISION to 1.
Diffstat (limited to 'devel/glib2')
-rw-r--r--devel/glib2/Makefile5
-rw-r--r--devel/glib2/distinfo11
-rw-r--r--devel/glib2/options.mk29
-rw-r--r--devel/glib2/patches/patch-ak45
-rw-r--r--devel/glib2/patches/patch-ck23
-rw-r--r--devel/glib2/patches/patch-cl17
-rw-r--r--devel/glib2/patches/patch-cm32
-rw-r--r--devel/glib2/patches/patch-cn19
8 files changed, 157 insertions, 24 deletions
diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile
index f66972d91b1..44b4e48df73 100644
--- a/devel/glib2/Makefile
+++ b/devel/glib2/Makefile
@@ -1,6 +1,9 @@
-# $NetBSD: Makefile,v 1.186 2011/08/04 23:52:04 wiz Exp $
+# $NetBSD: Makefile,v 1.187 2011/10/09 19:40:02 jmmv Exp $
.include "Makefile.common"
+.include "options.mk"
+
+PKGREVISION= 1
CATEGORIES= devel
diff --git a/devel/glib2/distinfo b/devel/glib2/distinfo
index 33bddbf4005..4d0e4e3143d 100644
--- a/devel/glib2/distinfo
+++ b/devel/glib2/distinfo
@@ -1,8 +1,11 @@
-$NetBSD: distinfo,v 1.153 2011/06/09 11:16:38 drochner Exp $
+$NetBSD: distinfo,v 1.154 2011/10/09 19:40:02 jmmv Exp $
SHA1 (glib-2.28.8.tar.bz2) = 20cd63705a8805260da0320c65b979233f2e3c18
RMD160 (glib-2.28.8.tar.bz2) = f087a71445eb40fae5eab45a14cb74d4e239d5e6
Size (glib-2.28.8.tar.bz2) = 7017806 bytes
+SHA1 (glib-gio-kqueue-2.28.8-v0.patch) = 2705a9da3aa87cf3ef15e4288adb1367462ff012
+RMD160 (glib-gio-kqueue-2.28.8-v0.patch) = ebd7c05b2b6adde972c15476a728eb4a98b19969
+Size (glib-gio-kqueue-2.28.8-v0.patch) = 58453 bytes
SHA1 (patch-aa) = 44a3cc4b457ea75a3516d5c49155a3720bde515f
SHA1 (patch-ab) = 757cfd7f686d3e3147d13f530d1c85c7835bf762
SHA1 (patch-ac) = 96e153339675457356f71e35d20375bed669d337
@@ -13,7 +16,7 @@ SHA1 (patch-ag) = 65e50668eb909353210152ef54dfea923740179b
SHA1 (patch-ah) = 239dc3d0734424a7cafc5dd8d8381768cba2d23e
SHA1 (patch-ai) = ff1963c05cf82059de692cd5bf08872544297b7f
SHA1 (patch-aj) = 9e5a7ccf081e3ebdf7888a67b027b696f632177c
-SHA1 (patch-ak) = 718dad5f27cb8254d84d6f8007a96b33e7c4a435
+SHA1 (patch-ak) = 29a2adc7d7cd41a28ecad039cb5f46be5e9df974
SHA1 (patch-al) = bde29693322c568f9a4ad090f1d469de5f69920e
SHA1 (patch-am) = 062d3d295f00485ac3c3839dd4697957ebc66772
SHA1 (patch-an) = dd136645f7555f3600562b055cdcb4f60b41ae78
@@ -29,3 +32,7 @@ SHA1 (patch-cg) = f65c5a23102d3dee12bee68bd126385b3c3fe632
SHA1 (patch-ch) = df8444835b9954f902936c8b6fab5b44ac350db0
SHA1 (patch-ci) = f0191fd416222617a2e95e95a05c3dcf6b6ce2d2
SHA1 (patch-cj) = ef6b6ec1986990df096b342cfd8e9513e42671df
+SHA1 (patch-ck) = 324116cc6fb8dbce8ce8d20f5b237fc469a55cd2
+SHA1 (patch-cl) = a78266f135dc08e1f4710370c19cc820a6da7eb8
+SHA1 (patch-cm) = 8ddac97b3476c992abea3e5d9383cd3a5c9008f3
+SHA1 (patch-cn) = b930dc95d44eacc9448f2a3a799a95db2880bfd4
diff --git a/devel/glib2/options.mk b/devel/glib2/options.mk
new file mode 100644
index 00000000000..d4ac39e7165
--- /dev/null
+++ b/devel/glib2/options.mk
@@ -0,0 +1,29 @@
+# $NetBSD: options.mk,v 1.8 2011/10/09 19:40:02 jmmv Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.glib2
+PKG_SUPPORTED_OPTIONS= kqueue
+PKG_SUGGESTED_OPTIONS= # empty
+
+# We really should be doing this by default. However, the kqueue patch is not
+# official, needs some more testing and, due to the way it is written, forces
+# us to run autoconf. If the code gets integrated upstream, there is no reason
+# for us to provide a 'kqueue' option here and it should just go away.
+#
+#.if exists(/usr/include/sys/event.h)
+#PKG_SUGGESTED_OPTIONS+= kqueue
+#.endif
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.options.mk"
+
+.if $(PKG_OPTIONS:Mkqueue)
+PATCH_SITES= http://dmitrymatveev.co.uk/files/
+PATCHFILES= glib-gio-kqueue-2.28.8-v0.patch
+PATCH_DIST_STRIP= -p0
+
+USE_TOOLS+= automake autoconf
+pre-configure: regen-autotools
+regen-autotools:
+ cd ${WRKSRC} && automake
+ cd ${WRKSRC} && autoconf
+.endif
diff --git a/devel/glib2/patches/patch-ak b/devel/glib2/patches/patch-ak
index a3979334c68..446f08e23a8 100644
--- a/devel/glib2/patches/patch-ak
+++ b/devel/glib2/patches/patch-ak
@@ -1,8 +1,8 @@
-$NetBSD: patch-ak,v 1.7 2010/11/02 14:52:24 drochner Exp $
+$NetBSD: patch-ak,v 1.8 2011/10/09 19:40:02 jmmv Exp $
---- configure.ac.orig 2010-05-02 23:58:58.000000000 +0000
-+++ configure.ac
-@@ -846,7 +846,7 @@ int main (int argc, char **argv)
+--- configure.ac.orig 2011-06-05 19:18:49.000000000 -0400
++++ configure.ac 2011-10-08 23:50:38.000000000 -0400
+@@ -825,7 +825,7 @@ int main (int argc, char **argv)
AC_MSG_RESULT($g_have_gnuc_visibility)
AM_CONDITIONAL(HAVE_GNUC_VISIBILITY, [test x$g_have_gnuc_visibility = xyes])
@@ -11,14 +11,10 @@ $NetBSD: patch-ak,v 1.7 2010/11/02 14:52:24 drochner Exp $
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if defined(__SUNPRO_C) || (__SUNPRO_C >= 0x550)
#else
# include "error: this is not Sun Studio."
-@@ -1043,10 +1043,22 @@ fi
+@@ -1023,8 +1023,20 @@ fi
case $host in
*-*-solaris* )
-- AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
-- AC_DEFINE(_XOPEN_SOURCE, 2, Needed to get declarations for msg_control and msg_controllen on Solaris)
-- AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
-- ;;
+ AC_MSG_CHECKING([whether using Sun Studio C compiler with C99])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if defined(__STDC_VERSION__) || (__STDC_VERSION__ - 0 >= 199901L)
+#else
@@ -29,16 +25,14 @@ $NetBSD: patch-ak,v 1.7 2010/11/02 14:52:24 drochner Exp $
+ if test $g_have_sunstudio_c99 = yes; then
+ AC_DEFINE(_XOPEN_SOURCE, 600, Needed to get declarations for msg_control and msg_controllen on Solaris)
+ else
-+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
-+ AC_DEFINE(_XOPEN_SOURCE, 2, Needed to get declarations for msg_control and msg_controllen on Solaris)
+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
+ AC_DEFINE(_XOPEN_SOURCE, 2, Needed to get declarations for msg_control and msg_controllen on Solaris)
+ fi
+
-+ AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
-+ ;;
+ AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
+ ;;
esac
-
- dnl
-@@ -1399,11 +1411,12 @@ if test x"$glib_native_win32" = xyes; th
+@@ -1379,11 +1391,12 @@ if test x"$glib_native_win32" = xyes; th
G_MODULE_LDFLAGS=
else
export SED
@@ -52,7 +46,7 @@ $NetBSD: patch-ak,v 1.7 2010/11/02 14:52:24 drochner Exp $
G_MODULE_HAVE_DLERROR=0
dnl *** force native WIN32 shared lib loader
if test -z "$G_MODULE_IMPL"; then
-@@ -1464,7 +1477,7 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMP
+@@ -1444,7 +1457,7 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMP
LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
echo "void glib_plugin_test(void) { }" > plugin.c
@@ -61,7 +55,7 @@ $NetBSD: patch-ak,v 1.7 2010/11/02 14:52:24 drochner Exp $
-export-dynamic -o plugin.o plugin.c 2>&1 >/dev/null
AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
glib_cv_rtldglobal_broken,[
-@@ -1528,6 +1541,38 @@ dnl *** check for having dlerror()
+@@ -1508,6 +1521,38 @@ dnl *** check for having dlerror()
[G_MODULE_HAVE_DLERROR=0])
LIBS="$LIBS_orig"
fi
@@ -100,7 +94,7 @@ $NetBSD: patch-ak,v 1.7 2010/11/02 14:52:24 drochner Exp $
dnl *** done, have we got an implementation?
if test -z "$G_MODULE_IMPL"; then
G_MODULE_IMPL=0
-@@ -1538,7 +1583,7 @@ fi
+@@ -1518,7 +1563,7 @@ fi
AC_MSG_CHECKING(for the suffix of module shared libraries)
export SED
@@ -109,7 +103,7 @@ $NetBSD: patch-ak,v 1.7 2010/11/02 14:52:24 drochner Exp $
eval $shrext_cmds
module=yes eval std_shrext=$shrext_cmds
# chop the initial dot
-@@ -1557,6 +1602,8 @@ AC_SUBST(G_MODULE_PLUGIN_LIBS)
+@@ -1537,6 +1582,8 @@ AC_SUBST(G_MODULE_PLUGIN_LIBS)
AC_SUBST(G_MODULE_LDFLAGS)
AC_SUBST(G_MODULE_HAVE_DLERROR)
AC_SUBST(G_MODULE_BROKEN_RTLD_GLOBAL)
@@ -118,7 +112,7 @@ $NetBSD: patch-ak,v 1.7 2010/11/02 14:52:24 drochner Exp $
AC_SUBST(G_MODULE_NEED_USCORE)
AC_SUBST(GLIB_DEBUG_FLAGS)
-@@ -1945,22 +1992,8 @@ if test x"$have_threads" != xno; then
+@@ -1925,22 +1972,8 @@ if test x"$have_threads" != xno; then
G_THREAD_LIBS="-lpthread -lthread"
;;
*)
@@ -143,3 +137,12 @@ $NetBSD: patch-ak,v 1.7 2010/11/02 14:52:24 drochner Exp $
;;
esac
fi
+@@ -3638,7 +3671,7 @@ AC_ARG_ENABLE(Bsymbolic,
+ enable_Bsymbolic=no)
+ LDFLAGS="${SAVED_LDFLAGS}"])
+
+-if test "x${enable_Bsymbolic}" == "xyes"; then
++if test "x${enable_Bsymbolic}" = "xyes"; then
+ GLIB_LINK_FLAGS=-Wl,-Bsymbolic-functions
+ fi
+
diff --git a/devel/glib2/patches/patch-ck b/devel/glib2/patches/patch-ck
new file mode 100644
index 00000000000..5a62efcae88
--- /dev/null
+++ b/devel/glib2/patches/patch-ck
@@ -0,0 +1,23 @@
+$NetBSD: patch-ck,v 1.1 2011/10/09 19:40:02 jmmv Exp $
+
+--- glib/libcharset/Makefile.am.orig 2011-06-05 23:18:49.000000000 +0000
++++ glib/libcharset/Makefile.am
+@@ -25,18 +25,6 @@ EXTRA_DIST += \
+ charset_alias = $(DESTDIR)$(libdir)/charset.alias
+ charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+ install-exec-local: all-local
+- $(mkinstalldirs) $(DESTDIR)$(libdir)
+- if test -f $(charset_alias); then \
+- sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+- $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+- rm -f $(charset_tmp) ; \
+- else \
+- if test @GLIBC21@ = no; then \
+- sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+- $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+- rm -f $(charset_tmp) ; \
+- fi ; \
+- fi
+
+ uninstall-local: all-local
+ if test -f $(charset_alias); then \
diff --git a/devel/glib2/patches/patch-cl b/devel/glib2/patches/patch-cl
new file mode 100644
index 00000000000..f1cd8678e8a
--- /dev/null
+++ b/devel/glib2/patches/patch-cl
@@ -0,0 +1,17 @@
+$NetBSD: patch-cl,v 1.1 2011/10/09 19:40:02 jmmv Exp $
+
+--- gio/Makefile.am.orig 2011-10-09 17:21:29.000000000 +0000
++++ gio/Makefile.am
+@@ -632,12 +632,6 @@ gdbus_LDADD = libgio-2.0.la \
+ $(top_builddir)/glib/libglib-2.0.la \
+ $(top_builddir)/gobject/libgobject-2.0.la
+
+-completiondir = $(sysconfdir)/bash_completion.d
+-completion_SCRIPTS = \
+- gdbus-bash-completion.sh \
+- gsettings-bash-completion.sh
+-EXTRA_DIST += $(completion_SCRIPTS)
+-
+ # ------------------------------------------------------------------------
+
+ dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
diff --git a/devel/glib2/patches/patch-cm b/devel/glib2/patches/patch-cm
new file mode 100644
index 00000000000..f616189c328
--- /dev/null
+++ b/devel/glib2/patches/patch-cm
@@ -0,0 +1,32 @@
+$NetBSD: patch-cm,v 1.1 2011/10/09 19:40:02 jmmv Exp $
+
+sysutils/gio-fam builds the gio/fam backend as a separate module. Force it
+to link against the installed version of glib2, as it is not rebuilt by the
+package.
+
+--- gio/fam/Makefile.am.orig 2010-09-27 18:48:33.000000000 +0000
++++ gio/fam/Makefile.am
+@@ -25,11 +25,9 @@ libgiofam_la_CFLAGS = \
+ -DGIO_COMPILATION \
+ -DG_DISABLE_DEPRECATED
+
+-libgiofam_la_LDFLAGS = $(module_flags)
++libgiofam_la_LDFLAGS = $(module_flags) \
++ $$(pkg-config --libs gio-2.0 gobject-2.0 glib-2.0)
+ libgiofam_la_LIBADD = \
+- $(top_builddir)/gio/libgio-2.0.la \
+- $(top_builddir)/gobject/libgobject-2.0.la \
+- $(top_builddir)/glib/libglib-2.0.la \
+ $(GLIB_LIBS) \
+ $(FAM_LIBS) \
+ $(NULL)
+@@ -41,9 +39,6 @@ RUN_QUERY_MODULES=true
+ endif
+
+ install-data-hook:
+- if $(RUN_QUERY_MODULES) && test -z "$(DESTDIR)" ; then \
+- $(top_builddir)/gio/gio-querymodules$(EXEEXT) $(DESTDIR)$(GIO_MODULE_DIR) ; \
+- fi
+
+ uninstall-local:
+ $(RM) $(DESTDIR)$(GIO_MODULE_DIR)/giomodules.cache
diff --git a/devel/glib2/patches/patch-cn b/devel/glib2/patches/patch-cn
new file mode 100644
index 00000000000..970ae5a74b8
--- /dev/null
+++ b/devel/glib2/patches/patch-cn
@@ -0,0 +1,19 @@
+$NetBSD: patch-cn,v 1.1 2011/10/09 19:40:03 jmmv Exp $
+
+The mem-overflow test contains a declaration of an empty struct, which breaks
+on at least SunPro cc, and presumably some other non-gcc compilers. Skip this
+test for now, pending a better fix.
+https://bugzilla.gnome.org/show_bug.cgi?id=641350
+
+--- glib/tests/Makefile.am.orig 2011-06-05 23:18:49.000000000 +0000
++++ glib/tests/Makefile.am
+@@ -66,9 +66,6 @@ hostutils_LDADD = $(progs_ldadd)
+ TEST_PROGS += gvariant
+ gvariant_LDADD = $(progs_ldadd)
+
+-TEST_PROGS += mem-overflow
+-mem_overflow_LDADD = $(progs_ldadd)
+-
+ TEST_PROGS += utf8-performance
+ utf8_performance_SOURCES = utf8-performance.c
+ utf8_performance_LDADD = $(progs_ldadd)