Skip to content

Commit 862cd3d

Browse files
authored
Upgrade SDL2 to version 2.30.9 (microsoft#12894)
1 parent 8e56833 commit 862cd3d

File tree

6 files changed

+49
-115
lines changed

6 files changed

+49
-115
lines changed

SPECS-EXTENDED/SDL2/SDL2-2.0.22-prefer-wayland.patch

Lines changed: 0 additions & 81 deletions
This file was deleted.

SPECS-EXTENDED/SDL2/SDL2-2.0.9-khrplatform.patch

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff -up ./src/video/SDL_video.c.prefer-wayland ./src/video/SDL_video.c
2+
--- ./src/video/SDL_video.c.prefer-wayland 2024-03-25 11:11:50.474311044 +1000
3+
+++ ./src/video/SDL_video.c 2024-03-25 11:40:04.785892199 +1000
4+
@@ -69,12 +69,12 @@ static VideoBootStrap *bootstrap[] = {
5+
#ifdef SDL_VIDEO_DRIVER_COCOA
6+
&COCOA_bootstrap,
7+
#endif
8+
-#ifdef SDL_VIDEO_DRIVER_X11
9+
- &X11_bootstrap,
10+
-#endif
11+
#ifdef SDL_VIDEO_DRIVER_WAYLAND
12+
&Wayland_bootstrap,
13+
#endif
14+
+#ifdef SDL_VIDEO_DRIVER_X11
15+
+ &X11_bootstrap,
16+
+#endif
17+
#ifdef SDL_VIDEO_DRIVER_VIVANTE
18+
&VIVANTE_bootstrap,
19+
#endif

SPECS-EXTENDED/SDL2/SDL2.signatures.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Signatures": {
3-
"SDL2-2.24.0.tar.gz": "91e4c34b1768f92d399b078e171448c6af18cafda743987ed2064a28954d6d97",
3+
"SDL2-2.30.9.tar.gz": "24b574f71c87a763f50704bbb630cbe38298d544a1f890f099a4696b1d6beba4",
44
"SDL_config.h": "6805453d2b12b0713a827c54dd4ff823ca73df055e6c074dc5300ff1a8b1d2b9",
55
"SDL_revision.h": "ca24e457ea25247aa940034e8a2d28922485b279932a2074e15ff83456ed2d4e"
66
}

SPECS-EXTENDED/SDL2/SDL2.spec

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
%bcond_with jack
2-
Summary: Cross-platform multimedia library
32
Name: 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
76
Vendor: Microsoft Corporation
87
Distribution: Azure Linux
8+
License: Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
99
URL: https://www.libsdl.org/
1010
Source0: https://www.libsdl.org/release/%{name}-%{version}.tar.gz
1111
Source1: SDL_config.h
1212
Source2: SDL_revision.h
13+
1314
Patch0: 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+
1818
BuildRequires: git-core
1919
BuildRequires: cmake
2020
BuildRequires: make
@@ -30,7 +30,8 @@ BuildRequires: libX11-devel
3030
BuildRequires: libXi-devel
3131
BuildRequires: libXrandr-devel
3232
BuildRequires: libXrender-devel
33-
BuildRequires: libXScrnSaver-devel
33+
# While SDL2 supports this, Xwayland does not expose XScrnSaver.
34+
# BuildRequires: libXScrnSaver-devel
3435
BuildRequires: libXinerama-devel
3536
BuildRequires: libXcursor-devel
3637
BuildRequires: systemd-devel
@@ -67,9 +68,9 @@ to provide fast access to the graphics frame buffer and audio device.
6768
%package devel
6869
Summary: Files needed to develop Simple DirectMedia Layer applications
6970
Requires: %{name}%{?_isa} = %{version}-%{release}
70-
Requires: libX11-devel%{?_isa}
7171
Requires: mesa-libEGL-devel%{?_isa}
7272
Requires: mesa-libGLES-devel%{?_isa}
73+
Requires: libX11-devel%{?_isa}
7374
# Conflict with versions before libSDLmain moved here
7475
Conflicts: %{name}-static < 2.0.18-4
7576

@@ -90,14 +91,16 @@ Conflicts: %{name}-devel < 2.0.18-4
9091
Static libraries for SDL2.
9192

9293
%prep
93-
%autosetup -p1 -n %{name}-%{version}
94+
%autosetup -S git
95+
#autopatch 0
9496
sed -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...
98100
export 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

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27694,8 +27694,8 @@
2769427694
"type": "other",
2769527695
"other": {
2769627696
"name": "SDL2",
27697-
"version": "2.24.0",
27698-
"downloadUrl": "https://www.libsdl.org/release/SDL2-2.24.0.tar.gz"
27697+
"version": "2.30.9",
27698+
"downloadUrl": "https://www.libsdl.org/release/SDL2-2.30.9.tar.gz"
2769927699
}
2770027700
}
2770127701
},

0 commit comments

Comments
 (0)