summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-02-23 02:49:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-28 11:32:59 +0000
commite8e04898379be93ef680ffb9195d2ad392b374e8 (patch)
tree02b5c4fb0c8924d011098ec613c3b27f67a5f9c0 /meta
parentb748f409801f17d6d60e86903dbac30bb8eabdc7 (diff)
downloadpoky-e8e04898379be93ef680ffb9195d2ad392b374e8.tar.gz
clutter-1.0: Fix confgure test errors found by clang
We were using nested functions inadvertantly and they were compiling fine with gcc but clang doesnt support nested functions hence configure tests for cogl started to fail, but it was a test error not compiler error which was undetected thus far Backport a fix from upstream to help clang compile clutter (From OE-Core rev: 09ac424c6a04ac46a822168341a55293ba43dc27) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch105
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb1
2 files changed, 106 insertions, 0 deletions
diff --git a/meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch b/meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch
new file mode 100644
index 0000000000..c4edff3952
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch
@@ -0,0 +1,105 @@
1From 483a4bb00e7dd2f14d86e167c8013c8638723c33 Mon Sep 17 00:00:00 2001
2From: Emmanuele Bassi <ebassi@gnome.org>
3Date: Thu, 18 Feb 2016 17:19:09 +0000
4Subject: [PATCH] build: Use AC_COMPILE_IFELSE
5
6Instead of AC_TRY_COMPILE, which has been deprecated by newer autoconf.
7---
8Upstream-Status: Backport
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11 configure.ac | 66 ++++++++++++++++++++++++++++++------------------------------
12 1 file changed, 33 insertions(+), 33 deletions(-)
13
14diff --git a/configure.ac b/configure.ac
15index 4d72e0c..8ca3f94 100644
16--- a/configure.ac
17+++ b/configure.ac
18@@ -348,24 +348,25 @@ AS_IF([test "x$enable_wayland" != xno],
19 # We need to manually check for Wayland support in Cogl because
20 # the windowing systems are not exposed in the pkg-config file
21 saved_CFLAGS="${CFLAGS}"
22- CFLAGS="`$PKG_CONFIG --cflags $CLUTTER_BASE_PC_FILES`"
23+ CFLAGS="`$PKG_CONFIG --cflags cogl-1.0`"
24
25 AC_MSG_CHECKING([for Wayland Cogl backend])
26- AC_TRY_COMPILE([#include <cogl/cogl.h>],
27- [
28- #ifndef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
29- #error "No Wayland support in Cogl"
30- #endif
31- int main (void) { return 0; }
32- ],
33- [
34- AC_MSG_RESULT(yes)
35- have_cogl_wayland=yes
36- ],
37- [
38- AC_MSG_RESULT(no)
39- have_cogl_wayland=no
40- ])
41+
42+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
43+#include <cogl/cogl.h>
44+]],
45+[[
46+#ifndef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
47+#error Cogl compiled without Wayland support
48+#endif
49+]])], [
50+ AC_MSG_RESULT(yes)
51+ have_cogl_wayland=yes
52+ ], [
53+ AC_MSG_RESULT(no)
54+ have_cogl_wayland=no
55+ ])
56+
57 CFLAGS="${saved_CFLAGS}"
58 AS_IF([test "x$have_cogl_wayland" = xyes],
59 [
60@@ -499,26 +500,25 @@ AS_IF([test "x$enable_mir" = "xyes"],
61 # We need to manually check for Mir support in Cogl because
62 # the windowing systems are not exposed in the pkg-config file
63 saved_CFLAGS="${CFLAGS}"
64- CFLAGS="`$PKG_CONFIG --cflags $CLUTTER_BASE_PC_FILES`"
65+ CFLAGS="`$PKG_CONFIG --cflags cogl-1.0`"
66
67 AC_MSG_CHECKING([for Mir Cogl backend])
68- AC_TRY_COMPILE([#include <cogl/cogl.h>],
69- [
70- #ifndef COGL_HAS_EGL_PLATFORM_MIR_SUPPORT
71- #error "No Mir support in Cogl"
72- #endif
73- int main (void) { return 0; }
74- ],
75- [
76- AC_MSG_RESULT(yes)
77- have_cogl_mir=yes
78- ],
79- [
80- AC_MSG_RESULT(no)
81- have_cogl_mir=no
82- ])
83
84- CFLAGS="${saved_CFLAGS}"
85+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
86+#include <cogl/cogl.h>
87+]],
88+[[
89+#ifndef COGL_HAS_EGL_PLATFORM_MIR_SUPPORT
90+#error Cogl compiled without Mir support
91+#endif
92+]])], [
93+ AC_MSG_RESULT(yes)
94+ have_cogl_mir=yes
95+ ], [
96+ AC_MSG_RESULT(no)
97+ have_cogl_mir=no
98+ ])
99+
100 AS_IF([test "x$have_cogl_mir" = xno], [AC_MSG_ERROR("*** Cogl is missing Mir support.")])
101
102 PKG_CHECK_EXISTS([mirclient],
103--
1041.9.1
105
diff --git a/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb b/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb
index 093bf6e0d9..c53b3e71ba 100644
--- a/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb
+++ b/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb
@@ -6,4 +6,5 @@ SRC_URI[archive.md5sum] = "3b98e1b33719982a5736ae42cbf7183e"
6SRC_URI[archive.sha256sum] = "9631c98cb4bcbfec15e1bbe9eaa6eef0f127201552fce40d7d28f2133803cd63" 6SRC_URI[archive.sha256sum] = "9631c98cb4bcbfec15e1bbe9eaa6eef0f127201552fce40d7d28f2133803cd63"
7SRC_URI += "file://install-examples.patch \ 7SRC_URI += "file://install-examples.patch \
8 file://run-installed-tests-with-tap-output.patch \ 8 file://run-installed-tests-with-tap-output.patch \
9 file://0001-build-Use-AC_COMPILE_IFELSE.patch \
9 file://run-ptest" 10 file://run-ptest"