From 8558c5292af05f86bda1f3d880fe0694dda18577 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 5 May 2022 07:04:50 +0200 Subject: libsdl2: upgrade 2.0.20 -> 2.0.22 (From OE-Core rev: 047f05c7a641db4138cbf3b3ea965873fe75035c) Signed-off-by: Alexander Kanavin Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- ...unwind-in-native-OE-builds-by-not-looking.patch | 10 ++- ...make-pass-cflags-to-the-appropriate-cmake.patch | 46 ------------ ...tore-ability-to-disable-fb-accel-via-hint.patch | 36 ++++++++++ .../libsdl2/optional-libunwind-generic.patch | 18 ----- meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb | 83 ---------------------- meta/recipes-graphics/libsdl2/libsdl2_2.0.22.bb | 82 +++++++++++++++++++++ 6 files changed, 122 insertions(+), 153 deletions(-) delete mode 100644 meta/recipes-graphics/libsdl2/libsdl2/0001-sdlchecks.cmake-pass-cflags-to-the-appropriate-cmake.patch create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/0001-video-restore-ability-to-disable-fb-accel-via-hint.patch delete mode 100644 meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch delete mode 100644 meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb create mode 100644 meta/recipes-graphics/libsdl2/libsdl2_2.0.22.bb (limited to 'meta/recipes-graphics/libsdl2') 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 index 214664f621..57bc522393 100644 --- 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 @@ -1,4 +1,4 @@ -From 50c691e83f81b235bb96ef996dd4568ffaae256f Mon Sep 17 00:00:00 2001 +From 0234c546d86174fafe9ab280cf5f44de50b73676 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 @@ -16,15 +16,16 @@ 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 64f9fbf..12a4d8f 100644 +index 644715a..bbf2e28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -862,7 +862,7 @@ if(SDL_LIBC) +@@ -869,7 +869,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 @@ -33,6 +34,3 @@ index 64f9fbf..12a4d8f 100644 string(TOUPPER "HAVE_${_HEADER}" _UPPER) string(REPLACE "." "_" _HAVE_H ${_UPPER}) check_include_file("${_HEADER}" ${_HAVE_H}) --- -2.32.0 - diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-sdlchecks.cmake-pass-cflags-to-the-appropriate-cmake.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-sdlchecks.cmake-pass-cflags-to-the-appropriate-cmake.patch deleted file mode 100644 index e5d6cda0eb..0000000000 --- a/meta/recipes-graphics/libsdl2/libsdl2/0001-sdlchecks.cmake-pass-cflags-to-the-appropriate-cmake.patch +++ /dev/null @@ -1,46 +0,0 @@ -From dbf0a3f6ea77a1d5f5e3c4dec7a22fcc09a49537 Mon Sep 17 00:00:00 2001 -From: Max Krummenacher -Date: Mon, 10 Jan 2022 21:52:02 +0000 -Subject: [PATCH] cmake: sdlchecks.cmake: pass cflags to the appropriate cmake - variable - -If egl.pc sets at least two macros as the i.MX Vivante driver does, e.g.: -| Cflags: -I${includedir} -DLINUX -DWL_EGL_PLATFORM - -then we get the following error during configuration: - -| -- Performing Test HAVE_OPENGL_EGL -| CMake Error: Parse error in command line argument: WL_EGL_PLATFORM -| Should be: VAR:type=value - -If one changes to add a value to the macro, e.g. -| Cflags: -I${includedir} -DLINUX=1 -DWL_EGL_PLATFORM=1 -then cmake does not error out but the macro is not passed to the -C compiler. - -CMAKE_REQUIRED_FLAGS is the wrong variable to pass the CFLAGS in, -CMAKE_REQUIRED_DEFINITIONS should be used. - -Upstream-Status: Submitted [https://github.com/libsdl-org/SDL/pull/5209] -Signed-off-by: Max Krummenacher ---- - cmake/sdlchecks.cmake | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake -index 32be19c..f61b8df 100644 ---- a/cmake/sdlchecks.cmake -+++ b/cmake/sdlchecks.cmake -@@ -808,8 +808,7 @@ endmacro() - macro(CheckEGL) - if (SDL_OPENGL OR SDL_OPENGLES) - pkg_check_modules(EGL egl) -- string(REPLACE "-D_THREAD_SAFE;" "-D_THREAD_SAFE=1;" EGL_CFLAGS "${EGL_CFLAGS}") -- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${EGL_CFLAGS}") -+ set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} ${EGL_CFLAGS}") - check_c_source_compiles(" - #define EGL_API_FB - #define MESA_EGL_NO_X11_HEADERS --- -2.20.1 - diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-video-restore-ability-to-disable-fb-accel-via-hint.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-video-restore-ability-to-disable-fb-accel-via-hint.patch new file mode 100644 index 0000000000..fc74d30556 --- /dev/null +++ b/meta/recipes-graphics/libsdl2/libsdl2/0001-video-restore-ability-to-disable-fb-accel-via-hint.patch @@ -0,0 +1,36 @@ +From 14ad91658fd296e34bb9e833281e72c871bfb189 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 3 May 2022 12:31:50 +0200 +Subject: [PATCH] video: restore ability to disable fb accel via hint + +Somewhere in code refactoring between .20 and .22 this check +was lost, and so the hint had no effect anymore. + +Upstream-Status: Submitted [https://github.com/libsdl-org/SDL/pull/5611] +Signed-off-by: Alexander Kanavin +--- + src/video/SDL_video.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c +index 93c803e..cbe7616 100644 +--- a/src/video/SDL_video.c ++++ b/src/video/SDL_video.c +@@ -2503,6 +2503,14 @@ SDL_CreateWindowFramebuffer(SDL_Window * window) + if (!_this->checked_texture_framebuffer) { + SDL_bool attempt_texture_framebuffer = SDL_TRUE; + ++ /* See if the user or application wants to specifically disable the framebuffer */ ++ const char *hint = SDL_GetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION); ++ if (hint) { ++ if (*hint == '0' || SDL_strcasecmp(hint, "false") == 0) { ++ attempt_texture_framebuffer = SDL_FALSE; ++ } ++ } ++ + if (_this->is_dummy) { /* dummy driver never has GPU support, of course. */ + attempt_texture_framebuffer = SDL_FALSE; + } +-- +2.30.2 + diff --git a/meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch b/meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch deleted file mode 100644 index 757b99a5f6..0000000000 --- a/meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch +++ /dev/null @@ -1,18 +0,0 @@ -Do not error when libunwind-generic is not found, Not all -implementations of libunwind will provide this library therefore -do not make it hard error if its not found. - -Upstream-Status: Submitted [https://github.com/libsdl-org/SDL/pull/5194] -Signed-off-by: Khem Raj - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1358,7 +1358,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROI - if(HAVE_LIBUNWIND_H) - # We've already found the header, so REQUIRE the lib to be present - pkg_search_module(UNWIND REQUIRED libunwind) -- pkg_search_module(UNWIND_GENERIC REQUIRED libunwind-generic) -+ pkg_search_module(UNWIND_GENERIC libunwind-generic) - list(APPEND EXTRA_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES}) - endif() - endif() diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb deleted file mode 100644 index c1c827af79..0000000000 --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb +++ /dev/null @@ -1,83 +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 \ - file://optional-libunwind-generic.patch \ - file://0001-sdlchecks.cmake-pass-cflags-to-the-appropriate-cmake.patch \ - " -SRC_URI:append:class-native = " file://0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch" - -S = "${WORKDIR}/SDL2-${PV}" - -SRC_URI[sha256sum] = "c56aba1d7b5b0e7e999e4a7698c70b63a3394ff9704b5f6e1c57e0c16f04dd06" - -inherit cmake lib_package binconfig-disabled pkgconfig - -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_XVM=OFF \ - -DSDL_X11_XCURSOR=OFF \ - -DSDL_X11_XINERAMA=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', 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" -PACKAGECONFIG[opengl] = "-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl" -PACKAGECONFIG[pulseaudio] = "-DSDL_PULSEAUDIO=ON,-DSDL_PULSEAUDIO=OFF,pulseaudio" -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" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.22.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.22.bb new file mode 100644 index 0000000000..7678319770 --- /dev/null +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.22.bb @@ -0,0 +1,82 @@ +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 \ + file://0001-video-restore-ability-to-disable-fb-accel-via-hint.patch \ + " +SRC_URI:append:class-native = " file://0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch" + +S = "${WORKDIR}/SDL2-${PV}" + +SRC_URI[sha256sum] = "fe7cbf3127882e3fc7259a75a0cb585620272c51745d3852ab9dd87960697f2e" + +inherit cmake lib_package binconfig-disabled pkgconfig + +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_XVM=OFF \ + -DSDL_X11_XCURSOR=OFF \ + -DSDL_X11_XINERAMA=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', 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" +PACKAGECONFIG[opengl] = "-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl" +PACKAGECONFIG[pulseaudio] = "-DSDL_PULSEAUDIO=ON,-DSDL_PULSEAUDIO=OFF,pulseaudio" +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" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf