3 %bcond_with aalib # aalib graphics support
4 %bcond_with caca # caca graphics support
5 %bcond_with directfb # DirectFB graphics support
6 %bcond_with ggi # GGI graphics support
7 %bcond_with nas # NAS audio support
8 %bcond_with svga # svgalib graphics support
9 %bcond_without alsa # ALSA audio support
10 %bcond_with arts # aRts audio support
11 %bcond_with esd # EsounD audio support
12 %bcond_with new_gamma_ramp # causes crashes on nvidia drivers
13 %bcond_without static_libs # don't build static libraries
15 # NOTE: the following libraries are dlopened by soname detected at build time:
16 # libartsc.so.? [if with arts]
17 # libasound.so.2 [if with alsa]
18 # libaudio.so.2 [if with nas]
19 # libesd.so.0 [if with esd]
20 # libpulse-simple.so.0
25 Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library
26 Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
27 Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
33 Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
34 # Source0-md5: 9d96df8417572a2afb781a7c4c811a85
35 Patch0: %{name}-acfix.patch
36 Patch1: %{name}-new_gamma_ramp_support.patch
37 Patch2: fix-mouse-click.patch
38 Patch3: %{name}-config.patch
39 Patch4: %{name}-const_XData32.patch
40 URL: http://www.libsdl.org/
41 %{?with_directfb:BuildRequires: DirectFB-devel >= 0.9.15}
42 BuildRequires: OpenGL-GLU-devel
43 %{?with_aalib:BuildRequires: aalib-devel}
44 %{?with_alsa:BuildRequires: alsa-lib-devel >= 0.9.0}
45 %{?with_arts:BuildRequires: artsc-devel >= 1.1}
46 BuildRequires: autoconf >= 2.59-9
47 BuildRequires: automake
48 %{?with_esd:BuildRequires: esound-devel >= 0.2.8}
49 BuildRequires: gcc >= 5:4.0
50 %{?with_caca:BuildRequires: libcaca-devel}
51 %{?with_ggi:BuildRequires: libggi-devel}
52 BuildRequires: libtool >= 2:2.0
53 %{?with_nas:BuildRequires: nas-devel}
57 BuildRequires: perl-modules
58 BuildRequires: pkgconfig >= 1:0.7
59 BuildRequires: pulseaudio-devel >= 0.9
60 %{?with_svga:BuildRequires: svgalib-devel >= 1.4.0}
61 BuildRequires: tslib-devel
62 BuildRequires: xorg-lib-libX11-devel
63 BuildRequires: xorg-lib-libXext-devel
64 BuildRequires: xorg-lib-libXrandr-devel
65 BuildRequires: xorg-lib-libXrender-devel
66 BuildRequires: xorg-proto-xextproto-devel
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 %define specflags_ppc -maltivec
72 SDL (Simple DirectMedia Layer) is a library that allows you portable,
73 low level access to a video framebuffer, audio output, mouse, and
74 keyboard. It can support both windowed and DGA modes of XFree86, and
75 it is designed to be portable - applications linked with SDL can also
76 be built on Win32 and BeOS.
78 %description -l pl.UTF-8
79 SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
80 przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
81 myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
82 jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
83 konsolidowane z SDL można również budować w systemach Win32 i BeOS.
85 %description -l pt_BR.UTF-8
86 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
87 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
89 Essa biblioteca é usada por alguns jogos.
91 %description -l ru.UTF-8
92 SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
93 низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
94 буферу экрана на множестве различных платформ.
97 Summary: SDL - Header files
98 Summary(pl.UTF-8): SDL - Pliki nagłówkowe
99 Summary(pt_BR.UTF-8): Bibliotecas e arquivos de cabeçalho para aplicações SDL
100 Summary(ru.UTF-8): Файлы, необходимые для разработки программ, использующих SDL
101 Summary(uk.UTF-8): Файли, необхідні для розробки програм, що використовують SDL
102 Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) 开发库
103 Group: Development/Libraries
104 Requires: %{name} = %{version}-%{release}
105 %{?with_directfb:Requires: DirectFB-devel >= 0.9.15}
106 %{?with_aa:Requires: aalib-devel}
107 %{?with_caca:Requires: libcaca-devel}
108 %{?with_ggi:Requires: libggi-devel}
109 %{?with_svga:Requires: svgalib-devel >= 1.4.0}
110 Requires: tslib-devel
111 Requires: xorg-lib-libX11-devel
112 Suggests: OpenGL-GLU-devel
117 %description devel -l pl.UTF-8
118 SDL - Pliki nagłówkowe.
120 %description devel -l pt_BR.UTF-8
121 Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
122 recursos para o desenvolvimento de aplicativos com SDL.
124 %description devel -l ru.UTF-8
125 Этот пакет содержит файлы, необходимые для разработки программ,
128 %description devel -l uk.UTF-8
129 Цей пакет містить файли, необхідні для розробки програм, що
133 Summary: SDL - static libraries
134 Summary(pl.UTF-8): SDL - biblioteki statyczne
135 Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento de aplicações com a SDL
136 Summary(ru.UTF-8): Статические библиотеки для разработки с использованием SDL
137 Summary(uk.UTF-8): Статичні бібліотеки для розробки з використанням SDL
138 Group: Development/Libraries
139 Requires: %{name}-devel = %{version}-%{release}
142 SDL - static libraries.
144 %description static -l pl.UTF-8
145 SDL - biblioteki statyczne.
147 %description static -l pt_BR.UTF-8
148 Biblioteca estática para desenvolvimento de aplicações com a SDL.
150 %description static -l ru.UTF-8
151 Этот пакет содержит статические библиотеки для разработки программ,
154 %description static -l uk.UTF-8
155 Цей пакет містить статичні бібліотеки для розробки програм, що
159 Summary: SDL - example programs
160 Summary(pl.UTF-8): SDL - programy przykładowe
161 License: Public Domain
162 Group: Development/Libraries
163 Requires: %{name}-devel = %{version}-%{release}
165 %description examples
166 SDL - example programs.
168 %description examples -l pl.UTF-8
169 SDL - przykładowe programy.
174 %{?with_new_gamma_ramp:%patch1 -p1}
180 %{!?with_alsa:echo 'AC_DEFUN([AM_PATH_ALSA],[$3])' >> acinclude.m4}
181 %{!?with_esd:echo 'AC_DEFUN([AM_PATH_ESD],[$3])' >> acinclude.m4}
194 %{!?with_alsa:--disable-alsa} \
195 %{!?with_arts:--disable-arts} \
197 %{!?with_esd:--disable-esd} \
198 %{!?with_nas:--disable-nas} \
200 --enable-pthread-sem \
201 %{?with_aalib:--enable-video-aalib} \
202 %{?with_caca:--enable-video-caca} \
203 %{!?with_directfb:--disable-video-directfb} \
205 --enable-video-fbcon \
206 %{?with_ggi:--enable-video-ggi} \
207 --enable-video-opengl \
208 %{!?with_svga:--disable-video-svga} \
209 --enable-video-x11-dgamouse \
210 --enable-video-x11-vm \
211 --enable-video-x11-xinerama \
212 --enable-video-x11-xme \
213 --enable-video-x11-xrandr \
214 --enable-video-x11-xv \
216 %{!?with_static_libs:--disable-static}
221 rm -rf $RPM_BUILD_ROOT
222 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
225 DESTDIR=$RPM_BUILD_ROOT \
226 m4datadir=%{_aclocaldir}
228 rm -rf test/autom4te.cache
229 install test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
234 rm -rf $RPM_BUILD_ROOT
236 %post -p /sbin/ldconfig
237 %postun -p /sbin/ldconfig
240 %defattr(644,root,root,755)
241 %doc BUGS CREDITS README README-SDL.txt TODO WhatsNew
242 %attr(755,root,root) %{_libdir}/libSDL-1.2.so.*.*.*
243 %attr(755,root,root) %ghost %{_libdir}/libSDL-1.2.so.0
246 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/sdl-config
249 %attr(755,root,root) %{_libdir}/libSDL.so
251 %{_libdir}/libSDLmain.a
253 %{_aclocaldir}/sdl.m4
254 %{_pkgconfigdir}/sdl.pc
255 %{_mandir}/man3/SDL*.3*
257 %if %{with static_libs}
259 %defattr(644,root,root,755)
264 %defattr(644,root,root,755)
265 %{_examplesdir}/%{name}-%{version}