diff --git a/.gitignore b/.gitignore index 5cfde48..4617b61 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /sdl12-compat-cc5826a.tar.gz /sdl12-compat-efe9791.tar.gz +/sdl12-compat-21830e8.tar.gz diff --git a/sdl12-compat.spec b/sdl12-compat.spec index 24c8642..7dfd21a 100644 --- a/sdl12-compat.spec +++ b/sdl12-compat.spec @@ -1,6 +1,13 @@ -%global commit efe97912a54260f3e4c4b2ba5629986adbb9aff7 +%global commit 21830e8e81646e5c2969e45eeb4ab0b93319d621 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commitdate 20210609 +%global commitdate 20210610 + +%if 0%{?rhel} +# Features disabled for RHEL +%bcond_with static +%else +%bcond_without static +%endif Name: sdl12-compat Version: 0.0.1~git.%{commitdate}.%{shortcommit} @@ -65,12 +72,37 @@ If you are writing new code, please target SDL 2.0 directly and do not use this layer. +%if %{with static} +%package static +Summary: Static library to develop SDL 1.2 applications using SDL 2.0 +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +# This replaces SDL-static +Obsoletes: SDL-static < 1.2.15-47 +Conflicts: SDL-static < 1.2.50 +Provides: SDL-static = 1.2.50 +Provides: SDL-static%{?_isa} = 1.2.50 + +%description static +Simple DirectMedia Layer (SDL) is a cross-platform multimedia library +designed to provide fast access to the graphics frame buffer and audio device. + +This code is a compatibility layer; it provides a static link library for +programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes. +Note that applications that use this library will need to declare SDL2 as +a dependency manually, as the library is dlopen()'d to preserve APIs between +SDL-1.2 and SDL-2.0. + +If you are writing new code, please target SDL 2.0 directly and do not use +this layer. +%endif + + %prep %autosetup -n %{name}-%{commit} -S git_am %build -%cmake +%cmake %{?with_static:-DSTATICDEVEL=ON} %cmake_build @@ -90,13 +122,23 @@ install -m644 %{SOURCE1} %{buildroot}/%{_includedir}/SDL/SDL_config.h %files devel %{_bindir}/sdl-config +%{_datadir}/aclocal/sdl.m4 %{_includedir}/SDL/ %{_libdir}/libSDL-1.2.so %{_libdir}/libSDL.so %{_libdir}/pkgconfig/sdl12_compat.pc +%if %{with static} +%files static +%{_libdir}/libSDL.a +%endif + %changelog +* Thu Jun 10 2021 Neal Gompa - 0.0.1~git.20210610.21830e8-1 +- Update to new snapshot release +- Add static link library for non-RHEL + * Wed Jun 09 2021 Neal Gompa - 0.0.1~git.20210609.efe9791-1 - Update to new snapshot release - Refresh patch for multilib support diff --git a/sources b/sources index eae9b96..54d3272 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sdl12-compat-efe9791.tar.gz) = 6f58f7ac4ca1328cee37eb0cc32564c03213d041192d22a2923655d0963dcedd7127b2da0ec5926c998ee17e96da16d3031bbe356c6eb6a8a7b072eeedabe259 +SHA512 (sdl12-compat-21830e8.tar.gz) = 7e15caae73eb7da68e557144c1349f62ddbef92cfcac4349e6ebaa9cda13a5408c5b90e1d1aa08914494c3b9bfc903d53f3bbe02753d5766c8663c38c9aec40a