summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorMax Krummenacher <max.oss.09@gmail.com>2020-06-28 22:51:22 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-30 16:42:11 +0100
commit86172ed1cecd536a3dc6260622691db6cdf4d190 (patch)
tree05bb8cfc4ebafed76c081f471d2e8420189c03c3 /meta/recipes-graphics
parentb39303462930f3626922850242c9ee7faf5d2120 (diff)
downloadpoky-86172ed1cecd536a3dc6260622691db6cdf4d190.tar.gz
cogl-1.0: cope with missing x11 headers
Fix commit 3e96efc4dd87 ("cogl-1.0: : don't require eglmesaext.h") if x11 headers are missing. In that case AC_CHECK_HEADERS will report the egl headers missing, as by default on unix it builds for X11 as the platform but the compiler will fail to find the X11 headers. (From OE-Core rev: c1e8ee26dbaf77b3bdd362014f744ead88007f29) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Tested-by: Andrey Zhizhikin <andrey.z@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch31
1 files changed, 23 insertions, 8 deletions
diff --git a/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch b/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch
index 16ab2d7797..328984a63f 100644
--- a/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch
+++ b/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch
@@ -1,4 +1,4 @@
1From ca94946110f4aaeeb0cbc75e11a619b21f295056 Mon Sep 17 00:00:00 2001 1From bb9765a926588ebfe1eb324fbbe8fc22d419eebe Mon Sep 17 00:00:00 2001
2From: Max Krummenacher <max.krummenacher@toradex.com> 2From: Max Krummenacher <max.krummenacher@toradex.com>
3Date: Thu, 25 Jun 2020 11:27:40 +0000 3Date: Thu, 25 Jun 2020 11:27:40 +0000
4Subject: [PATCH] configure.ac: don't require eglmesaext.h 4Subject: [PATCH] configure.ac: don't require eglmesaext.h
@@ -15,11 +15,11 @@ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
15Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/cogl/-/merge_requests/28] 15Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/cogl/-/merge_requests/28]
16Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> 16Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
17--- 17---
18 configure.ac | 36 +++++++++++++++++------------------- 18 configure.ac | 51 ++++++++++++++++++++++++++++++++-------------------
19 1 file changed, 17 insertions(+), 19 deletions(-) 19 1 file changed, 32 insertions(+), 19 deletions(-)
20 20
21diff --git a/configure.ac b/configure.ac 21diff --git a/configure.ac b/configure.ac
22index 12798e9f..f7fa40e2 100644 22index b7ba95d..0d1d8de 100644
23--- a/configure.ac 23--- a/configure.ac
24+++ b/configure.ac 24+++ b/configure.ac
25@@ -1212,22 +1212,6 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"], 25@@ -1212,22 +1212,6 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
@@ -45,29 +45,44 @@ index 12798e9f..f7fa40e2 100644
45 AC_CHECK_LIB(EGL, [eglInitialize], 45 AC_CHECK_LIB(EGL, [eglInitialize],
46 [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"], 46 [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"],
47 [AC_MSG_ERROR([Unable to locate required EGL library])]) 47 [AC_MSG_ERROR([Unable to locate required EGL library])])
48@@ -1236,9 +1220,23 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"], 48@@ -1236,9 +1220,38 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
49 ] 49 ]
50 ) 50 )
51 51
52- COGL_EGL_INCLUDES="#include <EGL/egl.h> 52- COGL_EGL_INCLUDES="#include <EGL/egl.h>
53-#include <EGL/eglext.h> 53-#include <EGL/eglext.h>
54-#include <EGL/eglmesaext.h>" 54-#include <EGL/eglmesaext.h>"
55+dnl Test for the existence of egl headers.
56+dnl egl*.h includes eglplatform.h which on __unix__ defaults to a X11 platform.
57+dnl In that case AC_CHECK_HEADERS failes if X11 headers are not available.
58+dnl Set the usual include guard define and, if the EGL implementation doesn't
59+dnl use that guard fall back to USE_OZONE and EGL_NO_X11 platforms which don't
60+dnl require additional headers.
55+ AC_CHECK_HEADERS( 61+ AC_CHECK_HEADERS(
56+ [EGL/egl.h], 62+ [EGL/egl.h],
57+ [COGL_EGL_INCLUDES="#include <EGL/egl.h>"], 63+ [COGL_EGL_INCLUDES="#include <EGL/egl.h>"],
58+ [AC_MSG_ERROR([Unable to locate required EGL headers])]) 64+ [AC_MSG_ERROR([Unable to locate required EGL headers])],
65+ [#define __egl_h_
66+ #define USE_OZONE
67+ #define EGL_NO_X11])
59+ AC_CHECK_HEADERS( 68+ AC_CHECK_HEADERS(
60+ [EGL/eglext.h], 69+ [EGL/eglext.h],
61+ [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES 70+ [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
62+#include <EGL/eglext.h>"], 71+#include <EGL/eglext.h>"],
63+ [AC_MSG_ERROR([Unable to locate required EGL headers])], 72+ [AC_MSG_ERROR([Unable to locate required EGL headers])],
64+ [$COGL_EGL_INCLUDES]) 73+ [#define __eglext_h_
74+ #define USE_OZONE
75+ #define EGL_NO_X11
76+$COGL_EGL_INCLUDES])
65+ AC_CHECK_HEADERS( 77+ AC_CHECK_HEADERS(
66+ [EGL/eglmesaext.h], 78+ [EGL/eglmesaext.h],
67+ [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES 79+ [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
68+#include <EGL/eglmesaext.h>"], 80+#include <EGL/eglmesaext.h>"],
69+ [], 81+ [],
70+ [$COGL_EGL_INCLUDES]) 82+ [#define __eglmesaext_h_
83+#define USE_OZONE
84+#define EGL_NO_X11
85+$COGL_EGL_INCLUDES])
71+ 86+
72 AC_SUBST([COGL_EGL_INCLUDES]) 87 AC_SUBST([COGL_EGL_INCLUDES])
73 ]) 88 ])