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_with jack # JACK audio support
9 %bcond_without opengl # OpenGL (GLX) support
10 %bcond_without gles # OpenGL ES (EGL) support
11 %bcond_with kms # KMS/DRM graphics support
12 %bcond_without vulkan # Vulkan graphics support
13 %bcond_without wayland # Wayland graphics support
14 %bcond_without fcitx # Fcitx IM support
15 %bcond_without static_libs # don't build static libraries
16 %bcond_with mmx # MMX instructions
17 %bcond_with sse # SSE instructions
18 %bcond_with sse2 # SSE2 instructions
19 %bcond_with 3dnow # 3Dnow! instructions
20 %bcond_with altivec # Altivec instructions
22 # NOTE: the following libraries are dlopened by soname detected at build time:
23 # libartsc.so.? [if with arts]
24 # libasound.so.2 [if with alsa]
25 # libaudio.so.2 [if with nas]
26 # libdirectfb-*.so --needs patch (-release not supported by configure)
27 # libdrm.so.2 [if with kms]
28 # libesd.so.0 [if with esd]
29 # libfusionsound-*.so --needs patch (-release not supported by configure)
30 # libgbm.so.1 [if with kms]
31 # libjack.so.0 [if with jack]
32 # libpulse-simple.so.0
34 # libwayland-client.so.0 [if with wayland]
35 # libwayland-cursor.so.0 [if with wayland]
36 # libwayland-egl.so.1 [if with wayland]
37 # libxkbcommon.so.0 [if with wayland]
50 %ifarch %{x8664} x32 pentium2 pentium3 pentium4 athlon
53 %ifarch %{x8664} x32 pentium3 pentium4
56 %ifarch %{x8664} x32 pentium4
59 Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library
60 Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
61 Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
65 License: Zlib (BSD-like)
67 Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
68 # Source0-md5: 98b8a1535a757ea1d03ae44e2fb20247
69 Patch0: %{name}-config.patch
70 Patch1: wayland-sizeless-config.patch
71 URL: http://www.libsdl.org/
72 %{?with_kms:BuildRequires: Mesa-libgbm-devel >= 11.1.0}
73 %{?with_directfb:BuildRequires: DirectFB-devel >= 1.0.0}
74 %if %{with opengl} || %{with gles}
75 BuildRequires: EGL-devel
77 %{?with_directfb:BuildRequires: FusionSound-devel >= 1.1.1}
78 %{?with_opengl:BuildRequires: OpenGL-GLX-devel}
79 %{?with_gles:BuildRequires: OpenGLES-devel}
80 %{?with_alsa:BuildRequires: alsa-lib-devel >= 1.0.11}
81 %{?with_arts:BuildRequires: artsc-devel >= 1.1}
82 BuildRequires: autoconf >= 2.59-9
83 BuildRequires: automake
84 BuildRequires: dbus-devel
85 %{?with_esd:BuildRequires: esound-devel >= 0.2.8}
86 %{?with_fcitx:BuildRequires: fcitx-devel}
87 BuildRequires: gcc >= 5:4.0
88 BuildRequires: hidapi-devel
89 BuildRequires: ibus-devel >= 1.0
90 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel >= 0.125}
91 %{?with_kms:BuildRequires: libdrm-devel >= 1.4.82}
92 BuildRequires: libsamplerate-devel
93 BuildRequires: libtool >= 2:2.0
94 %{?with_nas:BuildRequires: nas-devel}
95 BuildRequires: perl-modules
96 BuildRequires: pipewire-devel >= 0.3.20
97 BuildRequires: pkgconfig >= 1:0.7
98 BuildRequires: pulseaudio-devel >= 0.9
99 BuildRequires: udev-devel
100 # wayland-client, wayland-cursor
101 %{?with_wayland:BuildRequires: wayland-devel >= 1.15}
102 %{?with_wayland:BuildRequires: wayland-egl-devel}
103 BuildRequires: xorg-lib-libX11-devel
104 BuildRequires: xorg-lib-libXScrnSaver-devel
105 BuildRequires: xorg-lib-libXcursor-devel
106 BuildRequires: xorg-lib-libXext-devel
107 BuildRequires: xorg-lib-libXi-devel
108 BuildRequires: xorg-lib-libXinerama-devel
109 BuildRequires: xorg-lib-libXrandr-devel
110 BuildRequires: xorg-lib-libXrender-devel
111 BuildRequires: xorg-lib-libXxf86vm-devel
113 BuildRequires: xorg-lib-libxkbcommon-devel
115 BuildRequires: xorg-proto-xextproto-devel
116 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
118 %define specflags_ppc -maltivec
121 SDL (Simple DirectMedia Layer) is a library that allows you portable,
122 low level access to a video framebuffer, audio output, mouse, and
123 keyboard. It can support both windowed and DGA modes of XFree86, and
124 it is designed to be portable - applications linked with SDL can also
125 be built on Win32 and BeOS.
127 %description -l pl.UTF-8
128 SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
129 przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
130 myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
131 jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
132 konsolidowane z SDL można również budować w systemach Win32 i BeOS.
134 %description -l pt_BR.UTF-8
135 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
136 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
138 Essa biblioteca é usada por alguns jogos.
140 %description -l ru.UTF-8
141 SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
142 низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
143 буферу экрана на множестве различных платформ.
146 Summary: SDL - Header files
147 Summary(pl.UTF-8): SDL - Pliki nagłówkowe
148 Summary(pt_BR.UTF-8): Bibliotecas e arquivos de cabeçalho para aplicações SDL
149 Summary(ru.UTF-8): Файлы, необходимые для разработки программ, использующих SDL
150 Summary(uk.UTF-8): Файли, необхідні для розробки програм, що використовують SDL
151 Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) 开发库
152 Group: Development/Libraries
153 Requires: %{name} = %{version}-%{release}
154 %{?with_directfb:Requires: DirectFB-devel >= 1.0.0}
155 Requires: xorg-lib-libX11-devel
156 Suggests: OpenGL-GLU-devel
161 %description devel -l pl.UTF-8
162 SDL - Pliki nagłówkowe.
164 %description devel -l pt_BR.UTF-8
165 Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
166 recursos para o desenvolvimento de aplicativos com SDL.
168 %description devel -l ru.UTF-8
169 Этот пакет содержит файлы, необходимые для разработки программ,
172 %description devel -l uk.UTF-8
173 Цей пакет містить файли, необхідні для розробки програм, що
177 Summary: SDL - static libraries
178 Summary(pl.UTF-8): SDL - biblioteki statyczne
179 Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento de aplicações com a SDL
180 Summary(ru.UTF-8): Статические библиотеки для разработки с использованием SDL
181 Summary(uk.UTF-8): Статичні бібліотеки для розробки з використанням SDL
182 Group: Development/Libraries
183 Requires: %{name}-devel = %{version}-%{release}
186 SDL - static libraries.
188 %description static -l pl.UTF-8
189 SDL - biblioteki statyczne.
191 %description static -l pt_BR.UTF-8
192 Biblioteca estática para desenvolvimento de aplicações com a SDL.
194 %description static -l ru.UTF-8
195 Этот пакет содержит статические библиотеки для разработки программ,
198 %description static -l uk.UTF-8
199 Цей пакет містить статичні бібліотеки для розробки програм, що
203 Summary: SDL - example programs
204 Summary(pl.UTF-8): SDL - programy przykładowe
205 License: Public Domain
206 Group: Development/Libraries
207 Requires: %{name}-devel = %{version}-%{release}
209 %description examples
210 SDL - example programs.
212 %description examples -l pl.UTF-8
213 SDL - przykładowe programy.
222 %{__aclocal} -I acinclude
225 %{!?with_3dnow:--disable-3dnow} \
226 %{!?with_alsa:--disable-alsa} \
227 %{!?with_altiveca:--disable-altivec} \
228 %{!?with_arts:--disable-arts} \
229 %{!?with_esd:--disable-esd} \
230 %{!?with_fcitx:--disable-fcitx} \
231 %{!?with_jack:--disable-jack} \
232 %{!?with_mmx:--disable-mmx} \
233 %{!?with_nas:--disable-nas} \
235 --enable-pthread-sem \
237 %{!?with_sse:--disable-sse --disable-ssemath} \
238 %{!?with_sse2:--disable-sse2} \
239 %{?with_sse:--enable-ssemath} \
240 %{!?with_static_libs:--disable-static} \
241 %{!?with_directfb:--disable-video-directfb} \
242 %{?with_kms:--enable-video-kmsdrm} \
243 --enable-video-opengl%{!?with_opengl:=no} \
244 --enable-video-opengles%{!?with_gles:=no} \
245 --enable-video-vulkan%{!?with_vulkan:=no} \
246 --enable-video-wayland%{!?with_wayland:=no} \
253 rm -rf $RPM_BUILD_ROOT
254 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
257 DESTDIR=$RPM_BUILD_ROOT \
258 m4datadir=%{_aclocaldir}
260 cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
263 rm -rf $RPM_BUILD_ROOT
265 %post -p /sbin/ldconfig
266 %postun -p /sbin/ldconfig
269 %defattr(644,root,root,755)
270 # non-Linux READMEs packaged for portability information
271 %doc BUGS.txt CREDITS.txt LICENSE.txt README*.txt TODO.txt WhatsNew.txt
272 %attr(755,root,root) %{_libdir}/libSDL2-2.0.so.*.*.*
273 %attr(755,root,root) %ghost %{_libdir}/libSDL2-2.0.so.0
276 %defattr(644,root,root,755)
277 %attr(755,root,root) %{_bindir}/sdl2-config
278 %attr(755,root,root) %{_libdir}/libSDL2.so
279 %{_libdir}/libSDL2.la
280 %{_libdir}/libSDL2_test.a
281 %{_libdir}/libSDL2_test.la
282 %{_libdir}/libSDL2main.a
283 %{_libdir}/libSDL2main.la
285 %{_aclocaldir}/sdl2.m4
286 %{_pkgconfigdir}/sdl2.pc
287 %{_libdir}/cmake/SDL2
289 %if %{with static_libs}
291 %defattr(644,root,root,755)
296 %defattr(644,root,root,755)
297 %{_examplesdir}/%{name}-%{version}