Blame SPECS/sdl12-compat.spec

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