3 %bcond_with aalib # with aalib graphics support
4 %bcond_with caca # with caca graphics support
5 %bcond_with directfb # with DirectFB graphics support
6 %bcond_with ggi # with GGI graphics support
7 %bcond_with nas # with NAS audio support
8 %bcond_with svga # with svgalib graphics support
9 %bcond_without alsa # without ALSA audio support
10 %bcond_without arts # without aRts audio support
11 %bcond_without esd # without EsounD audio support
12 %bcond_without static_libs # don't build static libraries
14 # NOTE: the following libraries are dlopened by soname detected at build time:
17 # libpulse-simple.so.0
22 Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library
23 Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
24 Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
30 Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
31 # Source0-md5: e52086d1b508fa0b76c52ee30b55bec4
32 Patch0: %{name}-mmx-constraints.patch
33 Patch1: %{name}-acfix.patch
34 Patch2: %{name}-caca.patch
35 URL: http://www.libsdl.org/
36 %{?with_directfb:BuildRequires: DirectFB-devel >= 0.9.15}
37 BuildRequires: OpenGL-GLU-devel
38 %{?with_aalib:BuildRequires: aalib-devel}
39 %{?with_alsa:BuildRequires: alsa-lib-devel >= 0.9.0}
40 %{?with_arts:BuildRequires: artsc-devel >= 1.1}
41 BuildRequires: autoconf >= 2.59-9
42 BuildRequires: automake
43 %{?with_esd:BuildRequires: esound-devel >= 0.2.8}
44 BuildRequires: gcc >= 5:4.0
45 %{?with_caca:BuildRequires: libcaca-devel}
46 %{?with_ggi:BuildRequires: libggi-devel}
47 BuildRequires: libtool >= 2:1.4d
48 %{?with_nas:BuildRequires: nas-devel}
52 BuildRequires: perl-modules
53 %{?with_directfb:BuildRequires: pkgconfig >= 1:0.7}
54 BuildRequires: pulseaudio-devel >= 0.9
55 %{?with_svga:BuildRequires: svgalib-devel >= 1.4.0}
56 BuildRequires: tslib-devel
57 BuildRequires: xorg-lib-libX11-devel
58 BuildRequires: xorg-lib-libXext-devel
59 BuildRequires: xorg-lib-libXrandr-devel
60 BuildRequires: xorg-lib-libXrender-devel
61 BuildRequires: xorg-proto-xextproto-devel
62 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 %define specflags_ppc -maltivec
67 SDL (Simple DirectMedia Layer) is a library that allows you portable,
68 low level access to a video framebuffer, audio output, mouse, and
69 keyboard. It can support both windowed and DGA modes of XFree86, and
70 it is designed to be portable - applications linked with SDL can also
71 be built on Win32 and BeOS.
73 %description -l pl.UTF-8
74 SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
75 przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
76 myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
77 jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
78 konsolidowane z SDL można również budować w systemach Win32 i BeOS.
80 %description -l pt_BR.UTF-8
81 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
82 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
84 Essa biblioteca é usada por alguns jogos.
86 %description -l ru.UTF-8
87 SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
88 низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
89 буферу экрана на множестве различных платформ.
92 Summary: SDL - Header files
93 Summary(pl.UTF-8): SDL - Pliki nagłówkowe
94 Summary(pt_BR.UTF-8): Bibliotecas e arquivos de cabeçalho para aplicações SDL
95 Summary(ru.UTF-8): Файлы, необходимые для разработки программ, использующих SDL
96 Summary(uk.UTF-8): Файли, необхідні для розробки програм, що використовують SDL
97 Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) 开发库
98 Group: Development/Libraries
99 Requires: %{name} = %{version}-%{release}
100 Suggests: OpenGL-GLU-devel
101 %{?with_directfb:Requires: DirectFB-devel >= 0.9.15}
102 %{?with_aa:Requires: aalib-devel}
103 %{?with_caca:Requires: libcaca-devel}
104 %{?with_ggi:Requires: libggi-devel}
105 %{?with_nas:Requires: nas-devel}
106 %{?with_svga:Requires: svgalib-devel >= 1.4.0}
107 Requires: tslib-devel
112 %description devel -l pl.UTF-8
113 SDL - Pliki nagłówkowe.
115 %description devel -l pt_BR.UTF-8
116 Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
117 recursos para o desenvolvimento de aplicativos com SDL.
119 %description devel -l ru.UTF-8
120 Этот пакет содержит файлы, необходимые для разработки программ,
123 %description devel -l uk.UTF-8
124 Цей пакет містить файли, необхідні для розробки програм, що
128 Summary: SDL - static libraries
129 Summary(pl.UTF-8): SDL - biblioteki statyczne
130 Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento de aplicações com a SDL
131 Summary(ru.UTF-8): Статические библиотеки для разработки с использованием SDL
132 Summary(uk.UTF-8): Статичні бібліотеки для розробки з використанням SDL
133 Group: Development/Libraries
134 Requires: %{name}-devel = %{version}-%{release}
137 SDL - static libraries.
139 %description static -l pl.UTF-8
140 SDL - biblioteki statyczne.
142 %description static -l pt_BR.UTF-8
143 Biblioteca estática para desenvolvimento de aplicações com a SDL.
145 %description static -l ru.UTF-8
146 Этот пакет содержит статические библиотеки для разработки программ,
149 %description static -l uk.UTF-8
150 Цей пакет містить статичні бібліотеки для розробки програм, що
154 Summary: SDL - example programs
155 Summary(pl.UTF-8): SDL - programy przykładowe
156 License: Public Domain
157 Group: Development/Libraries
158 Requires: %{name}-devel = %{version}-%{release}
160 %description examples
161 SDL - example programs.
163 %description examples -l pl.UTF-8
164 SDL - przykładowe programy.
170 #%patch2 -p1 # needs rewrite
173 %{!?with_alsa:echo 'AC_DEFUN([AM_PATH_ALSA],[$3])' >> acinclude.m4}
174 %{!?with_esd:echo 'AC_DEFUN([AM_PATH_ESD],[$3])' >> acinclude.m4}
187 %{!?with_alsa:--disable-alsa} \
188 %{!?with_arts:--disable-arts} \
190 %{!?with_esd:--disable-esd} \
191 %{!?with_nas:--disable-nas} \
193 --enable-pthread-sem \
194 %{?with_aalib:--enable-video-aalib} \
195 %{?with_caca:--enable-video-caca} \
196 %{!?with_directfb:--disable-video-directfb} \
198 --enable-video-fbcon \
199 %{?with_ggi:--enable-video-ggi} \
200 --enable-video-opengl \
201 %{!?with_svga:--disable-video-svga} \
202 --enable-video-x11-dgamouse \
203 --enable-video-x11-vm \
204 --enable-video-x11-xinerama \
205 --enable-video-x11-xme \
206 --enable-video-x11-xrandr \
207 --enable-video-x11-xv \
209 %{!?with_static_libs:--disable-static}
214 rm -rf $RPM_BUILD_ROOT
215 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
218 DESTDIR=$RPM_BUILD_ROOT \
219 m4datadir=%{_aclocaldir}
221 rm -rf test/autom4te.cache
222 install test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
227 rm -rf $RPM_BUILD_ROOT
229 %post -p /sbin/ldconfig
230 %postun -p /sbin/ldconfig
233 %defattr(644,root,root,755)
234 %doc BUGS CREDITS README README-SDL.txt TODO WhatsNew
235 %attr(755,root,root) %{_libdir}/libSDL-1.2.so.*.*.*
236 %attr(755,root,root) %ghost %{_libdir}/libSDL-1.2.so.0
239 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_bindir}/sdl-config
242 %attr(755,root,root) %{_libdir}/libSDL.so
244 %{_libdir}/libSDLmain.a
246 %{_aclocaldir}/sdl.m4
247 %{_pkgconfigdir}/sdl.pc
248 %{_mandir}/man3/SDL*.3*
250 %if %{with static_libs}
252 %defattr(644,root,root,755)
257 %defattr(644,root,root,755)
258 %{_examplesdir}/%{name}-%{version}