Blame SPECS/sdl12-compat.spec

a8bd53
%if 0%{?rhel}
a8bd53
# Features disabled for RHEL
a8bd53
%bcond_with static
a8bd53
%else
a8bd53
%bcond_without static
a8bd53
%endif
a8bd53
a8bd53
Name:           sdl12-compat
bd1c6c
Version:        1.2.52
bd1c6c
Release:        1%{?dist}
a8bd53
Summary:        SDL 1.2 runtime compatibility library using SDL 2.0
a8bd53
# mp3 decoder code is MIT-0/PD
a8bd53
# SDL_opengl.h is zlib and MIT
a8bd53
License:        zlib and (Public Domain or MIT-0) and MIT
a8bd53
URL:            https://github.com/libsdl-org/sdl12-compat
bd1c6c
Source0:        %{url}/archive/release-%{version}/%{name}-%{version}.tar.gz
a8bd53
# Multilib aware-header stub
a8bd53
Source1:        SDL_config.h
a8bd53
a8bd53
# Backports from upstream (0001~0500)
a8bd53
a8bd53
# Proposed patches (0501~1000)
a8bd53
a8bd53
# Fedora specific patches (1001+)
a8bd53
Patch1001:      sdl12-compat-sdlconfig-multilib.patch
a8bd53
a8bd53
BuildRequires:  cmake
a8bd53
BuildRequires:  gcc
a8bd53
BuildRequires:  git-core
a8bd53
BuildRequires:  make
a8bd53
BuildRequires:  SDL2-devel
a8bd53
BuildRequires:  mesa-libGL-devel
a8bd53
BuildRequires:  mesa-libGLU-devel
a8bd53
# This replaces SDL
a8bd53
Obsoletes:      SDL < 1.2.15-49
a8bd53
Conflicts:      SDL < 1.2.50
bd1c6c
Provides:       SDL = %{version}
bd1c6c
Provides:       SDL%{?_isa} = %{version}
a8bd53
# This dlopens SDL2 (?!), so manually depend on it
bd1c6c
Requires:       SDL2%{?_isa} >= 2.0.18
a8bd53
a8bd53
%description
a8bd53
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
a8bd53
designed to provide fast access to the graphics frame buffer and audio device.
a8bd53
a8bd53
This code is a compatibility layer; it provides a binary-compatible API for
a8bd53
programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes.
a8bd53
a8bd53
If you are writing new code, please target SDL 2.0 directly and do not use
a8bd53
this layer.
a8bd53
a8bd53
%package devel
a8bd53
Summary:        Files to develop SDL 1.2 applications using SDL 2.0
a8bd53
Requires:       %{name}%{?_isa} = %{version}-%{release}
a8bd53
# This replaces SDL-devel
a8bd53
Obsoletes:      SDL-devel < 1.2.15-49
a8bd53
Conflicts:      SDL-devel < 1.2.50
bd1c6c
Provides:       SDL-devel = %{version}
bd1c6c
Provides:       SDL-devel%{?_isa} = %{version}
a8bd53
%if ! %{with static}
a8bd53
# We don't provide the static library, but we want to replace SDL-static anyway
a8bd53
Obsoletes:      SDL-static < 1.2.15-49
a8bd53
Conflicts:      SDL-static < 1.2.50
a8bd53
%endif
a8bd53
# Add deps required to compile SDL apps
a8bd53
## For SDL_opengl.h
a8bd53
Requires:       pkgconfig(gl)
a8bd53
Requires:       pkgconfig(glu)
a8bd53
## For SDL_syswm.h
a8bd53
Requires:       pkgconfig(x11)
a8bd53
Requires:       pkgconfig(xproto)
a8bd53
a8bd53
%description devel
a8bd53
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
a8bd53
designed to provide fast access to the graphics frame buffer and audio device.
a8bd53
a8bd53
This code is a compatibility layer; it provides a source-compatible API for
a8bd53
programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes.
a8bd53
a8bd53
If you are writing new code, please target SDL 2.0 directly and do not use
a8bd53
this layer.
a8bd53
a8bd53
a8bd53
%if %{with static}
a8bd53
%package static
a8bd53
Summary:        Static library to develop SDL 1.2 applications using SDL 2.0
a8bd53
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
a8bd53
# This replaces SDL-static
a8bd53
Obsoletes:      SDL-static < 1.2.15-49
a8bd53
Conflicts:      SDL-static < 1.2.50
bd1c6c
Provides:       SDL-static = %{version}
bd1c6c
Provides:       SDL-static%{?_isa} = %{version}
a8bd53
a8bd53
%description static
a8bd53
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
a8bd53
designed to provide fast access to the graphics frame buffer and audio device.
a8bd53
a8bd53
This code is a compatibility layer; it provides a static link library for
a8bd53
programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes.
a8bd53
Note that applications that use this library will need to declare SDL2 as
a8bd53
a dependency manually, as the library is dlopen()'d to preserve APIs between
a8bd53
SDL-1.2 and SDL-2.0.
a8bd53
a8bd53
If you are writing new code, please target SDL 2.0 directly and do not use
a8bd53
this layer.
a8bd53
%endif
a8bd53
a8bd53
a8bd53
%prep
bd1c6c
%autosetup -n %{name}-release-%{version} -S git_am
a8bd53
a8bd53
a8bd53
%build
a8bd53
%cmake %{?with_static:-DSTATICDEVEL=ON}
a8bd53
%cmake_build
a8bd53
a8bd53
a8bd53
%install
a8bd53
%cmake_install
a8bd53
a8bd53
# Rename SDL_config.h to SDL_config-<arch>.h to avoid file conflicts on
a8bd53
# multilib systems and install SDL_config.h wrapper
a8bd53
mv %{buildroot}/%{_includedir}/SDL/SDL_config.h %{buildroot}/%{_includedir}/SDL/SDL_config-%{_arch}.h
a8bd53
install -m644 %{SOURCE1} %{buildroot}/%{_includedir}/SDL/SDL_config.h
a8bd53
a8bd53
%if ! %{with static}
a8bd53
# Delete leftover static files
a8bd53
rm -rf %{buildroot}%{_libdir}/*.a
a8bd53
%endif
a8bd53
a8bd53
a8bd53
%files
a8bd53
%license LICENSE.txt
a8bd53
%doc README.md BUGS.txt
a8bd53
%{_libdir}/libSDL-1.2.so.*
a8bd53
a8bd53
%files devel
a8bd53
%{_bindir}/sdl-config
a8bd53
%{_datadir}/aclocal/sdl.m4
a8bd53
%{_includedir}/SDL/
a8bd53
%{_libdir}/libSDL-1.2.so
a8bd53
%{_libdir}/libSDL.so
a8bd53
%{_libdir}/pkgconfig/sdl12_compat.pc
a8bd53
a8bd53
%if %{with static}
a8bd53
%files static
a8bd53
%{_libdir}/libSDL.a
a8bd53
%{_libdir}/libSDLmain.a
a8bd53
%endif
a8bd53
a8bd53
a8bd53
%changelog
bd1c6c
* Fri Mar 04 2022 Neal Gompa <ngompa@centosproject.org> - 1.2.52-1
bd1c6c
- Rebase to 1.2.52
bd1c6c
  Resolves: rhbz#2060907
bd1c6c
a8bd53
* Sat Dec 11 2021 Neal Gompa <ngompa@centosproject.org> - 0.0.1~git.20211125.4e4527a-4
a8bd53
- Conflict with all old SDL subpackages properly
a8bd53
a8bd53
* Tue Dec 07 2021 Wim Taymans <wtaymans@redhat.com> - 0.0.1~git.20211125.4e4527a-3
a8bd53
- Bump for rebuild after resync
a8bd53
a8bd53
* Wed Dec 01 2021 Neal Gompa <ngompa@centosproject.org> - 0.0.1~git.20211125.4e4527a-2
a8bd53
- Obsolete the SDL package properly
a8bd53
a8bd53
* Sat Nov 27 2021 Neal Gompa <ngompa@fedoraproject.org> - 0.0.1~git.20211125.4e4527a-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Sun Nov 07 2021 Neal Gompa <ngompa@fedoraproject.org> - 0.0.1~git.20211107.a10d6b6-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Sun Sep 26 2021 Neal Gompa <ngompa@fedoraproject.org> - 0.0.1~git.20210926.c6cfc8f-1
a8bd53
- Update to new snapshot release
a8bd53
- Ensure SDL2 dependency is arched
a8bd53
a8bd53
* Sun Sep 12 2021 Neal Gompa <ngompa@fedoraproject.org> - 0.0.1~git.20210909.a98590a-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Thu Aug 26 2021 Neal Gompa <ngompa@fedoraproject.org> - 0.0.1~git.20210825.b5f7170-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Sun Aug 22 2021 Neal Gompa <ngompa@fedoraproject.org> - 0.0.1~git.20210814.a3bfcb2-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Sun Jul 25 2021 Neal Gompa <ngompa@fedoraproject.org> - 0.0.1~git.20210719.aa9919b-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1~git.20210709.51254e5-2
a8bd53
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
a8bd53
a8bd53
* Fri Jul 09 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210709.51254e5-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Tue Jun 29 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210628.cf47f88-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Mon Jun 28 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210624.08b5def-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Sun Jun 20 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210619.4ad7ba6-2
a8bd53
- Update devel dependencies based on upstream feedback
a8bd53
a8bd53
* Sun Jun 20 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210619.4ad7ba6-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Sun Jun 20 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210618.f44f295-2
a8bd53
- Add devel dependencies expected by SDL packages to devel subpackage
a8bd53
a8bd53
* Fri Jun 18 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210618.f44f295-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Sun Jun 13 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210612.44f299f-1
a8bd53
- Update to new snapshot release
a8bd53
- Update license tag information
a8bd53
a8bd53
* Sat Jun 12 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210612.c0504eb-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Thu Jun 10 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210610.21830e8-1
a8bd53
- Update to new snapshot release
a8bd53
- Add static link library for non-RHEL
a8bd53
a8bd53
* Wed Jun 09 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210609.efe9791-1
a8bd53
- Update to new snapshot release
a8bd53
- Refresh patch for multilib support
a8bd53
a8bd53
* Thu Jun 03 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210602.cc5826a-3
a8bd53
- Fix for multilib support
a8bd53
a8bd53
* Thu Jun 03 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210602.cc5826a-2
a8bd53
- Add missing SDL2 dependency and fix Obsoletes
a8bd53
a8bd53
* Wed Jun 02 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210602.cc5826a-1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Sat May 29 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210528.646ecd7-0.1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Fri May 28 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210527.a915ff1-0.1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Wed May 26 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210526.848ad42-0.1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Mon May 24 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210524.cf71450-0.1
a8bd53
- Update to new snapshot release
a8bd53
a8bd53
* Sat May 15 2021 Neal Gompa <ngompa13@gmail.com> - 0~git.20210515.9f2d88a-1
a8bd53
- Initial package