All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix SDL recipes with regards to GL/GLES/EGL
@ 2014-01-23 12:02 Nicolas Dechesne
  2014-01-23 12:02 ` [PATCH 1/2] libsdl: add PACKAGECONFIG for opengl Nicolas Dechesne
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Dechesne @ 2014-01-23 12:02 UTC (permalink / raw)
  To: openembedded-core; +Cc: Nicolas Dechesne, patches

As discussed on the list, SDL fails to build on ARM platforms where
'opengl' DISTRO FEATURES means gles/egl, since SDL assumes that
'opengl' provides gl/glx. So until we find a better mechanism to
support GL vs GLES at the DISTRO FEATURE level, this serie create the
proper PACKAGECONFIG so that SDL enable-video-opengl can be disabled
more easily in .bbappend or .conf file.

If this gets merged, I will send a backport for dora, and a slightly
different backport for dylan which does not have the _remove feature,
hence i will be using an intermediate variable like PACKACONFIG_GL.

Nicolas Dechesne (2):
  libsdl: add PACKAGECONFIG for opengl
  libsdl2: add PACKAGECONFIG for opengl

 meta/recipes-graphics/libsdl/libsdl_1.2.15.bb  | 12 +++++++++---
 meta/recipes-graphics/libsdl2/libsdl2_2.0.1.bb | 12 +++++++++---
 2 files changed, 18 insertions(+), 6 deletions(-)

-- 
1.8.5.3



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] libsdl: add PACKAGECONFIG for opengl
  2014-01-23 12:02 [PATCH 0/2] Fix SDL recipes with regards to GL/GLES/EGL Nicolas Dechesne
@ 2014-01-23 12:02 ` Nicolas Dechesne
  2014-01-23 12:02   ` [PATCH 2/2] libsdl2: " Nicolas Dechesne
  2014-01-24 22:21   ` [PATCH 1/2] libsdl: " Saul Wold
  0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Dechesne @ 2014-01-23 12:02 UTC (permalink / raw)
  To: openembedded-core; +Cc: Nicolas Dechesne, patches

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/libsdl/libsdl_1.2.15.bb | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
index 4b4ff63..492e228 100644
--- a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
+++ b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
@@ -13,7 +13,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b82798ef4"
 PROVIDES = "virtual/libsdl"
 
 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)}"
@@ -40,15 +39,22 @@ EXTRA_OECONF = "--disable-static --enable-cdrom --enable-threads --enable-timers
                 --disable-xbios --disable-gem --disable-video-dummy \
                 --enable-input-events --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)} \
                 --disable-video-svga \
                 --disable-video-picogui --disable-video-qtopia --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-libdsl = "gl" in .conf
+PACKAGECONFIG[gl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
 
 PARALLEL_MAKE = ""
 
-- 
1.8.5.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] libsdl2: add PACKAGECONFIG for opengl
  2014-01-23 12:02 ` [PATCH 1/2] libsdl: add PACKAGECONFIG for opengl Nicolas Dechesne
@ 2014-01-23 12:02   ` Nicolas Dechesne
  2014-01-24 22:21   ` [PATCH 1/2] libsdl: " Saul Wold
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Dechesne @ 2014-01-23 12:02 UTC (permalink / raw)
  To: openembedded-core; +Cc: Nicolas Dechesne, patches

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 --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 = ""
 
-- 
1.8.5.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] libsdl: add PACKAGECONFIG for opengl
  2014-01-23 12:02 ` [PATCH 1/2] libsdl: add PACKAGECONFIG for opengl Nicolas Dechesne
  2014-01-23 12:02   ` [PATCH 2/2] libsdl2: " Nicolas Dechesne
@ 2014-01-24 22:21   ` Saul Wold
  1 sibling, 0 replies; 4+ messages in thread
From: Saul Wold @ 2014-01-24 22:21 UTC (permalink / raw)
  To: Nicolas Dechesne, openembedded-core; +Cc: patches

On 01/23/2014 04:02 AM, Nicolas Dechesne wrote:
> 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/libsdl/libsdl_1.2.15.bb | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
> index 4b4ff63..492e228 100644
> --- a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
> +++ b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
> @@ -13,7 +13,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b82798ef4"
>   PROVIDES = "virtual/libsdl"
>
>   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)}"
> @@ -40,15 +39,22 @@ EXTRA_OECONF = "--disable-static --enable-cdrom --enable-threads --enable-timers
>                   --disable-xbios --disable-gem --disable-video-dummy \
>                   --enable-input-events --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)} \
>                   --disable-video-svga \
>                   --disable-video-picogui --disable-video-qtopia --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)} \
> +"
> +
May need to have PACKAGECONFIG_class-target since this is causing and 
interesting virtual/nativesdk-nativesdk-libsdl  dependency somehow, have 
not looked into it any further yet.

I think the same issue will be in libsdl2

> NOTE: Resolving any missing task queue dependencies
> ERROR: Nothing PROVIDES 'virtual/nativesdk-nativesdk-libgl' (but virtual:nativesdk:/srv/hdd/poky/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb DEPENDS on or otherwise requires it). Close matches:
>   virtual/nativesdk-libsdl
>   virtual/nativesdk-libc
>   virtual/nativesdk-libintl
> NOTE: Runtime target 'nativesdk-qemu' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['nativesdk-qemu', 'nativesdk-libsdl', 'virtual/nativesdk-nativesdk-libgl']
> NOTE: Runtime target 'nativesdk-packagegroup-sdk-host' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['nativesdk-packagegroup-sdk-host', 'nativesdk-qemu', 'nativesdk-libsdl', 'virtual/nativesdk-nativesdk-libgl']
> ERROR: Required build target 'core-image-minimal' has no buildable providers.
> Missing or unbuildable dependency chain was: ['core-image-minimal', 'nativesdk-packagegroup-sdk-host', 'nativesdk-qemu', 'nativesdk-libsdl', 'virtual/nativesdk-nativesdk-libgl']


Sau!


>   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-libdsl = "gl" in .conf
> +PACKAGECONFIG[gl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
>
>   PARALLEL_MAKE = ""
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-24 22:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-23 12:02 [PATCH 0/2] Fix SDL recipes with regards to GL/GLES/EGL Nicolas Dechesne
2014-01-23 12:02 ` [PATCH 1/2] libsdl: add PACKAGECONFIG for opengl Nicolas Dechesne
2014-01-23 12:02   ` [PATCH 2/2] libsdl2: " Nicolas Dechesne
2014-01-24 22:21   ` [PATCH 1/2] libsdl: " Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.