Skip to contentSkip to conversation

libsdl2: require GLES when building Wayland support

PATCH In review Ross Burton 2 participants 4 messages Nov 11, 2015 – Nov 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libsdl2: require GLES when building Wayland support

The Wayland support requires GLES2 to be enabled as otherwise the EGL support code in SDL2 isn't enabled.

| In file included from .../SDL2-2.0.3/src/video/wayland/SDL_waylandvideo.c:34:0:
| .../SDL2-2.0.3/src/video/wayland/SDL_waylandvideo.c: In function 'Wayland_CreateDevice':
| .../SDL2-2.0.3/src/video/wayland/SDL_waylandopengles.h:38:38: error: 'SDL_EGL_GetSwapInterval' undeclared (first use in this function)
|  #define Wayland_GLES_GetSwapInterval SDL_EGL_GetSwapInterval

Solve this by adding gles2 to the Wayland PACKAGECONFIG option.

---
 meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb +1 -1
index 97f64f3..f138f97 100644
@@ -39,7 +39,7 @@ PACKAGECONFIG ??= " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
 "
 PACKAGECONFIG[alsa]       = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
Signature · 1 line
2.1.4
#1 lore raw

Hi Ross,

I tested this patch and found it also need to add libxkbcommon as a dependency in PACKAGECONFIG[wayland]. Otherwise the wayland support would skip if libxkbcommon is not built before even if we already enable video-wayland.

Reproduce steps:
bitbake libxkbcommon -c clean
bitbake libsdl2 -c cleansstate && bitbake libsdl2

config.log:
[snip]
configure:19347: checking for Wayland support
configure:19357: result: no
[snip]

Thanks,
Yi

Quoted 28 lines · Ross Burton

The Wayland support requires GLES2 to be enabled as otherwise the EGL support code in SDL2 isn't enabled.

| In file included from .../SDL2-2.0.3/src/video/wayland/SDL_waylandvideo.c:34:0:
| .../SDL2-2.0.3/src/video/wayland/SDL_waylandvideo.c: In function 'Wayland_CreateDevice':
| .../SDL2-2.0.3/src/video/wayland/SDL_waylandopengles.h:38:38: error: 'SDL_EGL_GetSwapInterval' undeclared (first use in this function)
|  #define Wayland_GLES_GetSwapInterval SDL_EGL_GetSwapInterval

Solve this by adding gles2 to the Wayland PACKAGECONFIG option.

---
  meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb +1 -1
index 97f64f3..f138f97 100644
@@ -39,7 +39,7 @@ PACKAGECONFIG ??= " \
      ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
      ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
      ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
      ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
  "
  PACKAGECONFIG[alsa]       = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
#2 lore raw
Quoted 5 lines · Yi Zhao

I tested this patch and found it also need to add libxkbcommon as a dependency in PACKAGECONFIG[wayland]. Otherwise the wayland support would skip if libxkbcommon is not built before even if we already enable video-wayland.

Thanks for noticing that, can you sed a patch for that?

Cheers
Ross

#3 lore raw
Quoted 11 lines · Ross

On 26 November 2015 at 06:33, Yi Zhao <[email protected] <mailto:[email protected]>> wrote:

I tested this patch and found it also need to add libxkbcommon as a dependency in PACKAGECONFIG[wayland]. Otherwise the wayland support would skip if libxkbcommon is not built before even if we already enable video-wayland.

Thanks for noticing that, can you sed a patch for that?

OK. I will send later.

Cheers
Yi

Quoted 2 lines

Cheers
Ross