]> git.pld-linux.org Git - packages/SDL2.git/blame - SDL2.spec
include a fix for the Firewatch game
[packages/SDL2.git] / SDL2.spec
CommitLineData
4b16167d 1# TODO: fcitx
916aeb96
JB
2#
3# Conditional build:
4%bcond_with directfb # DirectFB graphics support
5%bcond_with nas # NAS audio support
6%bcond_without alsa # ALSA audio support
7%bcond_with arts # aRts audio support
8%bcond_with esd # EsounD audio support
4b16167d 9%bcond_with jack # JACK audio support
916aeb96
JB
10%bcond_without gl # OpenGL (GLX) support
11%bcond_without gles # OpenGL ES (EGL) support
4b16167d 12%bcond_with kms # KMS/DRM graphics support
ac597a0d 13%bcond_with mir # Mir graphics support
4b16167d 14%bcond_without vulkan # Vulkan graphics support
35a46df4 15%bcond_without wayland # Wayland graphics support
916aeb96
JB
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
22#
23# NOTE: the following libraries are dlopened by soname detected at build time:
b63b7f4a
JB
24# libartsc.so.? [if with arts]
25# libasound.so.2 [if with alsa]
26# libaudio.so.2 [if with nas]
916aeb96 27# libdirectfb-*.so --needs patch (-release not supported by configure)
4b16167d 28# libdrm.so.2 [if with kms]
b63b7f4a 29# libesd.so.0 [if with esd]
916aeb96 30# libfusionsound-*.so --needs patch (-release not supported by configure)
4b16167d
JB
31# libgbm.so.1 [if with kms]
32# libjack.so.0 [if with jack]
33# libmirclient.so.9 [if with mir]
916aeb96 34# libpulse-simple.so.0
4b16167d 35# libsamplerate.so.0
b63b7f4a
JB
36# libwayland-client.so.0 [if with wayland]
37# libwayland-cursor.so.0 [if with wayland]
38# libwayland-egl.so.1 [if with wayland]
ac597a0d 39# libxkbcommon.so.0 [if with wayland or mir]
916aeb96
JB
40# libX11.so.6
41# libXcursor.so.1
42# libXext.so.6
43# libXi.so.6
44# libXinerama.so.1
45# libXrandr.so.2
46# libXrender.so.1
47# libXss.so.1
48# libXxf86vm.so.1
49%ifarch k6 athlon
50%define with_3dnow 1
51%endif
52%ifarch %{x8664} pentium2 pentium3 pentium4 athlon
53%define with_mmx 1
54%endif
55%ifarch %{x8664} pentium3 pentium4
56%define with_sse 1
57%endif
58%ifarch %{x8664} pentium4
59%define with_sse2 1
60%endif
61Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library
62Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
63Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
64Name: SDL2
7b028698 65Version: 2.0.8
5d96a4f8 66Release: 2
916aeb96
JB
67License: Zlib (BSD-like)
68Group: Libraries
69Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
7b028698 70# Source0-md5: 3800d705cef742c6a634f202c37f263f
916aeb96 71Patch0: %{name}-config.patch
1d5c0a4d 72Patch1: %{name}-cflags.patch
5d96a4f8 73Patch2: firewatch_fix.patch
916aeb96 74URL: http://www.libsdl.org/
4b16167d 75%{?with_kms:BuildRequires: Mesa-libgbm-devel >= 9.0.0}
b63b7f4a 76%{?with_wayland:BuildRequires: Mesa-libwayland-egl-devel}
916aeb96
JB
77%{?with_directfb:BuildRequires: DirectFB-devel >= 1.0.0}
78%{?with_directfb:BuildRequires: FusionSound-devel >= 1.1.1}
79%{?with_gl:BuildRequires: OpenGL-GLX-devel}
80%{?with_gles:BuildRequires: OpenGLES-devel}
81%{?with_alsa:BuildRequires: alsa-lib-devel >= 0.9.0}
82%{?with_arts:BuildRequires: artsc-devel >= 1.1}
83BuildRequires: autoconf >= 2.59-9
84BuildRequires: automake
85BuildRequires: dbus-devel
86%{?with_esd:BuildRequires: esound-devel >= 0.2.8}
87BuildRequires: gcc >= 5:4.0
4b16167d
JB
88BuildRequires: ibus-devel >= 1.0
89%{?with_jack:BuildRequires: jack-audio-connection-kit-devel >= 0.125}
90%{?with_kms:BuildRequires: libdrm-devel >= 2.4.46}
91BuildRequires: libsamplerate-devel
916aeb96 92BuildRequires: libtool >= 2:2.0
4b16167d 93%{?with_mir:BuildRequires: mir-devel >= 0.26}
916aeb96
JB
94%{?with_nas:BuildRequires: nas-devel}
95BuildRequires: perl-modules
96BuildRequires: pkgconfig >= 1:0.7
97BuildRequires: pulseaudio-devel >= 0.9
98BuildRequires: tslib-devel
99BuildRequires: udev-devel
b63b7f4a
JB
100# wayland-client, wayland-cursor
101%{?with_wayland:BuildRequires: wayland-devel}
916aeb96
JB
102BuildRequires: xorg-lib-libX11-devel
103BuildRequires: xorg-lib-libXScrnSaver-devel
104BuildRequires: xorg-lib-libXcursor-devel
105BuildRequires: xorg-lib-libXext-devel
106BuildRequires: xorg-lib-libXi-devel
107BuildRequires: xorg-lib-libXinerama-devel
108BuildRequires: xorg-lib-libXrandr-devel
109BuildRequires: xorg-lib-libXrender-devel
110BuildRequires: xorg-lib-libXxf86vm-devel
ac597a0d
JB
111%if %{with mir} || %{with wayland}
112BuildRequires: xorg-lib-libxkbcommon-devel
113%endif
916aeb96
JB
114BuildRequires: xorg-proto-xextproto-devel
115BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
116
117%define specflags_ppc -maltivec
118
119%description
120SDL (Simple DirectMedia Layer) is a library that allows you portable,
121low level access to a video framebuffer, audio output, mouse, and
122keyboard. It can support both windowed and DGA modes of XFree86, and
123it is designed to be portable - applications linked with SDL can also
124be built on Win32 and BeOS.
125
126%description -l pl.UTF-8
127SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
128przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
129myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
130jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
131konsolidowane z SDL można również budować w systemach Win32 i BeOS.
132
133%description -l pt_BR.UTF-8
134Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
135baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
136
137Essa biblioteca é usada por alguns jogos.
138
139%description -l ru.UTF-8
140SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
141низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
142буферу экрана на множестве различных платформ.
143
144%package devel
145Summary: SDL - Header files
146Summary(pl.UTF-8): SDL - Pliki nagłówkowe
147Summary(pt_BR.UTF-8): Bibliotecas e arquivos de cabeçalho para aplicações SDL
148Summary(ru.UTF-8): Файлы, необходимые для разработки программ, использующих SDL
149Summary(uk.UTF-8): Файли, необхідні для розробки програм, що використовують SDL
150Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) 开发库
151Group: Development/Libraries
152Requires: %{name} = %{version}-%{release}
153%{?with_directfb:Requires: DirectFB-devel >= 1.0.0}
154Requires: tslib-devel
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
1d5c0a4d 218%patch1 -p1
5d96a4f8 219%patch2 -p1
916aeb96
JB
220
221%build
222%{__libtoolize}
223%{__aclocal} -I acinclude
224%{__autoconf}
225%configure \
226 %{!?with_3dnow:--disable-3dnow} \
227 %{!?with_alsa:--disable-alsa} \
228 %{!?with_altiveca:--disable-altivec} \
229 %{!?with_arts:--disable-arts} \
230 %{!?with_esd:--disable-esd} \
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} \
35a46df4 243 --enable-video-mir%{!?with_mir:=no} \
cf76215c 244 --enable-video-opengl%{!?with_gl:=no} \
916aeb96 245 --enable-video-opengles%{!?with_gles:=no} \
4b16167d 246 --enable-video-vulkan%{!?with_vulkan:=no} \
35a46df4 247 --enable-video-wayland%{!?with_wayland:=no} \
916aeb96
JB
248 --with-x
249
35a46df4
JB
250%{__make} \
251 V=1
916aeb96
JB
252
253%install
254rm -rf $RPM_BUILD_ROOT
255install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
256
257%{__make} install \
258 DESTDIR=$RPM_BUILD_ROOT \
259 m4datadir=%{_aclocaldir}
260
261cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
262
263%clean
264rm -rf $RPM_BUILD_ROOT
265
266%post -p /sbin/ldconfig
267%postun -p /sbin/ldconfig
268
269%files
270%defattr(644,root,root,755)
271# non-Linux READMEs packaged for portability information
272%doc BUGS.txt COPYING.txt CREDITS.txt README*.txt TODO.txt WhatsNew.txt
273%attr(755,root,root) %{_libdir}/libSDL2-2.0.so.*.*.*
274%attr(755,root,root) %ghost %{_libdir}/libSDL2-2.0.so.0
275
276%files devel
277%defattr(644,root,root,755)
278%attr(755,root,root) %{_bindir}/sdl2-config
279%attr(755,root,root) %{_libdir}/libSDL2.so
280%{_libdir}/libSDL2.la
281%{_libdir}/libSDL2_test.a
4b16167d 282%{_libdir}/libSDL2_test.la
916aeb96 283%{_libdir}/libSDL2main.a
4b16167d 284%{_libdir}/libSDL2main.la
916aeb96
JB
285%{_includedir}/SDL2
286%{_aclocaldir}/sdl2.m4
287%{_pkgconfigdir}/sdl2.pc
35a46df4 288%{_libdir}/cmake/SDL2
916aeb96
JB
289
290%if %{with static_libs}
291%files static
292%defattr(644,root,root,755)
293%{_libdir}/libSDL2.a
294%endif
295
296%files examples
297%defattr(644,root,root,755)
298%{_examplesdir}/%{name}-%{version}
This page took 0.096051 seconds and 4 git commands to generate.