]> git.pld-linux.org Git - packages/SDL2.git/blob - SDL2.spec
add ibus bcond
[packages/SDL2.git] / SDL2.spec
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
8 %bcond_with     jack            # JACK audio support
9 %bcond_without  opengl          # OpenGL (GLX) support
10 %bcond_without  gles            # OpenGL ES (EGL) support
11 %bcond_with     kms             # KMS/DRM graphics support
12 %bcond_without  vulkan          # Vulkan graphics support
13 %bcond_without  wayland         # Wayland graphics support
14 %bcond_without  fcitx           # Fcitx IM support
15 %bcond_without  ibus            # IBus IM support
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:
24 # libartsc.so.?                 [if with arts]
25 # libasound.so.2                [if with alsa]
26 # libaudio.so.2                 [if with nas]
27 # libdirectfb-*.so --needs patch (-release not supported by configure)
28 # libdrm.so.2                   [if with kms]
29 # libesd.so.0                   [if with esd]
30 # libfusionsound-*.so --needs patch (-release not supported by configure)
31 # libgbm.so.1                   [if with kms]
32 # libjack.so.0                  [if with jack]
33 # libpipewire-0.3.so.0
34 # libpulse-simple.so.0
35 # libsamplerate.so.0
36 # libwayland-client.so.0        [if with wayland]
37 # libwayland-cursor.so.0        [if with wayland]
38 # libwayland-egl.so.1           [if with wayland]
39 # libxkbcommon.so.0             [if with wayland]
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} x32 pentium2 pentium3 pentium4 athlon
53 %define with_mmx        1
54 %endif
55 %ifarch %{x8664} x32 pentium3 pentium4
56 %define with_sse        1
57 %endif
58 %ifarch %{x8664} x32 pentium4
59 %define with_sse2       1
60 %endif
61 Summary:        SDL (Simple DirectMedia Layer) - Game/Multimedia Library
62 Summary(pl.UTF-8):      SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
63 Summary(zh_CN.UTF-8):   SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
64 Name:           SDL2
65 Version:        2.0.22
66 Release:        1
67 License:        Zlib (BSD-like)
68 Group:          Libraries
69 Source0:        http://www.libsdl.org/release/%{name}-%{version}.tar.gz
70 # Source0-md5:  40aedb499cb2b6f106d909d9d97f869a
71 Patch0:         %{name}-config.patch
72 URL:            http://www.libsdl.org/
73 %{?with_kms:BuildRequires:      Mesa-libgbm-devel >= 11.1.0}
74 %{?with_directfb:BuildRequires: DirectFB-devel >= 1.0.0}
75 %if %{with opengl} || %{with gles}
76 BuildRequires:  EGL-devel
77 %endif
78 %{?with_directfb:BuildRequires: FusionSound-devel >= 1.1.1}
79 %{?with_opengl:BuildRequires:   OpenGL-GLX-devel}
80 %{?with_gles:BuildRequires:     OpenGLES-devel}
81 %{?with_alsa:BuildRequires:     alsa-lib-devel >= 1.0.11}
82 %{?with_arts:BuildRequires:     artsc-devel >= 1.1}
83 BuildRequires:  autoconf >= 2.59-9
84 BuildRequires:  automake
85 BuildRequires:  dbus-devel
86 %{?with_esd:BuildRequires:      esound-devel >= 0.2.8}
87 %{?with_fcitx:BuildRequires:    fcitx-devel}
88 BuildRequires:  gcc >= 5:4.0
89 BuildRequires:  hidapi-devel
90 %{?with_ibus:BuildRequires:     ibus-devel >= 1.0}
91 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel >= 0.125}
92 %{?with_kms:BuildRequires:      libdrm-devel >= 1.4.82}
93 BuildRequires:  libsamplerate-devel
94 BuildRequires:  libtool >= 2:2.0
95 %{?with_nas:BuildRequires:      nas-devel}
96 BuildRequires:  perl-modules
97 BuildRequires:  pipewire-devel >= 0.3.20
98 BuildRequires:  pkgconfig >= 1:0.7
99 BuildRequires:  pulseaudio-devel >= 0.9
100 BuildRequires:  udev-devel
101 # wayland-client, wayland-cursor
102 %{?with_wayland:BuildRequires:  wayland-devel >= 1.18}
103 %{?with_wayland:BuildRequires:  wayland-egl-devel}
104 BuildRequires:  xorg-lib-libX11-devel
105 BuildRequires:  xorg-lib-libXScrnSaver-devel
106 BuildRequires:  xorg-lib-libXcursor-devel
107 BuildRequires:  xorg-lib-libXext-devel
108 BuildRequires:  xorg-lib-libXi-devel
109 BuildRequires:  xorg-lib-libXinerama-devel
110 BuildRequires:  xorg-lib-libXrandr-devel
111 BuildRequires:  xorg-lib-libXrender-devel
112 BuildRequires:  xorg-lib-libXxf86vm-devel
113 %if %{with wayland}
114 BuildRequires:  xorg-lib-libxkbcommon-devel >= 0.5.0
115 %endif
116 BuildRequires:  xorg-proto-xextproto-devel
117 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
118
119 %define         specflags_ppc   -maltivec
120
121 %description
122 SDL (Simple DirectMedia Layer) is a library that allows you portable,
123 low level access to a video framebuffer, audio output, mouse, and
124 keyboard. It can support both windowed and DGA modes of XFree86, and
125 it is designed to be portable - applications linked with SDL can also
126 be built on Win32 and BeOS.
127
128 %description -l pl.UTF-8
129 SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
130 przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
131 myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
132 jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
133 konsolidowane z SDL można również budować w systemach Win32 i BeOS.
134
135 %description -l pt_BR.UTF-8
136 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
137 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
138
139 Essa biblioteca é usada por alguns jogos.
140
141 %description -l ru.UTF-8
142 SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
143 низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
144 буферу экрана на множестве различных платформ.
145
146 %package devel
147 Summary:        SDL - Header files
148 Summary(pl.UTF-8):      SDL - Pliki nagłówkowe
149 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de cabeçalho para aplicações SDL
150 Summary(ru.UTF-8):      Файлы, необходимые для разработки программ, использующих SDL
151 Summary(uk.UTF-8):      Файли, необхідні для розробки програм, що використовують SDL
152 Summary(zh_CN.UTF-8):   SDL (Simple DirectMedia Layer) 开发库
153 Group:          Development/Libraries
154 Requires:       %{name} = %{version}-%{release}
155 %{?with_directfb:Requires:      DirectFB-devel >= 1.0.0}
156 Requires:       xorg-lib-libX11-devel
157 Suggests:       OpenGL-GLU-devel
158
159 %description devel
160 SDL - Header files.
161
162 %description devel -l pl.UTF-8
163 SDL - Pliki nagłówkowe.
164
165 %description devel -l pt_BR.UTF-8
166 Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
167 recursos 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
178 Summary:        SDL - static libraries
179 Summary(pl.UTF-8):      SDL - biblioteki statyczne
180 Summary(pt_BR.UTF-8):   Biblioteca estática para desenvolvimento de aplicações com a SDL
181 Summary(ru.UTF-8):      Статические библиотеки для разработки с использованием SDL
182 Summary(uk.UTF-8):      Статичні бібліотеки для розробки з використанням SDL
183 Group:          Development/Libraries
184 Requires:       %{name}-devel = %{version}-%{release}
185
186 %description static
187 SDL - static libraries.
188
189 %description static -l pl.UTF-8
190 SDL - biblioteki statyczne.
191
192 %description static -l pt_BR.UTF-8
193 Biblioteca 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
204 Summary:        SDL - example programs
205 Summary(pl.UTF-8):      SDL - programy przykładowe
206 License:        Public Domain
207 Group:          Development/Libraries
208 Requires:       %{name}-devel = %{version}-%{release}
209
210 %description examples
211 SDL - example programs.
212
213 %description examples -l pl.UTF-8
214 SDL - 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} \
230         %{!?with_fcitx:--disable-fcitx} \
231         %{!?with_ibus:--disable-ibus} \
232         %{!?with_jack:--disable-jack} \
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} \
243         %{?with_kms:--enable-video-kmsdrm} \
244         --enable-video-opengl%{!?with_opengl:=no} \
245         --enable-video-opengles%{!?with_gles:=no} \
246         --enable-video-vulkan%{!?with_vulkan:=no} \
247         --enable-video-wayland%{!?with_wayland:=no} \
248         --with-x
249
250 %{__make} \
251         V=1
252
253 %install
254 rm -rf $RPM_BUILD_ROOT
255 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
256
257 %{__make} install \
258         DESTDIR=$RPM_BUILD_ROOT \
259         m4datadir=%{_aclocaldir}
260
261 cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
262
263 %clean
264 rm -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 CREDITS.txt LICENSE.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
282 %{_libdir}/libSDL2_test.la
283 %{_libdir}/libSDL2main.a
284 %{_libdir}/libSDL2main.la
285 %{_includedir}/SDL2
286 %{_aclocaldir}/sdl2.m4
287 %{_pkgconfigdir}/sdl2.pc
288 %{_libdir}/cmake/SDL2
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.12478 seconds and 4 git commands to generate.