# # spec file for package sdl2-compat # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define lname libSDL2-2_0-0 %global _lto_cflags %_lto_cflags -ffat-lto-objects Name: sdl2-compat Version: 2.32.56 Release: 1.1 Summary: SDL-2.0 Compatibility Layer for Simple DirectMedia Layer 3.0 License: MIT Group: Development/Libraries/X11 URL: https://github.com/libsdl-org/sdl2-compat Source: https://github.com/libsdl-org/sdl2-compat/releases/download/release-%version/sdl2-compat-%version.tar.gz Source2: https://github.com/libsdl-org/sdl2-compat/releases/download/release-%version/sdl2-compat-%version.tar.gz.sig Source3: %name.keyring Source8: baselibs.conf Source9: %name-rpmlintrc Patch1: sdl2-symvers.patch BuildRequires: cmake BuildRequires: pkg-config BuildRequires: pkgconfig(sdl3) >= 3.2.12 %description This is the "Simple DirectMedia Layer" library built from sdl2-compat. it provides a binary and source compatible API for programs written against SDL 2.0, but it uses SDL 3.0 behind the scenes. %package -n %lname Summary: SDL-2.0 Compatibility Layer for Simple DirectMedia Layer 3.0 Group: System/Libraries Requires: libSDL3-0 >= 3.2.10 # "sdl2-compat 2.32.54: SDL3 library is too old (have 3.2.8, but # need at least 3.2.10). Segmentation fault (core dumped)" %description -n %lname This is the "Simple DirectMedia Layer" library built from sdl2-compat. it provides a binary and source compatible API for programs written against SDL 2.0, but it uses SDL 3.0 behind the scenes. %package devel Summary: Header and build system files for sdl2-compat Group: Development/Libraries/X11 Requires: %lname = %version Conflicts: SDL2-devel Provides: SDL2-devel = %version-%release # You should not add pkgconfig(x11) to sdl-devel; as far as SDL is concerned, it is optional. # (Think outputting to Wayland, KMSDRM, or null.) # https://github.com/libsdl-org/sdl2-compat/issues/405 %description devel This package contains files needed for development with the SDL2 library. %prep %autosetup -p1 %build %cmake %cmake_build %install b="%buildroot" %cmake_install rm -Rf "$b/%_datadir/licenses" # using %%license instead cd "$b/%_libdir/cmake/SDL2/" %if 0%{?suse_version} < 1600 # pkgconfig 0.x does not know "Provides" lines; work around it. ln -s sdl2-compat.pc "$b/%_libdir/pkgconfig/sdl2.pc" %endif %ldconfig_scriptlets -n %lname %files -n %lname %license LICENSE.txt %_libdir/libSDL2-2.0.so.* %files devel %_bindir/sdl2-config %_includedir/SDL2/ %_libdir/*SDL2*.a %_libdir/*.so %_libdir/cmake/ %_libdir/pkgconfig/*.pc %_datadir/aclocal/ %changelog * Mon May 5 2025 Jan Engelhardt - Update to release 2.32.56 * Fixed rendering in Mesen2 * Fixed brightness in ioquake3 * Fixed a hang at launch in the xemu emulator * Fixed crackling and sped up audio in OpenRCT2 * Fixed fullscreen window positioning on Wayland with multiple displays * Key events are now sent for dead keys on X11 * Fixed mouse wheel integer scrolling values * Fixed a double-free when working with RLE surfaces * Fixed a memory leak in SDL_LockTextureToSurface() * Fixed sending SDL3 controller events to SDL2 applications * Mon Mar 31 2025 Jan Engelhardt - Update to release 2.32.54 * Fixed crash during controller hotplug in RetroArch * Improved accuracy of SDL_GetRenderDriverInfo() * Fixed SDL_SetWindowInputFocus() return value - Delete 0001-cmake-install-sdl2-config-.cmake-files.patch (merged) * Sun Mar 30 2025 Jan Engelhardt - Add workarounds for Leap 15's not-so-capable pkg-config. * Wed Mar 12 2025 Jan Engelhardt - Delete pc.patch (rejected upstream) - Add 0001-cmake-install-sdl2-config-.cmake-files.patch * Mon Mar 10 2025 Jan Engelhardt - Delete self-conflicts * Sun Mar 9 2025 Jan Engelhardt - Add sdl2-symvers.patch to match our (non-compat) SDL2 package - Add pc.patch * Sun Mar 2 2025 Jan Engelhardt - Update to release 2.32.52 * Fixed tiny scaled window in recent versions of Wesnoth * Fixed a rare deadlock when opening an audio device using PipeWire on Linux * Fixed sound cutting out while using Kdenlive * Fixed controller input in D2X-Rebirth * Sat Feb 8 2025 Jan Engelhardt - Update to release 2.32.50 * Audio devices can be enumerated at startup and have names matching SDL2 conventions * Fri Feb 7 2025 Jan Engelhardt - Update to relesae 2.30.54 * Fixed the mouse wheel in Torchlight * Fixed double-free if SDL RLE encodes a surface during blit * Fixed SDL_ConvertSurface() returning NULL in Dwarf Fortress * Fixed a crash if you call SDL_FreeSurface() on a surface returned from SDL_GetWindowSurface() * Fixed SDL_WINDOW_ALWAYS_ON_TOP * Fixed garbled audio if format conversion was needed * Fixed D-Pad not working on some controllers * Fixed return value of SDL_WasInit(SDL_INIT_TIMER) * Fixed build errors when building some SDL2 applications using sdl2-compat headers * Fixed several memory leaks * Sun Feb 2 2025 Jan Engelhardt - Update to release 2.30.52 * Fixed a black screen in some applications, including Source 1 games * Fixed loud garbled audio in some applications, including Source 1 games and DOSBox * Fixed audio crackling and potential related crashing in some applications, including vkQuake * Fixed opening the main window in ffplay * Fixed fullscreen window size when running some games like Meat Boy on Wayland with fractional scaling enabled * Fixed keyboard input in Super Meat Boy * Fixed mouse motion while the mouse is grabbed * Fixed a crash in AntimicroX * Fixed building applications that expect SDL to provide standard C headers * Added support for the original Torchlight on Linux, which shipped using a pre-release SDL 2.0 library * Thu Jan 30 2025 Jan Engelhardt - Update to release 2.30.51 * Enable text input by default on desktop platform * Enable render batching if a specific renderer has not been requested * Fixed a memory leak * Wed Jan 22 2025 Jan Engelhardt - Update to release 2.30.50 * Added PS4/PS5 rumble hints that were renamed in SDL3 * hints: Add SDL_VIDEO_GL_DRIVER and SDL_VIDEO_EGL_DRIVER to renamed_hints * Tue Nov 19 2024 Jan Engelhardt - Initial package (version 2.30.50~40/commit ad5dab0f748) for build.opensuse.org