]> git.pld-linux.org Git - packages/SDL2.git/blame - SDL2.spec
upstream patch for fixing crash with wayland driver; rel 2
[packages/SDL2.git] / SDL2.spec
CommitLineData
916aeb96
JB
1#
2# Conditional build:
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
4b16167d 8%bcond_with jack # JACK audio support
8a4f2025 9%bcond_without opengl # OpenGL (GLX) support
916aeb96 10%bcond_without gles # OpenGL ES (EGL) support
4b16167d 11%bcond_with kms # KMS/DRM graphics support
4b16167d 12%bcond_without vulkan # Vulkan graphics support
35a46df4 13%bcond_without wayland # Wayland graphics support
f3acdcaf 14%bcond_without fcitx # Fcitx IM support
916aeb96
JB
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
21#
22# NOTE: the following libraries are dlopened by soname detected at build time:
b63b7f4a
JB
23# libartsc.so.? [if with arts]
24# libasound.so.2 [if with alsa]
25# libaudio.so.2 [if with nas]
916aeb96 26# libdirectfb-*.so --needs patch (-release not supported by configure)
4b16167d 27# libdrm.so.2 [if with kms]
b63b7f4a 28# libesd.so.0 [if with esd]
916aeb96 29# libfusionsound-*.so --needs patch (-release not supported by configure)
4b16167d
JB
30# libgbm.so.1 [if with kms]
31# libjack.so.0 [if with jack]
916aeb96 32# libpulse-simple.so.0
4b16167d 33# libsamplerate.so.0
b63b7f4a
JB
34# libwayland-client.so.0 [if with wayland]
35# libwayland-cursor.so.0 [if with wayland]
36# libwayland-egl.so.1 [if with wayland]
21fb636d 37# libxkbcommon.so.0 [if with wayland]
916aeb96
JB
38# libX11.so.6
39# libXcursor.so.1
40# libXext.so.6
41# libXi.so.6
42# libXinerama.so.1
43# libXrandr.so.2
44# libXrender.so.1
45# libXss.so.1
46# libXxf86vm.so.1
47%ifarch k6 athlon
48%define with_3dnow 1
49%endif
f70b2342 50%ifarch %{x8664} x32 pentium2 pentium3 pentium4 athlon
916aeb96
JB
51%define with_mmx 1
52%endif
f70b2342 53%ifarch %{x8664} x32 pentium3 pentium4
916aeb96
JB
54%define with_sse 1
55%endif
f70b2342 56%ifarch %{x8664} x32 pentium4
916aeb96
JB
57%define with_sse2 1
58%endif
59Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library
60Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
61Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
62Name: SDL2
cc0b9d97 63Version: 2.0.16
6277c5e0 64Release: 2
916aeb96
JB
65License: Zlib (BSD-like)
66Group: Libraries
67Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
cc0b9d97 68# Source0-md5: 98b8a1535a757ea1d03ae44e2fb20247
916aeb96 69Patch0: %{name}-config.patch
6277c5e0 70Patch1: wayland-sizeless-config.patch
916aeb96 71URL: http://www.libsdl.org/
88d7b76f 72%{?with_kms:BuildRequires: Mesa-libgbm-devel >= 11.1.0}
916aeb96 73%{?with_directfb:BuildRequires: DirectFB-devel >= 1.0.0}
cc0b9d97
JP
74%if %{with opengl} || %{with gles}
75BuildRequires: EGL-devel
76%endif
916aeb96 77%{?with_directfb:BuildRequires: FusionSound-devel >= 1.1.1}
8a4f2025 78%{?with_opengl:BuildRequires: OpenGL-GLX-devel}
916aeb96 79%{?with_gles:BuildRequires: OpenGLES-devel}
f5b3e9d0 80%{?with_alsa:BuildRequires: alsa-lib-devel >= 1.0.11}
916aeb96
JB
81%{?with_arts:BuildRequires: artsc-devel >= 1.1}
82BuildRequires: autoconf >= 2.59-9
83BuildRequires: automake
84BuildRequires: dbus-devel
85%{?with_esd:BuildRequires: esound-devel >= 0.2.8}
f3acdcaf 86%{?with_fcitx:BuildRequires: fcitx-devel}
916aeb96 87BuildRequires: gcc >= 5:4.0
88d7b76f 88BuildRequires: hidapi-devel
4b16167d
JB
89BuildRequires: ibus-devel >= 1.0
90%{?with_jack:BuildRequires: jack-audio-connection-kit-devel >= 0.125}
88d7b76f 91%{?with_kms:BuildRequires: libdrm-devel >= 1.4.82}
4b16167d 92BuildRequires: libsamplerate-devel
916aeb96
JB
93BuildRequires: libtool >= 2:2.0
94%{?with_nas:BuildRequires: nas-devel}
95BuildRequires: perl-modules
cc0b9d97 96BuildRequires: pipewire-devel >= 0.3.20
916aeb96
JB
97BuildRequires: pkgconfig >= 1:0.7
98BuildRequires: pulseaudio-devel >= 0.9
916aeb96 99BuildRequires: udev-devel
b63b7f4a 100# wayland-client, wayland-cursor
cc0b9d97 101%{?with_wayland:BuildRequires: wayland-devel >= 1.15}
f5b3e9d0 102%{?with_wayland:BuildRequires: wayland-egl-devel}
916aeb96
JB
103BuildRequires: xorg-lib-libX11-devel
104BuildRequires: xorg-lib-libXScrnSaver-devel
105BuildRequires: xorg-lib-libXcursor-devel
106BuildRequires: xorg-lib-libXext-devel
107BuildRequires: xorg-lib-libXi-devel
108BuildRequires: xorg-lib-libXinerama-devel
109BuildRequires: xorg-lib-libXrandr-devel
110BuildRequires: xorg-lib-libXrender-devel
111BuildRequires: xorg-lib-libXxf86vm-devel
21fb636d 112%if %{with wayland}
ac597a0d
JB
113BuildRequires: xorg-lib-libxkbcommon-devel
114%endif
916aeb96
JB
115BuildRequires: xorg-proto-xextproto-devel
116BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
117
118%define specflags_ppc -maltivec
119
120%description
121SDL (Simple DirectMedia Layer) is a library that allows you portable,
122low level access to a video framebuffer, audio output, mouse, and
123keyboard. It can support both windowed and DGA modes of XFree86, and
124it is designed to be portable - applications linked with SDL can also
125be built on Win32 and BeOS.
126
127%description -l pl.UTF-8
128SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
129przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
130myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
131jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
132konsolidowane z SDL można również budować w systemach Win32 i BeOS.
133
134%description -l pt_BR.UTF-8
135Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
136baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
137
138Essa biblioteca é usada por alguns jogos.
139
140%description -l ru.UTF-8
141SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
142низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
143буферу экрана на множестве различных платформ.
144
145%package devel
146Summary: SDL - Header files
147Summary(pl.UTF-8): SDL - Pliki nagłówkowe
148Summary(pt_BR.UTF-8): Bibliotecas e arquivos de cabeçalho para aplicações SDL
149Summary(ru.UTF-8): Файлы, необходимые для разработки программ, использующих SDL
150Summary(uk.UTF-8): Файли, необхідні для розробки програм, що використовують SDL
151Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) 开发库
152Group: Development/Libraries
153Requires: %{name} = %{version}-%{release}
154%{?with_directfb:Requires: DirectFB-devel >= 1.0.0}
916aeb96
JB
155Requires: xorg-lib-libX11-devel
156Suggests: OpenGL-GLU-devel
157
158%description devel
159SDL - Header files.
160
161%description devel -l pl.UTF-8
162SDL - Pliki nagłówkowe.
163
164%description devel -l pt_BR.UTF-8
165Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
166recursos para o desenvolvimento de aplicativos com SDL.
167
168%description devel -l ru.UTF-8
169Этот пакет содержит файлы, необходимые для разработки программ,
170использующих SDL.
171
172%description devel -l uk.UTF-8
173Цей пакет містить файли, необхідні для розробки програм, що
174використовують SDL.
175
176%package static
177Summary: SDL - static libraries
178Summary(pl.UTF-8): SDL - biblioteki statyczne
179Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento de aplicações com a SDL
180Summary(ru.UTF-8): Статические библиотеки для разработки с использованием SDL
181Summary(uk.UTF-8): Статичні бібліотеки для розробки з використанням SDL
182Group: Development/Libraries
183Requires: %{name}-devel = %{version}-%{release}
184
185%description static
186SDL - static libraries.
187
188%description static -l pl.UTF-8
189SDL - biblioteki statyczne.
190
191%description static -l pt_BR.UTF-8
192Biblioteca estática para desenvolvimento de aplicações com a SDL.
193
194%description static -l ru.UTF-8
195Этот пакет содержит статические библиотеки для разработки программ,
196использующих SDL.
197
198%description static -l uk.UTF-8
199Цей пакет містить статичні бібліотеки для розробки програм, що
200використовують SDL.
201
202%package examples
203Summary: SDL - example programs
204Summary(pl.UTF-8): SDL - programy przykładowe
205License: Public Domain
206Group: Development/Libraries
207Requires: %{name}-devel = %{version}-%{release}
208
209%description examples
210SDL - example programs.
211
212%description examples -l pl.UTF-8
213SDL - przykładowe programy.
214
215%prep
216%setup -q
217%patch0 -p1
6277c5e0 218%patch1 -p1
916aeb96
JB
219
220%build
221%{__libtoolize}
222%{__aclocal} -I acinclude
223%{__autoconf}
224%configure \
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} \
f3acdcaf 230 %{!?with_fcitx:--disable-fcitx} \
4b16167d 231 %{!?with_jack:--disable-jack} \
916aeb96
JB
232 %{!?with_mmx:--disable-mmx} \
233 %{!?with_nas:--disable-nas} \
234 --enable-pthreads \
235 --enable-pthread-sem \
236 --disable-rpath \
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} \
4b16167d 242 %{?with_kms:--enable-video-kmsdrm} \
8a4f2025 243 --enable-video-opengl%{!?with_opengl:=no} \
916aeb96 244 --enable-video-opengles%{!?with_gles:=no} \
4b16167d 245 --enable-video-vulkan%{!?with_vulkan:=no} \
35a46df4 246 --enable-video-wayland%{!?with_wayland:=no} \
916aeb96
JB
247 --with-x
248
35a46df4
JB
249%{__make} \
250 V=1
916aeb96
JB
251
252%install
253rm -rf $RPM_BUILD_ROOT
254install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
255
256%{__make} install \
257 DESTDIR=$RPM_BUILD_ROOT \
258 m4datadir=%{_aclocaldir}
259
260cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
261
262%clean
263rm -rf $RPM_BUILD_ROOT
264
265%post -p /sbin/ldconfig
266%postun -p /sbin/ldconfig
267
268%files
269%defattr(644,root,root,755)
270# non-Linux READMEs packaged for portability information
cc0b9d97 271%doc BUGS.txt CREDITS.txt LICENSE.txt README*.txt TODO.txt WhatsNew.txt
916aeb96
JB
272%attr(755,root,root) %{_libdir}/libSDL2-2.0.so.*.*.*
273%attr(755,root,root) %ghost %{_libdir}/libSDL2-2.0.so.0
274
275%files devel
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
4b16167d 281%{_libdir}/libSDL2_test.la
916aeb96 282%{_libdir}/libSDL2main.a
4b16167d 283%{_libdir}/libSDL2main.la
916aeb96
JB
284%{_includedir}/SDL2
285%{_aclocaldir}/sdl2.m4
286%{_pkgconfigdir}/sdl2.pc
35a46df4 287%{_libdir}/cmake/SDL2
916aeb96
JB
288
289%if %{with static_libs}
290%files static
291%defattr(644,root,root,755)
292%{_libdir}/libSDL2.a
293%endif
294
295%files examples
296%defattr(644,root,root,755)
297%{_examplesdir}/%{name}-%{version}
This page took 0.59975 seconds and 4 git commands to generate.