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