]> git.pld-linux.org Git - packages/SDL2.git/blame - SDL2.spec
add ibus bcond
[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
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
f70b2342 52%ifarch %{x8664} x32 pentium2 pentium3 pentium4 athlon
916aeb96
JB
53%define with_mmx 1
54%endif
f70b2342 55%ifarch %{x8664} x32 pentium3 pentium4
916aeb96
JB
56%define with_sse 1
57%endif
f70b2342 58%ifarch %{x8664} x32 pentium4
916aeb96
JB
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
378545f7 65Version: 2.0.22
1311af75 66Release: 1
916aeb96
JB
67License: Zlib (BSD-like)
68Group: Libraries
69Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
378545f7 70# Source0-md5: 40aedb499cb2b6f106d909d9d97f869a
916aeb96
JB
71Patch0: %{name}-config.patch
72URL: http://www.libsdl.org/
88d7b76f 73%{?with_kms:BuildRequires: Mesa-libgbm-devel >= 11.1.0}
916aeb96 74%{?with_directfb:BuildRequires: DirectFB-devel >= 1.0.0}
cc0b9d97
JP
75%if %{with opengl} || %{with gles}
76BuildRequires: EGL-devel
77%endif
916aeb96 78%{?with_directfb:BuildRequires: FusionSound-devel >= 1.1.1}
8a4f2025 79%{?with_opengl:BuildRequires: OpenGL-GLX-devel}
916aeb96 80%{?with_gles:BuildRequires: OpenGLES-devel}
f5b3e9d0 81%{?with_alsa:BuildRequires: alsa-lib-devel >= 1.0.11}
916aeb96
JB
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}
f3acdcaf 87%{?with_fcitx:BuildRequires: fcitx-devel}
916aeb96 88BuildRequires: gcc >= 5:4.0
88d7b76f 89BuildRequires: hidapi-devel
d37ef9b7 90%{?with_ibus:BuildRequires: ibus-devel >= 1.0}
4b16167d 91%{?with_jack:BuildRequires: jack-audio-connection-kit-devel >= 0.125}
88d7b76f 92%{?with_kms:BuildRequires: libdrm-devel >= 1.4.82}
4b16167d 93BuildRequires: libsamplerate-devel
916aeb96
JB
94BuildRequires: libtool >= 2:2.0
95%{?with_nas:BuildRequires: nas-devel}
96BuildRequires: perl-modules
cc0b9d97 97BuildRequires: pipewire-devel >= 0.3.20
916aeb96
JB
98BuildRequires: pkgconfig >= 1:0.7
99BuildRequires: pulseaudio-devel >= 0.9
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
109BuildRequires: xorg-lib-libXinerama-devel
110BuildRequires: xorg-lib-libXrandr-devel
111BuildRequires: xorg-lib-libXrender-devel
112BuildRequires: xorg-lib-libXxf86vm-devel
21fb636d 113%if %{with wayland}
1311af75 114BuildRequires: xorg-lib-libxkbcommon-devel >= 0.5.0
ac597a0d 115%endif
916aeb96
JB
116BuildRequires: xorg-proto-xextproto-devel
117BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
118
119%define specflags_ppc -maltivec
120
121%description
122SDL (Simple DirectMedia Layer) is a library that allows you portable,
123low level access to a video framebuffer, audio output, mouse, and
124keyboard. It can support both windowed and DGA modes of XFree86, and
125it is designed to be portable - applications linked with SDL can also
126be built on Win32 and BeOS.
127
128%description -l pl.UTF-8
129SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
130przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
131myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
132jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
133konsolidowane z SDL można również budować w systemach Win32 i BeOS.
134
135%description -l pt_BR.UTF-8
136Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
137baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
138
139Essa biblioteca é usada por alguns jogos.
140
141%description -l ru.UTF-8
142SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
143низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
144буферу экрана на множестве различных платформ.
145
146%package devel
147Summary: SDL - Header files
148Summary(pl.UTF-8): SDL - Pliki nagłówkowe
149Summary(pt_BR.UTF-8): Bibliotecas e arquivos de cabeçalho para aplicações SDL
150Summary(ru.UTF-8): Файлы, необходимые для разработки программ, использующих SDL
151Summary(uk.UTF-8): Файли, необхідні для розробки програм, що використовують SDL
152Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) 开发库
153Group: Development/Libraries
154Requires: %{name} = %{version}-%{release}
155%{?with_directfb:Requires: DirectFB-devel >= 1.0.0}
916aeb96
JB
156Requires: xorg-lib-libX11-devel
157Suggests: OpenGL-GLU-devel
158
159%description devel
160SDL - Header files.
161
162%description devel -l pl.UTF-8
163SDL - Pliki nagłówkowe.
164
165%description devel -l pt_BR.UTF-8
166Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
167recursos para o desenvolvimento de aplicativos com SDL.
168
169%description devel -l ru.UTF-8
170Этот пакет содержит файлы, необходимые для разработки программ,
171использующих SDL.
172
173%description devel -l uk.UTF-8
174Цей пакет містить файли, необхідні для розробки програм, що
175використовують SDL.
176
177%package static
178Summary: SDL - static libraries
179Summary(pl.UTF-8): SDL - biblioteki statyczne
180Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento de aplicações com a SDL
181Summary(ru.UTF-8): Статические библиотеки для разработки с использованием SDL
182Summary(uk.UTF-8): Статичні бібліотеки для розробки з використанням SDL
183Group: Development/Libraries
184Requires: %{name}-devel = %{version}-%{release}
185
186%description static
187SDL - static libraries.
188
189%description static -l pl.UTF-8
190SDL - biblioteki statyczne.
191
192%description static -l pt_BR.UTF-8
193Biblioteca estática para desenvolvimento de aplicações com a SDL.
194
195%description static -l ru.UTF-8
196Этот пакет содержит статические библиотеки для разработки программ,
197использующих SDL.
198
199%description static -l uk.UTF-8
200Цей пакет містить статичні бібліотеки для розробки програм, що
201використовують SDL.
202
203%package examples
204Summary: SDL - example programs
205Summary(pl.UTF-8): SDL - programy przykładowe
206License: Public Domain
207Group: Development/Libraries
208Requires: %{name}-devel = %{version}-%{release}
209
210%description examples
211SDL - example programs.
212
213%description examples -l pl.UTF-8
214SDL - przykładowe programy.
215
216%prep
217%setup -q
218%patch0 -p1
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} \
d37ef9b7 231 %{!?with_ibus:--disable-ibus} \
4b16167d 232 %{!?with_jack:--disable-jack} \
916aeb96
JB
233 %{!?with_mmx:--disable-mmx} \
234 %{!?with_nas:--disable-nas} \
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.203156 seconds and 4 git commands to generate.