]> git.pld-linux.org Git - packages/SDL2.git/blame - SDL2.spec
up to 2.30.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
c574ca6f 12%bcond_without pipewire # Pipewire audio support
4b16167d 13%bcond_without vulkan # Vulkan graphics support
35a46df4 14%bcond_without wayland # Wayland graphics support
f3acdcaf 15%bcond_without fcitx # Fcitx IM support
d37ef9b7 16%bcond_without ibus # IBus IM support
916aeb96
JB
17%bcond_without static_libs # don't build static libraries
18%bcond_with mmx # MMX instructions
19%bcond_with sse # SSE instructions
20%bcond_with sse2 # SSE2 instructions
21%bcond_with 3dnow # 3Dnow! instructions
22%bcond_with altivec # Altivec instructions
23#
24# NOTE: the following libraries are dlopened by soname detected at build time:
b63b7f4a
JB
25# libartsc.so.? [if with arts]
26# libasound.so.2 [if with alsa]
27# libaudio.so.2 [if with nas]
916aeb96 28# libdirectfb-*.so --needs patch (-release not supported by configure)
4b16167d 29# libdrm.so.2 [if with kms]
b63b7f4a 30# libesd.so.0 [if with esd]
916aeb96 31# libfusionsound-*.so --needs patch (-release not supported by configure)
4b16167d
JB
32# libgbm.so.1 [if with kms]
33# libjack.so.0 [if with jack]
ce152da7 34# libpipewire-0.3.so.0
916aeb96 35# libpulse-simple.so.0
4b16167d 36# libsamplerate.so.0
b63b7f4a
JB
37# libwayland-client.so.0 [if with wayland]
38# libwayland-cursor.so.0 [if with wayland]
39# libwayland-egl.so.1 [if with wayland]
21fb636d 40# libxkbcommon.so.0 [if with wayland]
916aeb96
JB
41# libX11.so.6
42# libXcursor.so.1
43# libXext.so.6
44# libXi.so.6
916aeb96
JB
45# libXrandr.so.2
46# libXrender.so.1
47# libXss.so.1
916aeb96
JB
48%ifarch k6 athlon
49%define with_3dnow 1
50%endif
f70b2342 51%ifarch %{x8664} x32 pentium2 pentium3 pentium4 athlon
916aeb96
JB
52%define with_mmx 1
53%endif
f70b2342 54%ifarch %{x8664} x32 pentium3 pentium4
916aeb96
JB
55%define with_sse 1
56%endif
f70b2342 57%ifarch %{x8664} x32 pentium4
916aeb96
JB
58%define with_sse2 1
59%endif
60Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library
61Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
62Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
63Name: SDL2
edcf61e5 64Version: 2.30.2
8c7555fe 65Release: 1
916aeb96
JB
66License: Zlib (BSD-like)
67Group: Libraries
68Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
edcf61e5 69# Source0-md5: 08667937c83fada423dacc7cd90f3ec8
916aeb96
JB
70Patch0: %{name}-config.patch
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 81%{?with_arts:BuildRequires: artsc-devel >= 1.1}
d86d9da3 82BuildRequires: autoconf >= 2.65
916aeb96
JB
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
d37ef9b7 89%{?with_ibus:BuildRequires: ibus-devel >= 1.0}
4b16167d 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
c574ca6f 96%{?with_pipewire:BuildRequires: pipewire-devel >= 0.3.20}
916aeb96 97BuildRequires: pkgconfig >= 1:0.7
d86d9da3 98BuildRequires: pulseaudio-devel >= 0.9.15
a50654fd 99BuildRequires: rpm-build >= 4.6
916aeb96 100BuildRequires: udev-devel
b63b7f4a 101# wayland-client, wayland-cursor
378545f7 102%{?with_wayland:BuildRequires: wayland-devel >= 1.18}
f5b3e9d0 103%{?with_wayland:BuildRequires: wayland-egl-devel}
916aeb96
JB
104BuildRequires: xorg-lib-libX11-devel
105BuildRequires: xorg-lib-libXScrnSaver-devel
106BuildRequires: xorg-lib-libXcursor-devel
107BuildRequires: xorg-lib-libXext-devel
108BuildRequires: xorg-lib-libXi-devel
916aeb96
JB
109BuildRequires: xorg-lib-libXrandr-devel
110BuildRequires: xorg-lib-libXrender-devel
21fb636d 111%if %{with wayland}
1311af75 112BuildRequires: xorg-lib-libxkbcommon-devel >= 0.5.0
ac597a0d 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}
916aeb96
JB
154Requires: xorg-lib-libX11-devel
155Suggests: OpenGL-GLU-devel
156
157%description devel
158SDL - Header files.
159
160%description devel -l pl.UTF-8
161SDL - Pliki nagłówkowe.
162
163%description devel -l pt_BR.UTF-8
164Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
165recursos para o desenvolvimento de aplicativos com SDL.
166
167%description devel -l ru.UTF-8
168Этот пакет содержит файлы, необходимые для разработки программ,
169использующих SDL.
170
171%description devel -l uk.UTF-8
172Цей пакет містить файли, необхідні для розробки програм, що
173використовують SDL.
174
175%package static
176Summary: SDL - static libraries
177Summary(pl.UTF-8): SDL - biblioteki statyczne
178Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento de aplicações com a SDL
179Summary(ru.UTF-8): Статические библиотеки для разработки с использованием SDL
180Summary(uk.UTF-8): Статичні бібліотеки для розробки з використанням SDL
181Group: Development/Libraries
182Requires: %{name}-devel = %{version}-%{release}
183
184%description static
185SDL - static libraries.
186
187%description static -l pl.UTF-8
188SDL - biblioteki statyczne.
189
190%description static -l pt_BR.UTF-8
191Biblioteca estática para desenvolvimento de aplicações com a SDL.
192
193%description static -l ru.UTF-8
194Этот пакет содержит статические библиотеки для разработки программ,
195использующих SDL.
196
197%description static -l uk.UTF-8
198Цей пакет містить статичні бібліотеки для розробки програм, що
199використовують SDL.
200
201%package examples
202Summary: SDL - example programs
203Summary(pl.UTF-8): SDL - programy przykładowe
204License: Public Domain
205Group: Development/Libraries
206Requires: %{name}-devel = %{version}-%{release}
a50654fd 207BuildArch: noarch
916aeb96
JB
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
218
219%build
220%{__libtoolize}
221%{__aclocal} -I acinclude
222%{__autoconf}
223%configure \
224 %{!?with_3dnow:--disable-3dnow} \
225 %{!?with_alsa:--disable-alsa} \
226 %{!?with_altiveca:--disable-altivec} \
227 %{!?with_arts:--disable-arts} \
228 %{!?with_esd:--disable-esd} \
f3acdcaf 229 %{!?with_fcitx:--disable-fcitx} \
d37ef9b7 230 %{!?with_ibus:--disable-ibus} \
4b16167d 231 %{!?with_jack:--disable-jack} \
916aeb96
JB
232 %{!?with_mmx:--disable-mmx} \
233 %{!?with_nas:--disable-nas} \
c574ca6f 234 %{!?with_pipewire:--disable-pipewire} \
916aeb96
JB
235 --enable-pthreads \
236 --enable-pthread-sem \
237 --disable-rpath \
238 %{!?with_sse:--disable-sse --disable-ssemath} \
239 %{!?with_sse2:--disable-sse2} \
240 %{?with_sse:--enable-ssemath} \
241 %{!?with_static_libs:--disable-static} \
242 %{!?with_directfb:--disable-video-directfb} \
4b16167d 243 %{?with_kms:--enable-video-kmsdrm} \
8a4f2025 244 --enable-video-opengl%{!?with_opengl:=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
cc0b9d97 272%doc BUGS.txt CREDITS.txt LICENSE.txt README*.txt TODO.txt WhatsNew.txt
916aeb96
JB
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.586273 seconds and 4 git commands to generate.