]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with aalib # aalib graphics support | |
4 | %bcond_with caca # caca graphics support | |
5 | %bcond_with directfb # DirectFB graphics support | |
6 | %bcond_with ggi # GGI graphics support | |
7 | %bcond_with nas # NAS audio support | |
8 | %bcond_with svga # svgalib graphics support | |
9 | %bcond_without alsa # ALSA audio support | |
10 | %bcond_with arts # aRts audio support | |
11 | %bcond_with esd # EsounD audio support | |
12 | %bcond_without static_libs # don't build static libraries | |
13 | # | |
14 | # NOTE: the following libraries are dlopened by soname detected at build time: | |
15 | # libartsc.so.? [if with arts] | |
16 | # libasound.so.2 [if with alsa] | |
17 | # libaudio.so.2 [if with nas] | |
18 | # libesd.so.0 [if with esd] | |
19 | # libpulse-simple.so.0 | |
20 | # libX11.so.6 | |
21 | # libXext.so.6 | |
22 | # libXrender.so.1 | |
23 | # libXrandr.so.2 | |
24 | Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library | |
25 | Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów | |
26 | Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库 | |
27 | Name: SDL | |
28 | Version: 1.2.14 | |
29 | Release: 3 | |
30 | License: LGPL v2.1+ | |
31 | Group: Libraries | |
32 | Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz | |
33 | # Source0-md5: e52086d1b508fa0b76c52ee30b55bec4 | |
34 | Patch0: %{name}-mmx-constraints.patch | |
35 | Patch1: %{name}-acfix.patch | |
36 | Patch2: %{name}-new_gamma_ramp_support.patch | |
37 | URL: http://www.libsdl.org/ | |
38 | %{?with_directfb:BuildRequires: DirectFB-devel >= 0.9.15} | |
39 | BuildRequires: OpenGL-GLU-devel | |
40 | %{?with_aalib:BuildRequires: aalib-devel} | |
41 | %{?with_alsa:BuildRequires: alsa-lib-devel >= 0.9.0} | |
42 | %{?with_arts:BuildRequires: artsc-devel >= 1.1} | |
43 | BuildRequires: autoconf >= 2.59-9 | |
44 | BuildRequires: automake | |
45 | %{?with_esd:BuildRequires: esound-devel >= 0.2.8} | |
46 | BuildRequires: gcc >= 5:4.0 | |
47 | %{?with_caca:BuildRequires: libcaca-devel} | |
48 | %{?with_ggi:BuildRequires: libggi-devel} | |
49 | BuildRequires: libtool >= 2:2.0 | |
50 | %{?with_nas:BuildRequires: nas-devel} | |
51 | %ifarch %{ix86} | |
52 | BuildRequires: nasm | |
53 | %endif | |
54 | BuildRequires: perl-modules | |
55 | BuildRequires: pkgconfig >= 1:0.7 | |
56 | BuildRequires: pulseaudio-devel >= 0.9 | |
57 | %{?with_svga:BuildRequires: svgalib-devel >= 1.4.0} | |
58 | BuildRequires: tslib-devel | |
59 | BuildRequires: xorg-lib-libX11-devel | |
60 | BuildRequires: xorg-lib-libXext-devel | |
61 | BuildRequires: xorg-lib-libXrandr-devel | |
62 | BuildRequires: xorg-lib-libXrender-devel | |
63 | BuildRequires: xorg-proto-xextproto-devel | |
64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
65 | ||
66 | %define specflags_ppc -maltivec | |
67 | ||
68 | %description | |
69 | SDL (Simple DirectMedia Layer) is a library that allows you portable, | |
70 | low level access to a video framebuffer, audio output, mouse, and | |
71 | keyboard. It can support both windowed and DGA modes of XFree86, and | |
72 | it is designed to be portable - applications linked with SDL can also | |
73 | be built on Win32 and BeOS. | |
74 | ||
75 | %description -l pl.UTF-8 | |
76 | SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą | |
77 | przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio, | |
78 | myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86 | |
79 | jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje | |
80 | konsolidowane z SDL można również budować w systemach Win32 i BeOS. | |
81 | ||
82 | %description -l pt_BR.UTF-8 | |
83 | Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de | |
84 | baixo nível a áudio, teclado, mouse e vídeo em várias plataformas. | |
85 | ||
86 | Essa biblioteca é usada por alguns jogos. | |
87 | ||
88 | %description -l ru.UTF-8 | |
89 | SDL (Simple DirectMedia Layer) это набор функций, предоставляющий | |
90 | низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к | |
91 | буферу экрана на множестве различных платформ. | |
92 | ||
93 | %package devel | |
94 | Summary: SDL - Header files | |
95 | Summary(pl.UTF-8): SDL - Pliki nagłówkowe | |
96 | Summary(pt_BR.UTF-8): Bibliotecas e arquivos de cabeçalho para aplicações SDL | |
97 | Summary(ru.UTF-8): Файлы, необходимые для разработки программ, использующих SDL | |
98 | Summary(uk.UTF-8): Файли, необхідні для розробки програм, що використовують SDL | |
99 | Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) 开发库 | |
100 | Group: Development/Libraries | |
101 | Requires: %{name} = %{version}-%{release} | |
102 | %{?with_directfb:Requires: DirectFB-devel >= 0.9.15} | |
103 | %{?with_aa:Requires: aalib-devel} | |
104 | %{?with_caca:Requires: libcaca-devel} | |
105 | %{?with_ggi:Requires: libggi-devel} | |
106 | %{?with_svga:Requires: svgalib-devel >= 1.4.0} | |
107 | Requires: tslib-devel | |
108 | Requires: xorg-lib-libX11-devel | |
109 | Suggests: OpenGL-GLU-devel | |
110 | ||
111 | %description devel | |
112 | SDL - Header files. | |
113 | ||
114 | %description devel -l pl.UTF-8 | |
115 | SDL - Pliki nagłówkowe. | |
116 | ||
117 | %description devel -l pt_BR.UTF-8 | |
118 | Esse pacote contém bibliotecas, arquivos de cabeçalho e outros | |
119 | recursos para o desenvolvimento de aplicativos com SDL. | |
120 | ||
121 | %description devel -l ru.UTF-8 | |
122 | Этот пакет содержит файлы, необходимые для разработки программ, | |
123 | использующих SDL. | |
124 | ||
125 | %description devel -l uk.UTF-8 | |
126 | Цей пакет містить файли, необхідні для розробки програм, що | |
127 | використовують SDL. | |
128 | ||
129 | %package static | |
130 | Summary: SDL - static libraries | |
131 | Summary(pl.UTF-8): SDL - biblioteki statyczne | |
132 | Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento de aplicações com a SDL | |
133 | Summary(ru.UTF-8): Статические библиотеки для разработки с использованием SDL | |
134 | Summary(uk.UTF-8): Статичні бібліотеки для розробки з використанням SDL | |
135 | Group: Development/Libraries | |
136 | Requires: %{name}-devel = %{version}-%{release} | |
137 | ||
138 | %description static | |
139 | SDL - static libraries. | |
140 | ||
141 | %description static -l pl.UTF-8 | |
142 | SDL - biblioteki statyczne. | |
143 | ||
144 | %description static -l pt_BR.UTF-8 | |
145 | Biblioteca estática para desenvolvimento de aplicações com a SDL. | |
146 | ||
147 | %description static -l ru.UTF-8 | |
148 | Этот пакет содержит статические библиотеки для разработки программ, | |
149 | использующих SDL. | |
150 | ||
151 | %description static -l uk.UTF-8 | |
152 | Цей пакет містить статичні бібліотеки для розробки програм, що | |
153 | використовують SDL. | |
154 | ||
155 | %package examples | |
156 | Summary: SDL - example programs | |
157 | Summary(pl.UTF-8): SDL - programy przykładowe | |
158 | License: Public Domain | |
159 | Group: Development/Libraries | |
160 | Requires: %{name}-devel = %{version}-%{release} | |
161 | ||
162 | %description examples | |
163 | SDL - example programs. | |
164 | ||
165 | %description examples -l pl.UTF-8 | |
166 | SDL - przykładowe programy. | |
167 | ||
168 | %prep | |
169 | %setup -q | |
170 | %patch0 -p1 | |
171 | %patch1 -p1 | |
172 | %patch2 -p1 | |
173 | ||
174 | : > acinclude.m4 | |
175 | %{!?with_alsa:echo 'AC_DEFUN([AM_PATH_ALSA],[$3])' >> acinclude.m4} | |
176 | %{!?with_esd:echo 'AC_DEFUN([AM_PATH_ESD],[$3])' >> acinclude.m4} | |
177 | ||
178 | %build | |
179 | %{__libtoolize} | |
180 | %{__aclocal} | |
181 | %{__autoconf} | |
182 | %configure \ | |
183 | %ifarch %{ix86} | |
184 | --enable-nasm \ | |
185 | %else | |
186 | --disable-nasm \ | |
187 | %endif | |
188 | --disable-rpath \ | |
189 | %{!?with_alsa:--disable-alsa} \ | |
190 | %{!?with_arts:--disable-arts} \ | |
191 | --enable-dga \ | |
192 | %{!?with_esd:--disable-esd} \ | |
193 | %{!?with_nas:--disable-nas} \ | |
194 | --enable-pthreads \ | |
195 | --enable-pthread-sem \ | |
196 | %{?with_aalib:--enable-video-aalib} \ | |
197 | %{?with_caca:--enable-video-caca} \ | |
198 | %{!?with_directfb:--disable-video-directfb} \ | |
199 | --enable-video-dga \ | |
200 | --enable-video-fbcon \ | |
201 | %{?with_ggi:--enable-video-ggi} \ | |
202 | --enable-video-opengl \ | |
203 | %{!?with_svga:--disable-video-svga} \ | |
204 | --enable-video-x11-dgamouse \ | |
205 | --enable-video-x11-vm \ | |
206 | --enable-video-x11-xinerama \ | |
207 | --enable-video-x11-xme \ | |
208 | --enable-video-x11-xrandr \ | |
209 | --enable-video-x11-xv \ | |
210 | --with-x \ | |
211 | %{!?with_static_libs:--disable-static} | |
212 | ||
213 | %{__make} | |
214 | ||
215 | %install | |
216 | rm -rf $RPM_BUILD_ROOT | |
217 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
218 | ||
219 | %{__make} install \ | |
220 | DESTDIR=$RPM_BUILD_ROOT \ | |
221 | m4datadir=%{_aclocaldir} | |
222 | ||
223 | rm -rf test/autom4te.cache | |
224 | install test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
225 | ||
226 | rm -rf docs/man3 | |
227 | ||
228 | %clean | |
229 | rm -rf $RPM_BUILD_ROOT | |
230 | ||
231 | %post -p /sbin/ldconfig | |
232 | %postun -p /sbin/ldconfig | |
233 | ||
234 | %files | |
235 | %defattr(644,root,root,755) | |
236 | %doc BUGS CREDITS README README-SDL.txt TODO WhatsNew | |
237 | %attr(755,root,root) %{_libdir}/libSDL-1.2.so.*.*.* | |
238 | %attr(755,root,root) %ghost %{_libdir}/libSDL-1.2.so.0 | |
239 | ||
240 | %files devel | |
241 | %defattr(644,root,root,755) | |
242 | %doc docs.html docs | |
243 | %attr(755,root,root) %{_bindir}/sdl-config | |
244 | %attr(755,root,root) %{_libdir}/libSDL.so | |
245 | %{_libdir}/libSDL.la | |
246 | %{_libdir}/libSDLmain.a | |
247 | %{_includedir}/SDL | |
248 | %{_aclocaldir}/sdl.m4 | |
249 | %{_pkgconfigdir}/sdl.pc | |
250 | %{_mandir}/man3/SDL*.3* | |
251 | ||
252 | %if %{with static_libs} | |
253 | %files static | |
254 | %defattr(644,root,root,755) | |
255 | %{_libdir}/libSDL.a | |
256 | %endif | |
257 | ||
258 | %files examples | |
259 | %defattr(644,root,root,755) | |
260 | %{_examplesdir}/%{name}-%{version} |