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