summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glib-2.0')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch56
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch39
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch60
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch35
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch54
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch29
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch24
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch197
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch65
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch30
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/run-ptest3
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch20
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb24
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc98
14 files changed, 734 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch
new file mode 100644
index 0000000000..9b87d9d547
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch
@@ -0,0 +1,56 @@
1From 0167c3340d8201dca8e9031b61703bbc5ed6ce33 Mon Sep 17 00:00:00 2001
2From: Jan Schmidt <thaytan@noraisin.net>
3Date: Wed, 25 Sep 2013 19:22:26 +1000
4Subject: [PATCH] gio: Fix -Werror format string errors from mismatched ints.
5
6Upstream-Status: Backport
7
8---
9 gio/gdbusmessage.c | 8 ++++----
10 gio/gdbusprivate.c | 4 ++--
11 2 files changed, 6 insertions(+), 6 deletions(-)
12
13diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
14index ac233a3..ad77aa6 100644
15--- a/gio/gdbusmessage.c
16+++ b/gio/gdbusmessage.c
17@@ -3468,10 +3468,10 @@ g_dbus_message_print (GDBusMessage *message,
18 statbuf.st_mode);
19 g_string_append_printf (fs, "%s" "ino=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
20 (guint64) statbuf.st_ino);
21- g_string_append_printf (fs, "%s" "uid=%d", fs->len > 0 ? "," : "",
22- statbuf.st_uid);
23- g_string_append_printf (fs, "%s" "gid=%d", fs->len > 0 ? "," : "",
24- statbuf.st_gid);
25+ g_string_append_printf (fs, "%s" "uid=%u", fs->len > 0 ? "," : "",
26+ (guint) statbuf.st_uid);
27+ g_string_append_printf (fs, "%s" "gid=%u", fs->len > 0 ? "," : "",
28+ (guint) statbuf.st_gid);
29 g_string_append_printf (fs, "%s" "rdev=%d:%d", fs->len > 0 ? "," : "",
30 major (statbuf.st_rdev), minor (statbuf.st_rdev));
31 g_string_append_printf (fs, "%s" "size=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
32diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c
33index 0e5bef2..785a0c0 100644
34--- a/gio/gdbusprivate.c
35+++ b/gio/gdbusprivate.c
36@@ -2155,7 +2155,7 @@ write_message_print_transport_debug (gssize bytes_written,
37 _g_dbus_debug_print_lock ();
38 g_print ("========================================================================\n"
39 "GDBus-debug:Transport:\n"
40- " >>>> WROTE %" G_GSIZE_FORMAT " bytes of message with serial %d and\n"
41+ " >>>> WROTE %" G_GSSIZE_FORMAT " bytes of message with serial %d and\n"
42 " size %" G_GSIZE_FORMAT " from offset %" G_GSIZE_FORMAT " on a %s\n",
43 bytes_written,
44 g_dbus_message_get_serial (data->message),
45@@ -2206,7 +2206,7 @@ read_message_print_transport_debug (gssize bytes_read,
46 _g_dbus_debug_print_lock ();
47 g_print ("========================================================================\n"
48 "GDBus-debug:Transport:\n"
49- " <<<< READ %" G_GSIZE_FORMAT " bytes of message with serial %d and\n"
50+ " <<<< READ %" G_GSSIZE_FORMAT " bytes of message with serial %d and\n"
51 " size %d to offset %" G_GSIZE_FORMAT " from a %s\n",
52 bytes_read,
53 serial,
54--
551.8.3.1
56
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch b/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch
new file mode 100644
index 0000000000..3aac35a5d3
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch
@@ -0,0 +1,39 @@
1From 55253b55b9c65f3e0efbbe03cbab2a4c4014a16b Mon Sep 17 00:00:00 2001
2From: Song.Li <Song.Li@windriver.com>
3Date: Thu, 5 Jul 2012 15:09:41 +0800
4Subject: [PATCH] add -march=i486 into CFLAGS automatically
5
6Upstream-Status: Inappropriate [configuration]
7
8glib configure will check if current gcc need -march=i486,
9when gcc need -march=i486 but CFLAGS don't have,
10glib configure will abort and advise the user to add -march=i486 or later.
11This will break the build process,it's not good for automatic build system.
12so change this to adding -march=i485 automatically when it is needed.
13---
14 configure.ac | 6 ++++--
15 1 files changed, 4 insertions(+), 2 deletions(-)
16
17Index: glib-2.36.0/configure.ac
18===================================================================
19--- glib-2.36.0.orig/configure.ac
20+++ glib-2.36.0/configure.ac
21@@ -2378,7 +2378,7 @@ dnl
22 dnl Note that the atomic ops are only available with GCC on x86 when
23 dnl using -march=i486 or higher. If we detect that the atomic ops are
24 dnl not available but would be available given the right flags, we want
25-dnl to abort and advise the user to fix their CFLAGS. It's better to do
26+dnl to add -march=i486 automatically to fix their CFLAGS. It's better to do
27 dnl that then to silently fall back on emulated atomic ops just because
28 dnl the user had the wrong build environment.
29
30@@ -2401,7 +2401,8 @@ AC_CACHE_CHECK([for lock-free atomic int
31 AC_TRY_COMPILE([],
32 [volatile int atomic = 2;\
33 __sync_bool_compare_and_swap (&atomic, 2, 3);],
34- [AC_MSG_ERROR([GLib must be build with -march=i486 or later.])],
35+ [AC_MSG_WARN([GLib must be build with -march=i486 or later.])
36+ SAVE_CFLAGS="${SAVE_CFLAGS} -march=i486"],
37 [])
38 CFLAGS="${SAVE_CFLAGS}"
39 fi
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
new file mode 100644
index 0000000000..1d69a3f290
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
@@ -0,0 +1,60 @@
1From 1c5718648d49e795efee91c220a2bf9386c184f2 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 28 Apr 2012 18:24:50 +0200
4Subject: [PATCH] configure: use $host_alias-libtool instead of libtool
5 directly
6
7Poky renames libtool to $host_alias-libtool.
8./$host_alias-libtool isn't created until after configure runs with
9libtool >= 2.2.2
10so we can't call # it at this point. We can safely assume a version is
11available
12from PATH though
13
14Rebased to glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com>
15Rebased to glib-2.32.1 by Martin Jansa <Martin.Jansa@gmail.com>
16
17Upstream-Status: Inappropriate [configuration]
18
19Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
20---
21 configure.ac | 8 ++++----
22 1 files changed, 4 insertions(+), 4 deletions(-)
23
24diff --git a/configure.ac b/configure.ac
25index a6478c6..9a93d60 100644
26--- a/configure.ac
27+++ b/configure.ac
28@@ -1470,7 +1470,7 @@ if test x"$glib_native_win32" = xyes; then
29 G_MODULE_LDFLAGS=
30 else
31 export SED
32- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
33+ G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
34 fi
35 dnl G_MODULE_IMPL= don't reset, so cmd-line can override
36 G_MODULE_NEED_USCORE=0
37@@ -1535,9 +1535,9 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then
38 LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
39 dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
40 echo "void glib_plugin_test(void) { }" > plugin.c
41- ${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
42+ ${SHELL} ./$host_alias-libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
43 ${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1
44- ${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
45+ ${SHELL} ./$host_alias-libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
46 ${LDFLAGS} -module -o plugin.la -export-dynamic \
47 -shrext ".o" -avoid-version plugin.lo \
48 -rpath /dont/care >/dev/null 2>&1
49@@ -1614,7 +1614,7 @@ fi
50
51 AC_MSG_CHECKING(for the suffix of module shared libraries)
52 export SED
53-shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
54+shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='`
55 eval $shrext_cmds
56 module=yes eval std_shrext=$shrext_cmds
57 # chop the initial dot
58--
591.7.8.6
60
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
new file mode 100644
index 0000000000..1571112b0e
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
@@ -0,0 +1,35 @@
1Rename 'rand' variable to avoid conflict.
2
3Upstream-Status: pending
4Signed-off-by: Björn Stenberg <bjst@enea.com>
5
6diff -u glib-2.34.3/tests/refcount/signals.c~ glib-2.34.3/tests/refcount/signals.c
7--- glib-2.34.3/tests/refcount/signals.c 2012-11-26 17:52:48.000000000 +0100
8+++ glib-2.34.3/tests/refcount/signals.c 2013-02-08 14:24:10.052477546 +0100
9@@ -9,7 +9,7 @@
10 #define MY_IS_TEST_CLASS(tclass) (G_TYPE_CHECK_CLASS_TYPE ((tclass), G_TYPE_TEST))
11 #define MY_TEST_GET_CLASS(test) (G_TYPE_INSTANCE_GET_CLASS ((test), G_TYPE_TEST, GTestClass))
12
13-static GRand *rand;
14+static GRand *grand;
15
16 typedef struct _GTest GTest;
17 typedef struct _GTestClass GTestClass;
18@@ -84,7 +84,7 @@
19 NULL
20 };
21
22- rand = g_rand_new();
23+ grand = g_rand_new();
24
25 test_type = g_type_register_static (G_TYPE_OBJECT, "GTest",
26 &test_info, 0);
27@@ -218,7 +218,7 @@
28 static void
29 my_test_do_prop (GTest * test)
30 {
31- test->value = g_rand_int (rand);
32+ test->value = g_rand_int (grand);
33 g_object_notify (G_OBJECT (test), "test-prop");
34 }
35
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch b/meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch
new file mode 100644
index 0000000000..720ea6c328
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/gio-test-race.patch
@@ -0,0 +1,54 @@
1Upstream-Status: Submitted
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From a047a0270ee5faf1d9d6080cbc613defdf52baea Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Tue, 4 Feb 2014 13:15:08 +0000
7Subject: [PATCH] gio/tests: fix race when generating code
8
9There is a race condition in the makefile that can result in build failures like this in parallel builds:
10
11| ./gdbus-test-codegen-generated.h:7:0: error: unterminated #ifndef
12| #ifndef __GDBUS_TEST_CODEGEN_GENERATED_H__
13
14This is because a rule like this:
15
16x.c x.h: prerequisites
17 @commands
18
19doesn't consider x.c and x.h together. Instead, it expands to two rules, one to
20generate x.c and one to generate x.h, which happen to run the same commands. In
21the worst case they execute in parallel, overwriting each other's output.
22
23Signed-off-by: Ross Burton <ross.burton@intel.com>
24
25https://bugzilla.gnome.org/show_bug.cgi?id=723616
26---
27 gio/tests/Makefile.am | 4 +++-
28 1 file changed, 3 insertions(+), 1 deletion(-)
29
30diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
31index 0beb239..270faf6 100644
32--- a/gio/tests/Makefile.am
33+++ b/gio/tests/Makefile.am
34@@ -436,7 +436,7 @@ gmenumodel_SOURCES = $(gdbus_sessionbus_sources) gmenumode
35 gnotification_SOURCES = $(gdbus_sessionbus_sources) gnotification.c gnotification-server.h gnotification-server.c
36
37 gdbus-test-codegen.o: gdbus-test-codegen-generated.h
38-gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
39+gdbus-test-codegen-generated.h: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
40 $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
41 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
42 $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
43@@ -455,6 +455,8 @@ gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c: test-codegen.xml
44 --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \
45 $(srcdir)/test-codegen.xml \
46 $(NULL)
47+gdbus-test-codegen-generated.c: gdbus-test-codegen-generated.h
48+ @: # Generated as side-effect of .h
49
50 EXTRA_DIST += test-codegen.xml
51 CLEANFILES += gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml
52--
531.7.10.4
54
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch
new file mode 100644
index 0000000000..9759d11e3c
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch
@@ -0,0 +1,29 @@
1configure.ac: change readlink -f to -m
2
3Change "readlink -f" to "readlink -m" since $libdir/$with_runtime_libdir
4may not exist.
5
6This patch should go to the upstream, I will send it sooner.
7
8Upstream-Status: Pending
9
10Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11---
12 configure.ac | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/configure.ac b/configure.ac
16--- a/configure.ac
17+++ b/configure.ac
18@@ -271,7 +271,7 @@ AC_ARG_WITH(runtime-libdir,
19 [],
20 [with_runtime_libdir=""])
21 GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
22-ABS_GLIB_RUNTIME_LIBDIR="`readlink -f $libdir/$with_runtime_libdir`"
23+ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`"
24 AC_SUBST(GLIB_RUNTIME_LIBDIR)
25 AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR)
26 AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"])
27--
281.8.1.2
29
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch
new file mode 100644
index 0000000000..ee435111fc
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch
@@ -0,0 +1,24 @@
1# an very old patch cherry-picked in every glib-2.0 patch directory. The earliest container
2# for it is 2.6.5 in OE. The earliest commit for it is c8e5702127e507e82e6f68a4b8c546803accea9d
3# in OE side which ports from previous bitkeeper SCM. In OE side it's only used til 2.12.4.
4#
5# keep it since it's always cleaner to not hardcode destination path. Use @datadir@ is more
6# portable here. mark for upstream
7#
8# by Kevin Tian <kevin.tian@intel.com>, 06/25/2010
9# Rebased by Dongxiao Xu <dongxiao.xu@intel.com>, 11/16/2010
10
11Upstream-Status: Inappropriate [configuration]
12
13diff -ruN glib-2.27.3-orig/glib-gettextize.in glib-2.27.3/glib-gettextize.in
14--- glib-2.27.3-orig/glib-gettextize.in 2009-04-01 07:04:20.000000000 +0800
15+++ glib-2.27.3/glib-gettextize.in 2010-11-16 12:55:06.874605916 +0800
16@@ -52,7 +52,7 @@
17 datadir=@datadir@
18 datarootdir=@datarootdir@
19
20-gettext_dir=$prefix/share/glib-2.0/gettext
21+gettext_dir=@datadir@/glib-2.0/gettext
22
23 while test $# -gt 0; do
24 case "$1" in
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch b/meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch
new file mode 100644
index 0000000000..3dba0ee31b
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/gtest-skip-fixes.patch
@@ -0,0 +1,197 @@
1Fix the handling of skipped tests so that it follows what automake does.
2
3Upstream-Status: Backport [https://bugzilla.gnome.org/show_bug.cgi?id=720263]
4Signed-off-by: Ross Burton <ross.burton@intel.com>
5
6diff --git a/glib/gtestutils.c b/glib/gtestutils.c
7index bc7bbcf..feaafa3 100644
8--- a/glib/gtestutils.c
9+++ b/glib/gtestutils.c
10@@ -607,9 +607,10 @@ static gchar *test_run_name = "";
11 static GSList **test_filename_free_list;
12 static guint test_run_forks = 0;
13 static guint test_run_count = 0;
14+static guint test_skipped_count = 0;
15 static GTestResult test_run_success = G_TEST_RUN_FAILURE;
16 static gchar *test_run_msg = NULL;
17-static guint test_skip_count = 0;
18+static guint test_startup_skip_count = 0;
19 static GTimer *test_user_timer = NULL;
20 static double test_user_stamp = 0;
21 static GSList *test_paths = NULL;
22@@ -765,6 +766,8 @@ g_test_log (GTestLogType lbit,
23 g_print ("Bail out!\n");
24 abort();
25 }
26+ if (largs[0] == G_TEST_RUN_SKIPPED)
27+ test_skipped_count++;
28 break;
29 case G_TEST_LOG_MIN_RESULT:
30 if (test_tap_log)
31@@ -869,11 +872,11 @@ parse_args (gint *argc_p,
32 {
33 gchar *equal = argv[i] + 16;
34 if (*equal == '=')
35- test_skip_count = g_ascii_strtoull (equal + 1, NULL, 0);
36+ test_startup_skip_count = g_ascii_strtoull (equal + 1, NULL, 0);
37 else if (i + 1 < argc)
38 {
39 argv[i++] = NULL;
40- test_skip_count = g_ascii_strtoull (argv[i], NULL, 0);
41+ test_startup_skip_count = g_ascii_strtoull (argv[i], NULL, 0);
42 }
43 argv[i] = NULL;
44 }
45@@ -1516,14 +1519,21 @@ g_test_get_root (void)
46 * g_test_run_suite() or g_test_run() may only be called once
47 * in a program.
48 *
49- * Returns: 0 on success
50+ * Returns: 0 on success, 1 on failure (assuming it returns at all),
51+ * 77 if all tests were skipped with g_test_skip().
52 *
53 * Since: 2.16
54 */
55 int
56 g_test_run (void)
57 {
58- return g_test_run_suite (g_test_get_root());
59+ if (g_test_run_suite (g_test_get_root()) != 0)
60+ return 1;
61+
62+ if (test_run_count > 0 && test_run_count == test_skipped_count)
63+ return 77;
64+ else
65+ return 0;
66 }
67
68 /**
69@@ -2063,7 +2073,7 @@ test_case_run (GTestCase *tc)
70 }
71 }
72
73- if (++test_run_count <= test_skip_count)
74+ if (++test_run_count <= test_startup_skip_count)
75 g_test_log (G_TEST_LOG_SKIP_CASE, test_run_name, NULL, 0, NULL);
76 else if (test_run_list)
77 {
78@@ -2117,7 +2127,8 @@ test_case_run (GTestCase *tc)
79 g_free (test_uri_base);
80 test_uri_base = old_base;
81
82- return success == G_TEST_RUN_SUCCESS;
83+ return (success == G_TEST_RUN_SUCCESS ||
84+ success == G_TEST_RUN_SKIPPED);
85 }
86
87 static int
88diff --git a/glib/tests/testing.c b/glib/tests/testing.c
89index 20c2e79..1025f12 100644
90--- a/glib/tests/testing.c
91+++ b/glib/tests/testing.c
92@@ -575,10 +575,93 @@ test_nonfatal (void)
93 g_test_trap_assert_stdout ("*The End*");
94 }
95
96+static void
97+test_skip (void)
98+{
99+ g_test_skip ("Skipped should count as passed, not failed");
100+}
101+
102+static void
103+test_pass (void)
104+{
105+}
106+
107+static const char *argv0;
108+
109+static void
110+test_skip_all (void)
111+{
112+ GPtrArray *argv;
113+ GError *error = NULL;
114+ int status;
115+
116+ argv = g_ptr_array_new ();
117+ g_ptr_array_add (argv, (char *) argv0);
118+ g_ptr_array_add (argv, "--GTestSubprocess");
119+ g_ptr_array_add (argv, "-p");
120+ g_ptr_array_add (argv, "/misc/skip");
121+ g_ptr_array_add (argv, NULL);
122+
123+ g_spawn_sync (NULL, (char **) argv->pdata, NULL,
124+ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
125+ NULL, NULL, NULL, NULL, &status,
126+ &error);
127+ g_assert_no_error (error);
128+
129+ g_spawn_check_exit_status (status, &error);
130+ g_assert_error (error, G_SPAWN_EXIT_ERROR, 77);
131+ g_clear_error (&error);
132+
133+ g_ptr_array_set_size (argv, 0);
134+ g_ptr_array_add (argv, (char *) argv0);
135+ g_ptr_array_add (argv, "--GTestSubprocess");
136+ g_ptr_array_add (argv, "-p");
137+ g_ptr_array_add (argv, "/misc/skip");
138+ g_ptr_array_add (argv, "-p");
139+ g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip1");
140+ g_ptr_array_add (argv, "-p");
141+ g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip2");
142+ g_ptr_array_add (argv, NULL);
143+
144+ g_spawn_sync (NULL, (char **) argv->pdata, NULL,
145+ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
146+ NULL, NULL, NULL, NULL, &status,
147+ &error);
148+ g_assert_no_error (error);
149+
150+ g_spawn_check_exit_status (status, &error);
151+ g_assert_error (error, G_SPAWN_EXIT_ERROR, 77);
152+ g_clear_error (&error);
153+
154+ g_ptr_array_set_size (argv, 0);
155+ g_ptr_array_add (argv, (char *) argv0);
156+ g_ptr_array_add (argv, "--GTestSubprocess");
157+ g_ptr_array_add (argv, "-p");
158+ g_ptr_array_add (argv, "/misc/skip");
159+ g_ptr_array_add (argv, "-p");
160+ g_ptr_array_add (argv, "/misc/skip-all/subprocess/pass");
161+ g_ptr_array_add (argv, "-p");
162+ g_ptr_array_add (argv, "/misc/skip-all/subprocess/skip1");
163+ g_ptr_array_add (argv, NULL);
164+
165+ g_spawn_sync (NULL, (char **) argv->pdata, NULL,
166+ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
167+ NULL, NULL, NULL, NULL, &status,
168+ &error);
169+ g_assert_no_error (error);
170+
171+ g_spawn_check_exit_status (status, &error);
172+ g_assert_no_error (error);
173+
174+ g_ptr_array_unref (argv);
175+}
176+
177 int
178 main (int argc,
179 char *argv[])
180 {
181+ argv0 = argv[0];
182+
183 g_test_init (&argc, &argv, NULL);
184
185 g_test_add_func ("/random-generator/rand-1", test_rand1);
186@@ -633,5 +716,11 @@ main (int argc,
187
188 g_test_add_func ("/misc/nonfatal", test_nonfatal);
189
190+ g_test_add_func ("/misc/skip", test_skip);
191+ g_test_add_func ("/misc/skip-all", test_skip_all);
192+ g_test_add_func ("/misc/skip-all/subprocess/skip1", test_skip);
193+ g_test_add_func ("/misc/skip-all/subprocess/skip2", test_skip);
194+ g_test_add_func ("/misc/skip-all/subprocess/pass", test_pass);
195+
196 return g_test_run();
197 }
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch b/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch
new file mode 100644
index 0000000000..0db8fd1609
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/ptest-dbus.patch
@@ -0,0 +1,65 @@
1Fix dbus-appinfo from attempting to use the session's bus, and hanging if there
2isn't one present.
3
4Upstream-Status: Backport
5Signed-off-by: Ross Burton <ross.burton@intel.com>
6
7From 940fa98290812789d095d93ff1c550cd86fb2428 Mon Sep 17 00:00:00 2001
8From: Xavier Claessens <xavier.claessens@collabora.co.uk>
9Date: Mon, 28 Oct 2013 21:18:54 +0000
10Subject: Tests: add session_bus_run() and use it where possible
11
12This is to avoid having again the subtil bug in dbus-appinfo.c:
13session_bus_down() was called before g_test_run() so the test was
14running on the user's dbus session.
15
16https://bugzilla.gnome.org/show_bug.cgi?id=697348
17---
18diff --git a/gio/tests/dbus-appinfo.c b/gio/tests/dbus-appinfo.c
19index ca11e98..7698429 100644
20--- a/gio/tests/dbus-appinfo.c
21+++ b/gio/tests/dbus-appinfo.c
22@@ -280,11 +280,7 @@ main (int argc, char **argv)
23 {
24 g_test_init (&argc, &argv, NULL);
25
26- session_bus_up ();
27-
28 g_test_add_func ("/appinfo/dbusappinfo", test_dbus_appinfo);
29
30- session_bus_down ();
31-
32- return g_test_run ();
33+ return session_bus_run ();
34 }
35diff --git a/gio/tests/gdbus-sessionbus.c b/gio/tests/gdbus-sessionbus.c
36index 68c4449..13c2edb 100644
37--- a/gio/tests/gdbus-sessionbus.c
38+++ b/gio/tests/gdbus-sessionbus.c
39@@ -47,3 +47,14 @@ session_bus_down (void)
40 g_clear_object (&singleton);
41 }
42
43+gint
44+session_bus_run (void)
45+{
46+ gint ret;
47+
48+ session_bus_up ();
49+ ret = g_test_run ();
50+ session_bus_down ();
51+
52+ return ret;
53+}
54diff --git a/gio/tests/gdbus-sessionbus.h b/gio/tests/gdbus-sessionbus.h
55index 7ef3abd..284cd00 100644
56--- a/gio/tests/gdbus-sessionbus.h
57+++ b/gio/tests/gdbus-sessionbus.h
58@@ -30,6 +30,7 @@ G_BEGIN_DECLS
59 void session_bus_up (void);
60 void session_bus_stop (void);
61 void session_bus_down (void);
62+gint session_bus_run (void);
63
64 G_END_DECLS
65
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch b/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch
new file mode 100644
index 0000000000..f3be02770c
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch
@@ -0,0 +1,30 @@
1Instead of writing the temporary mapping files in the mappedfile test to the
2user runtime directory, write them to $TMP. The runtime directory may not
3currently exist if the test is executed on a non-desktop system and the test
4doesn't attempt to create the directory structure.
5
6Upstream-Status: Pending
7Signed-off-by: Ross Burton <ross.burton@intel.com>
8
9diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c
10index 40e0e60..27a24be 100644
11--- a/glib/tests/mappedfile.c
12+++ b/glib/tests/mappedfile.c
13@@ -81,7 +81,7 @@ test_writable (void)
14 const gchar *new = "abcdefghijklmnopqrstuvxyz";
15 gchar *tmp_copy_path;
16
17- tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL);
18+ tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL);
19
20 g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error);
21 g_assert_no_error (error);
22@@ -125,7 +125,7 @@ test_writable_fd (void)
23 int fd;
24 gchar *tmp_copy_path;
25
26- tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL);
27+ tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL);
28
29 g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error);
30 g_assert_no_error (error);
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
new file mode 100644
index 0000000000..130ae09b6c
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -0,0 +1,3 @@
1#! /bin/sh
2
3gnome-desktop-testing-runner glib
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch b/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
new file mode 100644
index 0000000000..2a154fdd4a
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
@@ -0,0 +1,20 @@
1Fix DATADIRNAME on uclibc/Linux
2
3translation files are always installed under PREFIX/share/locale in uclibc
4based systems therefore lets set DATADIRNAME to "share".
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7Upstream-Status: Pending
8Index: glib-2.38.2/m4macros/glib-gettext.m4
9===================================================================
10--- glib-2.38.2.orig/m4macros/glib-gettext.m4 2013-11-07 07:29:13.000000000 -0800
11+++ glib-2.38.2/m4macros/glib-gettext.m4 2014-03-15 14:51:54.712135644 -0700
12@@ -239,7 +239,7 @@
13 [CATOBJEXT=.mo
14 DATADIRNAME=lib])
15 ;;
16- *-*-openbsd*)
17+ *-*-openbsd* | *-*-linux-uclibc*)
18 CATOBJEXT=.mo
19 DATADIRNAME=share
20 ;;
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
new file mode 100644
index 0000000000..40529503ba
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
@@ -0,0 +1,24 @@
1require glib.inc
2
3PE = "1"
4
5SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
6
7SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
8 file://configure-libtool.patch \
9 file://fix-conflicting-rand.patch \
10 file://add-march-i486-into-CFLAGS-automatically.patch \
11 file://glib-2.0-configure-readlink.patch \
12 file://run-ptest \
13 file://0001-gio-Fix-Werror-format-string-errors-from-mismatched-.patch \
14 file://ptest-dbus.patch \
15 file://ptest-paths.patch \
16 file://gtest-skip-fixes.patch \
17 file://gio-test-race.patch \
18 file://uclibc.patch \
19 "
20
21SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
22
23SRC_URI[md5sum] = "26d1d08e478fc48c181ca8be44f5b69f"
24SRC_URI[sha256sum] = "056a9854c0966a0945e16146b3345b7a82562a5ba4d5516fd10398732aea5734"
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
new file mode 100644
index 0000000000..66bf290c2f
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -0,0 +1,98 @@
1SUMMARY = "A general-purpose utility library"
2DESCRIPTION = "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."
3# pcre is under BSD;
4# docs/reference/COPYING is with a 'public domai'-like license!
5LICENSE = "LGPLv2+ & BSD & PD"
6LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
7 file://glib/glib.h;beginline=4;endline=17;md5=62b7bd0d17b98573dfb87495ac1c5b4c \
8 file://gmodule/COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
9 file://gmodule/gmodule.h;beginline=4;endline=17;md5=62b7bd0d17b98573dfb87495ac1c5b4c \
10 file://glib/pcre/COPYING;md5=266ebc3ff74ee9ce6fad65577667c0f4 \
11 file://glib/pcre/pcre.h;beginline=11;endline=35;md5=de27f2bf633d20a2b7af0b1983423283 \
12 file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc"
13BUGTRACKER = "http://bugzilla.gnome.org"
14SECTION = "libs"
15
16BBCLASSEXTEND = "native nativesdk"
17
18DEPENDS = "glib-2.0-native virtual/libiconv libffi zlib"
19DEPENDS_append_class-target = "${@base_contains('DISTRO_FEATURES', 'ptest', ' dbus', '', d)}"
20DEPENDS_class-native = "pkgconfig-native gettext-native libffi-native zlib-native"
21DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-libffi nativesdk-zlib ${BPN}-native"
22
23PACKAGES =+ "${PN}-utils ${PN}-bash-completion ${PN}-codegen"
24
25LEAD_SONAME = "libglib-2.0.*"
26FILES_${PN}-utils = "${bindir}/* ${datadir}/glib-2.0/gettext"
27
28inherit autotools gettext gtk-doc pkgconfig ptest
29
30S = "${WORKDIR}/glib-${PV}"
31
32CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-man"
33
34PTEST_CONF = "${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-installed-tests', '--disable-installed-tests', d)}"
35EXTRA_OECONF = "--enable-included-printf=no ${CORECONF} ${PTEST_CONF}"
36EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
37EXTRA_OECONF_append_libc-uclibc = " --with-libiconv=gnu"
38
39do_configure_prepend() {
40 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
41}
42
43FILES_${PN} = "${libdir}/lib*${SOLIBS} ${libdir}/gio ${datadir}/glib-2.0/schemas \
44 ${datadir}/glib-2.0/gettext/mkinstalldirs ${datadir}/glib-2.0/gettext/po/Makefile.in.in"
45FILES_${PN}-dev += "${libdir}/glib-2.0/include \
46 ${libdir}/gio/modules/lib*${SOLIBSDEV} \
47 ${libdir}/gio/modules/*.la"
48FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb \
49 ${libdir}/gio/modules/.debug \
50 ${libdir}/glib-2.0/installed-tests/glib/.debug"
51FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py"
52FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d \
53 ${datadir}/bash-completion"
54FILES_${PN}-ptest += "${libdir}/glib-2.0/installed-tests \
55 ${datadir}/installed-tests/glib"
56
57ARM_INSTRUCTION_SET = "arm"
58USE_NLS = "yes"
59
60do_install_append () {
61 sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python|'
62
63 # Remove some unpackaged files
64 rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
65 rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo
66
67 # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
68 # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
69 if [ -f ${D}${bindir}/glib-mkenums ]; then
70 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
71 fi
72}
73
74RDEPENDS_${PN}-ptest += "\
75 gnome-desktop-testing \
76 tzdata \
77 tzdata-americas \
78 tzdata-asia \
79 tzdata-europe \
80 tzdata-posix \
81 python-pygobject \
82 python-dbus \
83 shared-mime-info \
84 "
85
86RDEPENDS_${PN}-ptest_append_libc-glibc = "\
87 eglibc-gconv-utf-16 \
88 eglibc-charmap-utf-8 \
89 eglibc-gconv-cp1255 \
90 eglibc-charmap-cp1255 \
91 eglibc-gconv-utf-32 \
92 eglibc-gconv-utf-7 \
93 eglibc-gconv-euc-jp \
94 eglibc-gconv-iso8859-1 \
95 eglibc-gconv-iso8859-15 \
96 eglibc-charmap-invariant \
97 eglibc-localedata-translit-cjk-variants \
98 "