]> git.pld-linux.org Git - packages/SDL2.git/blob - SDL2.spec
up to 2.0.12
[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_without  vulkan          # Vulkan graphics support
14 %bcond_without  wayland         # Wayland graphics support
15 %bcond_without  static_libs     # don't build static libraries
16 %bcond_with     mmx             # MMX instructions
17 %bcond_with     sse             # SSE instructions
18 %bcond_with     sse2            # SSE2 instructions
19 %bcond_with     3dnow           # 3Dnow! instructions
20 %bcond_with     altivec         # Altivec instructions
21 #
22 # NOTE: the following libraries are dlopened by soname detected at build time:
23 # libartsc.so.?                 [if with arts]
24 # libasound.so.2                [if with alsa]
25 # libaudio.so.2                 [if with nas]
26 # libdirectfb-*.so --needs patch (-release not supported by configure)
27 # libdrm.so.2                   [if with kms]
28 # libesd.so.0                   [if with esd]
29 # libfusionsound-*.so --needs patch (-release not supported by configure)
30 # libgbm.so.1                   [if with kms]
31 # libjack.so.0                  [if with jack]
32 # libpulse-simple.so.0
33 # libsamplerate.so.0
34 # libwayland-client.so.0        [if with wayland]
35 # libwayland-cursor.so.0        [if with wayland]
36 # libwayland-egl.so.1           [if with wayland]
37 # libxkbcommon.so.0             [if with wayland]
38 # libX11.so.6
39 # libXcursor.so.1
40 # libXext.so.6
41 # libXi.so.6
42 # libXinerama.so.1
43 # libXrandr.so.2
44 # libXrender.so.1
45 # libXss.so.1
46 # libXxf86vm.so.1
47 %ifarch k6 athlon
48 %define with_3dnow      1
49 %endif
50 %ifarch %{x8664} pentium2 pentium3 pentium4 athlon
51 %define with_mmx        1
52 %endif
53 %ifarch %{x8664} pentium3 pentium4
54 %define with_sse        1
55 %endif
56 %ifarch %{x8664} pentium4
57 %define with_sse2       1
58 %endif
59 Summary:        SDL (Simple DirectMedia Layer) - Game/Multimedia Library
60 Summary(pl.UTF-8):      SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
61 Summary(zh_CN.UTF-8):   SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
62 Name:           SDL2
63 Version:        2.0.12
64 Release:        1
65 License:        Zlib (BSD-like)
66 Group:          Libraries
67 Source0:        http://www.libsdl.org/release/%{name}-%{version}.tar.gz
68 # Source0-md5:  783b6f2df8ff02b19bb5ce492b99c8ff
69 Patch0:         %{name}-config.patch
70 Patch1:         %{name}-cflags.patch
71 URL:            http://www.libsdl.org/
72 %{?with_kms:BuildRequires:      Mesa-libgbm-devel >= 9.0.0}
73 %{?with_directfb:BuildRequires: DirectFB-devel >= 1.0.0}
74 %{?with_directfb:BuildRequires: FusionSound-devel >= 1.1.1}
75 %{?with_gl:BuildRequires:       OpenGL-GLX-devel}
76 %{?with_gles:BuildRequires:     OpenGLES-devel}
77 %{?with_alsa:BuildRequires:     alsa-lib-devel >= 1.0.11}
78 %{?with_arts:BuildRequires:     artsc-devel >= 1.1}
79 BuildRequires:  autoconf >= 2.59-9
80 BuildRequires:  automake
81 BuildRequires:  dbus-devel
82 %{?with_esd:BuildRequires:      esound-devel >= 0.2.8}
83 BuildRequires:  gcc >= 5:4.0
84 BuildRequires:  ibus-devel >= 1.0
85 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel >= 0.125}
86 %{?with_kms:BuildRequires:      libdrm-devel >= 2.4.46}
87 BuildRequires:  libsamplerate-devel
88 BuildRequires:  libtool >= 2:2.0
89 %{?with_nas:BuildRequires:      nas-devel}
90 BuildRequires:  perl-modules
91 BuildRequires:  pkgconfig >= 1:0.7
92 BuildRequires:  pulseaudio-devel >= 0.9
93 BuildRequires:  tslib-devel
94 BuildRequires:  udev-devel
95 # wayland-client, wayland-cursor
96 %{?with_wayland:BuildRequires:  wayland-devel}
97 %{?with_wayland:BuildRequires:  wayland-egl-devel}
98 BuildRequires:  xorg-lib-libX11-devel
99 BuildRequires:  xorg-lib-libXScrnSaver-devel
100 BuildRequires:  xorg-lib-libXcursor-devel
101 BuildRequires:  xorg-lib-libXext-devel
102 BuildRequires:  xorg-lib-libXi-devel
103 BuildRequires:  xorg-lib-libXinerama-devel
104 BuildRequires:  xorg-lib-libXrandr-devel
105 BuildRequires:  xorg-lib-libXrender-devel
106 BuildRequires:  xorg-lib-libXxf86vm-devel
107 %if %{with wayland}
108 BuildRequires:  xorg-lib-libxkbcommon-devel
109 %endif
110 BuildRequires:  xorg-proto-xextproto-devel
111 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
112
113 %define         specflags_ppc   -maltivec
114
115 %description
116 SDL (Simple DirectMedia Layer) is a library that allows you portable,
117 low level access to a video framebuffer, audio output, mouse, and
118 keyboard. It can support both windowed and DGA modes of XFree86, and
119 it is designed to be portable - applications linked with SDL can also
120 be built on Win32 and BeOS.
121
122 %description -l pl.UTF-8
123 SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
124 przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
125 myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
126 jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
127 konsolidowane z SDL można również budować w systemach Win32 i BeOS.
128
129 %description -l pt_BR.UTF-8
130 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
131 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
132
133 Essa biblioteca é usada por alguns jogos.
134
135 %description -l ru.UTF-8
136 SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
137 низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
138 буферу экрана на множестве различных платформ.
139
140 %package devel
141 Summary:        SDL - Header files
142 Summary(pl.UTF-8):      SDL - Pliki nagłówkowe
143 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de cabeçalho para aplicações SDL
144 Summary(ru.UTF-8):      Файлы, необходимые для разработки программ, использующих SDL
145 Summary(uk.UTF-8):      Файли, необхідні для розробки програм, що використовують SDL
146 Summary(zh_CN.UTF-8):   SDL (Simple DirectMedia Layer) 开发库
147 Group:          Development/Libraries
148 Requires:       %{name} = %{version}-%{release}
149 %{?with_directfb:Requires:      DirectFB-devel >= 1.0.0}
150 Requires:       tslib-devel
151 Requires:       xorg-lib-libX11-devel
152 Suggests:       OpenGL-GLU-devel
153
154 %description devel
155 SDL - Header files.
156
157 %description devel -l pl.UTF-8
158 SDL - Pliki nagłówkowe.
159
160 %description devel -l pt_BR.UTF-8
161 Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
162 recursos para o desenvolvimento de aplicativos com SDL.
163
164 %description devel -l ru.UTF-8
165 Этот пакет содержит файлы, необходимые для разработки программ,
166 использующих SDL.
167
168 %description devel -l uk.UTF-8
169 Цей пакет містить файли, необхідні для розробки програм, що
170 використовують SDL.
171
172 %package static
173 Summary:        SDL - static libraries
174 Summary(pl.UTF-8):      SDL - biblioteki statyczne
175 Summary(pt_BR.UTF-8):   Biblioteca estática para desenvolvimento de aplicações com a SDL
176 Summary(ru.UTF-8):      Статические библиотеки для разработки с использованием SDL
177 Summary(uk.UTF-8):      Статичні бібліотеки для розробки з використанням SDL
178 Group:          Development/Libraries
179 Requires:       %{name}-devel = %{version}-%{release}
180
181 %description static
182 SDL - static libraries.
183
184 %description static -l pl.UTF-8
185 SDL - biblioteki statyczne.
186
187 %description static -l pt_BR.UTF-8
188 Biblioteca estática para desenvolvimento de aplicações com a SDL.
189
190 %description static -l ru.UTF-8
191 Этот пакет содержит статические библиотеки для разработки программ,
192 использующих SDL.
193
194 %description static -l uk.UTF-8
195 Цей пакет містить статичні бібліотеки для розробки програм, що
196 використовують SDL.
197
198 %package examples
199 Summary:        SDL - example programs
200 Summary(pl.UTF-8):      SDL - programy przykładowe
201 License:        Public Domain
202 Group:          Development/Libraries
203 Requires:       %{name}-devel = %{version}-%{release}
204
205 %description examples
206 SDL - example programs.
207
208 %description examples -l pl.UTF-8
209 SDL - przykładowe programy.
210
211 %prep
212 %setup -q
213 %patch0 -p1
214 %patch1 -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} \
226         %{!?with_jack:--disable-jack} \
227         %{!?with_mmx:--disable-mmx} \
228         %{!?with_nas:--disable-nas} \
229         --enable-pthreads \
230         --enable-pthread-sem \
231         --disable-rpath \
232         %{!?with_sse:--disable-sse --disable-ssemath} \
233         %{!?with_sse2:--disable-sse2} \
234         %{?with_sse:--enable-ssemath} \
235         %{!?with_static_libs:--disable-static} \
236         %{!?with_directfb:--disable-video-directfb} \
237         %{?with_kms:--enable-video-kmsdrm} \
238         --enable-video-opengl%{!?with_gl:=no} \
239         --enable-video-opengles%{!?with_gles:=no} \
240         --enable-video-vulkan%{!?with_vulkan:=no} \
241         --enable-video-wayland%{!?with_wayland:=no} \
242         --with-x
243
244 %{__make} \
245         V=1
246
247 %install
248 rm -rf $RPM_BUILD_ROOT
249 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
250
251 %{__make} install \
252         DESTDIR=$RPM_BUILD_ROOT \
253         m4datadir=%{_aclocaldir}
254
255 cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
256
257 %clean
258 rm -rf $RPM_BUILD_ROOT
259
260 %post   -p /sbin/ldconfig
261 %postun -p /sbin/ldconfig
262
263 %files
264 %defattr(644,root,root,755)
265 # non-Linux READMEs packaged for portability information
266 %doc BUGS.txt COPYING.txt CREDITS.txt README*.txt TODO.txt WhatsNew.txt
267 %attr(755,root,root) %{_libdir}/libSDL2-2.0.so.*.*.*
268 %attr(755,root,root) %ghost %{_libdir}/libSDL2-2.0.so.0
269
270 %files devel
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_bindir}/sdl2-config
273 %attr(755,root,root) %{_libdir}/libSDL2.so
274 %{_libdir}/libSDL2.la
275 %{_libdir}/libSDL2_test.a
276 %{_libdir}/libSDL2_test.la
277 %{_libdir}/libSDL2main.a
278 %{_libdir}/libSDL2main.la
279 %{_includedir}/SDL2
280 %{_aclocaldir}/sdl2.m4
281 %{_pkgconfigdir}/sdl2.pc
282 %{_libdir}/cmake/SDL2
283
284 %if %{with static_libs}
285 %files static
286 %defattr(644,root,root,755)
287 %{_libdir}/libSDL2.a
288 %endif
289
290 %files examples
291 %defattr(644,root,root,755)
292 %{_examplesdir}/%{name}-%{version}
This page took 0.045584 seconds and 3 git commands to generate.