aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2020-04-23 08:44:03 -0500
committerOtavio Salvador <otavio@ossystems.com.br>2020-04-24 14:00:40 -0300
commitef01e8bffe63621871c696bcc3c5b68b40680033 (patch)
treee2c9c74da849735b8929fe9dc93b2276620beb1c
parente6f581f2064ed12a0535042bbb96361b6f617184 (diff)
downloadmeta-freescale-ef01e8bffe63621871c696bcc3c5b68b40680033.tar.gz
meta-freescale-ef01e8bffe63621871c696bcc3c5b68b40680033.tar.bz2
meta-freescale-ef01e8bffe63621871c696bcc3c5b68b40680033.zip
waffle: Fix x11 build without GBM support
For i.MX 6 and 7, building x11_egl failed with the following: ``` In file included from ../waffle-1.6.0/src/waffle/surfaceless_egl/sl_window.c:35: ../waffle-1.6.0/src/waffle/surfaceless_egl/sl_platform.h:30:10: fatal error: gbm.h: No such file or directory 30 | #include <gbm.h> | ^~~~~~~ ``` The failure is not surprising since i.MX 6 and 7 don't support GBM. What is surprising is surfaceless_egl is built even if it is disabled. The meson dependency for surfaceless_egl was incorrectly tied to x11_egl, so fix that, plus add a dependency on GBM. Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> (cherry picked from commit 76467d61049bd89a25f5a26592bc6c8808e51ff9)
-rw-r--r--recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch46
-rw-r--r--recipes-graphics/waffle/waffle_%.bbappend1
2 files changed, 47 insertions, 0 deletions
diff --git a/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch b/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch
new file mode 100644
index 00000000..3f9f3b1c
--- /dev/null
+++ b/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch
@@ -0,0 +1,46 @@
+From 451381a61ad0c96e870da2325fc188eaa3d91fec Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Wed, 22 Apr 2020 14:08:36 -0500
+Subject: [PATCH 2/2] meson: Separate surfaceless option from x11
+
+Allow surfaceless build separate from the x11 option.
+Also require gbm for surfaceless build.
+
+Upstream-Status: Pending
+
+Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+---
+ meson.build | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 4ebb022..0705f61 100644
+--- a/meson.build
++++ b/meson.build
+@@ -72,6 +72,7 @@ dep_udev = _dep_null
+ dep_cocoa = _dep_null
+ dep_core_foundation = _dep_null
+ dep_gl_headers = _dep_null
++dep_surfaceless = _dep_null
+
+ # Get dependencies
+ if build_wgl
+@@ -101,12 +102,14 @@ else
+ endif
+ dep_gbm = dependency('gbm', required : get_option('gbm'))
+ dep_udev = dependency('libudev', required : get_option('gbm'))
++ dep_surfaceless_egl = dependency('egl', required : get_option('surfaceless_egl'))
++ dep_surfaceless_gbm = dependency('gbm', required : get_option('surfaceless_egl'))
+
+ build_x11_egl = dep_egl.found()
+ build_wayland = dep_wayland_client.found() and dep_wayland_egl.found() and dep_wayland_wayland_egl.found()
+ build_glx = dep_gl.found()
+ build_gbm = dep_gbm.found() and dep_udev.found()
+- build_surfaceless = dep_egl.found()
++ build_surfaceless = dep_surfaceless_egl.found() and dep_surfaceless_gbm.found()
+ endif
+
+ dep_bash = dependency('bash-completion', required : false)
+--
+2.17.1
+
diff --git a/recipes-graphics/waffle/waffle_%.bbappend b/recipes-graphics/waffle/waffle_%.bbappend
index 4bb2ed5f..9d090bcf 100644
--- a/recipes-graphics/waffle/waffle_%.bbappend
+++ b/recipes-graphics/waffle/waffle_%.bbappend
@@ -2,6 +2,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://0001-meson-Add-missing-wayland-dependency-on-EGL.patch \
+ file://0002-meson-Separate-surfaceless-option-from-x11.patch \
"
PACKAGECONFIG_IMXGPU_X11 = ""