diff mbox

[2/2] libsdl2: add PACKAGECONFIG for opengl

Message ID 1390478526-12041-3-git-send-email-nicolas.dechesne@linaro.org
State New
Headers show

Commit Message

Nicolas Dechesne Jan. 23, 2014, 12:02 p.m. UTC
As discussed in [1], SDL recipe makes the wrong assumption that
'opengl' in DISTRO_FEATURES implies GL/GLX. However 'opengl' could
also mean GLES/EGL, and the recipe fails to build in such
situations. So we add a PACKAGECONFIG option for opengl so that the
build can be made to work on gles/egl with a simple .bbappend.

The default PACKAGECONFIG is set to the same value as previously,
e.g. 'gl' is enabled if 'opengl' is found in DISTRO_FEATURES.

[1] http://lists.openembedded.org/pipermail/openembedded-core/2014-January/088735.html

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
---
 meta/recipes-graphics/libsdl2/libsdl2_2.0.1.bb | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.1.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.1.bb
index 7958f7b..57d1bd1 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.1.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.1.bb
@@ -13,7 +13,6 @@  LIC_FILES_CHKSUM = "file://COPYING.txt;md5=0605ca7e995ab1217e0bb988731a87fe"
 PROVIDES = "virtual/libsdl2"
 
 DEPENDS = "${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-           ${@base_contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)} \
            ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxext libxrandr libxrender', '', d)} \
            tslib"
 DEPENDS_class-nativesdk = "${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
@@ -33,14 +32,21 @@  EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
                 --disable-video-dummy \
                 --enable-input-tslib --enable-pthreads \
                 ${@base_contains('DISTRO_FEATURES', 'directfb', '--enable-video-directfb', '--disable-video-directfb', d)} \
-                ${@base_contains('DISTRO_FEATURES', 'opengl', '--enable-video-opengl', '--disable-video-opengl', d)} \
                 ${@base_contains('DISTRO_FEATURES', 'x11', '--enable-video-x11', '--disable-video-x11', d)} \
                 --enable-sdl-dlopen \
                 --disable-rpath \
                 --disable-pulseaudio"
 
-PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
+PACKAGECONFIG ??= " \
+    ${@base_contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
+    ${@base_contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
+"
+
 PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
+# SDL wrongly assumes that opengl means GL/GLX, when using GLES/EGL, do:
+# PACKAGECONFIG_remove = "gl" in .bbappend
+# or PACKAGECONFIG_remove_pn-libdsl2 = "gl" in .conf
+PACKAGECONFIG[gl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
 
 PARALLEL_MAKE = ""