summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2011-01-31 16:29:42 +0100
committerKoen Kooi <koen@openembedded.org>2011-01-31 19:19:43 +0100
commit8f97fc08120f6850a9559205fdaf2e116188b25d (patch)
tree7f337c9795ae1972cbb85948e3ad9f7a4cb797af
parentf6e1f7551b25da33a1b854f7a58ceda01e025da6 (diff)
downloadopenembedded-8f97fc08120f6850a9559205fdaf2e116188b25d.tar.gz
clutter: add 1.4.2
Signed-off-by: Koen Kooi <koen@openembedded.org>
-rw-r--r--recipes/clutter/clutter-1.4.2/test-conformance-fix.patch64
-rw-r--r--recipes/clutter/clutter.inc1
-rw-r--r--recipes/clutter/clutter_1.4.2.bb40
3 files changed, 105 insertions, 0 deletions
diff --git a/recipes/clutter/clutter-1.4.2/test-conformance-fix.patch b/recipes/clutter/clutter-1.4.2/test-conformance-fix.patch
new file mode 100644
index 0000000000..63e94e3295
--- /dev/null
+++ b/recipes/clutter/clutter-1.4.2/test-conformance-fix.patch
@@ -0,0 +1,64 @@
+From 424963f6b2de009590acf3e26c51b83cdce1d40e Mon Sep 17 00:00:00 2001
+From: Neil Roberts <neil@linux.intel.com>
+Date: Mon, 11 Oct 2010 16:16:45 +0100
+Subject: [PATCH] tests: Generate the stub scripts using sed
+
+Instead of trying to run ./test-conformance with the -l option to
+generate a list of available tests it now runs sed on the
+test-conform-main.c file instead. Running the generated executable is
+a pain for cross-compiling so it would be nice to avoid it unless it's
+absolutely necessary. Although you could tell people who are cross
+compiling to just disable the conformance tests, this seems a shame
+because they could still be useful along with the wrappers for example
+if the cross compile is built to a shared network folder where the
+tests can be run on the actual device.
+
+The sed script is a little more ugly than it could be because it tries
+to avoid using the GNU extensions '\+' and '\|'.
+
+The script ends up placing restrictions on the format of the C file
+because the tests must all be listed on one line each. There is now a
+comment to explain this. Hopefully the trade off is worth it.
+
+http://bugzilla.clutter-project.org/show_bug.cgi?id=2363
+---
+ tests/conform/Makefile.am | 6 ++++--
+ tests/conform/test-conform-main.c | 5 +++++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am
+index 3036639..1e723e7 100644
+--- a/tests/conform/Makefile.am
++++ b/tests/conform/Makefile.am
+@@ -89,9 +89,11 @@ test_conformance_SOURCES = $(common_sources) $(units_sources)
+
+ wrappers: stamp-test-conformance
+ @true
+-stamp-test-conformance: Makefile test-conformance$(EXEEXT)
++stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c
+ @mkdir -p wrappers
+- @( $(abs_builddir)/test-conformance$(EXEEXT) -l -m thorough | $(GREP) '^/' ) > unit-tests
++ @sed -n -e 's/^ \{1,\}TEST_CONFORM_SIMPLE *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
++ -e 's/^ \{1,\}TEST_CONFORM_SKIP *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
++ $(srcdir)/test-conform-main.c > unit-tests
+ @chmod +x test-launcher.sh
+ @( echo "/stamp-test-conformance" ; \
+ echo "/test-conformance" ; \
+diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c
+index a8b3cf8..2ae7a04 100644
+--- a/tests/conform/test-conform-main.c
++++ b/tests/conform/test-conform-main.c
+@@ -92,6 +92,11 @@ main (int argc, char **argv)
+ {
+ clutter_test_init (&argc, &argv);
+
++ /* This file is run through a sed script during the make step so the
++ lines containing the tests need to be formatted on a single line
++ each. To comment out a test use the SKIP or TODO macros. Using
++ #if 0 would break the script. */
++
+ TEST_CONFORM_SIMPLE ("/timeline", test_timeline);
+ TEST_CONFORM_SKIP (!g_test_slow (), "/timeline", test_timeline_interpolate);
+ TEST_CONFORM_SKIP (!g_test_slow (), "/timeline", test_timeline_rewind);
+--
+1.7.3.16.g9464b \ No newline at end of file
diff --git a/recipes/clutter/clutter.inc b/recipes/clutter/clutter.inc
index 2a061af23d..7f3324bfde 100644
--- a/recipes/clutter/clutter.inc
+++ b/recipes/clutter/clutter.inc
@@ -57,6 +57,7 @@ FILES_${PN}-cally-examples = "${bindir}/cally-*-example"
require clutter-common.inc
do_configure_prepend() {
+ glib-gettextize --force --copy || true
# Fix up some weirdness in the docs
copy_gtk_doc_make
diff --git a/recipes/clutter/clutter_1.4.2.bb b/recipes/clutter/clutter_1.4.2.bb
new file mode 100644
index 0000000000..d3159f4745
--- /dev/null
+++ b/recipes/clutter/clutter_1.4.2.bb
@@ -0,0 +1,40 @@
+require clutter.inc
+
+DEPENDS += "json-glib"
+
+PR = "${INC_PR}.0"
+
+SRC_URI = "http://source.clutter-project.org/sources/clutter/1.4/clutter-${PV}.tar.bz2 \
+ file://test-conformance-fix.patch \
+ ${INC_SRC_URI} \
+ "
+
+SRC_URI[md5sum] = "5a3c6d8414d4e286aba0a936f344c9b1"
+SRC_URI[sha256sum] = "92fd67acce5105c933e54ad0c87d0f5ace1202fd0f87949cb49a3759e6e38892"
+
+# recommended for --clutter-debug / --cogl-debug params
+BASE_CONF += " --enable-debug"
+
+do_configure_prepend() {
+ # align the test data location *.c (V1.2 uses macro ASSETS_DIR for path in *.c)
+ for i in $(find ${S}/tests -name Makefile.am) ; do
+ sed -i -e 's:$(top_srcdir)/tests/data:${datadir}/${PN}-tests:g' $i
+ done
+}
+
+do_compile_prepend() {
+ rebuild_shader_sources ${S}/clutter/cogl/cogl/driver/gles
+ # align test data location *.json
+ for full_name in $(find ${S}/tests/data -name *.png -o -name *.json) ; do
+ data_name=${full_name##*/}
+ for i in $(find ${S}/tests -name *.json) ; do
+ sed -i -e s:${data_name}:${datadir}/${PN}-tests/${data_name}:g $i
+ done
+ done
+}
+
+do_install() {
+ autotools_do_install
+ install_tests
+}
+