--- /dev/null
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+Add 'install-ptest' target, to copy needed files to ptest dir.
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-status: Pending
+---
+ Makefile.decl | 43 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 43 insertions(+)
+
+--- a/Makefile.decl 2012-03-12 01:42:39.000000000 +0100
++++ b/Makefile.decl 2012-11-26 13:42:08.436865192 +0100
+@@ -25,6 +25,49 @@
+ test-nonrecursive:
+ endif
+
++ptest: ptest-nonrecursive
++ @ for subdir in $(SUBDIRS) .; do \
++ test -d "$$subdir" -a "$$subdir" != "." -a "$$subdir" != "po" && \
++ ( test -d $$subdir && cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) \
++ done
++
++ptest-nonrecursive:
++ @test -z "${TEST_PROGS}" || ${GTESTER} --keep-going --verbose ${TEST_PROGS}
++
++install-ptest: install-ptest-nonrecursive
++ @test -z "$(SUBDIRS)" || for subdir in $(SUBDIRS); do \
++ test "$$subdir" == "." || \
++ (cd $$subdir && $(MAKE) DESTDIR=$(DESTDIR)/$$subdir $@ ) \
++ done
++
++# install files used for ptest:
++# - copy EXTRA_DIST (for test data in glib/tests)
++# - run dist-hook (for glib/tests/bookmarks/ and glib/tests/markups)
++# - copy TEST_PROGS (the test programs)
++# - copy INSTALL_PROGS (for glib/gtester)
++# - avoid libtool wrappers by copying binaries from .libs
++# - strip Makefile: target from all Makefiles
++install-ptest-nonrecursive:
++ @mkdir -p $(DESTDIR)
++ @if [ -n "${TEST_PROGS}" ]; then \
++ if [ -n "${EXTRA_DIST}" ]; then \
++ cp ${EXTRA_DIST} $(DESTDIR); \
++ fi; \
++ grep -q dist-hook: Makefile && \
++ $(MAKE) distdir=$(DESTDIR) dist-hook; \
++ if [ -d .libs ] ; then \
++ cd .libs; \
++ fi; \
++ cp ${TEST_PROGS} $(DESTDIR); \
++ fi;
++ @if [ -n "${INSTALL_PROGS}" ]; then \
++ if [ -d .libs ] ; then \
++ cd .libs; \
++ fi; \
++ cp ${INSTALL_PROGS} $(DESTDIR); \
++ fi
++ @test -f Makefile && sed 's/^Makefile:/_Makefile:/' <Makefile >$(DESTDIR)/Makefile
++
+ # test-report: run tests in subdirs and generate report
+ # perf-report: run tests in subdirs with -m perf and generate report
+ # full-report: like test-report: with -m perf and -m slow
--- /dev/null
+From 1c5718648d49e795efee91c220a2bf9386c184f2 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sat, 28 Apr 2012 18:24:50 +0200
+Subject: [PATCH] configure: use $host_alias-libtool instead of libtool
+ directly
+
+Poky renames libtool to $host_alias-libtool.
+./$host_alias-libtool isn't created until after configure runs with
+libtool >= 2.2.2
+so we can't call # it at this point. We can safely assume a version is
+available
+from PATH though
+
+Rebased to glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com>
+Rebased to glib-2.32.1 by Martin Jansa <Martin.Jansa@gmail.com>
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ configure.ac | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a6478c6..9a93d60 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1470,7 +1470,7 @@ if test x"$glib_native_win32" = xyes; then
+ G_MODULE_LDFLAGS=
+ else
+ export SED
+- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++ G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+ fi
+ dnl G_MODULE_IMPL= don't reset, so cmd-line can override
+ G_MODULE_NEED_USCORE=0
+@@ -1535,9 +1535,9 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then
+ LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
+ dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
+ echo "void glib_plugin_test(void) { }" > plugin.c
+- ${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
++ ${SHELL} ./$host_alias-libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
+ ${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1
+- ${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
++ ${SHELL} ./$host_alias-libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
+ ${LDFLAGS} -module -o plugin.la -export-dynamic \
+ -shrext ".o" -avoid-version plugin.lo \
+ -rpath /dont/care >/dev/null 2>&1
+@@ -1614,7 +1614,7 @@ fi
+
+ AC_MSG_CHECKING(for the suffix of module shared libraries)
+ export SED
+-shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
++shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='`
+ eval $shrext_cmds
+ module=yes eval std_shrext=$shrext_cmds
+ # chop the initial dot
+--
+1.7.8.6
+
--- /dev/null
+diff -ur glib-2.34.3_/configure.ac glib-2.34.3/configure.ac
+--- glib-2.34.3_/configure.ac 2014-09-30 01:22:31.377486031 +0300
++++ glib-2.34.3/configure.ac 2014-09-30 01:23:45.358782478 +0300
+@@ -69,6 +69,7 @@
+ # Support silent build rules. Disable
+ # by either passing --disable-silent-rules to configure or passing V=1
+ # to make
++m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
+ AM_SILENT_RULES([yes])
+
+ GLIB_MAJOR_VERSION=glib_major_version
--- /dev/null
+Rename 'rand' variable to avoid conflict.
+
+Upstream-Status: pending
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+
+diff -u glib-2.34.3/tests/refcount/signals.c~ glib-2.34.3/tests/refcount/signals.c
+--- glib-2.34.3/tests/refcount/signals.c 2012-11-26 17:52:48.000000000 +0100
++++ glib-2.34.3/tests/refcount/signals.c 2013-02-08 14:24:10.052477546 +0100
+@@ -9,7 +9,7 @@
+ #define MY_IS_TEST_CLASS(tclass) (G_TYPE_CHECK_CLASS_TYPE ((tclass), G_TYPE_TEST))
+ #define MY_TEST_GET_CLASS(test) (G_TYPE_INSTANCE_GET_CLASS ((test), G_TYPE_TEST, GTestClass))
+
+-static GRand *rand;
++static GRand *grand;
+
+ typedef struct _GTest GTest;
+ typedef struct _GTestClass GTestClass;
+@@ -84,7 +84,7 @@
+ NULL
+ };
+
+- rand = g_rand_new();
++ grand = g_rand_new();
+
+ test_type = g_type_register_static (G_TYPE_OBJECT, "GTest",
+ &test_info, 0);
+@@ -218,7 +218,7 @@
+ static void
+ my_test_do_prop (GTest * test)
+ {
+- test->value = g_rand_int (rand);
++ test->value = g_rand_int (grand);
+ g_object_notify (G_OBJECT (test), "test-prop");
+ }
+
--- /dev/null
+Upstream-Status: Pending
+
+Pass CC & CFLAGS vars so that tune parameters get used.
+This fixes compilation with x32 toolchain.
+
+Received this patch from H.J. Lu <hjl.tools@gmail.com>
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13
+
+Index: glib-2.30.0/glib/Makefile.am
+===================================================================
+--- glib-2.30.0.orig/glib/Makefile.am
++++ glib-2.30.0/glib/Makefile.am
+@@ -359,10 +359,10 @@ INSTALL_PROGS=
+
+ if ENABLE_DTRACE
+ glib_probes.h: glib_probes.d Makefile
+- $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
++ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -C -h -s $< -o $@.tmp
+ @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
+ glib_probes.o: glib_probes.d Makefile
+- $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
++ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@
+ BUILT_SOURCES += glib_probes.h glib_probes.o
+ CLEANFILES += glib_probes.h glib_probes.h.tmp
+ libglib_2_0_la_LIBADD += glib_probes.o
+Index: glib-2.30.0/glib/Makefile.in
+===================================================================
+--- glib-2.30.0.orig/glib/Makefile.in
++++ glib-2.30.0/glib/Makefile.in
+@@ -1691,10 +1691,10 @@ uninstall-local: uninstall-ms-lib uninst
+ @OS_WIN32_AND_DLL_COMPILATION_FALSE@uninstall-def-file:
+
+ @ENABLE_DTRACE_TRUE@glib_probes.h: glib_probes.d Makefile
+-@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
++@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) CC="$(CC)" CFLAGS="$(CFLAGS)" $(DTRACE) -C -h -s $< -o $@.tmp
+ @ENABLE_DTRACE_TRUE@ @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
+ @ENABLE_DTRACE_TRUE@glib_probes.o: glib_probes.d Makefile
+-@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
++@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) CC="$(CC)" CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@
+
+ gspawn-win32-helper-console.c:
+ echo '#define HELPER_CONSOLE' >$@
+Index: glib-2.30.0/gobject/Makefile.am
+===================================================================
+--- glib-2.30.0.orig/gobject/Makefile.am
++++ glib-2.30.0/gobject/Makefile.am
+@@ -141,10 +141,10 @@ gobject_c_sources = \
+
+ if ENABLE_DTRACE
+ gobject_probes.h: gobject_probes.d Makefile
+- $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
++ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -C -h -s $< -o $@.tmp
+ @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
+ gobject_probes.o: gobject_probes.d Makefile
+- $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
++ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@
+ BUILT_SOURCES += gobject_probes.h gobject_probes.o
+ CLEANFILES += gobject_probes.h
+ libgobject_2_0_la_LIBADD += gobject_probes.o
+Index: glib-2.30.0/gobject/Makefile.in
+===================================================================
+--- glib-2.30.0.orig/gobject/Makefile.in
++++ glib-2.30.0/gobject/Makefile.in
+@@ -1581,10 +1581,10 @@ uninstall-ms-lib:
+ @OS_WIN32_AND_DLL_COMPILATION_FALSE@uninstall-def-file:
+
+ @ENABLE_DTRACE_TRUE@gobject_probes.h: gobject_probes.d Makefile
+-@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
++@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -C -h -s $< -o $@.tmp
+ @ENABLE_DTRACE_TRUE@ @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
+ @ENABLE_DTRACE_TRUE@gobject_probes.o: gobject_probes.d Makefile
+-@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
++@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@
+
+ # This is read by gobject-introspection/misc/ and gtk-doc
+ gobject-public-headers.txt: Makefile
--- /dev/null
+# an very old patch cherry-picked in every glib-2.0 patch directory. The earliest container
+# for it is 2.6.5 in OE. The earliest commit for it is c8e5702127e507e82e6f68a4b8c546803accea9d
+# in OE side which ports from previous bitkeeper SCM. In OE side it's only used til 2.12.4.
+#
+# keep it since it's always cleaner to not hardcode destination path. Use @datadir@ is more
+# portable here. mark for upstream
+#
+# by Kevin Tian <kevin.tian@intel.com>, 06/25/2010
+# Rebased by Dongxiao Xu <dongxiao.xu@intel.com>, 11/16/2010
+
+Upstream-Status: Inappropriate [configuration]
+
+diff -ruN glib-2.27.3-orig/glib-gettextize.in glib-2.27.3/glib-gettextize.in
+--- glib-2.27.3-orig/glib-gettextize.in 2009-04-01 07:04:20.000000000 +0800
++++ glib-2.27.3/glib-gettextize.in 2010-11-16 12:55:06.874605916 +0800
+@@ -52,7 +52,7 @@
+ datadir=@datadir@
+ datarootdir=@datarootdir@
+
+-gettext_dir=$prefix/share/glib-2.0/gettext
++gettext_dir=@datadir@/glib-2.0/gettext
+
+ while test $# -gt 0; do
+ case "$1" in
--- /dev/null
+Upstream-Status: Accepted [https://bugzilla.gnome.org/show_bug.cgi?id=691011]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd glib-2.34.3/configure.ac glib-2.34.3/configure.ac
+--- glib-2.34.3/configure.ac 2012-11-26 19:10:04.000000000 +0200
++++ glib-2.34.3/configure.ac 2013-01-02 15:49:27.832183712 +0200
+@@ -291,7 +291,6 @@
+ AM_CONDITIONAL(HAVE_CXX, [test "$CXX" != ""])
+ AC_LANG_RESTORE
+
+-AM_PROG_CC_STDC
+ AM_PROG_CC_C_O
+ AC_PROG_INSTALL
--- /dev/null
+#!/bin/sh
+
+make -k ptest
--- /dev/null
+DESCRIPTION = "GLib is a general-purpose utility library, \
+which provides many useful data types, macros, \
+type conversions, string utilities, file utilities, a main \
+loop abstraction, and so on. It works on many \
+UNIX-like platforms, Windows, OS/2 and BeOS."
+LICENSE = "LGPLv2+"
+SECTION = "libs"
+PRIORITY = "optional"
+PR = "r2"
+DEPENDS += "glib-2.0-native virtual/libiconv gtk-doc zlib"
+DEPENDS_virtclass-native += "gettext-native gtk-doc-native \
+ pkgconfig-native"
+DEPENDS += "libffi python-argparse-native zlib"
+DEPENDS_virtclass-native += "libffi-native python-argparse-native"
+DEPENDS_virtclass-nativesdk += "nativesdk-libtool nativesdk-libffi python-argparse-native nativesdk-zlib"
+
+SRC_URI = "\
+ http://ftp.gnome.org/pub/GNOME/sources/glib/2.34/glib-${PV}.tar.xz \
+ file://configure-libtool.patch;patch=1 \
+ file://glib-2.0_fix_for_x32.patch;patch=1 \
+ file://obsolete_automake_macros.patch;patch=1 \
+ file://fix-conflicting-rand.patch;patch=1 \
+ file://configure_am_silent_rules.patch;patch=1 \
+"
+
+SRC_URI[md5sum] = "a4ca31e258273c3761e3de2edd607661"
+SRC_URI[sha256sum] = "855fcbf87cb93065b488358e351774d8a39177281023bae58c286f41612658a7"
+
+inherit autotools gettext
+
+S = "${WORKDIR}/glib-${PV}"
+
+EXTRA_OECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-man --enable-included-printf=no --disable-modular-tests --disable-selinux"
+
+do_configure_prepend() {
+ sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
+}
+
+ARM_INSTRUCTION_SET = "arm"
+USE_NLS = "yes"
+
+do_install_append() {
+ if [ "${PN}" != "glib-2.0-native" ]; then
+ sed ${D}${bindir}/gtester-report -i -e 's,${STAGING_BINDIR_NATIVE},${bindir},g'
+ fi
+
+ # remove some unpackaged files
+ rm -f ${D}${libdir}/gdbus-2.0/codegen/*.pyc
+ rm -f ${D}${libdir}/gdbus-2.0/codegen/*.pyo
+ # and empty dirs
+ rm -rf ${D}${libdir}/gio
+
+ # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
+ # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
+ if [ -f ${D}${bindir}/glib-mkenums ]; then
+ sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
+ fi
+}
+
+EXTRA_OECONF_virtclass-native = "--disable-dtrace --disable-systemtap"
+
+do_configure_prepend_virtclass-native() {
+ if [ -e ${S}/${TARGET_SYS}-libtool ] ; then
+ echo "${TARGET_SYS}-libtool already present"
+ else
+ cp ${STAGING_BINDIR}/${TARGET_SYS}-libtool ${S}
+ fi
+
+}
+
+#BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "gobject-2.0 gmodule-2.0 gthread-2.0 gio-2.0 glib-2.0-utils ${PN}-bash-completion ${PN}-codegen"
+LEAD_SONAME = "libglib-2.0.*"
+FILES_${PN}-utils = "${bindir}/* ${datadir}/glib-2.0/gettext"
+FILES_${PN} = "${libdir}/lib*so.* ${libdir}/gio/modules/*.so \
+ ${datadir}/glib-2.0/schemas \
+ ${datadir}/glib-2.0/gettext/mkinstalldirs ${datadir}/glib-2.0/gettext/po/Makefile.in.in"
+FILES_${PN}-dev += "${libdir}/glib-2.0/include \
+ ${libdir}/gio/modules/*.la"
+FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb \
+ ${libdir}/gio/modules/.debug"
+
+FILES_gmodule-2.0 = "${libdir}/libgmodule-2.0.so.*"
+FILES_gobject-2.0 = "${libdir}/libgobject-2.0.so.*"
+FILES_gio-2.0 = "${libdir}/libgio-2.0.so.*"
+FILES_gthread-2.0 = "${libdir}/libgthread-2.0.so.*"
+FILES_${PN}-codegen = "${libdir}/gdbus-2.0/codegen/*.py"
+FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d \
+ ${datadir}/bash-completion"
+
+# Let various glib components end up in glib package
+# for compatibility (with binary packages from Maemo).
+FILES_gthread-2.0_chinook-compat = ""
+FILES_gmodule-2.0_chinook-compat = ""
+FILES_gobject-2.0_chinook-compat = ""
+FILES_gio-2.0_chinook-compat = ""