diff mbox series

[PATCHv2] default-providers.inc: add entries for virtual/libsdl2

Message ID 20250424213951.2514902-1-f_l_k@t-online.de
State New
Headers show
Series [PATCHv2] default-providers.inc: add entries for virtual/libsdl2 | expand

Commit Message

Markus Volk April 24, 2025, 9:39 p.m. UTC
virtual/libsdl2 can be provided by 'libsdl2' and 'libsdl2-compat' where the latter
is a replacement for libsdl2 that uses libsdl3 behind the scenes and should
be favored if applicable.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta/conf/distro/include/default-providers.inc | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Alexander Kanavin April 25, 2025, 7:59 a.m. UTC | #1
This is fine, but it makes me wonder: is libsdl2-compat compatible
enough to build qemu-system-native with it? Can you try that? Then we
might consider switching over to sdl3 in core.

Alex

On Thu, 24 Apr 2025 at 23:40, Markus Volk via lists.openembedded.org
<f_l_k=t-online.de@lists.openembedded.org> wrote:
>
> virtual/libsdl2 can be provided by 'libsdl2' and 'libsdl2-compat' where the latter
> is a replacement for libsdl2 that uses libsdl3 behind the scenes and should
> be favored if applicable.
>
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  meta/conf/distro/include/default-providers.inc | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
> index cebd0400f4..ee91af8796 100644
> --- a/meta/conf/distro/include/default-providers.inc
> +++ b/meta/conf/distro/include/default-providers.inc
> @@ -4,6 +4,8 @@
>  BB_RECIPE_VIRTUAL_PROVIDERS = "virtual/cross-cc virtual/cross-c++ virtual/cross-binutils virtual/nativesdk-cross-cc virtual/nativesdk-cross-c++ virtual/nativesdk-cross-binutils"
>  PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
>  PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg"
> +PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2"
> +PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native"
>  PREFERRED_PROVIDER_virtual/egl ?= "mesa"
>  PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
>  PREFERRED_PROVIDER_virtual/libglx ?= "mesa"
> @@ -32,6 +34,7 @@ VIRTUAL-RUNTIME_base-utils-hwclock ?= "busybox-hwclock"
>  VIRTUAL-RUNTIME_base-utils-syslog ?= "busybox-syslog"
>  VIRTUAL-RUNTIME_keymaps ?= "keymaps"
>  VIRTUAL-RUNTIME_dbus ?= "dbus"
> +VIRTUAL-RUNTIME_libsdl2 ?= "libsdl2"
>
>  #
>  # Default recipe providers
> @@ -62,5 +65,6 @@ PREFERRED_PROVIDER_pkgconfig-native ?= "pkgconfig-native"
>  PREFERRED_RPROVIDER_initd-functions ?= "initscripts"
>
>  PREFERRED_PROVIDER_nativesdk-mesa ?= "nativesdk-mesa"
> +PREFERRED_PROVIDER_virtual/nativesdk-libsdl2 ?= "nativesdk-libsdl2"
>
>  PREFERRED_RPROVIDER_virtual-x-terminal-emulator ?= "rxvt-unicode"
> --
> 2.49.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#215406): https://lists.openembedded.org/g/openembedded-core/message/215406
> Mute This Topic: https://lists.openembedded.org/mt/112441574/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Markus Volk April 25, 2025, 8:25 a.m. UTC | #2
On Fri, Apr 25 2025 at 09:59:58 +02:00:00, Alexander Kanavin via 
lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org> 
wrote:
> This is fine, but it makes me wonder: is libsdl2-compat compatible
> enough to build qemu-system-native with it? Can you try that? Then we
> might consider switching over to sdl3 in core.

I have already tried this. I have set it up as follows:
VIRTUAL-RUNTIME_libsdl2 = ā€œlibsdl2-compatā€
PREFERRED_PROVIDER_virtual/libsdl2 = ā€œlibsdl2-compatā€
PREFERRED_PROVIDER_virtual/libsdl2-native = ā€œlibsdl2-compat-nativeā€
PREFERRED_PROVIDER_virtual/nativesdk-libsdl2 = 
ā€œnativesdk-libsdl2-compatā€

and I was able to build my complete image, which includes building 
qemu-system-native
and also a lot of libsdl2 games, and at least compilation-wise there 
were no problems.
I also noticed quite some runtime improvements if running libsdl2 apps 
under wayland

Some possible problems I can think of:

- libsdl2-compat would add a requirement for x11 and opengl
- I'm not sure why this is, but libsdl2-compat was added to 
non-repro-meta-oe.inc, which
  suggests there may still be a reproducibility issue
Alexander Kanavin April 25, 2025, 8:36 a.m. UTC | #3
On Fri, 25 Apr 2025 at 10:25, Markus Volk <f_l_k@t-online.de> wrote:
> Some possible problems I can think of:
>
> - libsdl2-compat would add a requirement for x11 and opengl

This is already the case for libsdl2-native, so it won't worsen
things. At some point we can see if we can disable x11 and run
qemu-system-native as a pure wayland client, perhaps only after they
add direct sdl3 support.

> - I'm not sure why this is, but libsdl2-compat was added to non-repro-meta-oe.inc, which
>   suggests there may still be a reproducibility issue

Yes, this needs to be addressed before adding to core.

Alex
diff mbox series

Patch

diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index cebd0400f4..ee91af8796 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -4,6 +4,8 @@ 
 BB_RECIPE_VIRTUAL_PROVIDERS = "virtual/cross-cc virtual/cross-c++ virtual/cross-binutils virtual/nativesdk-cross-cc virtual/nativesdk-cross-c++ virtual/nativesdk-cross-binutils"
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
 PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg"
+PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2"
+PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native"
 PREFERRED_PROVIDER_virtual/egl ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
 PREFERRED_PROVIDER_virtual/libglx ?= "mesa"
@@ -32,6 +34,7 @@  VIRTUAL-RUNTIME_base-utils-hwclock ?= "busybox-hwclock"
 VIRTUAL-RUNTIME_base-utils-syslog ?= "busybox-syslog"
 VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 VIRTUAL-RUNTIME_dbus ?= "dbus"
+VIRTUAL-RUNTIME_libsdl2 ?= "libsdl2"
 
 #
 # Default recipe providers
@@ -62,5 +65,6 @@  PREFERRED_PROVIDER_pkgconfig-native ?= "pkgconfig-native"
 PREFERRED_RPROVIDER_initd-functions ?= "initscripts"
 
 PREFERRED_PROVIDER_nativesdk-mesa ?= "nativesdk-mesa"
+PREFERRED_PROVIDER_virtual/nativesdk-libsdl2 ?= "nativesdk-libsdl2"
 
 PREFERRED_RPROVIDER_virtual-x-terminal-emulator ?= "rxvt-unicode"