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