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