Skip to contentSkip to conversation

libsdl3: add recipe

PATCH Markus Volk 2 participants 5 messages Mar 13, 2025 – Mar 17, 2025 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

v2: remove directfb from PACKAGECONFIG

Quoted 135 lines · Markus Volk
Signed-off-by Markus Volk <[email protected] <mailto:[email protected]>>
---
 .../recipes-graphics/libsdl3/libsdl3_3.2.8.bb | 83 
+++++++++++++++++++
 1 file changed, 83 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb
meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +2 -0
new file mode 100644
index 0000000000..9c4fa317a2
@@ -0,0 +1,83 @@
+SUMMARY = "Simple DirectMedia Layer"
+DESCRIPTION = "Simple DirectMedia Layer is a cross-platform 

multimedia \
+library designed to provide low level access to audio, keyboard, mouse, \

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +9 -0
+joystick, 3D hardware via OpenGL, and 2D video framebuffer."
+HOMEPAGE = "http://www.libsdl.org <http://www.libsdl.org/>"
+BUGTRACKER = "<http://bugzilla.libsdl.org/>"
+
+SECTION = "libs"
+
+LICENSE = "Zlib & BSD-2-Clause"
+LIC_FILES_CHKSUM = "\
+    file://LICENSE.txt;md5=cbf0e3161523f9a9315b6b915c5c4457 

<file://license.txt;md5=cbf0e3161523f9a9315b6b915c5c4457/> \
+ <file://src/hidapi/LICENSE.txt;md5=7c3949a631240cb6c31c50f3eb696077> \
+ <file://src/hidapi/LICENSE-bsd.txt;md5=b5fa085ce0926bb50d0621620a82361f> \
+ <file://src/video/yuv2rgb/LICENSE;md5=79f8f3418d91531e05f0fc94ca67e071> \
+"

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +3 -0
+
+# arm-neon adds MIT license
+LICENSE:append = " ${@bb.utils.contains 

<mailto:${@bb.utils.contains>('PACKAGECONFIG', 'arm-neon', '& MIT', '', d)}"
+LIC_FILES_CHKSUM:append = " ${@bb.utils.contains
<mailto:${@bb.utils.contains>('PACKAGECONFIG', 'arm-neon', '<file://src/video/arm/pixman-arm-neon-asm.h;md5=9a9cc1e51abbf1da58f4d9528ec9d49b;beginline=1;endline=24',> '', d)}"

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +4 -0
+
+PROVIDES = "virtual/libsdl3"
+
+SRC_URI = "http://www.libsdl.org/release/SDL3-${PV}.tar.gz 

<http://www.libsdl.org/release/SDL3-$%7BPV%7D.tar.gz>"

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +4 -0
+
+S = "${WORKDIR}/SDL3-${PV}"
+
+SRC_URI[sha256sum] = 

"13388fabb361de768ecdf2b65e52bb27d1054cae6ccb6942ba926e378e00db03"

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +2 -0
+
+inherit cmake lib_package binconfig-disabled pkgconfig 

upstream-version-is-even

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +23 -0
+
+CVE_PRODUCT = "simple_directmedia_layer sdl"
+
+EXTRA_OECMAKE = " \
+	-DSDL_OSS_DEFAULT=OFF \
+	-DSDL_DISKAUDIO=OFF \
+	-DSDL_DUMMYVIDEO=OFF \
+	-DSDL_RPI=OFF \
+	-DSDL_PTHREADS=ON \
+	-DSDL_RPATH=OFF \
+	-DSDL_SNDIO=OFF \
+	-DSDL_X11_XCURSOR=OFF \
+	-DSDL_X11_XDBE=OFF \
+	-DSDL_X11_XFIXES=OFF \
+	-DSDL_X11_XINPUT=OFF \
+	-DSDL_X11_XRANDR=OFF \
+	-DSDL_X11_XSCRNSAVER=OFF \
+	-DSDL_X11_XSHAPE=OFF \
+"
+
+# opengl packageconfig factored out to make it easy for distros
+# and BSP layers to pick either (desktop) opengl, gles2, or no GL
+PACKAGECONFIG_GL ?= "${@bb.utils.filter 

<mailto:${@bb.utils.filter>('DISTRO_FEATURES', 'opengl', d)}"

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +3 -0
+
+PACKAGECONFIG:class-native = "x11 ${PACKAGECONFIG_GL}"
+PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter 

<mailto:${@bb.utils.filter>('DISTRO_FEATURES', 'x11', d)} ${PACKAGECONFIG_GL}"

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +3 -0
+PACKAGECONFIG ??= " \
+	${PACKAGECONFIG_GL} \
+	${@bb.utils.filter <mailto:${@bb.utils.filter>('DISTRO_FEATURES', 

'alsa pulseaudio pipewire x11 vulkan', d)} \

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +1 -0
+	${@bb.utils.contains 

<mailto:${@bb.utils.contains>('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +1 -0
+	${@bb.utils.contains <mailto:${@bb.utils.contains>("TUNE_FEATURES", 

"neon","arm-neon","",d)} \
+"

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +3 -0
+PACKAGECONFIG[alsa]       = "-DSDL_ALSA=ON,-DSDL_ALSA=OFF,alsa-lib,"
+PACKAGECONFIG[arm-neon]   = "-DSDL_ARMNEON=ON,-DSDL_ARMNEON=OFF"
+PACKAGECONFIG[gles2]      = 

"-DSDL_OPENGLES=ON,-DSDL_OPENGLES=OFF,virtual/libgles2"

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +2 -0
+PACKAGECONFIG[jack]       = "-DSDL_JACK=ON,-DSDL_JACK=OFF,jack"
+PACKAGECONFIG[kmsdrm]     = "-DSDL_KMSDRM=ON,-DSDL_KMSDRM=OFF,libdrm 

virtual/libgbm"
+# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +2 -0
+#  so we'll just use libusb when it's available.
+PACKAGECONFIG[libusb] = 

"-DSDL_HIDAPI_LIBUSB=ON,-DSDL_HIDAPI_LIBUSB=OFF,libusb1" +PACKAGECONFIG[libdecor] = "-DSDL_WAYLAND_LIBDECOR=ON,-DSDL_WAYLAND_LIBDECOR=OFF,libdecor,libdecor"
+PACKAGECONFIG[opengl] =
"-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl" +PACKAGECONFIG[pipewire] = "-DSDL_PIPEWIRE_SHARED=ON,-DSDL_PIPEWIRE_SHARED=OFF,pipewire" +PACKAGECONFIG[pulseaudio] = "-DSDL_PULSEAUDIO=ON,-DSDL_PULSEAUDIO=OFF,pulseaudio"

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +2 -1
+PACKAGECONFIG[vulkan]    = "-DSDL_VULKAN=ON 
-DSDL_RENDER_VULKAN=ON,-DSDL_VULKAN=OFF -DSDL_RENDER_VULKAN=OFF"
+PACKAGECONFIG[wayland]    = 

"-DSDL_WAYLAND=ON,-DSDL_WAYLAND=OFF,wayland-native wayland wayland-protocols libxkbcommon"
+PACKAGECONFIG[x11] =
"-DSDL_X11=ON,-DSDL_X11=OFF,virtual/libx11 libxext libxrandr libxrender"

meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file +6 -1
+
+CFLAGS:append:class-native = " -DNO_SHARED_MEMORY"
+
+FILES:${PN} += "${datadir}/licenses/SDL3/LICENSE.txt"
+
+BBCLASSEXTEND = "native nativesdk"
--

2.48.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#115967): <https://lists.openembedded.org/g/openembedded-devel/message/115967>
Mute This Topic: <https://lists.openembedded.org/mt/111678038/3618223>
Group Owner: [email protected] <mailto:[email protected]>
Unsubscribe: <https://lists.openembedded.org/g/openembedded-devel/unsub> [[email protected] <mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hi,

in my world build without x11 in DISTRO_FEATURES this and libsdl2-compat failed to build with:

-- SDL3 was configured with the following options:

Signature · 163 lines
-- Platform: Linux
-- 64-bit:   TRUE
-- Compiler: libsdl3/3.2.8/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-gcc
-- Revision: release-3.2.8-0-gf6864924f
-- Vendor:
-- 
-- Subsystems:
--   Audio:    ON
--   Video:    ON
--   GPU:      ON
--   Render:   ON
--   Camera:   ON
--   Joystick: ON
--   Haptic:   ON
--   Hidapi:   ON
--   Power:    ON
--   Sensor:   ON
--   Dialog:   ON
-- 
-- Options:
--   SDL_ALSA                    (Wanted: OFF): OFF
--   SDL_ALSA_SHARED             (Wanted: OFF): OFF
--   SDL_ALTIVEC                 (Wanted: OFF): OFF
--   SDL_ARMNEON                 (Wanted: OFF): OFF
--   SDL_ASAN                    (Wanted: OFF): OFF
--   SDL_ASSEMBLY                (Wanted: ON): ON
--   SDL_ASSERTIONS              (Wanted: auto): auto
--   SDL_AVX                     (Wanted: OFF): OFF
--   SDL_AVX2                    (Wanted: OFF): OFF
--   SDL_AVX512F                 (Wanted: OFF): OFF
--   SDL_BACKGROUNDING_SIGNAL    (Wanted: OFF): OFF
--   SDL_CCACHE                  (Wanted: OFF): OFF
--   SDL_CLANG_TIDY              (Wanted: OFF): OFF
--   SDL_CLOCK_GETTIME           (Wanted: ON): ON
--   SDL_COCOA                   (Wanted: OFF): OFF
--   SDL_DBUS                    (Wanted: ON): OFF
--   SDL_DEPS_SHARED             (Wanted: ON): OFF
--   SDL_DIRECTX                 (Wanted: OFF): OFF
--   SDL_DISKAUDIO               (Wanted: OFF): OFF
--   SDL_DUMMYAUDIO              (Wanted: ON): ON
--   SDL_DUMMYCAMERA             (Wanted: ON): ON
--   SDL_DUMMYVIDEO              (Wanted: OFF): OFF
--   SDL_EXAMPLES                (Wanted: OFF): OFF
--   SDL_EXAMPLES_LINK_SHARED    (Wanted: ON): OFF
--   SDL_FOREGROUNDING_SIGNAL    (Wanted: OFF): OFF
--   SDL_GCC_ATOMICS             (Wanted: ON): ON
--   SDL_GPU_DXVK                (Wanted: OFF): OFF
--   SDL_HIDAPI                  (Wanted: ON): ON
--   SDL_HIDAPI_JOYSTICK         (Wanted: ON): ON
--   SDL_HIDAPI_LIBUSB           (Wanted: OFF): OFF
--   SDL_HIDAPI_LIBUSB_SHARED    (Wanted: OFF): OFF
--   SDL_IBUS                    (Wanted: ON): OFF
--   SDL_INSTALL                 (Wanted: ON): OFF
--   SDL_INSTALL_TESTS           (Wanted: OFF): OFF
--   SDL_JACK                    (Wanted: OFF): OFF
--   SDL_JACK_SHARED             (Wanted: OFF): OFF
--   SDL_KMSDRM                  (Wanted: OFF): OFF
--   SDL_KMSDRM_SHARED           (Wanted: OFF): OFF
--   SDL_LASX                    (Wanted: OFF): OFF
--   SDL_LIBC                    (Wanted: ON): ON
--   SDL_LIBICONV                (Wanted: OFF): OFF
--   SDL_LIBUDEV                 (Wanted: ON): ON
--   SDL_LIBURING                (Wanted: ON): OFF
--   SDL_LSX                     (Wanted: OFF): OFF
--   SDL_METAL                   (Wanted: OFF): OFF
--   SDL_MMX                     (Wanted: OFF): OFF
--   SDL_OFFSCREEN               (Wanted: ON): ON
--   SDL_OPENGL                  (Wanted: OFF): OFF
--   SDL_OPENGLES                (Wanted: OFF): OFF
--   SDL_OPENVR                  (Wanted: OFF): OFF
--   SDL_OSS                     (Wanted: OFF): OFF
--   SDL_PIPEWIRE                (Wanted: ON): OFF
--   SDL_PIPEWIRE_SHARED         (Wanted: OFF): OFF
--   SDL_PTHREADS                (Wanted: ON): ON
--   SDL_PTHREADS_SEM            (Wanted: ON): ON
--   SDL_PULSEAUDIO              (Wanted: ON): ON
--   SDL_PULSEAUDIO_SHARED       (Wanted: ON): ON
--   SDL_RENDER_D3D              (Wanted: OFF): OFF
--   SDL_RENDER_D3D11            (Wanted: OFF): OFF
--   SDL_RENDER_D3D12            (Wanted: OFF): OFF
--   SDL_RENDER_GPU              (Wanted: ON): ON
--   SDL_RENDER_METAL            (Wanted: ON): OFF
--   SDL_RENDER_VULKAN           (Wanted: OFF): OFF
--   SDL_ROCKCHIP                (Wanted: ON): OFF
--   SDL_RPATH                   (Wanted: OFF): OFF
--   SDL_RPI                     (Wanted: OFF): OFF
--   SDL_SNDIO                   (Wanted: OFF): OFF
--   SDL_SNDIO_SHARED            (Wanted: OFF): OFF
--   SDL_SSE                     (Wanted: OFF): OFF
--   SDL_SSE2                    (Wanted: OFF): OFF
--   SDL_SSE3                    (Wanted: OFF): OFF
--   SDL_SSE4_1                  (Wanted: OFF): OFF
--   SDL_SSE4_2                  (Wanted: OFF): OFF
--   SDL_SYSTEM_ICONV            (Wanted: ON): ON
--   SDL_TESTS                   (Wanted: OFF): OFF
--   SDL_TESTS_LINK_SHARED       (Wanted: ON): OFF
--   SDL_UNINSTALL               (Wanted: ON): OFF
--   SDL_VIRTUAL_JOYSTICK        (Wanted: ON): ON
--   SDL_VIVANTE                 (Wanted: OFF): OFF
--   SDL_VULKAN                  (Wanted: OFF): OFF
--   SDL_WASAPI                  (Wanted: OFF): OFF
--   SDL_WAYLAND                 (Wanted: OFF): OFF
--   SDL_WAYLAND_LIBDECOR        (Wanted: OFF): OFF
--   SDL_WAYLAND_LIBDECOR_SHARED (Wanted: OFF): OFF
--   SDL_WAYLAND_SHARED          (Wanted: OFF): OFF
--   SDL_X11                     (Wanted: OFF): OFF
--   SDL_X11_SHARED              (Wanted: OFF): OFF
--   SDL_X11_XCURSOR             (Wanted: OFF): OFF
--   SDL_X11_XDBE                (Wanted: OFF): OFF
--   SDL_X11_XFIXES              (Wanted: OFF): OFF
--   SDL_X11_XINPUT              (Wanted: OFF): OFF
--   SDL_X11_XRANDR              (Wanted: OFF): OFF
--   SDL_X11_XSCRNSAVER          (Wanted: OFF): OFF
--   SDL_X11_XSHAPE              (Wanted: OFF): OFF
--   SDL_X11_XSYNC               (Wanted: OFF): OFF
--   SDL_XINPUT                  (Wanted: OFF): OFF
-- 
--  Build Shared Library: ON
--  Build Static Library: OFF
-- 
-- If something was not detected, although the libraries
-- were installed, then make sure you have set the
-- CMAKE_C_FLAGS and CMAKE_PREFIX_PATH CMake variables correctly.
-- 
CMake Error at cmake/macros.cmake:382 (message):
  SDL could not find X11 or Wayland development libraries on your system.
  This means SDL will not be able to create windows on a typical unix
  operating system.  Most likely, this is not wanted.

  On Linux, install the packages listed at
  https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md#build-dependencies


  If you really don't need desktop windows, the documentation tells you how
  to skip this check.
  https://github.com/libsdl-org/SDL/blob/main/docs/README-cmake.md#cmake-fails-to-build-without-x11-or-wayland-support


Call Stack (most recent call first):
  CMakeLists.txt:3799 (SDL_PrintSummary)

which might be caused by _both_ x11 and wayland missing in
DISTRO_FEATURES and we should probably add features_check inherit to
make sure at least one of them is available.

libsdl2-compat (in build where libsdl3 didn't fail) failed with:

-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OpenGL)
CMake Error at TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/libsdl2-compat/2.32.52/recipe-sysroot-native/usr/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233
(message):
  Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
  TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/libsdl2-compat/2.32.52/recipe-sysroot-native/usr/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603
(_FPHSA_FAILURE_MESSAGE)
  TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/libsdl2-compat/2.32.52/recipe-sysroot-native/usr/share/cmake-3.31/Modules/FindX11.cmake:676
(find_package_handle_standard_args)
  test/CMakeLists.txt:118 (find_package)

I'll check what went wrong and send patches, this is just FYI.

Cheers,

On Thu, Mar 13, 2025 at 1:41 PM Markus Volk via lists.openembedded.org
Quoted 18 lines · <[email protected]> wrote:

v2: remove directfb from PACKAGECONFIG

On Thu, Mar 13 2025 at 13:03:40 +01:00:00, Markus Volk <[email protected]> wrote:

Signed-off-by Markus Volk <[email protected]> --- .../recipes-graphics/libsdl3/libsdl3_3.2.8.bb | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb diff --git a/meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb b/meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file mode 100644 index 0000000000..9c4fa317a2 --- /dev/null +++ b/meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb @@ -0,0 +1,83 @@ +SUMMARY = "Simple DirectMedia Layer" +DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \ +library designed to provide low level access to audio, keyboard, mouse, \ +joystick, 3D hardware via OpenGL, and 2D video framebuffer." +HOMEPAGE = "http://www.libsdl.org" +BUGTRACKER = "http://bugzilla.libsdl.org/" + +SECTION = "libs" + +LICENSE = "Zlib & BSD-2-Clause" +LIC_FILES_CHKSUM = "\ + file://LICENSE.txt;md5=cbf0e3161523f9a9315b6b915c5c4457 \ + file://src/hidapi/LICENSE.txt;md5=7c3949a631240cb6c31c50f3eb696077 \ + file://src/hidapi/LICENSE-bsd.txt;md5=b5fa085ce0926bb50d0621620a82361f \ + file://src/video/yuv2rgb/LICENSE;md5=79f8f3418d91531e05f0fc94ca67e071 \ +" + +# arm-neon adds MIT license +LICENSE:append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', '& MIT', '', d)}" +LIC_FILES_CHKSUM:append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', 'file://src/video/arm/pixman-arm-neon-asm.h;md5=9a9cc1e51abbf1da58f4d9528ec9d49b;beginline=1;endline=24', '', d)}" + +PROVIDES = "virtual/libsdl3" + +SRC_URI = "http://www.libsdl.org/release/SDL3-${PV}.tar.gz" + +S = "${WORKDIR}/SDL3-${PV}" + +SRC_URI[sha256sum] = "13388fabb361de768ecdf2b65e52bb27d1054cae6ccb6942ba926e378e00db03" + +inherit cmake lib_package binconfig-disabled pkgconfig upstream-version-is-even + +CVE_PRODUCT = "simple_directmedia_layer sdl" + +EXTRA_OECMAKE = " \ + -DSDL_OSS_DEFAULT=OFF \ + -DSDL_DISKAUDIO=OFF \ + -DSDL_DUMMYVIDEO=OFF \ + -DSDL_RPI=OFF \ + -DSDL_PTHREADS=ON \ + -DSDL_RPATH=OFF \ + -DSDL_SNDIO=OFF \ + -DSDL_X11_XCURSOR=OFF \ + -DSDL_X11_XDBE=OFF \ + -DSDL_X11_XFIXES=OFF \ + -DSDL_X11_XINPUT=OFF \ + -DSDL_X11_XRANDR=OFF \ + -DSDL_X11_XSCRNSAVER=OFF \ + -DSDL_X11_XSHAPE=OFF \ +" + +# opengl packageconfig factored out to make it easy for distros +# and BSP layers to pick either (desktop) opengl, gles2, or no GL +PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" + +PACKAGECONFIG:class-native = "x11 ${PACKAGECONFIG_GL}" +PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${PACKAGECONFIG_GL}" +PACKAGECONFIG ??= " \ + ${PACKAGECONFIG_GL} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio pipewire x11 vulkan', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \ + ${@bb.utils.contains("TUNE_FEATURES", "neon","arm-neon","",d)} \ +" +PACKAGECONFIG[alsa] = "-DSDL_ALSA=ON,-DSDL_ALSA=OFF,alsa-lib," +PACKAGECONFIG[arm-neon] = "-DSDL_ARMNEON=ON,-DSDL_ARMNEON=OFF" +PACKAGECONFIG[gles2] = "-DSDL_OPENGLES=ON,-DSDL_OPENGLES=OFF,virtual/libgles2" +PACKAGECONFIG[jack] = "-DSDL_JACK=ON,-DSDL_JACK=OFF,jack" +PACKAGECONFIG[kmsdrm] = "-DSDL_KMSDRM=ON,-DSDL_KMSDRM=OFF,libdrm virtual/libgbm" +# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers, +# so we'll just use libusb when it's available. +PACKAGECONFIG[libusb] = "-DSDL_HIDAPI_LIBUSB=ON,-DSDL_HIDAPI_LIBUSB=OFF,libusb1" +PACKAGECONFIG[libdecor] = "-DSDL_WAYLAND_LIBDECOR=ON,-DSDL_WAYLAND_LIBDECOR=OFF,libdecor,libdecor" +PACKAGECONFIG[opengl] = "-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl" +PACKAGECONFIG[pipewire] = "-DSDL_PIPEWIRE_SHARED=ON,-DSDL_PIPEWIRE_SHARED=OFF,pipewire" +PACKAGECONFIG[pulseaudio] = "-DSDL_PULSEAUDIO=ON,-DSDL_PULSEAUDIO=OFF,pulseaudio" +PACKAGECONFIG[vulkan] = "-DSDL_VULKAN=ON -DSDL_RENDER_VULKAN=ON,-DSDL_VULKAN=OFF -DSDL_RENDER_VULKAN=OFF" +PACKAGECONFIG[wayland] = "-DSDL_WAYLAND=ON,-DSDL_WAYLAND=OFF,wayland-native wayland wayland-protocols libxkbcommon" +PACKAGECONFIG[x11] = "-DSDL_X11=ON,-DSDL_X11=OFF,virtual/libx11 libxext libxrandr libxrender" + +CFLAGS:append:class-native = " -DNO_SHARED_MEMORY" + +FILES:${PN} += "${datadir}/licenses/SDL3/LICENSE.txt" + +BBCLASSEXTEND = "native nativesdk"

--
2.48.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#115969): https://lists.openembedded.org/g/openembedded-devel/message/115969
Mute This Topic: https://lists.openembedded.org/mt/111678038/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

Hi,

I have sent a patch to fix it.

Quoted 247 lines · Martin Jansa via lists.openembedded.org

Hi,

in my world build without x11 in DISTRO_FEATURES this and libsdl2-compat failed to build with:

-- SDL3 was configured with the following options:
--
-- Platform: Linux
-- 64-bit: TRUE
-- Compiler:
libsdl3/3.2.8/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-gcc -- Revision: release-3.2.8-0-gf6864924f
-- Vendor:
--
-- Subsystems:

--   Audio:    ON
--   Video:    ON
--   GPU:      ON
--   Render:   ON
--   Camera:   ON
--   Joystick: ON
--   Haptic:   ON
--   Hidapi:   ON
--   Power:    ON
--   Sensor:   ON
--   Dialog:   ON
--
-- Options:
--   SDL_ALSA                    (Wanted: OFF): OFF
--   SDL_ALSA_SHARED             (Wanted: OFF): OFF
--   SDL_ALTIVEC                 (Wanted: OFF): OFF
--   SDL_ARMNEON                 (Wanted: OFF): OFF
--   SDL_ASAN                    (Wanted: OFF): OFF
--   SDL_ASSEMBLY                (Wanted: ON): ON
--   SDL_ASSERTIONS              (Wanted: auto): auto
--   SDL_AVX                     (Wanted: OFF): OFF
--   SDL_AVX2                    (Wanted: OFF): OFF
--   SDL_AVX512F                 (Wanted: OFF): OFF
--   SDL_BACKGROUNDING_SIGNAL    (Wanted: OFF): OFF
--   SDL_CCACHE                  (Wanted: OFF): OFF
--   SDL_CLANG_TIDY              (Wanted: OFF): OFF
--   SDL_CLOCK_GETTIME           (Wanted: ON): ON
--   SDL_COCOA                   (Wanted: OFF): OFF
--   SDL_DBUS                    (Wanted: ON): OFF
--   SDL_DEPS_SHARED             (Wanted: ON): OFF
--   SDL_DIRECTX                 (Wanted: OFF): OFF
--   SDL_DISKAUDIO               (Wanted: OFF): OFF
--   SDL_DUMMYAUDIO              (Wanted: ON): ON
--   SDL_DUMMYCAMERA             (Wanted: ON): ON
--   SDL_DUMMYVIDEO              (Wanted: OFF): OFF
--   SDL_EXAMPLES                (Wanted: OFF): OFF
--   SDL_EXAMPLES_LINK_SHARED    (Wanted: ON): OFF
--   SDL_FOREGROUNDING_SIGNAL    (Wanted: OFF): OFF
--   SDL_GCC_ATOMICS             (Wanted: ON): ON
--   SDL_GPU_DXVK                (Wanted: OFF): OFF
--   SDL_HIDAPI                  (Wanted: ON): ON
--   SDL_HIDAPI_JOYSTICK         (Wanted: ON): ON
--   SDL_HIDAPI_LIBUSB           (Wanted: OFF): OFF
--   SDL_HIDAPI_LIBUSB_SHARED    (Wanted: OFF): OFF
--   SDL_IBUS                    (Wanted: ON): OFF
--   SDL_INSTALL                 (Wanted: ON): OFF
--   SDL_INSTALL_TESTS           (Wanted: OFF): OFF
--   SDL_JACK                    (Wanted: OFF): OFF
--   SDL_JACK_SHARED             (Wanted: OFF): OFF
--   SDL_KMSDRM                  (Wanted: OFF): OFF
--   SDL_KMSDRM_SHARED           (Wanted: OFF): OFF
--   SDL_LASX                    (Wanted: OFF): OFF
--   SDL_LIBC                    (Wanted: ON): ON
--   SDL_LIBICONV                (Wanted: OFF): OFF
--   SDL_LIBUDEV                 (Wanted: ON): ON
--   SDL_LIBURING                (Wanted: ON): OFF
--   SDL_LSX                     (Wanted: OFF): OFF
--   SDL_METAL                   (Wanted: OFF): OFF
--   SDL_MMX                     (Wanted: OFF): OFF
--   SDL_OFFSCREEN               (Wanted: ON): ON
--   SDL_OPENGL                  (Wanted: OFF): OFF
--   SDL_OPENGLES                (Wanted: OFF): OFF
--   SDL_OPENVR                  (Wanted: OFF): OFF
--   SDL_OSS                     (Wanted: OFF): OFF
--   SDL_PIPEWIRE                (Wanted: ON): OFF
--   SDL_PIPEWIRE_SHARED         (Wanted: OFF): OFF
--   SDL_PTHREADS                (Wanted: ON): ON
--   SDL_PTHREADS_SEM            (Wanted: ON): ON
--   SDL_PULSEAUDIO              (Wanted: ON): ON
--   SDL_PULSEAUDIO_SHARED       (Wanted: ON): ON
--   SDL_RENDER_D3D              (Wanted: OFF): OFF
--   SDL_RENDER_D3D11            (Wanted: OFF): OFF
--   SDL_RENDER_D3D12            (Wanted: OFF): OFF
--   SDL_RENDER_GPU              (Wanted: ON): ON
--   SDL_RENDER_METAL            (Wanted: ON): OFF
--   SDL_RENDER_VULKAN           (Wanted: OFF): OFF
--   SDL_ROCKCHIP                (Wanted: ON): OFF
--   SDL_RPATH                   (Wanted: OFF): OFF
--   SDL_RPI                     (Wanted: OFF): OFF
--   SDL_SNDIO                   (Wanted: OFF): OFF
--   SDL_SNDIO_SHARED            (Wanted: OFF): OFF
--   SDL_SSE                     (Wanted: OFF): OFF
--   SDL_SSE2                    (Wanted: OFF): OFF
--   SDL_SSE3                    (Wanted: OFF): OFF
--   SDL_SSE4_1                  (Wanted: OFF): OFF
--   SDL_SSE4_2                  (Wanted: OFF): OFF
--   SDL_SYSTEM_ICONV            (Wanted: ON): ON
--   SDL_TESTS                   (Wanted: OFF): OFF
--   SDL_TESTS_LINK_SHARED       (Wanted: ON): OFF
--   SDL_UNINSTALL               (Wanted: ON): OFF
--   SDL_VIRTUAL_JOYSTICK        (Wanted: ON): ON
--   SDL_VIVANTE                 (Wanted: OFF): OFF
--   SDL_VULKAN                  (Wanted: OFF): OFF
--   SDL_WASAPI                  (Wanted: OFF): OFF
--   SDL_WAYLAND                 (Wanted: OFF): OFF
--   SDL_WAYLAND_LIBDECOR        (Wanted: OFF): OFF
--   SDL_WAYLAND_LIBDECOR_SHARED (Wanted: OFF): OFF
--   SDL_WAYLAND_SHARED          (Wanted: OFF): OFF
--   SDL_X11                     (Wanted: OFF): OFF
--   SDL_X11_SHARED              (Wanted: OFF): OFF
--   SDL_X11_XCURSOR             (Wanted: OFF): OFF
--   SDL_X11_XDBE                (Wanted: OFF): OFF
--   SDL_X11_XFIXES              (Wanted: OFF): OFF
--   SDL_X11_XINPUT              (Wanted: OFF): OFF
--   SDL_X11_XRANDR              (Wanted: OFF): OFF
--   SDL_X11_XSCRNSAVER          (Wanted: OFF): OFF
--   SDL_X11_XSHAPE              (Wanted: OFF): OFF
--   SDL_X11_XSYNC               (Wanted: OFF): OFF
--   SDL_XINPUT                  (Wanted: OFF): OFF

--
-- Build Shared Library: ON
-- Build Static Library: OFF
--
-- If something was not detected, although the libraries -- were installed, then make sure you have set the
-- CMAKE_C_FLAGS and CMAKE_PREFIX_PATH CMake variables correctly. --
CMake Error at cmake/macros.cmake:382 (message):
SDL could not find X11 or Wayland development libraries on your
system.
This means SDL will not be able to create windows on a typical unix operating system. Most likely, this is not wanted.

On Linux, install the packages listed at

<https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md#build-dependencies>

If you really don't need desktop windows, the documentation tells
you how
to skip this check.

<https://github.com/libsdl-org/SDL/blob/main/docs/README-cmake.md#cmake-fails-to-build-without-x11-or-wayland-support>

Call Stack (most recent call first):
CMakeLists.txt:3799 (SDL_PrintSummary)

which might be caused by _both_ x11 and wayland missing in DISTRO_FEATURES and we should probably add features_check inherit to make sure at least one of them is available.

libsdl2-compat (in build where libsdl3 didn't fail) failed with:

-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OpenGL)
CMake Error at TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/libsdl2-compat/2.32.52/recipe-sysroot-native/usr/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):

TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/libsdl2-compat/2.32.52/recipe-sysroot-native/usr/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)

TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/libsdl2-compat/2.32.52/recipe-sysroot-native/usr/share/cmake-3.31/Modules/FindX11.cmake:676 (find_package_handle_standard_args)
test/CMakeLists.txt:118 (find_package)

I'll check what went wrong and send patches, this is just FYI.

Cheers,

Quoted 56 lines · On Thu, Mar 13, 2025 at 1:41 PM Markus Volk via lists.openembedded.org…

v2: remove directfb from PACKAGECONFIG

On Thu, Mar 13 2025 at 13:03:40 +01:00:00, Markus Volk
<[email protected] <mailto:[email protected]>> wrote:

<mailto:[email protected]>> --- .../recipes-graphics/libsdl3/libsdl3_3.2.8.bb | 83
+++++++++++++++++++ 1 file changed, 83 insertions(+) create mode
100644 meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb diff --git a/meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb b/meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb new file mode 100644 index 0000000000..9c4fa317a2 --- /dev/null +++ b/meta-oe/recipes-graphics/libsdl3/libsdl3_3.2.8.bb @@ -0,0 +1,83 @@ +SUMMARY = "Simple DirectMedia Layer" +DESCRIPTION = "Simple
DirectMedia Layer is a cross-platform multimedia \ +library designed to provide low level access to audio, keyboard, mouse, \ +joystick, 3D hardware via OpenGL, and 2D video framebuffer." +HOMEPAGE = "http://www.libsdl.org" +BUGTRACKER = "http://bugzilla.libsdl.org/"
+ +SECTION = "libs" + +LICENSE = "Zlib & BSD-2-Clause"
+LIC_FILES_CHKSUM = "\ +
file://LICENSE.txt;md5=cbf0e3161523f9a9315b6b915c5c4457 \ + file://src/hidapi/LICENSE.txt;md5=7c3949a631240cb6c31c50f3eb696077 \
+
file://src/hidapi/LICENSE-bsd.txt;md5=b5fa085ce0926bb50d0621620a82361f \ + file://src/video/yuv2rgb/LICENSE;md5=79f8f3418d91531e05f0fc94ca67e071 \ +" + +# arm-neon adds MIT license +LICENSE:append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', '& MIT', '', d)}" +LIC_FILES_CHKSUM:append = " ${@bb.utils.contains('PACKAGECONFIG',
'arm-neon', 'file://src/video/arm/pixman-arm-neon-asm.h;md5=9a9cc1e51abbf1da58f4d9528ec9d49b;beginline=1;endline=24', '', d)}" + +PROVIDES = "virtual/libsdl3" + +SRC_URI = "http://www.libsdl.org/release/SDL3-${PV}.tar.gz" + +S = "${WORKDIR}/SDL3-${PV}" + +SRC_URI[sha256sum] = "13388fabb361de768ecdf2b65e52bb27d1054cae6ccb6942ba926e378e00db03" + +inherit cmake lib_package binconfig-disabled pkgconfig
upstream-version-is-even + +CVE_PRODUCT = "simple_directmedia_layer sdl" + +EXTRA_OECMAKE = " \ + -DSDL_OSS_DEFAULT=OFF \ +

(quoted diff) +0 -6
-DSDL_DISKAUDIO=OFF \ + -DSDL_DUMMYVIDEO=OFF \ + -DSDL_RPI=OFF \ + 
-DSDL_PTHREADS=ON \ + -DSDL_RPATH=OFF \ + -DSDL_SNDIO=OFF \ + 
-DSDL_X11_XCURSOR=OFF \ + -DSDL_X11_XDBE=OFF \ + 
-DSDL_X11_XFIXES=OFF \ + -DSDL_X11_XINPUT=OFF \ + 
-DSDL_X11_XRANDR=OFF \ + -DSDL_X11_XSCRNSAVER=OFF \ + 
-DSDL_X11_XSHAPE=OFF \ +" + +# opengl packageconfig factored out to 

make it easy for distros +# and BSP layers to pick either (desktop) opengl, gles2, or no GL +PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" +

(quoted diff) +2 -0
+PACKAGECONFIG:class-native = "x11 ${PACKAGECONFIG_GL}" 
+PACKAGECONFIG:class-nativesdk = 

"${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${PACKAGECONFIG_GL}" +PACKAGECONFIG ??= " \ + ${PACKAGECONFIG_GL} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio pipewire
x11 vulkan', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \ + ${@bb.utils.contains("TUNE_FEATURES", "neon","arm-neon","",d)} \ +"

(quoted diff) +3 -0
+PACKAGECONFIG[alsa] = "-DSDL_ALSA=ON,-DSDL_ALSA=OFF,alsa-lib," 
+PACKAGECONFIG[arm-neon] = "-DSDL_ARMNEON=ON,-DSDL_ARMNEON=OFF" 
+PACKAGECONFIG[gles2] = 

"-DSDL_OPENGLES=ON,-DSDL_OPENGLES=OFF,virtual/libgles2"

(quoted diff) +2 -0
+PACKAGECONFIG[jack] = "-DSDL_JACK=ON,-DSDL_JACK=OFF,jack" 
+PACKAGECONFIG[kmsdrm] = "-DSDL_KMSDRM=ON,-DSDL_KMSDRM=OFF,libdrm 

virtual/libgbm" +# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers, +# so we'll just use libusb when it's available. +PACKAGECONFIG[libusb] = "-DSDL_HIDAPI_LIBUSB=ON,-DSDL_HIDAPI_LIBUSB=OFF,libusb1" +PACKAGECONFIG[libdecor] =
"-DSDL_WAYLAND_LIBDECOR=ON,-DSDL_WAYLAND_LIBDECOR=OFF,libdecor,libdecor"
+PACKAGECONFIG[opengl] =
"-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl"
+PACKAGECONFIG[pipewire] =
"-DSDL_PIPEWIRE_SHARED=ON,-DSDL_PIPEWIRE_SHARED=OFF,pipewire"
+PACKAGECONFIG[pulseaudio] =
"-DSDL_PULSEAUDIO=ON,-DSDL_PULSEAUDIO=OFF,pulseaudio"

