From: "Luke D. Jones" <luke@ljones.dev>
To: buildroot@uclibc.org
Cc: "Luke D. Jones" <luke@ljones.dev>
Subject: [Buildroot] [PATCH] package/sdl2: Add config for wayland, vivante, pulseaudio
Date: Wed, 15 Mar 2023 09:51:03 +0100 [thread overview]
Message-ID: <20230315085103.1671888-2-luke@ljones.dev> (raw)
In-Reply-To: <20230315085103.1671888-1-luke@ljones.dev>
Add support for building SDL2 with the following enabled as either optional
or detected:
- Wayland video support, enables running SDL2 applications under
pure wayland desktops/compositors
- Vivante video device support, this enables SDL2 to run on devices using
this video chip without a full desktop (much like KMS/DRM)
- Pulseaudio support, this solves an ancient issue that still occurs in
some cases. Described at: http://forums.libsdl.org/viewtopic.php?t=7609&sid=40fdb9756b8e22e1b8253cda3338845f
Signed-off-by: Luke D. Jones <luke@ljones.dev>
---
package/sdl2/Config.in | 16 ++++++++++++++++
package/sdl2/sdl2.mk | 21 +++++++++++++++++++++
2 files changed, 37 insertions(+)
diff --git a/package/sdl2/Config.in b/package/sdl2/Config.in
index 7c8258fe73b3..365be28c8ddb 100644
--- a/package/sdl2/Config.in
+++ b/package/sdl2/Config.in
@@ -18,6 +18,22 @@ config BR2_PACKAGE_SDL2_DIRECTFB
comment "DirectFB video driver needs directfb"
depends on !BR2_PACKAGE_DIRECTFB
+config BR2_PACKAGE_SDL2_WAYLAND
+ bool "wayland video driver"
+ depends on BR2_PACKAGE_WAYLAND
+
+comment "wayland video driver needs wayland"
+ depends on !BR2_PACKAGE_WAYLAND
+
+config BR2_PACKAGE_SDL2_PULSEAUDIO
+ bool "pulseaudio support"
+ depends on BR2_PACKAGE_PULSEAUDIO
+ depends on BR2_PACKAGE_ALSA_LIB
+
+comment "pulseaudio support needs the pulseaudio and alsa packages"
+ depends on !BR2_PACKAGE_PULSEAUDIO
+ depends on !BR2_PACKAGE_ALSA_LIB
+
config BR2_PACKAGE_SDL2_X11
bool "X11 video driver"
depends on BR2_PACKAGE_XORG7
diff --git a/package/sdl2/sdl2.mk b/package/sdl2/sdl2.mk
index c01f12d12cf7..12bfe0eb1592 100644
--- a/package/sdl2/sdl2.mk
+++ b/package/sdl2/sdl2.mk
@@ -81,6 +81,20 @@ else
SDL2_CONF_OPTS += --disable-video-directfb
endif
+ifeq ($(BR2_PACKAGE_SDL2_WAYLAND),y)
+SDL2_DEPENDENCIES += wayland
+SDL2_CONF_OPTS += --enable-video-wayland
+else
+SDL2_CONF_OPTS += --disable-video-wayland
+endif
+
+ifeq ($(BR2_PACKAGE_SDL2_PULSEAUDIO),y)
+SDL2_DEPENDENCIES += pulseaudio
+SDL2_CONF_OPTS += --enable-pulseaudio
+else
+SDL2_CONF_OPTS += --disable-pulseaudio
+endif
+
ifeq ($(BR2_PACKAGE_SDL2_OPENGLES)$(BR2_PACKAGE_RPI_USERLAND),yy)
SDL2_DEPENDENCIES += rpi-userland
SDL2_CONF_OPTS += --enable-video-rpi
@@ -181,4 +195,11 @@ else
SDL2_CONF_OPTS += --disable-video-kmsdrm
endif
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y)
+SDL2_DEPENDENCIES += libdrm_etnaviv
+SDL2_CONF_OPTS += --enable-video-vivante
+else
+SDL2_CONF_OPTS += --disable-video-vivante
+endif
+
$(eval $(autotools-package))
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-03-15 8:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-15 8:51 [Buildroot] (no subject) Luke D. Jones
2023-03-15 8:51 ` Luke D. Jones [this message]
2023-03-16 14:09 ` [Buildroot] [PATCH] package/sdl2: Add config for wayland, vivante, pulseaudio Luke Jones
2024-08-30 17:52 ` [Buildroot] [PATCH v1] package/sdl2: enable wayland support Thomas Devoogdt
2025-02-09 18:16 ` [Buildroot] [PATCH v2] package/sdl2: add " Thomas Devoogdt
2025-05-16 15:17 ` Peter Korsgaard
2025-05-16 15:52 ` Peter Korsgaard
2026-11-20 21:54 ` [Buildroot] [PATCH v2] package/sdl2: add PulseAudio support Angelo Compagnucci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230315085103.1671888-2-luke@ljones.dev \
--to=luke@ljones.dev \
--cc=buildroot@uclibc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox