|
|
|
@ -1,32 +1,24 @@
|
|
|
|
|
# For the generated library symbol suffix
|
|
|
|
|
%if 0%{?__isa_bits} == 32
|
|
|
|
|
%global libsymbolsuffix %{nil}
|
|
|
|
|
%else
|
|
|
|
|
%global libsymbolsuffix ()(%{__isa_bits}bit)
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# For declaring rich dependency on libdecor
|
|
|
|
|
%global libdecor_majver 0
|
|
|
|
|
|
|
|
|
|
Name: SDL2
|
|
|
|
|
Version: 2.26.0
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Version: 2.0.10
|
|
|
|
|
Release: 2%{?dist}.inferit
|
|
|
|
|
Summary: Cross-platform multimedia library
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
%global enable_jack 1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
License: zlib and MIT
|
|
|
|
|
URL: http://www.libsdl.org/
|
|
|
|
|
Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
|
|
|
|
|
Source1: SDL_config.h
|
|
|
|
|
Source2: SDL_revision.h
|
|
|
|
|
|
|
|
|
|
Patch0: multilib.patch
|
|
|
|
|
# Prefer Wayland by default
|
|
|
|
|
Patch1: SDL2-2.0.22-prefer-wayland.patch
|
|
|
|
|
# ptrdiff_t is not the same as khronos defines on 32bit arches
|
|
|
|
|
Patch1: SDL2-2.0.9-khrplatform.patch
|
|
|
|
|
Patch2: CVE-2019-13616-validate_image_size_when_loading_BMP_files.patch
|
|
|
|
|
Patch3: 0001-Fix-build-against-wayland-1.20.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: git-core
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: alsa-lib-devel
|
|
|
|
|
BuildRequires: mesa-libGL-devel
|
|
|
|
|
BuildRequires: mesa-libGLU-devel
|
|
|
|
@ -38,22 +30,21 @@ BuildRequires: libXi-devel
|
|
|
|
|
BuildRequires: libXrandr-devel
|
|
|
|
|
BuildRequires: libXrender-devel
|
|
|
|
|
BuildRequires: libXScrnSaver-devel
|
|
|
|
|
BuildRequires: libusb-devel
|
|
|
|
|
BuildRequires: libXinerama-devel
|
|
|
|
|
BuildRequires: libXcursor-devel
|
|
|
|
|
BuildRequires: systemd-devel
|
|
|
|
|
BuildRequires: pkgconfig(libusb-1.0)
|
|
|
|
|
# PulseAudio
|
|
|
|
|
BuildRequires: pkgconfig(libpulse-simple)
|
|
|
|
|
# Jack
|
|
|
|
|
%if 0%{?enable_jack}
|
|
|
|
|
BuildRequires: pkgconfig(jack)
|
|
|
|
|
# PipeWire
|
|
|
|
|
BuildRequires: pkgconfig(libpipewire-0.3)
|
|
|
|
|
%endif
|
|
|
|
|
# D-Bus
|
|
|
|
|
BuildRequires: pkgconfig(dbus-1)
|
|
|
|
|
# IBus
|
|
|
|
|
BuildRequires: pkgconfig(ibus-1.0)
|
|
|
|
|
# Wayland
|
|
|
|
|
BuildRequires: pkgconfig(libdecor-%{libdecor_majver})
|
|
|
|
|
BuildRequires: pkgconfig(wayland-client)
|
|
|
|
|
BuildRequires: pkgconfig(wayland-egl)
|
|
|
|
|
BuildRequires: pkgconfig(wayland-cursor)
|
|
|
|
@ -61,14 +52,13 @@ BuildRequires: pkgconfig(wayland-protocols)
|
|
|
|
|
BuildRequires: pkgconfig(wayland-scanner)
|
|
|
|
|
BuildRequires: pkgconfig(xkbcommon)
|
|
|
|
|
# Vulkan
|
|
|
|
|
%ifnarch s390 s390x aarch64 ppc64le
|
|
|
|
|
BuildRequires: vulkan-devel
|
|
|
|
|
%endif
|
|
|
|
|
# KMS
|
|
|
|
|
BuildRequires: mesa-libgbm-devel
|
|
|
|
|
BuildRequires: libdrm-devel
|
|
|
|
|
|
|
|
|
|
# Ensure libdecor is pulled in when libwayland-client is (rhbz#1992804)
|
|
|
|
|
Requires: (libdecor-%{libdecor_majver}.so.%{libdecor_majver}%{libsymbolsuffix} if libwayland-client)
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
|
|
|
|
|
to provide fast access to the graphics frame buffer and audio device.
|
|
|
|
@ -79,8 +69,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
Requires: mesa-libEGL-devel%{?_isa}
|
|
|
|
|
Requires: mesa-libGLES-devel%{?_isa}
|
|
|
|
|
Requires: libX11-devel%{?_isa}
|
|
|
|
|
# Conflict with versions before libSDLmain moved here
|
|
|
|
|
Conflicts: %{name}-static < 2.0.18-2
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
|
|
|
|
@ -90,195 +78,104 @@ developing SDL applications.
|
|
|
|
|
|
|
|
|
|
%package static
|
|
|
|
|
Summary: Static libraries for SDL2
|
|
|
|
|
# Needed to keep CMake happy
|
|
|
|
|
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|
|
|
|
# Conflict with versions before libSDLmain moved to -devel
|
|
|
|
|
Conflicts: %{name}-devel < 2.0.18-2
|
|
|
|
|
|
|
|
|
|
%description static
|
|
|
|
|
Static libraries for SDL2.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -S git
|
|
|
|
|
sed -i -e 's/\r//g' TODO.txt README.md WhatsNew.txt BUGS.txt LICENSE.txt CREDITS.txt README-SDL.txt
|
|
|
|
|
%autosetup -p1
|
|
|
|
|
# Compilation without ESD
|
|
|
|
|
sed -i -e 's/.*AM_PATH_ESD.*//' configure.ac
|
|
|
|
|
sed -i -e 's/\r//g' TODO.txt README.txt WhatsNew.txt BUGS.txt COPYING.txt CREDITS.txt README-SDL.txt
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# Deal with new CMake policy around whitespace in LDFLAGS...
|
|
|
|
|
export LDFLAGS="%{shrink:%{build_ldflags}}"
|
|
|
|
|
|
|
|
|
|
%cmake \
|
|
|
|
|
-DSDL_DLOPEN=ON \
|
|
|
|
|
-DSDL_VIDEO_KMSDRM=ON \
|
|
|
|
|
-DSDL_ARTS=OFF \
|
|
|
|
|
-DSDL_ESD=OFF \
|
|
|
|
|
-DSDL_NAS=OFF \
|
|
|
|
|
-DSDL_PULSEAUDIO_SHARED=ON \
|
|
|
|
|
-DSDL_JACK_SHARED=ON \
|
|
|
|
|
-DSDL_PIPEWIRE_SHARED=ON \
|
|
|
|
|
-DSDL_ALSA=ON \
|
|
|
|
|
-DSDL_VIDEO_WAYLAND=ON \
|
|
|
|
|
-DSDL_LIBDECOR_SHARED=ON \
|
|
|
|
|
-DSDL_VIDEO_VULKAN=ON \
|
|
|
|
|
-DSDL_SSE3=OFF \
|
|
|
|
|
-DSDL_RPATH=OFF \
|
|
|
|
|
-DSDL_STATIC=ON \
|
|
|
|
|
-DSDL_STATIC_PIC=ON \
|
|
|
|
|
%configure \
|
|
|
|
|
--enable-sdl-dlopen \
|
|
|
|
|
--enable-video-kmsdrm \
|
|
|
|
|
--disable-arts \
|
|
|
|
|
--disable-esd \
|
|
|
|
|
--disable-nas \
|
|
|
|
|
--enable-pulseaudio-shared \
|
|
|
|
|
%if 0%{?enable_jack}
|
|
|
|
|
--enable-jack-shared \
|
|
|
|
|
%else
|
|
|
|
|
--disable-jack \
|
|
|
|
|
%endif
|
|
|
|
|
--enable-alsa \
|
|
|
|
|
--enable-video-wayland \
|
|
|
|
|
%ifnarch s390 s390x aarch64 ppc64le
|
|
|
|
|
--enable-video-vulkan \
|
|
|
|
|
%endif
|
|
|
|
|
--enable-sse2=no \
|
|
|
|
|
--enable-sse3=no \
|
|
|
|
|
--disable-rpath \
|
|
|
|
|
%ifarch ppc64le
|
|
|
|
|
-DSDL_ALTIVEC=OFF \
|
|
|
|
|
--disable-altivec \
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%cmake_build
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%cmake_install
|
|
|
|
|
%make_install
|
|
|
|
|
|
|
|
|
|
# Rename SDL_config.h to SDL_config-<arch>.h to avoid file conflicts on
|
|
|
|
|
# multilib systems and install SDL_config.h wrapper
|
|
|
|
|
mv %{buildroot}%{_includedir}/SDL2/SDL_config.h %{buildroot}%{_includedir}/SDL2/SDL_config-%{_arch}.h
|
|
|
|
|
install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/SDL2/SDL_config.h
|
|
|
|
|
|
|
|
|
|
# Rename SDL_revision.h to SDL_revision-<arch>.h to avoid file conflicts on
|
|
|
|
|
# multilib systems and install SDL_revision.h wrapper
|
|
|
|
|
# TODO: Figure out how in the hell the SDL_REVISION changes between architectures on the same SRPM.
|
|
|
|
|
mv %{buildroot}%{_includedir}/SDL2/SDL_revision.h %{buildroot}%{_includedir}/SDL2/SDL_revision-%{_arch}.h
|
|
|
|
|
install -p -m 644 %{SOURCE2} %{buildroot}%{_includedir}/SDL2/SDL_revision.h
|
|
|
|
|
# remove libtool .la file
|
|
|
|
|
rm -vf %{buildroot}%{_libdir}/*.la
|
|
|
|
|
# remove static .a file
|
|
|
|
|
# rm -f %{buildroot}%{_libdir}/*.a
|
|
|
|
|
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%license COPYING.txt
|
|
|
|
|
%doc BUGS.txt CREDITS.txt README-SDL.txt
|
|
|
|
|
%{_libdir}/libSDL2-2.0.so.0*
|
|
|
|
|
%{_libdir}/lib*.so.*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%doc README.md TODO.txt WhatsNew.txt
|
|
|
|
|
%doc README.txt TODO.txt WhatsNew.txt
|
|
|
|
|
%{_bindir}/*-config
|
|
|
|
|
%{_libdir}/lib*.so
|
|
|
|
|
%{_libdir}/libSDL2main.a
|
|
|
|
|
%{_libdir}/pkgconfig/sdl2.pc
|
|
|
|
|
%dir %{_libdir}/cmake/SDL2
|
|
|
|
|
%{_libdir}/cmake/SDL2/SDL2Config*.cmake
|
|
|
|
|
%{_libdir}/cmake/SDL2/SDL2Targets*.cmake
|
|
|
|
|
%{_libdir}/cmake/SDL2/SDL2mainTargets*.cmake
|
|
|
|
|
%{_libdir}/cmake/SDL2/
|
|
|
|
|
%{_includedir}/SDL2
|
|
|
|
|
%{_datadir}/aclocal/*
|
|
|
|
|
%{_libdir}/libSDL2_test.a
|
|
|
|
|
%{_libdir}/cmake/SDL2/SDL2testTargets*.cmake
|
|
|
|
|
|
|
|
|
|
%files static
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%{_libdir}/libSDL2.a
|
|
|
|
|
%{_libdir}/cmake/SDL2/SDL2staticTargets*.cmake
|
|
|
|
|
%license COPYING.txt
|
|
|
|
|
%{_libdir}/lib*.a
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Aug 21 2022 Neal Gompa <ngompa@centosproject.org> - 2.26.0-1
|
|
|
|
|
- Update to 2.26.0
|
|
|
|
|
Resolves: rhbz#2051959
|
|
|
|
|
- Drop backported patches included in this release
|
|
|
|
|
|
|
|
|
|
* Tue Feb 08 2022 Neal Gompa <ngompa@centosproject.org> - 2.0.20-2
|
|
|
|
|
- Backport Wayland fixes with Wayland-by-default from upstream
|
|
|
|
|
Resolves: rhbz#2051963
|
|
|
|
|
|
|
|
|
|
* Tue Jan 11 2022 Neal Gompa <ngompa@centosproject.org> - 2.0.20-1
|
|
|
|
|
- Update to 2.0.20
|
|
|
|
|
Resolves: rhbz#2039137
|
|
|
|
|
- Drop backported patches included in this release
|
|
|
|
|
|
|
|
|
|
* Fri Jan 07 2022 Neal Gompa <ngompa@centosproject.org> - 2.0.18-2
|
|
|
|
|
- Move libSDL2main to -devel and refresh split CMake target patch
|
|
|
|
|
Resolves: rhbz#2038390
|
|
|
|
|
|
|
|
|
|
* Tue Jan 04 2022 Neal Gompa <ngompa@centosproject.org> - 2.0.18-1
|
|
|
|
|
- Update to 2.0.18
|
|
|
|
|
Resolves: rhbz#2028076
|
|
|
|
|
- Fix multilib conflict with SDL_revision.h (rhbz#2008838)
|
|
|
|
|
* Mon Dec 11 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 2.0.10-2.inferit
|
|
|
|
|
- Backport fix for building against wayland-1.20+
|
|
|
|
|
- Add patch to split SDL2 CMake targets for static libraries (rhbz#1965359)
|
|
|
|
|
|
|
|
|
|
* Wed Dec 01 2021 Neal Gompa <ngompa@centosproject.org> - 2.0.16-5
|
|
|
|
|
- Re-enable libdecor support now that it's available in RHEL 9
|
|
|
|
|
Resolves: rhbz#2003471
|
|
|
|
|
|
|
|
|
|
* Thu Aug 26 2021 Wim Taymans <wtaymans@redhat.com> - 2.0.16-4
|
|
|
|
|
- Build with SDL_STATIC_PIC and SDL_STATIC to actually make the
|
|
|
|
|
static version of SDL2
|
|
|
|
|
|
|
|
|
|
* Thu Aug 26 2021 Wim Taymans <wtaymans@redhat.com> - 2.0.16-3
|
|
|
|
|
- Build with SDL_STATIC_PIC instead of SDL_STATIC
|
|
|
|
|
|
|
|
|
|
* Thu Aug 26 2021 Wim Taymans <wtaymans@redhat.com> - 2.0.16-2
|
|
|
|
|
- Disable libdecor until it is added to centos/RHEL9
|
|
|
|
|
* Thu Dec 07 2023 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 2.0.10-2
|
|
|
|
|
- Rebuilt for MSVSphere 8.8
|
|
|
|
|
|
|
|
|
|
* Thu Aug 26 2021 Neal Gompa <ngompa@fedoraproject.org> - 2.0.16-1
|
|
|
|
|
- Update to 2.0.16
|
|
|
|
|
* Fri Nov 22 2019 Wim Taymans <wtaymans@redhat.com> - 2.0.10-2
|
|
|
|
|
- Fix CVE-2019-13616 SDL: heap-based buffer overflow in SDL blit
|
|
|
|
|
functions in video/SDL_blit*.c
|
|
|
|
|
- Resolves: rhbz#1756279
|
|
|
|
|
|
|
|
|
|
* Thu Aug 26 2021 Tom Callaway <spot@fedoraproject.org> - 2.0.14-7
|
|
|
|
|
- add -static Requires to -devel to make CMake stop failing on missing files (bz1965359)
|
|
|
|
|
|
|
|
|
|
* Thu Aug 26 2021 Neal Gompa <ngompa13@gmail.com> - 2.0.14-6
|
|
|
|
|
- Switch to CMake to build SDL2
|
|
|
|
|
- Build JACK support unconditionally since PipeWire-JACK exists in RHEL 9
|
|
|
|
|
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.0.14-5
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.0.14-4
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Mon Feb 22 2021 Hans de Goede <hdegoede@redhat.com> - 2.0.14-3
|
|
|
|
|
- SDL2 no longer uses audiofile, drop the audiofile-devel BuildRequires
|
|
|
|
|
|
|
|
|
|
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.14-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 21 2021 Pete Walter <pwalter@fedoraproject.org> - 2.0.14-1
|
|
|
|
|
- Update to 2.0.14
|
|
|
|
|
- Rebase multilib.patch
|
|
|
|
|
- Don't use globs in the form of libFOO.so.* for listing files
|
|
|
|
|
|
|
|
|
|
* Tue Jan 12 2021 Wim Taymans <wtaymans@redhat.com> - 2.0.12-5
|
|
|
|
|
- Disable JACK on rhel >= 8
|
|
|
|
|
|
|
|
|
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.12-4
|
|
|
|
|
- Second attempt - Rebuilt for
|
|
|
|
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.12-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 2.0.12-2
|
|
|
|
|
- Use make macros
|
|
|
|
|
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
|
|
|
|
|
|
|
|
|
* Wed Mar 11 2020 Pete Walter <pwalter@fedoraproject.org> - 2.0.12-1
|
|
|
|
|
- Update to 2.0.12
|
|
|
|
|
|
|
|
|
|
* Tue Feb 11 2020 Tom Callaway <spot@fedoraproject.org> - 2.0.10-3
|
|
|
|
|
- apply upstream fix for FTBFS
|
|
|
|
|
|
|
|
|
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.10-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Pete Walter <pwalter@fedoraproject.org> - 2.0.10-1
|
|
|
|
|
* Tue Nov 12 2019 Wim Taymans <wtaymans@redhat.com> - 2.0.10-1
|
|
|
|
|
- Update to 2.0.10
|
|
|
|
|
|
|
|
|
|
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.9-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
- Resolves: rhbz#1751780
|
|
|
|
|
|
|
|
|
|
* Fri Feb 15 2019 Tom Callaway <spot@fedoraproject.org> - 2.0.9-3
|
|
|
|
|
- use khrplatform defines, not ptrdiff_t
|
|
|
|
|
|
|
|
|
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.9-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Nov 2 2018 Tom Callaway <spot@fedoraproject.org> - 2.0.9-1
|
|
|
|
|
- update to 2.0.9
|
|
|
|
|
* Tue Aug 14 2018 Wim Taymans <wtaymans@redhat.com> - 2.0.8-7
|
|
|
|
|
- Disable jack
|
|
|
|
|
|
|
|
|
|
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.8-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
* Sat Aug 11 2018 Wim Taymans <wtaymans@redhat.com> - 2.0.8-6
|
|
|
|
|
- Disable vulkan on s390, s390x, aarch64 and ppc64le
|
|
|
|
|
- Resolves: rhbz#1610034
|
|
|
|
|
|
|
|
|
|
* Mon May 21 2018 Adam Jackson <ajax@redhat.com> - 2.0.8-5
|
|
|
|
|
- Backport a crash/hang fix from 2.0.9 (#1580541)
|
|
|
|
|
* Tue Jul 17 2018 Wim Taymans <wtaymans@redhat.com> - 2.0.8-5
|
|
|
|
|
- Disable obsolete audiofile-devel BR (#1588283)
|
|
|
|
|
|
|
|
|
|
* Wed Apr 11 2018 Tom Callaway <spot@fedoraproject.org> - 2.0.8-4
|
|
|
|
|
- enable video-kmsdrm
|
|
|
|
|