(quoted diff) +2 -1
+PACKAGECONFIG[vulkan] = "-DSDL_VULKAN=ON 
-DSDL_RENDER_VULKAN=ON,-DSDL_VULKAN=OFF -DSDL_RENDER_VULKAN=OFF" 
+PACKAGECONFIG[wayland] = 

"-DSDL_WAYLAND=ON,-DSDL_WAYLAND=OFF,wayland-native wayland wayland-protocols libxkbcommon" +PACKAGECONFIG[x11] = "-DSDL_X11=ON,-DSDL_X11=OFF,virtual/libx11 libxext libxrandr libxrender" + +CFLAGS:append:class-native = " -DNO_SHARED_MEMORY" +

Review

Quoted 4 lines
(quoted diff) +2 -0
+FILES:${PN} += "${datadir}/licenses/SDL3/LICENSE.txt" + 
+BBCLASSEXTEND = "native nativesdk"
 --
 2.48.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#116024): <https://lists.openembedded.org/g/openembedded-devel/message/116024>
Mute This Topic: <https://lists.openembedded.org/mt/111678038/3618223>
Group Owner: [email protected] <mailto:[email protected]>
Unsubscribe: <https://lists.openembedded.org/g/openembedded-devel/unsub> [[email protected] <mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Thank you Markus, you're faster than me, will include both your fixes for next world build, but LGTM.

Quoted 14 lines · Markus Volk via lists.openembedded.org

For libsdl2-compat it looks like at least currently x11 (and also opengl) is required:
https://github.com/libsdl-org/sdl2-compat/blob/4453e2d05881c3616af8ca71f7c4267c60f993d8/src/sdl2_compat.h#L1279

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#116027): https://lists.openembedded.org/g/openembedded-devel/message/116027
Mute This Topic: https://lists.openembedded.org/mt/111678038/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-