From 1b663e75553d7cf9b7405864598038b2688c0a5f Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 10 Jun 2026 00:27:11 +0100 Subject: [PATCH] sdl2: drop standalone SDL2 in favour of sdl2-compat The SDL2 library is now provided by the sdl2-compat package built on top of SDL3, so the standalone SDL2 2.32.x package is no longer needed. Signed-off-by: Daniel Golle --- libs/sdl2/Makefile | 157 ------------------ ...ix-segfault-in-Wayland_DestroyWindow.patch | 20 --- .../sdl2/patches/110-tests-no-libunwind.patch | 10 -- ...0-tests-install-resources-to-datadir.patch | 24 --- 4 files changed, 211 deletions(-) delete mode 100644 libs/sdl2/Makefile delete mode 100644 libs/sdl2/patches/100-fix-segfault-in-Wayland_DestroyWindow.patch delete mode 100644 libs/sdl2/patches/110-tests-no-libunwind.patch delete mode 100644 libs/sdl2/patches/120-tests-install-resources-to-datadir.patch diff --git a/libs/sdl2/Makefile b/libs/sdl2/Makefile deleted file mode 100644 index 6f3e699..0000000 --- a/libs/sdl2/Makefile +++ /dev/null @@ -1,157 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=sdl2 -PKG_VERSION:=2.32.10 -PKG_RELEASE:=1 - -PKG_SOURCE:=SDL2-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://www.libsdl.org/release/ -PKG_HASH:=5f5993c530f084535c65a6879e9b26ad441169b3e25d789d83287040a9ca5165 - -PKG_BUILD_DIR:=$(BUILD_DIR)/SDL2-$(PKG_VERSION) - -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=BSD-3c -PKG_LICENSE_FILES:=COPYING LICENSE - -CMAKE_INSTALL:=1 -PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libsdl2-tests - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -CMAKE_BINARY_SUBDIR:=openwrt-build - -CMAKE_OPTIONS += \ - -DSDL_ALSA=ON \ - -DSDL_ALSA_SHARED=ON \ - -DSDL_ARTS=OFF \ - -DSDL_ARTS_SHARED=OFF \ - -DSDL_ASAN=OFF \ - -DSDL_BACKGROUNDING_SIGNAL=OFF \ - -DSDL_CCACHE=OFF \ - -DSDL_CLOCK_GETTIME=ON \ - -DSDL_COCOA=OFF \ - -DSDL_DBUS=OFF \ - -DSDL_DIRECTFB=OFF \ - -DSDL_DIRECTFB_SHARED=OFF \ - -DSDL_DIRECTX=OFF \ - -DSDL_DISKAUDIO=OFF \ - -DSDL_DUMMYAUDIO=ON \ - -DSDL_DUMMYVIDEO=ON \ - -DSDL_ESD=OFF \ - -DSDL_ESD_SHARED=OFF \ - -DSDL_FOREGROUNDING_SIGNAL=OFF \ - -DSDL_FUSIONSOUND=OFF \ - -DSDL_FUSIONSOUND_SHARED=OFF \ - -DSDL_GCC_ATOMICS=ON \ - -DSDL_HIDAPI=ON \ - -DSDL_HIDAPI_JOYSTICK=ON \ - -DSDL_HIDAPI_LIBUSB=ON \ - -DSDL_IBUS=OFF \ - -DSDL_JACK=OFF \ - -DSDL_JACK_SHARED=OFF \ - -DSDL_KMSDRM=ON \ - -DSDL_KMSDRM_SHARED=ON \ - -DSDL_LASX=OFF \ - -DSDL_LIBC=ON \ - -DSDL_LIBICONV=OFF \ - -DSDL_LIBSAMPLERATE=ON \ - -DSDL_LIBSAMPLERATE_SHARED=ON \ - -DSDL_LIBUDEV=ON \ - -DSDL_LSX=OFF \ - -DSDL_METAL=OFF \ - -DSDL_MMX=OFF \ - -DSDL_NAS=OFF \ - -DSDL_NAS_SHARED=OFF \ - -DSDL_OFFSCREEN=ON \ - -DSDL_OPENGL=ON \ - -DSDL_OPENGLES=ON \ - -DSDL_OSS=OFF \ - -DSDL_PIPEWIRE=OFF \ - -DSDL_PIPEWIRE_SHARED=OFF \ - -DSDL_PTHREADS=ON \ - -DSDL_PTHREADS_SEM=ON \ - -DSDL_PULSEAUDIO=ON \ - -DSDL_PULSEAUDIO_SHARED=ON \ - -DSDL_RENDER_D3D=OFF \ - -DSDL_RENDER_METAL=OFF \ - -DSDL_RPATH=OFF \ - -DSDL_RPI=OFF \ - -DSDL_SNDIO=OFF \ - -DSDL_SNDIO_SHARED=OFF \ - -DSDL_SYSTEM_ICONV=OFF \ - -DSDL_TESTS=$(if $(CONFIG_PACKAGE_libsdl2-tests),ON,OFF) \ - -DSDL_INSTALL_TESTS=$(if $(CONFIG_PACKAGE_libsdl2-tests),ON,OFF) \ - -DSDL_VENDOR_INFO=OFF \ - -DSDL_VIRTUAL_JOYSTICK=OFF \ - -DSDL_VIVANTE=OFF \ - -DSDL_VULKAN=ON \ - -DSDL_WASAPI=OFF \ - -DSDL_WAYLAND=ON \ - -DSDL_WAYLAND_LIBDECOR=OFF \ - -DSDL_WAYLAND_LIBDECOR_SHARED=OFF \ - -DSDL_WAYLAND_QT_TOUCH=ON \ - -DSDL_WAYLAND_SHARED=ON \ - -DSDL_X11=OFF \ - -DSDL_X11_SHARED=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 \ - -DSDL_XINPUT=OFF - -define Package/libsdl2 - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Simple DirectMedia Layer - URL:=https://www.libsdl.org - DEPENDS:=+libstdcpp +alsa-lib +libudev-zero +pulseaudio +libmesa +libsamplerate +libwayland +wayland-protocols -endef - -define Package/libsdl2/description - Simple DirectMedia Layer is a cross-platform development library designed to - provide low level access to audio, keyboard, mouse, joystick, and graphics - hardware via OpenGL and Direct3D. -endef - -define Build/InstallDev - $(call Build/InstallDev/cmake,$(1)) -ifdef CONFIG_DEBUG - $(LN) libSDL2d.so $(1)/usr/lib/libSDL2.so -endif -endef - -define Package/libsdl2/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL2*.so* $(1)/usr/lib -ifdef CONFIG_DEBUG - $(LN) libSDL2d.so $(1)/usr/lib/libSDL2.so -endif -endef - -define Package/libsdl2-tests - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Video - TITLE:=SDL installed tests - URL:=https://www.libsdl.org - DEPENDS:=+libsdl2 -endef - -define Package/libsdl2-tests/description - Various test programs to validate SDL is working correctly, and some benchmarks. -endef - -define Package/libsdl2-tests/install - $(INSTALL_DIR) $(1)/usr/libexec/installed-tests - $(CP) $(PKG_INSTALL_DIR)/usr/libexec/installed-tests/* $(1)/usr/libexec/installed-tests - $(INSTALL_DIR) $(1)/usr/share/installed-tests - $(CP) $(PKG_INSTALL_DIR)/usr/share/installed-tests/* $(1)/usr/share/installed-tests -endef - -$(eval $(call BuildPackage,libsdl2)) -$(eval $(call BuildPackage,libsdl2-tests)) diff --git a/libs/sdl2/patches/100-fix-segfault-in-Wayland_DestroyWindow.patch b/libs/sdl2/patches/100-fix-segfault-in-Wayland_DestroyWindow.patch deleted file mode 100644 index dcda488..0000000 --- a/libs/sdl2/patches/100-fix-segfault-in-Wayland_DestroyWindow.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/video/wayland/SDL_waylandwindow.c -+++ b/src/video/wayland/SDL_waylandwindow.c -@@ -2292,7 +2292,7 @@ void Wayland_DestroyWindow(_THIS, SDL_Wi - SDL_VideoData *data = _this->driverdata; - SDL_WindowData *wind = window->driverdata; - -- if (data) { -+ if (wind) { - #ifdef SDL_VIDEO_OPENGL_EGL - if (wind->egl_surface) { - SDL_EGL_DestroySurface(_this, wind->egl_surface); -@@ -2346,6 +2346,8 @@ void Wayland_DestroyWindow(_THIS, SDL_Wi - wl_surface_destroy(wind->surface); - - SDL_free(wind); -+ } -+ if (data) { - WAYLAND_wl_display_flush(data->display); - } - window->driverdata = NULL; diff --git a/libs/sdl2/patches/110-tests-no-libunwind.patch b/libs/sdl2/patches/110-tests-no-libunwind.patch deleted file mode 100644 index 0d39562..0000000 --- a/libs/sdl2/patches/110-tests-no-libunwind.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1642,7 +1642,6 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS - endif() - - endif() -- CheckLibUnwind() - - if(HAVE_DBUS_DBUS_H) - list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_dbus.c") diff --git a/libs/sdl2/patches/120-tests-install-resources-to-datadir.patch b/libs/sdl2/patches/120-tests-install-resources-to-datadir.patch deleted file mode 100644 index b8bedae..0000000 --- a/libs/sdl2/patches/120-tests-install-resources-to-datadir.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Daniel Golle -Subject: tests: install resource files to datadir, not libexecdir - -The .bmp / .hex / .txt / .dat / .wav files shipped alongside the test -binaries are not executables; they are read-only data. Installing them -under ${libexecdir}/installed-tests/SDL2/ is both inconsistent with the -GNOME installed-tests convention (data lives under ${datadir}, only -binaries under ${libexecdir}) and trips OpenWrt's package QA which -expects every regular file in /usr/libexec/ to carry the executable -bit. Move them to ${datadir}/installed-tests/SDL2/ alongside the -matching ${exe}.test descriptors, and pin the permissions to 0644 so -the umask of the build host cannot influence the installed mode. - ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -531,6 +531,7 @@ if(SDL_INSTALL_TESTS) - endif() - install( - FILES ${RESOURCE_FILES} -- DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/SDL2 -+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ -+ DESTINATION ${CMAKE_INSTALL_DATADIR}/installed-tests/SDL2 - ) - endif()