2016-10-24 17:49:59 +10:00
|
|
|
%define oversion 0.4.1
|
|
|
|
|
2014-06-08 21:22:29 +11:00
|
|
|
%define api 2.0
|
2017-02-27 20:11:53 +10:00
|
|
|
%define major 0
|
2014-06-08 21:22:29 +11:00
|
|
|
%define libname %mklibname %{name}_ %{api} %{major}
|
|
|
|
%define devname %mklibname %{name} -d
|
2013-08-05 18:37:46 +04:00
|
|
|
|
|
|
|
Summary: Simple DirectMedia Layer
|
|
|
|
Name: SDL2
|
2016-10-24 17:49:59 +10:00
|
|
|
Version: 2.0.5
|
2017-02-27 20:39:01 +10:00
|
|
|
Release: 4
|
2013-08-05 18:37:46 +04:00
|
|
|
License: Zlib
|
|
|
|
Group: System/Libraries
|
|
|
|
Url: http://www.libsdl.org/
|
|
|
|
Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
|
2014-06-08 21:22:29 +11:00
|
|
|
Patch0: SDL2-2.0.3-cmake.patch
|
2017-02-27 20:11:53 +10:00
|
|
|
Patch1: SDL2-2.0.5-soversion.patch
|
|
|
|
Patch2: SDL2-2.0.5-ppc.patch
|
|
|
|
Patch3: SDL2-2.0.5-null-deref.patch
|
2016-10-24 17:49:59 +10:00
|
|
|
BuildRequires: cmake
|
2013-08-06 01:59:15 +11:00
|
|
|
BuildRequires: nas-devel
|
|
|
|
BuildRequires: pkgconfig(alsa)
|
|
|
|
BuildRequires: pkgconfig(dbus-1)
|
2013-08-05 18:37:46 +04:00
|
|
|
BuildRequires: pkgconfig(gl)
|
|
|
|
BuildRequires: pkgconfig(glu)
|
|
|
|
BuildRequires: pkgconfig(libpulse)
|
2013-08-06 02:24:44 +11:00
|
|
|
BuildRequires: pkgconfig(libusb)
|
2013-08-06 01:59:15 +11:00
|
|
|
BuildRequires: pkgconfig(udev)
|
|
|
|
BuildRequires: pkgconfig(xcursor)
|
|
|
|
BuildRequires: pkgconfig(xext)
|
|
|
|
BuildRequires: pkgconfig(xi)
|
|
|
|
BuildRequires: pkgconfig(xinerama)
|
2013-08-05 18:37:46 +04:00
|
|
|
BuildRequires: pkgconfig(xrandr)
|
2013-08-06 01:59:15 +11:00
|
|
|
BuildRequires: pkgconfig(xscrnsaver)
|
|
|
|
BuildRequires: pkgconfig(xxf86vm)
|
2013-08-05 18:37:46 +04:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
|
|
|
|
%description
|
|
|
|
This is the Simple DirectMedia Layer, a generic API that provides low level
|
|
|
|
access to audio, keyboard, mouse, and display framebuffer across multiple
|
|
|
|
platforms.
|
|
|
|
|
2016-10-24 17:49:59 +10:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{libname}
|
2013-08-05 18:37:46 +04:00
|
|
|
Summary: Main library for %{name}
|
|
|
|
Group: System/Libraries
|
2017-02-27 20:39:01 +10:00
|
|
|
Conflicts: %{_lib}SDL2_2.0_1 < 2.0.5-4
|
|
|
|
Obsoletes: %{_lib}SDL2_2.0_1 < 2.0.5-4
|
2013-08-05 18:37:46 +04:00
|
|
|
|
2016-10-24 17:49:59 +10:00
|
|
|
%description -n %{libname}
|
2013-08-05 18:37:46 +04:00
|
|
|
This package contains the library needed to run programs dynamically
|
|
|
|
linked with %{name}.
|
|
|
|
|
|
|
|
%files -n %{libname}
|
|
|
|
%doc README.txt README-SDL.txt CREDITS.txt COPYING.txt BUGS.txt WhatsNew.txt
|
2016-10-24 17:49:59 +10:00
|
|
|
%{_libdir}/libSDL2-%{api}.so.%{major}
|
|
|
|
%{_libdir}/libSDL2-%{api}.so.%{oversion}
|
2013-08-05 18:37:46 +04:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2016-10-24 17:49:59 +10:00
|
|
|
%package -n %{devname}
|
2013-08-05 18:37:46 +04:00
|
|
|
Summary: Headers for developing programs that will use %{name}
|
|
|
|
Group: Development/C
|
2016-10-24 17:49:59 +10:00
|
|
|
Requires: %{libname} = %{EVRD}
|
|
|
|
Provides: %{name}-devel = %{EVRD}
|
2013-08-05 18:37:46 +04:00
|
|
|
|
2016-10-24 17:49:59 +10:00
|
|
|
%description -n %{devname}
|
2013-08-05 18:37:46 +04:00
|
|
|
This package contains the headers that programmers will need to develop
|
|
|
|
applications which will use %{name}.
|
|
|
|
|
|
|
|
%files -n %{devname}
|
|
|
|
%doc README.txt README-SDL.txt CREDITS.txt COPYING.txt BUGS.txt WhatsNew.txt
|
|
|
|
%{_bindir}/sdl2-config
|
|
|
|
%{_libdir}/pkgconfig/sdl2.pc
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%dir %{_includedir}/SDL2
|
|
|
|
%{_includedir}/SDL2/*.h
|
|
|
|
%{_datadir}/aclocal/sdl2.m4
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2013-09-12 15:44:31 +04:00
|
|
|
%apply_patches
|
2013-08-05 18:37:46 +04:00
|
|
|
|
|
|
|
%build
|
2013-10-30 01:11:03 +11:00
|
|
|
%cmake -DRPATH:BOOL=OFF
|
2013-08-05 18:37:46 +04:00
|
|
|
%make
|
|
|
|
|
|
|
|
%install
|
2013-09-12 15:44:31 +04:00
|
|
|
%makeinstall_std -C build
|
2013-08-05 18:37:46 +04:00
|
|
|
|
|
|
|
rm -f %{buildroot}%{_libdir}/*.a
|
|
|
|
|