From c55dc3a8f13050123bc63479c5a3159601c240a0 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Sat, 26 Nov 2022 12:31:48 +0100 Subject: libsdl2: update 2.24.2 -> 2.26.0 - add PACKAGECONFIG for libdecor - add PACKAGECONFIG for pipewire - remove native patch, CMakeLists.txt has been reworked, still needed ? In addition to lots of bug fixes, here are the major changes in this release: General: Updated OpenGL headers to the latest API from The Khronos Group Inc. Added SDL_GetWindowSizeInPixels() to get the window size in pixels, which may differ from the window coordinate size for windows with high-DPI support Added simulated vsync synchronization for the software renderer Added the mouse position to SDL_MouseWheelEvent Added SDL_ResetHints() to reset all hints to their default values Added SDL_GetJoystickGUIDInfo() to get device information encoded in a joystick GUID Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 to control whether the HIDAPI driver for XBox 360 controllers should be used Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED to control whether the player LEDs should be lit to indicate which player is associated with an Xbox 360 controller Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS to control whether the HIDAPI driver for XBox 360 wireless controllers should be used Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE to control whether the HIDAPI driver for XBox One controllers should be used Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED to control the brightness of the XBox One guide button LED Added support for PS3 controllers to the HIDAPI driver, enabled by default on macOS, controlled by the SDL_HINT_JOYSTICK_HIDAPI_PS3 hint Added support for Nintendo Wii controllers to the HIDAPI driver, not enabled by default, controlled by the SDL_HINT_JOYSTICK_HIDAPI_WII hint Added the hint SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED to control whether the player LED should be lit on the Nintendo Wii controllers Added the hint SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS to control whether Nintendo Switch Joy-Con controllers will be in vertical mode when using the HIDAPI driver Added access to the individual left and right gyro sensors of the combined Joy-Cons controller Added a microsecond timestamp to SDL_SensorEvent and SDL_ControllerSensorEvent, when the hardware provides that information Added SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp() to retrieve the last sensor data with the associated microsecond timestamp Added the hint SDL_HINT_HIDAPI_IGNORE_DEVICES to have the SDL HID API ignore specific devices SDL_GetRevision() now includes more information about the SDL build, including the git commit hash if available Windows: Added the hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether the system mouse acceleration curve is used for relative mouse motion macOS: Implemented vsync synchronization on macOS 12 Linux: Added SDL_SetPrimarySelectionText(), SDL_GetPrimarySelectionText(), and SDL_HasPrimarySelectionText() to interact with the X11 primary selection clipboard Added the hint SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP to control whether mouse pointer warp emulation is enabled under Wayland Android: Enabled IME soft keyboard input Added version checking to make sure the SDL Java and C code are compatible Signed-off-by: Markus Volk Signed-off-by: Alexandre Belloni --- ...unwind-in-native-OE-builds-by-not-looking.patch | 36 --------- meta/recipes-graphics/libsdl2/libsdl2_2.24.2.bb | 85 ---------------------- meta/recipes-graphics/libsdl2/libsdl2_2.26.0.bb | 85 ++++++++++++++++++++++ 3 files changed, 85 insertions(+), 121 deletions(-) delete mode 100644 meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch delete mode 100644 meta/recipes-graphics/libsdl2/libsdl2_2.24.2.bb create mode 100644 meta/recipes-graphics/libsdl2/libsdl2_2.26.0.bb (limited to 'meta') diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch deleted file mode 100644 index f34b870e74..0000000000 --- a/meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 77093de6a12c24a60fc447698900d18d0a3943af Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani -Date: Fri, 18 Mar 2022 12:06:23 +0100 -Subject: [PATCH] Disable libunwind in native OE builds by not looking for - libunwind - -This is a workaround for this build error: - -| -- Checking for one of the modules 'libunwind' -| CMake Error at [...]/build/tmp/work/x86_64-linux/libsdl2-native/2.0.20-r0/recipe-sysroot-native/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:890 (message): -| None of the required 'libunwind' found -| Call Stack (most recent call first): -| CMakeLists.txt:1367 (pkg_search_module) - -By not looking for the libunwind header, the rest of the libunwind -specific bits in the CMake build script are disabled. - -Upstream-Status: Inappropriate [OE specific] - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7617205..d9b1522 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -952,7 +952,7 @@ if(SDL_LIBC) - check_include_file(sys/types.h HAVE_SYS_TYPES_H) - foreach(_HEADER - stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h limits.h float.h -- strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h libunwind.h) -+ strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h) - string(TOUPPER "HAVE_${_HEADER}" _UPPER) - string(REPLACE "." "_" _HAVE_H ${_UPPER}) - check_include_file("${_HEADER}" ${_HAVE_H}) diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.24.2.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.24.2.bb deleted file mode 100644 index ce5a8aa8f2..0000000000 --- a/meta/recipes-graphics/libsdl2/libsdl2_2.24.2.bb +++ /dev/null @@ -1,85 +0,0 @@ -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=68a088513da90254b2fbe664f42af315 \ - 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/libsdl2" - -SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ - " -SRC_URI:append:class-native = " file://0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch" - -S = "${WORKDIR}/SDL2-${PV}" - -SRC_URI[sha256sum] = "b35ef0a802b09d90ed3add0dcac0e95820804202914f5bb7b0feb710f1a1329f" - -inherit cmake lib_package binconfig-disabled pkgconfig upstream-version-is-even - -BINCONFIG = "${bindir}/sdl2-config" - -CVE_PRODUCT = "simple_directmedia_layer sdl" - -EXTRA_OECMAKE = "-DSDL_OSS=OFF -DSDL_ESD=OFF -DSDL_ARTS=OFF \ - -DSDL_DISKAUDIO=OFF -DSDL_NAS=OFF -DSDL_ESD_SHARED=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 directfb pulseaudio 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[directfb] = "-DSDL_DIRECTFB=ON,-DSDL_DIRECTFB=OFF,directfb,directfb" -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] = ",,libusb1" -PACKAGECONFIG[opengl] = "-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl" -PACKAGECONFIG[pulseaudio] = "-DSDL_PULSEAUDIO=ON,-DSDL_PULSEAUDIO=OFF,pulseaudio" -PACKAGECONFIG[vulkan] = "-DSDL_VULKAN=ON,-DSDL_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/SDL2/LICENSE.txt" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.26.0.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.26.0.bb new file mode 100644 index 0000000000..3dda082593 --- /dev/null +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.26.0.bb @@ -0,0 +1,85 @@ +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=68a088513da90254b2fbe664f42af315 \ + 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/libsdl2" + +SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz" + +S = "${WORKDIR}/SDL2-${PV}" + +SRC_URI[sha256sum] = "8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295" + +inherit cmake lib_package binconfig-disabled pkgconfig upstream-version-is-even + +BINCONFIG = "${bindir}/sdl2-config" + +CVE_PRODUCT = "simple_directmedia_layer sdl" + +EXTRA_OECMAKE = "-DSDL_OSS=OFF -DSDL_ESD=OFF -DSDL_ARTS=OFF \ + -DSDL_DISKAUDIO=OFF -DSDL_NAS=OFF -DSDL_ESD_SHARED=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 directfb 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[directfb] = "-DSDL_DIRECTFB=ON,-DSDL_DIRECTFB=OFF,directfb,directfb" +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] = ",,libusb1" +PACKAGECONFIG[libdecor] = "-DSDL_WAYLAND_LIBDECOR=ON,-DSDL_WAYLAND_LIBDECOR=OFF,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_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/SDL2/LICENSE.txt" + +BBCLASSEXTEND = "native nativesdk" -- cgit 1.2.3-korg