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 ibus # IBus IM support
16 %bcond_without static_libs # don't build static libraries
17 %bcond_with mmx # MMX instructions
18 %bcond_with sse # SSE instructions
19 %bcond_with sse2 # SSE2 instructions
20 %bcond_with 3dnow # 3Dnow! instructions
21 %bcond_with altivec # Altivec instructions
23 # NOTE: the following libraries are dlopened by soname detected at build time:
24 # libartsc.so.? [if with arts]
25 # libasound.so.2 [if with alsa]
26 # libaudio.so.2 [if with nas]
27 # libdirectfb-*.so --needs patch (-release not supported by configure)
28 # libdrm.so.2 [if with kms]
29 # libesd.so.0 [if with esd]
30 # libfusionsound-*.so --needs patch (-release not supported by configure)
31 # libgbm.so.1 [if with kms]
32 # libjack.so.0 [if with jack]
33 # libpipewire-0.3.so.0
34 # libpulse-simple.so.0
36 # libwayland-client.so.0 [if with wayland]
37 # libwayland-cursor.so.0 [if with wayland]
38 # libwayland-egl.so.1 [if with wayland]
39 # 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: 10bad2a286f155565edc611f41345de1
69 Patch0: %{name}-config.patch
70 URL: http://www.libsdl.org/
71 %{?with_kms:BuildRequires: Mesa-libgbm-devel >= 11.1.0}
72 %{?with_directfb:BuildRequires: DirectFB-devel >= 1.0.0}
73 %if %{with opengl} || %{with gles}
74 BuildRequires: EGL-devel
76 %{?with_directfb:BuildRequires: FusionSound-devel >= 1.1.1}
77 %{?with_opengl:BuildRequires: OpenGL-GLX-devel}
78 %{?with_gles:BuildRequires: OpenGLES-devel}
79 %{?with_alsa:BuildRequires: alsa-lib-devel >= 1.0.11}
80 %{?with_arts:BuildRequires: artsc-devel >= 1.1}
81 BuildRequires: autoconf >= 2.59-9
82 BuildRequires: automake
83 BuildRequires: dbus-devel
84 %{?with_esd:BuildRequires: esound-devel >= 0.2.8}
85 %{?with_fcitx:BuildRequires: fcitx-devel}
86 BuildRequires: gcc >= 5:4.0
87 BuildRequires: hidapi-devel
88 %{?with_ibus:BuildRequires: ibus-devel >= 1.0}
89 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel >= 0.125}
90 %{?with_kms:BuildRequires: libdrm-devel >= 1.4.82}
91 BuildRequires: libsamplerate-devel
92 BuildRequires: libtool >= 2:2.0
93 %{?with_nas:BuildRequires: nas-devel}
94 BuildRequires: perl-modules
95 BuildRequires: pipewire-devel >= 0.3.20
96 BuildRequires: pkgconfig >= 1:0.7
97 BuildRequires: pulseaudio-devel >= 0.9
98 BuildRequires: udev-devel
99 # wayland-client, wayland-cursor
100 %{?with_wayland:BuildRequires: wayland-devel >= 1.18}
101 %{?with_wayland:BuildRequires: wayland-egl-devel}
102 BuildRequires: xorg-lib-libX11-devel
103 BuildRequires: xorg-lib-libXScrnSaver-devel
104 BuildRequires: xorg-lib-libXcursor-devel
105 BuildRequires: xorg-lib-libXext-devel
106 BuildRequires: xorg-lib-libXi-devel
107 BuildRequires: xorg-lib-libXrandr-devel
108 BuildRequires: xorg-lib-libXrender-devel
110 BuildRequires: xorg-lib-libxkbcommon-devel >= 0.5.0
112 BuildRequires: xorg-proto-xextproto-devel
113 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
115 %define specflags_ppc -maltivec
118 SDL (Simple DirectMedia Layer) is a library that allows you portable,
119 low level access to a video framebuffer, audio output, mouse, and
120 keyboard. It can support both windowed and DGA modes of XFree86, and
121 it is designed to be portable - applications linked with SDL can also
122 be built on Win32 and BeOS.
124 %description -l pl.UTF-8
125 SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
126 przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
127 myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
128 jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
129 konsolidowane z SDL można również budować w systemach Win32 i BeOS.
131 %description -l pt_BR.UTF-8
132 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
133 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
135 Essa biblioteca é usada por alguns jogos.
137 %description -l ru.UTF-8
138 SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
139 низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
140 буферу экрана на множестве различных платформ.
143 Summary: SDL - Header files
144 Summary(pl.UTF-8): SDL - Pliki nagłówkowe
145 Summary(pt_BR.UTF-8): Bibliotecas e arquivos de cabeçalho para aplicações SDL
146 Summary(ru.UTF-8): Файлы, необходимые для разработки программ, использующих SDL
147 Summary(uk.UTF-8): Файли, необхідні для розробки програм, що використовують SDL
148 Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) 开发库
149 Group: Development/Libraries
150 Requires: %{name} = %{version}-%{release}
151 %{?with_directfb:Requires: DirectFB-devel >= 1.0.0}
152 Requires: xorg-lib-libX11-devel
153 Suggests: OpenGL-GLU-devel
158 %description devel -l pl.UTF-8
159 SDL - Pliki nagłówkowe.
161 %description devel -l pt_BR.UTF-8
162 Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
163 recursos para o desenvolvimento de aplicativos com SDL.
165 %description devel -l ru.UTF-8
166 Этот пакет содержит файлы, необходимые для разработки программ,
169 %description devel -l uk.UTF-8
170 Цей пакет містить файли, необхідні для розробки програм, що
174 Summary: SDL - static libraries
175 Summary(pl.UTF-8): SDL - biblioteki statyczne
176 Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento de aplicações com a SDL
177 Summary(ru.UTF-8): Статические библиотеки для разработки с использованием SDL
178 Summary(uk.UTF-8): Статичні бібліотеки для розробки з використанням SDL
179 Group: Development/Libraries
180 Requires: %{name}-devel = %{version}-%{release}
183 SDL - static libraries.
185 %description static -l pl.UTF-8
186 SDL - biblioteki statyczne.
188 %description static -l pt_BR.UTF-8
189 Biblioteca estática para desenvolvimento de aplicações com a SDL.
191 %description static -l ru.UTF-8
192 Этот пакет содержит статические библиотеки для разработки программ,
195 %description static -l uk.UTF-8
196 Цей пакет містить статичні бібліотеки для розробки програм, що
200 Summary: SDL - example programs
201 Summary(pl.UTF-8): SDL - programy przykładowe
202 License: Public Domain
203 Group: Development/Libraries
204 Requires: %{name}-devel = %{version}-%{release}
206 %description examples
207 SDL - example programs.
209 %description examples -l pl.UTF-8
210 SDL - przykładowe programy.
218 %{__aclocal} -I acinclude
221 %{!?with_3dnow:--disable-3dnow} \
222 %{!?with_alsa:--disable-alsa} \
223 %{!?with_altiveca:--disable-altivec} \
224 %{!?with_arts:--disable-arts} \
225 %{!?with_esd:--disable-esd} \
226 %{!?with_fcitx:--disable-fcitx} \
227 %{!?with_ibus:--disable-ibus} \
228 %{!?with_jack:--disable-jack} \
229 %{!?with_mmx:--disable-mmx} \
230 %{!?with_nas:--disable-nas} \
232 --enable-pthread-sem \
234 %{!?with_sse:--disable-sse --disable-ssemath} \
235 %{!?with_sse2:--disable-sse2} \
236 %{?with_sse:--enable-ssemath} \
237 %{!?with_static_libs:--disable-static} \
238 %{!?with_directfb:--disable-video-directfb} \
239 %{?with_kms:--enable-video-kmsdrm} \
240 --enable-video-opengl%{!?with_opengl:=no} \
241 --enable-video-opengles%{!?with_gles:=no} \
242 --enable-video-vulkan%{!?with_vulkan:=no} \
243 --enable-video-wayland%{!?with_wayland:=no} \
250 rm -rf $RPM_BUILD_ROOT
251 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
254 DESTDIR=$RPM_BUILD_ROOT \
255 m4datadir=%{_aclocaldir}
257 cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
260 rm -rf $RPM_BUILD_ROOT
262 %post -p /sbin/ldconfig
263 %postun -p /sbin/ldconfig
266 %defattr(644,root,root,755)
267 # non-Linux READMEs packaged for portability information
268 %doc BUGS.txt CREDITS.txt LICENSE.txt README*.txt TODO.txt WhatsNew.txt
269 %attr(755,root,root) %{_libdir}/libSDL2-2.0.so.*.*.*
270 %attr(755,root,root) %ghost %{_libdir}/libSDL2-2.0.so.0
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_bindir}/sdl2-config
275 %attr(755,root,root) %{_libdir}/libSDL2.so
276 %{_libdir}/libSDL2.la
277 %{_libdir}/libSDL2_test.a
278 %{_libdir}/libSDL2_test.la
279 %{_libdir}/libSDL2main.a
280 %{_libdir}/libSDL2main.la
282 %{_aclocaldir}/sdl2.m4
283 %{_pkgconfigdir}/sdl2.pc
284 %{_libdir}/cmake/SDL2
286 %if %{with static_libs}
288 %defattr(644,root,root,755)
293 %defattr(644,root,root,755)
294 %{_examplesdir}/%{name}-%{version}