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