3 %bcond_with directfb # DirectFB graphics support
4 %bcond_with nas # NAS audio support
5 %bcond_without alsa # ALSA audio support
6 %bcond_with arts # aRts audio support
7 %bcond_with esd # EsounD audio support
8 %bcond_without gl # OpenGL (GLX) support
9 %bcond_without gles # OpenGL ES (EGL) support
10 %bcond_with mir # Mir graphics support
11 %bcond_without wayland # Wayland graphics support
12 %bcond_without static_libs # don't build static libraries
13 %bcond_with mmx # MMX instructions
14 %bcond_with sse # SSE instructions
15 %bcond_with sse2 # SSE2 instructions
16 %bcond_with 3dnow # 3Dnow! instructions
17 %bcond_with altivec # Altivec instructions
19 # NOTE: the following libraries are dlopened by soname detected at build time:
20 # libartsc.so.? [if with arts]
21 # libasound.so.2 [if with alsa]
22 # libaudio.so.2 [if with nas]
23 # libdirectfb-*.so --needs patch (-release not supported by configure)
24 # libesd.so.0 [if with esd]
25 # libfusionsound-*.so --needs patch (-release not supported by configure)
26 # libmirclient.so.7 [if with mir]
27 # libpulse-simple.so.0
28 # libwayland-client.so.0 [if with wayland]
29 # libwayland-cursor.so.0 [if with wayland]
30 # libwayland-egl.so.1 [if with wayland]
31 # libxkbcommon.so.0 [if with wayland or mir]
44 %ifarch %{x8664} pentium2 pentium3 pentium4 athlon
47 %ifarch %{x8664} pentium3 pentium4
50 %ifarch %{x8664} pentium4
53 Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library
54 Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
55 Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
59 License: Zlib (BSD-like)
61 Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
62 # Source0-md5: d4055424d556b4a908aa76fad63abd3c
63 Patch0: %{name}-config.patch
64 Patch1: %{name}-cflags.patch
65 URL: http://www.libsdl.org/
66 %{?with_wayland:BuildRequires: Mesa-libwayland-egl-devel}
67 %{?with_directfb:BuildRequires: DirectFB-devel >= 1.0.0}
68 %{?with_directfb:BuildRequires: FusionSound-devel >= 1.1.1}
69 %{?with_gl:BuildRequires: OpenGL-GLX-devel}
70 %{?with_gles:BuildRequires: OpenGLES-devel}
71 %{?with_alsa:BuildRequires: alsa-lib-devel >= 0.9.0}
72 %{?with_arts:BuildRequires: artsc-devel >= 1.1}
73 BuildRequires: autoconf >= 2.59-9
74 BuildRequires: automake
75 BuildRequires: dbus-devel
76 %{?with_esd:BuildRequires: esound-devel >= 0.2.8}
77 BuildRequires: gcc >= 5:4.0
78 BuildRequires: libtool >= 2:2.0
79 %{?with_mir:BuildRequires: mir-devel}
80 %{?with_nas:BuildRequires: nas-devel}
81 BuildRequires: perl-modules
82 BuildRequires: pkgconfig >= 1:0.7
83 BuildRequires: pulseaudio-devel >= 0.9
84 BuildRequires: tslib-devel
85 BuildRequires: udev-devel
86 # wayland-client, wayland-cursor
87 %{?with_wayland:BuildRequires: wayland-devel}
88 BuildRequires: xorg-lib-libX11-devel
89 BuildRequires: xorg-lib-libXScrnSaver-devel
90 BuildRequires: xorg-lib-libXcursor-devel
91 BuildRequires: xorg-lib-libXext-devel
92 BuildRequires: xorg-lib-libXi-devel
93 BuildRequires: xorg-lib-libXinerama-devel
94 BuildRequires: xorg-lib-libXrandr-devel
95 BuildRequires: xorg-lib-libXrender-devel
96 BuildRequires: xorg-lib-libXxf86vm-devel
97 %if %{with mir} || %{with wayland}
98 BuildRequires: xorg-lib-libxkbcommon-devel
100 BuildRequires: xorg-proto-xextproto-devel
101 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
103 %define specflags_ppc -maltivec
106 SDL (Simple DirectMedia Layer) is a library that allows you portable,
107 low level access to a video framebuffer, audio output, mouse, and
108 keyboard. It can support both windowed and DGA modes of XFree86, and
109 it is designed to be portable - applications linked with SDL can also
110 be built on Win32 and BeOS.
112 %description -l pl.UTF-8
113 SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
114 przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
115 myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
116 jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
117 konsolidowane z SDL można również budować w systemach Win32 i BeOS.
119 %description -l pt_BR.UTF-8
120 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
121 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
123 Essa biblioteca é usada por alguns jogos.
125 %description -l ru.UTF-8
126 SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
127 низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
128 буферу экрана на множестве различных платформ.
131 Summary: SDL - Header files
132 Summary(pl.UTF-8): SDL - Pliki nagłówkowe
133 Summary(pt_BR.UTF-8): Bibliotecas e arquivos de cabeçalho para aplicações SDL
134 Summary(ru.UTF-8): Файлы, необходимые для разработки программ, использующих SDL
135 Summary(uk.UTF-8): Файли, необхідні для розробки програм, що використовують SDL
136 Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) 开发库
137 Group: Development/Libraries
138 Requires: %{name} = %{version}-%{release}
139 %{?with_directfb:Requires: DirectFB-devel >= 1.0.0}
140 Requires: tslib-devel
141 Requires: xorg-lib-libX11-devel
142 Suggests: OpenGL-GLU-devel
147 %description devel -l pl.UTF-8
148 SDL - Pliki nagłówkowe.
150 %description devel -l pt_BR.UTF-8
151 Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
152 recursos para o desenvolvimento de aplicativos com SDL.
154 %description devel -l ru.UTF-8
155 Этот пакет содержит файлы, необходимые для разработки программ,
158 %description devel -l uk.UTF-8
159 Цей пакет містить файли, необхідні для розробки програм, що
163 Summary: SDL - static libraries
164 Summary(pl.UTF-8): SDL - biblioteki statyczne
165 Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento de aplicações com a SDL
166 Summary(ru.UTF-8): Статические библиотеки для разработки с использованием SDL
167 Summary(uk.UTF-8): Статичні бібліотеки для розробки з використанням SDL
168 Group: Development/Libraries
169 Requires: %{name}-devel = %{version}-%{release}
172 SDL - static libraries.
174 %description static -l pl.UTF-8
175 SDL - biblioteki statyczne.
177 %description static -l pt_BR.UTF-8
178 Biblioteca estática para desenvolvimento de aplicações com a SDL.
180 %description static -l ru.UTF-8
181 Этот пакет содержит статические библиотеки для разработки программ,
184 %description static -l uk.UTF-8
185 Цей пакет містить статичні бібліотеки для розробки програм, що
189 Summary: SDL - example programs
190 Summary(pl.UTF-8): SDL - programy przykładowe
191 License: Public Domain
192 Group: Development/Libraries
193 Requires: %{name}-devel = %{version}-%{release}
195 %description examples
196 SDL - example programs.
198 %description examples -l pl.UTF-8
199 SDL - przykładowe programy.
208 %{__aclocal} -I acinclude
211 %{!?with_3dnow:--disable-3dnow} \
212 %{!?with_alsa:--disable-alsa} \
213 %{!?with_altiveca:--disable-altivec} \
214 %{!?with_arts:--disable-arts} \
215 %{!?with_esd:--disable-esd} \
216 %{!?with_mmx:--disable-mmx} \
217 %{!?with_nas:--disable-nas} \
219 --enable-pthread-sem \
221 %{!?with_sse:--disable-sse --disable-ssemath} \
222 %{!?with_sse2:--disable-sse2} \
223 %{?with_sse:--enable-ssemath} \
224 %{!?with_static_libs:--disable-static} \
225 %{!?with_directfb:--disable-video-directfb} \
226 --enable-video-mir%{!?with_mir:=no} \
227 --enable-video-opengl%{!?with_gl:=no} \
228 --enable-video-opengles%{!?with_gles:=no} \
229 --enable-video-wayland%{!?with_wayland:=no} \
236 rm -rf $RPM_BUILD_ROOT
237 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
240 DESTDIR=$RPM_BUILD_ROOT \
241 m4datadir=%{_aclocaldir}
243 cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
246 rm -rf $RPM_BUILD_ROOT
248 %post -p /sbin/ldconfig
249 %postun -p /sbin/ldconfig
252 %defattr(644,root,root,755)
253 # non-Linux READMEs packaged for portability information
254 %doc BUGS.txt COPYING.txt CREDITS.txt README*.txt TODO.txt WhatsNew.txt
255 %attr(755,root,root) %{_libdir}/libSDL2-2.0.so.*.*.*
256 %attr(755,root,root) %ghost %{_libdir}/libSDL2-2.0.so.0
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_bindir}/sdl2-config
261 %attr(755,root,root) %{_libdir}/libSDL2.so
262 %{_libdir}/libSDL2.la
263 %{_libdir}/libSDL2_test.a
264 %{_libdir}/libSDL2main.a
266 %{_aclocaldir}/sdl2.m4
267 %{_pkgconfigdir}/sdl2.pc
268 %{_libdir}/cmake/SDL2
270 %if %{with static_libs}
272 %defattr(644,root,root,755)
277 %defattr(644,root,root,755)
278 %{_examplesdir}/%{name}-%{version}