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