Skip to contentSkip to conversation

package/sdl2: Add wayland support

PATCH In review Alexander Shiyan 2 participants 4 messages Feb 6, 2025 – Feb 9, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/sdl2: Add wayland support

This adds a configuration option to enable Wayland video driver support in SDL2.

---
 package/sdl2/Config.in | 11 +++++++++++
 package/sdl2/sdl2.mk   |  8 +++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)
package/sdl2/Config.in +11 -0
index f1c22e4f80..784e381003 100644
@@ -38,6 +38,17 @@ comment "KMS/DRM video driver needs a GBM provider, and OpenGL or OpenGLES+EGL"
 		!BR2_PACKAGE_HAS_LIBEGL || \
 		!(BR2_PACKAGE_SDL2_OPENGL || BR2_PACKAGE_SDL2_OPENGLES)
 
+config BR2_PACKAGE_SDL2_WAYLAND
+	bool "Wayland video driver"
+	depends on BR2_PACKAGE_WAYLAND
+	depends on BR2_PACKAGE_HAS_LIBEGL
+	depends on BR2_PACKAGE_SDL2_OPENGLES
+	depends on BR2_PACKAGE_LIBXKBCOMMON
+
+comment "Wayland video driver needs a Wayland, OpenGLES+EGL and libxkbcommon"
+	depends on !BR2_PACKAGE_WAYLAND || !BR2_PACKAGE_HAS_LIBEGL || \
+		!BR2_PACKAGE_SDL2_OPENGLES || !BR2_PACKAGE_LIBXKBCOMMON
+
 config BR2_PACKAGE_SDL2_OPENGL
 	bool "OpenGL (GLX)"
 	depends on BR2_PACKAGE_HAS_LIBGL
package/sdl2/sdl2.mk +7 -1
index 50f80c68d7..918d5d7811 100644
@@ -23,7 +23,6 @@ SDL2_CONF_OPTS += \
 	--disable-video-vivante \
 	--disable-video-cocoa \
 	--disable-video-metal \
-	--disable-video-wayland \
 	--disable-video-dummy \
 	--disable-video-offscreen \
 	--disable-video-vulkan \
@@ -164,4 +163,11 @@ else
 SDL2_CONF_OPTS += --disable-video-kmsdrm
 endif
 
+ifeq ($(BR2_PACKAGE_SDL2_WAYLAND),y)
+SDL2_DEPENDENCIES += libegl libxkbcommon wayland
+SDL2_CONF_OPTS += --enable-video-wayland
+else
+SDL2_CONF_OPTS += --disable-video-wayland
+endif
+
 $(eval $(autotools-package))
Signature · 6 lines
2.39.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author Tested-by
#2 lore raw

Hello Thomas.

Unfortunately I don't have that letter to which I could reply with a tag. If you post the v2 (it's been a long time since the patch publication, I think it got lost), you can add a tag from me:

Thanks!

пт, 7 февр. 2025 г. в 15:03, Thomas Devoogdt <[email protected]>:

Quoted 7 lines

Hi Alexander,

This patch duplicates https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/,
can you verify that one?

Quoted 7 lines

Just reply to that patch with:

Kr,

Thomas

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Hi,

Quoted 7 lines

Hello Thomas.

Unfortunately I don't have that letter to which I could reply with a tag. If you post the v2 (it's been a long time since the patch publication, I think it got lost), you can add a tag from me:

I've posted a v2, see
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/.

Quoted 1 line

Thanks!

Kr,

Thomas Devoogdt
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot