Switch to CMake to build SDL2 and always build JACK support
Upstream increasingly prefers CMake for building SDL, so switch to that. Additionally, let's always build JACK support since PipeWire in RHEL 9 provides libjack.
This commit is contained in:
parent
8e9e34c4e5
commit
104dfc214c
65
SDL2.spec
65
SDL2.spec
@ -1,12 +1,6 @@
|
|||||||
%if 0%{?rhel} >= 8
|
|
||||||
%bcond_with jack
|
|
||||||
%else
|
|
||||||
%bcond_without jack
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: SDL2
|
Name: SDL2
|
||||||
Version: 2.0.14
|
Version: 2.0.14
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Cross-platform multimedia library
|
Summary: Cross-platform multimedia library
|
||||||
|
|
||||||
License: zlib and MIT
|
License: zlib and MIT
|
||||||
@ -18,8 +12,10 @@ Patch0: multilib.patch
|
|||||||
# ptrdiff_t is not the same as khronos defines on 32bit arches
|
# ptrdiff_t is not the same as khronos defines on 32bit arches
|
||||||
Patch1: SDL2-2.0.9-khrplatform.patch
|
Patch1: SDL2-2.0.9-khrplatform.patch
|
||||||
|
|
||||||
|
BuildRequires: cmake
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: alsa-lib-devel
|
BuildRequires: alsa-lib-devel
|
||||||
BuildRequires: mesa-libGL-devel
|
BuildRequires: mesa-libGL-devel
|
||||||
BuildRequires: mesa-libGLU-devel
|
BuildRequires: mesa-libGLU-devel
|
||||||
@ -38,9 +34,7 @@ BuildRequires: systemd-devel
|
|||||||
# PulseAudio
|
# PulseAudio
|
||||||
BuildRequires: pkgconfig(libpulse-simple)
|
BuildRequires: pkgconfig(libpulse-simple)
|
||||||
# Jack
|
# Jack
|
||||||
%if %{with jack}
|
|
||||||
BuildRequires: pkgconfig(jack)
|
BuildRequires: pkgconfig(jack)
|
||||||
%endif
|
|
||||||
# D-Bus
|
# D-Bus
|
||||||
BuildRequires: pkgconfig(dbus-1)
|
BuildRequires: pkgconfig(dbus-1)
|
||||||
# IBus
|
# IBus
|
||||||
@ -83,49 +77,40 @@ Static libraries for SDL2.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%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
|
sed -i -e 's/\r//g' TODO.txt README.txt WhatsNew.txt BUGS.txt COPYING.txt CREDITS.txt README-SDL.txt
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
# Deal with new CMake policy around whitespace in LDFLAGS...
|
||||||
--enable-sdl-dlopen \
|
export LDFLAGS="%{shrink:%{build_ldflags}}"
|
||||||
--enable-video-kmsdrm \
|
|
||||||
--disable-arts \
|
%cmake \
|
||||||
--disable-esd \
|
-DSDL_DLOPEN=ON \
|
||||||
--disable-nas \
|
-DVIDEO_KMSDRM=ON \
|
||||||
--enable-pulseaudio-shared \
|
-DARTS=OFF \
|
||||||
%if %{with jack}
|
-DESD=OFF \
|
||||||
--enable-jack-shared \
|
-DNAS=OFF \
|
||||||
%else
|
-DPULSEAUDIO_SHARED=ON \
|
||||||
--disable-jack \
|
-DJACK_SHARED=ON \
|
||||||
%endif
|
-DALSA=ON \
|
||||||
--enable-alsa \
|
-DVIDEO_WAYLAND=ON \
|
||||||
--enable-video-wayland \
|
-DVIDEO_VULKAN=ON \
|
||||||
--enable-video-vulkan \
|
-DSSE3=OFF \
|
||||||
--enable-sse2=no \
|
-DRPATH=OFF \
|
||||||
--enable-sse3=no \
|
-DSDL_STATIC=ON \
|
||||||
--disable-rpath \
|
|
||||||
%ifarch ppc64le
|
%ifarch ppc64le
|
||||||
--disable-altivec \
|
-DALTIVEC=OFF \
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%make_build
|
%cmake_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%cmake_install
|
||||||
|
|
||||||
# Rename SDL_config.h to SDL_config-<arch>.h to avoid file conflicts on
|
# Rename SDL_config.h to SDL_config-<arch>.h to avoid file conflicts on
|
||||||
# multilib systems and install SDL_config.h wrapper
|
# multilib systems and install SDL_config.h wrapper
|
||||||
mv %{buildroot}%{_includedir}/SDL2/SDL_config.h %{buildroot}%{_includedir}/SDL2/SDL_config-%{_arch}.h
|
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
|
install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/SDL2/SDL_config.h
|
||||||
|
|
||||||
# remove libtool .la file
|
|
||||||
rm -vf %{buildroot}%{_libdir}/*.la
|
|
||||||
# remove static .a file
|
|
||||||
# rm -f %{buildroot}%{_libdir}/*.a
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING.txt
|
%license COPYING.txt
|
||||||
@ -146,6 +131,10 @@ rm -vf %{buildroot}%{_libdir}/*.la
|
|||||||
%{_libdir}/lib*.a
|
%{_libdir}/lib*.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 17 2021 Neal Gompa <ngompa13@gmail.com> - 2.0.14-4
|
||||||
|
- Switch to CMake to build SDL2
|
||||||
|
- Build JACK support unconditionally since PipeWire-JACK exists in RHEL 9
|
||||||
|
|
||||||
* Mon Feb 22 2021 Hans de Goede <hdegoede@redhat.com> - 2.0.14-3
|
* Mon Feb 22 2021 Hans de Goede <hdegoede@redhat.com> - 2.0.14-3
|
||||||
- SDL2 no longer uses audiofile, drop the audiofile-devel BuildRequires
|
- SDL2 no longer uses audiofile, drop the audiofile-devel BuildRequires
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user