summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2015-11-09 11:17:07 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-25 08:08:11 +0000
commit5357764057e0ee4210d806c158db62367db826ae (patch)
treeb1a156e63ca8b821d29f2feb8cb628d7eed51116 /meta/recipes-core/glib-2.0
parent1e271af2b18fb3c1f9f472f453b3a1716b081284 (diff)
downloadpoky-5357764057e0ee4210d806c158db62367db826ae.tar.gz
glib-2.0: Enable more tests while cross-compiling
(From OE-Core rev: e6e9260b97d873f14991a1143f1bda5b1b624955) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch81
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb1
2 files changed, 82 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
new file mode 100644
index 0000000000..f1e688cacf
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
@@ -0,0 +1,81 @@
1From 310dfe1bdd16d4b254732fcc202c6211629bc7b6 Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Mon, 9 Nov 2015 11:07:27 +0200
4Subject: [PATCH] Enable more tests while cross-compiling
5
6Upstream disables a few tests while cross-compiling because their build requires
7running other built binaries. This usually makes sense but in the cross-compile
8case we can depend on glib-2.0-native.
9
10Upstream-Status: Inappropriate [OE specific]
11Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
12---
13 gio/tests/Makefile.am | 8 +++-----
14 tests/gobject/Makefile.am | 8 +++-----
15 2 files changed, 6 insertions(+), 10 deletions(-)
16
17diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
18index 868873f..533e454 100644
19--- a/gio/tests/Makefile.am
20+++ b/gio/tests/Makefile.am
21@@ -503,10 +503,9 @@ test_programs += \
22 endif
23
24 # -----------------------------------------------------------------------------
25-# The resources test is a bit more complicated, and we cannot build it when
26-# cross-compiling GIO because it requires running a binary...
27+# The resources test is a bit more complicated, and requires glib-native
28+# for running a binary
29
30-if !CROSS_COMPILING
31 test_programs += resources
32 resources_SOURCES = resources.c
33 nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
34@@ -528,7 +527,11 @@ if !ENABLE_INSTALLED_TESTS
35 libresourceplugin_la_LDFLAGS += -rpath /
36 endif
37
38+if !CROSS_COMPILING
39 glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
40+else
41+glib_compile_resources=glib-compile-resources
42+endif
43
44 resources.o: test_resources2.h
45 test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
46@@ -545,7 +548,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
47
48 EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
49 CLEANFILES += test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
50-endif # !CROSS_COMPILING
51
52 BUILT_SOURCES += giotypefuncs.c
53
54diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
55index 16f2827..4c2208e 100644
56--- a/tests/gobject/Makefile.am
57+++ b/tests/gobject/Makefile.am
58@@ -48,10 +48,13 @@ if ENABLE_TIMELOOP
59 installed_test_programs += timeloop-closure
60 endif
61
62-# The marshal test requires running a binary, which means we cannot
63-# build it when cross-compiling
64+# The marshal test requires running a binary, which means we require
65+# glib-native when cross-compiling
66 if !CROSS_COMPILING
67 glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
68+else
69+glib_genmarshal=$(shell which glib-genmarshal)
70+endif
71
72 testmarshal.h: stamp-testmarshal.h
73 @true
74@@ -69,7 +72,6 @@ BUILT_SOURCES += testmarshal.h testmarshal.c
75 CLEANFILES += stamp-testmarshal.h
76 EXTRA_DIST += testcommon.h testmarshal.list
77 BUILT_EXTRA_DIST += testmarshal.h testmarshal.c
78-endif # !CROSS_COMPILING
79
80 dist-hook: $(BUILT_EXTRA_DIST)
81 files='$(BUILT_EXTRA_DIST)'; \
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb
index 22fd34a6ff..04951f4b6f 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb
@@ -16,6 +16,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
16 file://allow-run-media-sdX-drive-mount-if-username-root.patch \ 16 file://allow-run-media-sdX-drive-mount-if-username-root.patch \
17 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ 17 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
18 file://0001-gio-tests-Don-t-depend-on-a-data-file-that-s-not-bui.patch \ 18 file://0001-gio-tests-Don-t-depend-on-a-data-file-that-s-not-bui.patch \
19 file://Enable-more-tests-while-cross-compiling.patch \
19 " 20 "
20 21
21SRC_URI_append_class-native = " file://glib-gettextize-dir.patch" 22SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"