#
# Conditional build:
-%bcond_with aalib # with aalib graphics support
-%bcond_with caca # with caca graphics support
-%bcond_with directfb # with DirectFB graphics support
-%bcond_with ggi # with GGI graphics support
-%bcond_with nas # with NAS audio support
-%bcond_with svga # with svgalib graphics support
-%bcond_without alsa # without ALSA audio support
-%bcond_without arts # without aRts audio support
-%bcond_without esd # without EsounD audio support
+%bcond_with aalib # aalib graphics support
+%bcond_with caca # caca graphics support
+%bcond_with directfb # DirectFB graphics support
+%bcond_with ggi # GGI graphics support
+%bcond_with nas # NAS audio support
+%bcond_with svga # svgalib graphics support
+%bcond_without alsa # ALSA audio support
+%bcond_with arts # aRts audio support
+%bcond_with esd # EsounD audio support
+%bcond_with new_gamma_ramp # causes crashes on nvidia drivers
+%bcond_without static_libs # don't build static libraries
#
# NOTE: the following libraries are dlopened by soname detected at build time:
-# libasound.so.2
-# libesd.so.0
+# libartsc.so.? [if with arts]
+# libasound.so.2 [if with alsa]
+# libaudio.so.2 [if with nas]
+# libesd.so.0 [if with esd]
# libpulse-simple.so.0
# libX11.so.6
# libXext.so.6
Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
Name: SDL
-Version: 1.2.12
-Release: 1
+Version: 1.2.15
+Release: 6
License: LGPL v2.1+
Group: Libraries
Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
-# Source0-md5: 544b4554986e51eed6d34435cf9c5f3f
-Patch0: %{name}-mmx-constraints.patch
-Patch1: %{name}-acfix.patch
-Patch2: %{name}-caca.patch
+# Source0-md5: 9d96df8417572a2afb781a7c4c811a85
+Patch0: %{name}-acfix.patch
+Patch1: %{name}-new_gamma_ramp_support.patch
+Patch2: fix-mouse-click.patch
+Patch3: %{name}-config.patch
+Patch4: %{name}-const_XData32.patch
URL: http://www.libsdl.org/
%{?with_directfb:BuildRequires: DirectFB-devel >= 0.9.15}
BuildRequires: OpenGL-GLU-devel
BuildRequires: gcc >= 5:4.0
%{?with_caca:BuildRequires: libcaca-devel}
%{?with_ggi:BuildRequires: libggi-devel}
-BuildRequires: libtool >= 2:1.4d
+BuildRequires: libtool >= 2:2.0
%{?with_nas:BuildRequires: nas-devel}
%ifarch %{ix86}
BuildRequires: nasm
%endif
BuildRequires: perl-modules
-%{?with_directfb:BuildRequires: pkgconfig >= 1:0.7}
+BuildRequires: pkgconfig >= 1:0.7
BuildRequires: pulseaudio-devel >= 0.9
%{?with_svga:BuildRequires: svgalib-devel >= 1.4.0}
+BuildRequires: tslib-devel
BuildRequires: xorg-lib-libX11-devel
BuildRequires: xorg-lib-libXext-devel
BuildRequires: xorg-lib-libXrandr-devel
BuildRequires: xorg-proto-xextproto-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define specflags_ppc -maltivec
+
%description
SDL (Simple DirectMedia Layer) is a library that allows you portable,
low level access to a video framebuffer, audio output, mouse, and
%{?with_aa:Requires: aalib-devel}
%{?with_caca:Requires: libcaca-devel}
%{?with_ggi:Requires: libggi-devel}
-%{?with_nas:Requires: nas-devel}
%{?with_svga:Requires: svgalib-devel >= 1.4.0}
+Requires: tslib-devel
+Requires: xorg-lib-libX11-devel
+Suggests: OpenGL-GLU-devel
%description devel
SDL - Header files.
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
-#%patch2 -p1 # needs rewrite
+%{?with_new_gamma_ramp:%patch1 -p1}
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+: > acinclude.m4
%{!?with_alsa:echo 'AC_DEFUN([AM_PATH_ALSA],[$3])' >> acinclude.m4}
%{!?with_esd:echo 'AC_DEFUN([AM_PATH_ESD],[$3])' >> acinclude.m4}
--enable-video-x11-xme \
--enable-video-x11-xrandr \
--enable-video-x11-xv \
- --with-x
+ --with-x \
+ %{!?with_static_libs:--disable-static}
%{__make}
%files
%defattr(644,root,root,755)
%doc BUGS CREDITS README README-SDL.txt TODO WhatsNew
-%attr(755,root,root) %{_libdir}/libSDL-*.so.*.*
+%attr(755,root,root) %{_libdir}/libSDL-1.2.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libSDL-1.2.so.0
%files devel
%defattr(644,root,root,755)
%{_includedir}/SDL
%{_aclocaldir}/sdl.m4
%{_pkgconfigdir}/sdl.pc
-%{_mandir}/man3/*
+%{_mandir}/man3/SDL*.3*
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libSDL.a
+%endif
%files examples
%defattr(644,root,root,755)