summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2010-06-09 16:10:59 -0700
committerDan Nicholson <dbn.lists@gmail.com>2010-06-17 12:39:33 -0700
commit070f7f2bed612ce1333c2d2b2fb58aaeaf16b802 (patch)
tree58db0f70cd7d9f1025f9ca6a6203efdd49cf1805
parent34830d54dba1780420b41e00f61b2e34b00c10c9 (diff)
glib2: Save patches to be replayed on snapshots
These are the patches that get us from base glib to just what we need for pkg-config. They should be replayed any time the glib snapshot is updated.
-rw-r--r--glib2-patches/01-unignore-files.patch51
-rw-r--r--glib2-patches/02-no-docs.patch113
-rw-r--r--glib2-patches/03-no-translations.patch122
-rw-r--r--glib2-patches/04-no-tests.patch75
-rw-r--r--glib2-patches/05-only-glib.patch155
-rw-r--r--glib2-patches/06-no-installed-files.patch167
-rw-r--r--glib2-patches/07-no-gregex-pcre.patch158
7 files changed, 841 insertions, 0 deletions
diff --git a/glib2-patches/01-unignore-files.patch b/glib2-patches/01-unignore-files.patch
new file mode 100644
index 0000000..e5a5945
--- /dev/null
+++ b/glib2-patches/01-unignore-files.patch
@@ -0,0 +1,51 @@
+Make the glib .gitignore files more explicit so we don't ignore tracked
+files.
+
+This should go to glib upstream.
+
+diff --git a/glib2/.gitignore b/glib2/.gitignore
+index 9b1006e..cf2bd73 100644
+--- a/glib2/.gitignore
++++ b/glib2/.gitignore
+@@ -18,6 +18,7 @@ Makefile
+ # autofoo stuff here
+ compile
+ config.*
++!/config.h.win32.in
+ configure
+ depcomp
+ aclocal.m4
+@@ -34,5 +35,5 @@ gtk-doc.make
+ glibconfig.h.win32
+
+ INSTALL
+-README
+-ChangeLog
++/README
++/ChangeLog
+diff --git a/glib2/glib/.gitignore b/glib2/glib/.gitignore
+index 814afd8..06e965f 100644
+--- a/glib2/glib/.gitignore
++++ b/glib2/glib/.gitignore
+@@ -2,7 +2,8 @@ galias.h
+ galiasdef.c
+ gtester
+ libglib-gdb.py
+-makefile.msc
++/makefile.msc
+ gspawn-win32-helper-console.c
+ gspawn-win64-helper-console.c
+ gspawn-win64-helper.c
++!glib-mirroring-tab/Makefile
+diff --git a/glib2/glib/libcharset/.gitignore b/glib2/glib/libcharset/.gitignore
+index 0cef440..3112b7d 100644
+--- a/glib2/glib/libcharset/.gitignore
++++ b/glib2/glib/libcharset/.gitignore
+@@ -1,3 +1,4 @@
+ charset.alias
+ ref-add.sed
+ ref-del.sed
++!config.charset
+--
+1.6.6.1
+
diff --git a/glib2-patches/02-no-docs.patch b/glib2-patches/02-no-docs.patch
new file mode 100644
index 0000000..8f54259
--- /dev/null
+++ b/glib2-patches/02-no-docs.patch
@@ -0,0 +1,113 @@
+glib2: Prevent docs from being created or distributed
+
+We don't need the glib documentation when it's being used bundled. This
+allows gtk-doc and xsltproc to be avoided.
+
+diff --git a/glib2/Makefile.am b/glib2/Makefile.am
+index 708b16b..e650e75 100644
+--- a/glib2/Makefile.am
++++ b/glib2/Makefile.am
+@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
+
+ AUTOMAKE_OPTIONS = 1.7
+
+-SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs
++SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po
+ DIST_SUBDIRS = $(SUBDIRS) build
+
+ bin_SCRIPTS = glib-gettextize
+@@ -68,8 +68,7 @@ BUILT_EXTRA_DIST = \
+ INSTALL \
+ ChangeLog \
+ glibconfig.h.win32 \
+- config.h.win32 \
+- gtk-doc.make
++ config.h.win32
+
+ configexecincludedir = $(libdir)/glib-2.0/include
+ configexecinclude_DATA = glibconfig.h
+diff --git a/glib2/autogen.sh b/glib2/autogen.sh
+index 358371b..add4064 100755
+--- a/glib2/autogen.sh
++++ b/glib2/autogen.sh
+@@ -32,14 +32,6 @@ if $have_libtool ; then : ; else
+ DIE=1
+ fi
+
+-(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
+- echo
+- echo "You must have gtk-doc installed to compile $PROJECT."
+- echo "Install the appropriate package for your distribution,"
+- echo "or get the source tarball at ftp://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
+- DIE=1
+-}
+-
+ (autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have autoconf installed to compile $PROJECT."
+@@ -93,7 +85,6 @@ touch README INSTALL
+ $ACLOCAL $ACLOCAL_FLAGS || exit $?
+
+ libtoolize --force || exit $?
+-gtkdocize || exit $?
+
+ autoheader || exit $?
+
+diff --git a/glib2/configure.in b/glib2/configure.in
+index 3e2f677..1f3fda6 100644
+--- a/glib2/configure.in
++++ b/glib2/configure.in
+@@ -2744,35 +2744,6 @@ if test $cross_compiling = yes; then
+ fi
+ fi
+
+-dnl **************************
+-dnl *** Checks for gtk-doc ***
+-dnl **************************
+-
+-GTK_DOC_CHECK([1.11])
+-
+-AC_ARG_ENABLE(man,
+- [AC_HELP_STRING([--enable-man],
+- [regenerate man pages from Docbook [default=no]])],enable_man=yes,
+- enable_man=no)
+-
+-if test "${enable_man}" != no; then
+-dnl
+-dnl Check for xsltproc
+-dnl
+-AC_PATH_PROG([XSLTPROC], [xsltproc])
+- if test -z "$XSLTPROC"; then
+- enable_man=no
+- fi
+-
+- dnl check for DocBook DTD and stylesheets in the local catalog.
+- JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
+- [DocBook XML DTD V4.1.2],,enable_man=no)
+- JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
+- [DocBook XSL Stylesheets],,enable_man=no)
+-fi
+-
+-AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
+-
+ dnl ******************************
+ dnl *** output the whole stuff ***
+ dnl ******************************
+@@ -3541,14 +3512,6 @@ gio/fam/Makefile
+ gio/win32/Makefile
+ gio/tests/Makefile
+ po/Makefile.in
+-docs/Makefile
+-docs/reference/Makefile
+-docs/reference/glib/Makefile
+-docs/reference/glib/version.xml
+-docs/reference/gobject/Makefile
+-docs/reference/gobject/version.xml
+-docs/reference/gio/Makefile
+-docs/reference/gio/version.xml
+ tests/Makefile
+ tests/gobject/Makefile
+ tests/refcount/Makefile
+--
+1.6.6.1
+
diff --git a/glib2-patches/03-no-translations.patch b/glib2-patches/03-no-translations.patch
new file mode 100644
index 0000000..15d53f1
--- /dev/null
+++ b/glib2-patches/03-no-translations.patch
@@ -0,0 +1,122 @@
+glib2: Prevent translations from being installed
+
+pkg-config isn't translated, so we don't need the bundled library to be
+tranlated, either. The glib gettext m4 macros need to be hacked up a bit
+to keep the po/ directory from being distributed.
+
+diff --git a/glib2/Makefile.am b/glib2/Makefile.am
+index e650e75..0944ac3 100644
+--- a/glib2/Makefile.am
++++ b/glib2/Makefile.am
+@@ -3,11 +3,9 @@ include $(top_srcdir)/Makefile.decl
+
+ AUTOMAKE_OPTIONS = 1.7
+
+-SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po
++SUBDIRS = . m4macros glib gmodule gthread gobject gio tests
+ DIST_SUBDIRS = $(SUBDIRS) build
+
+-bin_SCRIPTS = glib-gettextize
+-
+ AM_CPPFLAGS = \
+ -DG_LOG_DOMAIN=g_log_domain_glib \
+ @GLIB_DEBUG_FLAGS@ \
+@@ -44,7 +42,6 @@ EXTRA_DIST += \
+ glibconfig.h.win32.in \
+ msvc_recommended_pragmas.h \
+ config.h.win32.in \
+- po/po2tbl.sed.in \
+ glib-2.0.pc.in \
+ gobject-2.0.pc.in \
+ gmodule-2.0.pc.in \
+@@ -109,10 +106,6 @@ endif
+
+ $(pkgconfig_DATA): config.status
+
+-# install mkinstalldirs for glib-gettextize's benefit
+-gettextdir = $(datadir)/glib-2.0/gettext
+-gettext_SCRIPTS = mkinstalldirs
+-
+ # build documentation when doing distcheck
+ DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-gtk-doc --enable-man
+
+diff --git a/glib2/configure.in b/glib2/configure.in
+index 1f3fda6..7ab8b19 100644
+--- a/glib2/configure.in
++++ b/glib2/configure.in
+@@ -472,8 +472,7 @@ dnl
+ dnl gettext support
+ dnl
+
+-ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
+-AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
++ALL_LINGUAS=
+ GLIB_GNU_GETTEXT
+
+ if test "$gt_cv_have_gettext" != "yes" ; then
+@@ -3484,7 +3483,6 @@ gio-unix-2.0.pc
+ gio-2.0-uninstalled.pc
+ gio-unix-2.0-uninstalled.pc
+ glib-zip
+-glib-gettextize
+ Makefile
+ build/Makefile
+ build/win32/Makefile
+@@ -3511,7 +3509,6 @@ gio/fen/Makefile
+ gio/fam/Makefile
+ gio/win32/Makefile
+ gio/tests/Makefile
+-po/Makefile.in
+ tests/Makefile
+ tests/gobject/Makefile
+ tests/refcount/Makefile
+@@ -3520,7 +3517,6 @@ m4macros/Makefile
+
+ AC_CONFIG_COMMANDS([chmod-scripts],
+ [chmod 0755 glib-zip
+-chmod 0755 glib-gettextize
+ chmod 0755 gobject/glib-mkenums])
+
+ # we want to invoke this macro solely so that the config.status script
+diff --git a/glib2/m4macros/glib-gettext.m4 b/glib2/m4macros/glib-gettext.m4
+index 68b08b3..18c3c1e 100644
+--- a/glib2/m4macros/glib-gettext.m4
++++ b/glib2/m4macros/glib-gettext.m4
+@@ -273,11 +273,6 @@ msgstr ""
+ # We need to process the po/ directory.
+ POSUB=po
+
+- AC_OUTPUT_COMMANDS(
+- [case "$CONFIG_FILES" in *po/Makefile.in*)
+- sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+- esac])
+-
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+@@ -364,22 +359,6 @@ glib_DEFUN([GLIB_GNU_GETTEXT],
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+-
+- dnl Generate list of files to be processed by xgettext which will
+- dnl be included in po/Makefile.
+- test -d po || mkdir po
+- if test "x$srcdir" != "x."; then
+- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+- posrcprefix="$srcdir/"
+- else
+- posrcprefix="../$srcdir/"
+- fi
+- else
+- posrcprefix="../"
+- fi
+- rm -f po/POTFILES
+- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+- < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
+
+ # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+--
+1.6.6.1
+
diff --git a/glib2-patches/04-no-tests.patch b/glib2-patches/04-no-tests.patch
new file mode 100644
index 0000000..4338bd2
--- /dev/null
+++ b/glib2-patches/04-no-tests.patch
@@ -0,0 +1,75 @@
+glib2: Don't build or distribute the tests
+
+The point of the bundled library is to use it, not to do regression
+tests on it.
+
+diff --git a/glib2/Makefile.am b/glib2/Makefile.am
+index 0944ac3..91af7be 100644
+--- a/glib2/Makefile.am
++++ b/glib2/Makefile.am
+@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
+
+ AUTOMAKE_OPTIONS = 1.7
+
+-SUBDIRS = . m4macros glib gmodule gthread gobject gio tests
++SUBDIRS = . m4macros glib gmodule gthread gobject gio
+ DIST_SUBDIRS = $(SUBDIRS) build
+
+ AM_CPPFLAGS = \
+diff --git a/glib2/configure.in b/glib2/configure.in
+index 7ab8b19..afc60e4 100644
+--- a/glib2/configure.in
++++ b/glib2/configure.in
+@@ -3493,7 +3493,6 @@ glib/libcharset/Makefile
+ glib/gnulib/Makefile
+ glib/pcre/Makefile
+ glib/update-pcre/Makefile
+-glib/tests/Makefile
+ gmodule/Makefile
+ gmodule/gmoduleconf.h
+ gobject/Makefile
+@@ -3509,9 +3508,6 @@ gio/fen/Makefile
+ gio/fam/Makefile
+ gio/win32/Makefile
+ gio/tests/Makefile
+-tests/Makefile
+-tests/gobject/Makefile
+-tests/refcount/Makefile
+ m4macros/Makefile
+ ])
+
+@@ -3537,7 +3533,6 @@ if false; then
+ gthread/makefile.msc
+ gthread/gthread.rc
+ gio/gio.rc
+- tests/makefile.msc
+ ])
+ fi
+
+diff --git a/glib2/glib/Makefile.am b/glib2/glib/Makefile.am
+index 8882ae2..340705e 100644
+--- a/glib2/glib/Makefile.am
++++ b/glib2/glib/Makefile.am
+@@ -25,9 +25,9 @@ else
+ gatomic_c = gatomic.c
+ endif
+
+-SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
++SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre .
+
+-DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
++DIST_SUBDIRS = libcharset gnulib pcre update-pcre
+
+ AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+@@ -50,7 +50,6 @@ galiasdef.c: $(srcdir)/makegalias.pl glib.symbols
+ if OS_LINUX
+ if HAVE_GNUC_VISIBILITY
+ TESTS_ENVIRONMENT = GLIB_DEBUG_FLAGS="$(GLIB_DEBUG_FLAGS)"
+-TESTS = abicheck.sh pltcheck.sh
+ endif
+ endif
+
+--
+1.6.6.1
+
diff --git a/glib2-patches/05-only-glib.patch b/glib2-patches/05-only-glib.patch
new file mode 100644
index 0000000..2c34284
--- /dev/null
+++ b/glib2-patches/05-only-glib.patch
@@ -0,0 +1,155 @@
+glib2: Build only glib
+
+We only need the base library for pkg-config.
+
+diff --git a/glib2/Makefile.am b/glib2/Makefile.am
+index 91af7be..9361594 100644
+--- a/glib2/Makefile.am
++++ b/glib2/Makefile.am
+@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
+
+ AUTOMAKE_OPTIONS = 1.7
+
+-SUBDIRS = . m4macros glib gmodule gthread gobject gio
++SUBDIRS = . m4macros glib
+ DIST_SUBDIRS = $(SUBDIRS) build
+
+ AM_CPPFLAGS = \
+@@ -43,20 +43,7 @@ EXTRA_DIST += \
+ msvc_recommended_pragmas.h \
+ config.h.win32.in \
+ glib-2.0.pc.in \
+- gobject-2.0.pc.in \
+- gmodule-2.0.pc.in \
+- gmodule-export-2.0.pc.in \
+- gmodule-no-export-2.0.pc.in \
+- gthread-2.0.pc.in \
+- gio-2.0.pc.in \
+- gio-unix-2.0.pc.in \
+- glib-2.0-uninstalled.pc.in \
+- gobject-2.0-uninstalled.pc.in \
+- gmodule-2.0-uninstalled.pc.in \
+- gthread-2.0-uninstalled.pc.in \
+- gmodule-no-export-2.0-uninstalled.pc.in \
+- gio-2.0-uninstalled.pc.in \
+- gio-unix-2.0-uninstalled.pc.in
++ glib-2.0-uninstalled.pc.in
+
+
+ # These may be in the builddir too
+@@ -98,11 +85,7 @@ ChangeLog:
+ fi
+
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gmodule-export-2.0.pc gmodule-no-export-2.0.pc gthread-2.0.pc gio-2.0.pc
+-
+-if OS_UNIX
+-pkgconfig_DATA += gio-unix-2.0.pc
+-endif
++pkgconfig_DATA = glib-2.0.pc
+
+ $(pkgconfig_DATA): config.status
+
+diff --git a/glib2/build/win32/vs8/Makefile.am b/glib2/build/win32/vs8/Makefile.am
+index 69cd83f..6d43bb9 100644
+--- a/glib2/build/win32/vs8/Makefile.am
++++ b/glib2/build/win32/vs8/Makefile.am
+@@ -1,11 +1,7 @@
+ EXTRA_DIST = \
+ README \
+- gio.vcproj \
+ glib-genmarshal.vcproj \
+ glib.sln \
+ glib.vcproj \
+- gmodule.vcproj \
+- gobject.vcproj \
+ gspawn-win32-helper-console.vcproj \
+- gspawn-win32-helper.vcproj \
+- gthread.vcproj
++ gspawn-win32-helper.vcproj
+diff --git a/glib2/build/win32/vs9/Makefile.am b/glib2/build/win32/vs9/Makefile.am
+index e9b379f..6426653 100644
+--- a/glib2/build/win32/vs9/Makefile.am
++++ b/glib2/build/win32/vs9/Makefile.am
+@@ -7,11 +7,5 @@ EXTRA_DIST = \
+ glib-genmarshal.vcproj \
+ gspawn-win32-helper-console.vcproj \
+ gspawn-win32-helper.vcproj \
+- gmodule.vcproj \
+- gobject.vcproj \
+- gobject.vcprojin \
+- gthread.vcproj \
+- gio.vcproj \
+- gio.vcprojin \
+ testglib.vcproj \
+ install.vcproj
+diff --git a/glib2/configure.in b/glib2/configure.in
+index afc60e4..d0be962 100644
+--- a/glib2/configure.in
++++ b/glib2/configure.in
+@@ -3469,19 +3469,6 @@ fi
+ AC_CONFIG_FILES([
+ glib-2.0.pc
+ glib-2.0-uninstalled.pc
+-gmodule-2.0.pc
+-gmodule-export-2.0.pc
+-gmodule-no-export-2.0.pc
+-gmodule-2.0-uninstalled.pc
+-gmodule-no-export-2.0-uninstalled.pc
+-gthread-2.0.pc
+-gthread-2.0-uninstalled.pc
+-gobject-2.0.pc
+-gobject-2.0-uninstalled.pc
+-gio-2.0.pc
+-gio-unix-2.0.pc
+-gio-2.0-uninstalled.pc
+-gio-unix-2.0-uninstalled.pc
+ glib-zip
+ Makefile
+ build/Makefile
+@@ -3493,27 +3480,12 @@ glib/libcharset/Makefile
+ glib/gnulib/Makefile
+ glib/pcre/Makefile
+ glib/update-pcre/Makefile
+-gmodule/Makefile
+-gmodule/gmoduleconf.h
+-gobject/Makefile
+-gobject/glib-mkenums
+-gobject/tests/Makefile
+-gthread/Makefile
+-gthread/tests/Makefile
+-gio/Makefile
+-gio/xdgmime/Makefile
+-gio/inotify/Makefile
+-gio/libasyncns/Makefile
+-gio/fen/Makefile
+-gio/fam/Makefile
+-gio/win32/Makefile
+-gio/tests/Makefile
+ m4macros/Makefile
+ ])
+
+ AC_CONFIG_COMMANDS([chmod-scripts],
+ [chmod 0755 glib-zip
+-chmod 0755 gobject/glib-mkenums])
++])
+
+ # we want to invoke this macro solely so that the config.status script
+ # and automake generated makefiles know about these generated files.
+@@ -3526,13 +3498,6 @@ if false; then
+ glibconfig.h.win32
+ glib/makefile.msc
+ glib/glib.rc
+- gmodule/makefile.msc
+- gmodule/gmodule.rc
+- gobject/makefile.msc
+- gobject/gobject.rc
+- gthread/makefile.msc
+- gthread/gthread.rc
+- gio/gio.rc
+ ])
+ fi
+
+--
+1.6.6.1
+
diff --git a/glib2-patches/06-no-installed-files.patch b/glib2-patches/06-no-installed-files.patch
new file mode 100644
index 0000000..927ebb3
--- /dev/null
+++ b/glib2-patches/06-no-installed-files.patch
@@ -0,0 +1,167 @@
+glib2: don't install anything from the bundled library
+
+All we want is the libglib.la convenience library. The -version-info is
+removed since it causes warnings.
+
+diff --git a/glib2/Makefile.am b/glib2/Makefile.am
+index 9361594..4f48377 100644
+--- a/glib2/Makefile.am
++++ b/glib2/Makefile.am
+@@ -55,7 +55,7 @@ BUILT_EXTRA_DIST = \
+ config.h.win32
+
+ configexecincludedir = $(libdir)/glib-2.0/include
+-configexecinclude_DATA = glibconfig.h
++noinst_DATA = glibconfig.h
+
+ uninstall-local:
+ rm -f $(DESTDIR)$(configexecincludedir)/glibconfig.h
+@@ -85,7 +85,7 @@ ChangeLog:
+ fi
+
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = glib-2.0.pc
++noinst_DATA += glib-2.0.pc
+
+ $(pkgconfig_DATA): config.status
+
+diff --git a/glib2/glib/Makefile.am b/glib2/glib/Makefile.am
+index 340705e..e62e4a9 100644
+--- a/glib2/glib/Makefile.am
++++ b/glib2/glib/Makefile.am
+@@ -85,7 +85,7 @@ BUILT_EXTRA_DIST = \
+ galias.h \
+ galiasdef.c
+
+-lib_LTLIBRARIES = libglib-2.0.la
++noinst_LTLIBRARIES = libglib-2.0.la
+
+ if OS_WIN32_AND_DLL_COMPILATION
+ if MS_LIB_AVAILABLE
+@@ -197,12 +197,12 @@ EXTRA_libglib_2_0_la_SOURCES = \
+ gwin32.c
+
+ glibincludedir=$(includedir)/glib-2.0
+-glibinclude_HEADERS = \
++noinst_HEADERS = \
+ glib-object.h \
+ glib.h
+
+ glibsubincludedir=$(includedir)/glib-2.0/glib
+-glibsubinclude_HEADERS = \
++noinst_HEADERS += \
+ galloca.h \
+ garray.h \
+ gasyncqueue.h \
+@@ -319,7 +319,6 @@ libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAW
+
+ libglib_2_0_la_LDFLAGS = \
+ $(glib_win32_res_ldflag) \
+- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -export-dynamic $(no_undefined) $(export_symbols)
+
+ INSTALL_PROGS=
+@@ -352,7 +351,7 @@ endif
+ glib-win32-res.o: glib.rc
+ $(WINDRES) glib.rc $@
+
+-bin_PROGRAMS = ${INSTALL_PROGS}
++noinst_PROGRAMS = ${INSTALL_PROGS}
+
+ if OS_UNIX
+
+@@ -361,23 +360,13 @@ gtester_SOURCES = gtester.c
+ gtester_LDADD = libglib-2.0.la
+
+ auto_config_binscripts = gtester-report
+-bin_SCRIPTS = ${auto_config_binscripts}
++noinst_SCRIPTS = ${auto_config_binscripts}
+ EXTRA_DIST += ${auto_config_binscripts}
+
+ CONFIGVARS = \
+ "bindir" : "${bindir}", \
+ "glib-version" : "${GLIB_VERSION}"
+
+-install-exec-hook:
+- for sf in ${auto_config_binscripts} ; do \
+- mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
+- && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
+- -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
+- -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
+- || exit $$? ; \
+- rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
+- done
+-
+ endif
+
+ glib-2.0.lib: libglib-2.0.la glib.def
+@@ -407,19 +396,7 @@ distclean-local:
+
+ # install gdb scripts
+ gdbdir = $(datadir)/glib-2.0/gdb
+-dist_gdb_SCRIPTS = glib.py
++dist_noinst_SCRIPTS = glib.py
+
+ libglib-gdb.py: libglib-gdb.py.in
+ sed -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > libglib-gdb.py
+-
+-
+-install-data-hook: libglib-gdb.py
+- mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
+- $(INSTALL) libglib-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py
+-if HAVE_GLIB_RUNTIME_LIBDIR
+- mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
+- mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
+- mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
+- rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
+- ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so
+-endif
+diff --git a/glib2/glib/libcharset/Makefile.am b/glib2/glib/libcharset/Makefile.am
+index cfa3412..a173d81 100644
+--- a/glib2/glib/libcharset/Makefile.am
++++ b/glib2/glib/libcharset/Makefile.am
+@@ -24,31 +24,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 \
+- sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+- if grep '^# Packages using this file: $$' $(charset_tmp) \
+- > /dev/null; then \
+- rm -f $(charset_alias); \
+- else \
+- $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+- fi; \
+- rm -f $(charset_tmp); \
+- fi
+
+ charset.alias: config.charset
+ $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
+diff --git a/glib2/m4macros/Makefile.am b/glib2/m4macros/Makefile.am
+index 0284b4e..ea54548 100644
+--- a/glib2/m4macros/Makefile.am
++++ b/glib2/m4macros/Makefile.am
+@@ -5,4 +5,4 @@ installed_m4= glib-2.0.m4 glib-gettext.m4
+ EXTRA_DIST+=$(installed_m4)
+
+ m4datadir = $(datadir)/aclocal
+-m4data_DATA = $(installed_m4)
++noinst_DATA = $(installed_m4)
+--
+1.6.6.1
+
diff --git a/glib2-patches/07-no-gregex-pcre.patch b/glib2-patches/07-no-gregex-pcre.patch
new file mode 100644
index 0000000..b339e3e
--- /dev/null
+++ b/glib2-patches/07-no-gregex-pcre.patch
@@ -0,0 +1,158 @@
+glib2: Don't build GRegex or distribute pcre
+
+In order to avoid the bundled pcre in our bundled glib, just remove and
+disable the GRegex API. We don't currently need this in pkg-config
+anyway.
+
+diff --git a/glib2/configure.in b/glib2/configure.in
+index d0be962..dd1be30 100644
+--- a/glib2/configure.in
++++ b/glib2/configure.in
+@@ -2626,81 +2626,6 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ [broken_poll="no (cross compiling)"])
+ AC_MSG_RESULT($broken_poll)
+
+-dnl *********************
+-dnl *** GRegex checks ***
+-dnl *********************
+-PCRE_REQUIRED_VERSION=7.2
+-
+-# Check if we should compile GRegex
+-AC_ARG_ENABLE(regex, AC_HELP_STRING([--disable-regex],
+- [disable the compilation of GRegex]),
+-[case "${enableval}" in
+- yes) enable_regex=true ;;
+- no) enable_regex=false ;;
+- *) AC_MSG_ERROR(bad value ${enableval} for --enable-regex) ;;
+-esac],
+-[enable_regex=true])
+-
+-AM_CONDITIONAL(ENABLE_REGEX, $enable_regex)
+-
+-if test x$enable_regex = xtrue; then
+- AC_DEFINE(ENABLE_REGEX, [], [include GRegex])
+- # Check if we should use the internal or the system-supplied pcre
+- AC_ARG_WITH(pcre,
+- [AC_HELP_STRING([--with-pcre=@<:@internal/system@:>@],
+- [specify whether to use the internal or the
+- system-supplied PCRE library])])
+-
+- AM_CONDITIONAL(USE_SYSTEM_PCRE, [test "x$with_pcre" = xsystem])
+-
+- if test "x$with_pcre" = xsystem; then
+- PKG_CHECK_MODULES(PCRE,
+- libpcre >= $PCRE_REQUIRED_VERSION)
+- AC_CACHE_CHECK([for Unicode support in PCRE],glib_cv_pcre_has_unicode,[
+- glib_save_CFLAGS="$CFLAGS"
+- glib_save_LIBS="$LIBS"
+- CFLAGS="$CFLAGS $PCRE_CFLAGS" LIBS="$PCRE_LIBS"
+- AC_TRY_RUN([#include <pcre.h>
+- int main () {
+- int support;
+- pcre_config (PCRE_CONFIG_UTF8, &support);
+- if (!support)
+- return 1;
+- pcre_config (PCRE_CONFIG_UNICODE_PROPERTIES, &support);
+- if (!support)
+- return 1;
+- return 0;
+- }],
+- glib_cv_pcre_has_unicode=yes,
+- glib_cv_pcre_has_unicode=no,
+- glib_cv_pcre_has_unicode=yes)
+- CFLAGS="$glib_save_CFLAGS"
+- LIBS="$glib_save_LIBS"
+- ])
+- if test "$glib_cv_pcre_has_unicode" = "no"; then
+- AC_MSG_ERROR([*** The system-supplied PCRE does not support Unicode properties or UTF-8.])
+- fi
+- AC_SUBST(PCRE_CFLAGS)
+- AC_SUBST(PCRE_LIBS)
+- AC_DEFINE(USE_SYSTEM_PCRE, [], [using the system-supplied PCRE library])
+- PCRE_REQUIRES=libpcre
+- AC_SUBST(PCRE_REQUIRES)
+- else
+- # If using gcc 4 pass -Wno-pointer-sign when compiling the internal PCRE
+- if test x"$GCC" = xyes; then
+- AC_MSG_CHECKING([whether compiler understands -Wno-pointer-sign])
+- save_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -Wno-pointer-sign"
+- AC_TRY_COMPILE([],[],[PCRE_WARN_CFLAGS="$PCRE_WARN_CFLAGS -Wno-pointer-sign"
+- AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
+- CFLAGS="$save_CFLAGS"
+- fi
+- fi
+- AC_SUBST(PCRE_WARN_CFLAGS)
+-else
+- AM_CONDITIONAL(USE_SYSTEM_PCRE, false])
+-fi
+-
+ dnl **********************
+ dnl *** Win32 API libs ***
+ dnl **********************
+@@ -3478,8 +3403,6 @@ build/win32/vs9/Makefile
+ glib/Makefile
+ glib/libcharset/Makefile
+ glib/gnulib/Makefile
+-glib/pcre/Makefile
+-glib/update-pcre/Makefile
+ m4macros/Makefile
+ ])
+
+diff --git a/glib2/glib/Makefile.am b/glib2/glib/Makefile.am
+index e62e4a9..1778a76 100644
+--- a/glib2/glib/Makefile.am
++++ b/glib2/glib/Makefile.am
+@@ -7,27 +7,15 @@ PRINTF_SUBDIR = gnulib
+ printf_la = gnulib/libgnulib.la
+ endif
+
+-if ENABLE_REGEX
+-if USE_SYSTEM_PCRE
+-else
+-MAYBE_PCRE = pcre
+-endif
+-gregex_c = gregex.c
+-gregex_h = gregex.h
+-else
+-gregex_c =
+-gregex_h =
+-endif
+-
+ if HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS
+ gatomic_c = gatomic-gcc.c
+ else
+ gatomic_c = gatomic.c
+ endif
+
+-SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre .
++SUBDIRS = libcharset $(PRINTF_SUBDIR) .
+
+-DIST_SUBDIRS = libcharset gnulib pcre update-pcre
++DIST_SUBDIRS = libcharset gnulib
+
+ AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+@@ -301,19 +289,6 @@ uninstall-def-file:
+ export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
+ endif
+
+-if ENABLE_REGEX
+-if USE_SYSTEM_PCRE
+-pcre_lib = $(PCRE_LIBS)
+-pcre_inc = $(PCRE_CFLAGS)
+-else
+-pcre_lib = pcre/libpcre.la
+-pcre_inc =
+-endif
+-else
+-pcre_lib =
+-pcre_inc =
+-endif
+-
+ libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)
+ libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
+
+--
+1.6.6.1
+