11%bcond_with jack
2- Summary: Cross-platform multimedia library
32Name: SDL2
4- Version: 2.24.0
5- Release: 2 %{?dist }
6- License : zlib AND MIT
3+ Version: 2.30.9
4+ Release: 1 %{?dist }
5+ Summary : Cross-platform multimedia library
76Vendor: Microsoft Corporation
87Distribution: Azure Linux
8+ License: Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT )
99URL: https://www.libsdl.org/
1010Source0: https://www.libsdl.org/release/%{name }-%{version }.tar.gz
1111Source1: SDL_config.h
1212Source2: SDL_revision.h
13+
1314Patch0: multilib.patch
14- # ptrdiff_t is not the same as khronos defines on 32bit arches
15- Patch1: SDL2-2.0.9-khrplatform.patch
1615# Prefer Wayland by default
17- Patch2: SDL2-2.0.22-prefer-wayland.patch
16+ Patch1: SDL2-2.30.1-prefer-wayland.patch
17+
1818BuildRequires: git-core
1919BuildRequires: cmake
2020BuildRequires: make
@@ -30,7 +30,8 @@ BuildRequires: libX11-devel
3030BuildRequires: libXi-devel
3131BuildRequires: libXrandr-devel
3232BuildRequires: libXrender-devel
33- BuildRequires: libXScrnSaver-devel
33+ # While SDL2 supports this, Xwayland does not expose XScrnSaver.
34+ # BuildRequires: libXScrnSaver-devel
3435BuildRequires: libXinerama-devel
3536BuildRequires: libXcursor-devel
3637BuildRequires: systemd-devel
@@ -67,9 +68,9 @@ to provide fast access to the graphics frame buffer and audio device.
6768%package devel
6869Summary: Files needed to develop Simple DirectMedia Layer applications
6970Requires: %{name }%{?_isa } = %{version }-%{release }
70- Requires: libX11 -devel%{?_isa }
7171Requires: mesa-libEGL-devel%{?_isa }
7272Requires: mesa-libGLES-devel%{?_isa }
73+ Requires: libX11 -devel%{?_isa }
7374# Conflict with versions before libSDLmain moved here
7475Conflicts: %{name }-static < 2.0.18-4
7576
@@ -90,14 +91,16 @@ Conflicts: %{name}-devel < 2.0.18-4
9091Static libraries for SDL2.
9192
9293%prep
93- %autosetup -p1 -n %{name }-%{version }
94+ %autosetup -S git
95+ #autopatch 0
9496sed -i -e ' s/\r//g' TODO.txt README.md WhatsNew.txt BUGS.txt LICENSE.txt CREDITS.txt README-SDL.txt
9597
9698%build
9799# Deal with new CMake policy around whitespace in LDFLAGS...
98100export LDFLAGS=" %{shrink:%{build_ldflags}}"
99101
100- mkdir -p buildDir
102+ mkdir -p build
103+ cd build
101104
102105%cmake \
103106 -DSDL_DLOPEN= ON \
@@ -109,7 +112,7 @@ mkdir -p buildDir
109112%if %{with jack }
110113 -DSDL_JACK_SHARED= ON \
111114%else
112- -DSDL_JACK = OFF \
115+ -DSDL_JACK_SHARED = ON \
113116%endif
114117 -DSDL_PIPEWIRE_SHARED= ON \
115118 -DSDL_ALSA= ON \
@@ -118,12 +121,15 @@ mkdir -p buildDir
118121 -DSDL_SSE3= OFF \
119122 -DSDL_RPATH= OFF \
120123 -DSDL_STATIC= ON \
121- -DSDL_STATIC_PIC= ON -B ./buildDir
124+ -DSDL_STATIC_PIC= ON \
125+ ..
122126
123- cmake --build buildDir %{? _smp_mflags } --verbose
127+ % cmake_build
124128
125129%install
126- DESTDIR=%{buildroot } cmake --install buildDir
130+ cd build
131+ %cmake_install
132+ cd ..
127133
128134# Rename SDL_config.h to SDL_config-<arch>.h to avoid file conflicts on
129135# multilib systems and install SDL_config.h wrapper
@@ -151,6 +157,7 @@ install -p -m 644 %{SOURCE2} %{buildroot}%{_includedir}/SDL2/SDL_revision.h
151157%{_libdir }/cmake/SDL2/SDL2Config* .cmake
152158%{_libdir }/cmake/SDL2/SDL2Targets* .cmake
153159%{_libdir }/cmake/SDL2/SDL2mainTargets* .cmake
160+ %{_libdir }/cmake/SDL2/sdlfind.cmake
154161%{_includedir }/SDL2
155162%{_datadir }/aclocal/*
156163%{_libdir }/libSDL2_test.a
@@ -162,7 +169,11 @@ install -p -m 644 %{SOURCE2} %{buildroot}%{_includedir}/SDL2/SDL_revision.h
162169%{_libdir }/cmake/SDL2/SDL2staticTargets* .cmake
163170
164171%changelog
165- *
Fri Nov 25 2022 Sumedh Sharma <[email protected] > -
2.24.0-2 172+ *
Tue Mar 11 2025 Jyoti kanase <[email protected] > -
2.30.9-1 173+ - Upgrade to 2.30.9
174+ - License Verified.
175+
176+ *
Fri Nov 25 2022 Sumedh Sharma <[email protected] > -
2.24.0-2 166177- Initial CBL-Mariner import from Fedora 37 (license: MIT)
167178- Build with feature disabled: jack
168179- License verified
0 commit comments