buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
* [Buildroot] (no subject)
@ 2023-03-15  8:51 Luke D. Jones
  2023-03-15  8:51 ` [Buildroot] [PATCH] package/sdl2: Add config for wayland, vivante, pulseaudio Luke D. Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Luke D. Jones @ 2023-03-15  8:51 UTC (permalink / raw)
  To: buildroot

This patch adds support for a few config options in SDL2 that I had need
of for a work project:

- video-wayland, to enable running SDL2 applications under weston without xorg
- video-vivante, to enable running using the etnaviv driver directly
- pulseaudio, to enable building SDL2 with sound support

The sound addition is heavily related to a decade old issue that still persists
as described here: http://forums.libsdl.org/viewtopic.php?t=7609&sid=40fdb9756b8e22e1b8253cda3338845f


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH] package/sdl2: Add config for wayland, vivante, pulseaudio
  2023-03-15  8:51 [Buildroot] (no subject) Luke D. Jones
@ 2023-03-15  8:51 ` Luke D. Jones
  2023-03-16 14:09   ` Luke Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Luke D. Jones @ 2023-03-15  8:51 UTC (permalink / raw)
  To: buildroot; +Cc: Luke D. Jones

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

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

* Re: [Buildroot] [PATCH] package/sdl2: Add config for wayland, vivante, pulseaudio
  2023-03-15  8:51 ` [Buildroot] [PATCH] package/sdl2: Add config for wayland, vivante, pulseaudio Luke D. Jones
@ 2023-03-16 14:09   ` Luke Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Luke Jones @ 2023-03-16 14:09 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 256 bytes --]

On Wed, Mar 15 2023 at 09:51:03 +0100, Luke D. Jones <luke@ljones.dev> 
wrote:
> --enable-video-vivante

I made a mistake with -+SDL2_DEPENDENCIES += libdrm_etnaviv, this 
should have been +SDL2_DEPENDENCIES += libdrm

I will submit a revised patch later


[-- Attachment #1.2: Type: text/html, Size: 739 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-03-16 14:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15  8:51 [Buildroot] (no subject) Luke D. Jones
2023-03-15  8:51 ` [Buildroot] [PATCH] package/sdl2: Add config for wayland, vivante, pulseaudio Luke D. Jones
2023-03-16 14:09   ` Luke Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).