]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without fftwl # don't build "long" subpackages | |
4 | # | |
5 | Summary: Fast Fourier Transform library | |
6 | Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera | |
7 | Summary(pt_BR.UTF-8): biblioteca fast fourier transform | |
8 | Name: fftw3 | |
9 | Version: 3.1.2 | |
10 | Release: 5 | |
11 | License: GPL v2+ | |
12 | Group: Libraries | |
13 | Source0: ftp://ftp.fftw.org/pub/fftw/fftw-%{version}.tar.gz | |
14 | # Source0-md5: 08f2e21c9fd02f4be2bd53a62592afa4 | |
15 | Patch0: %{name}-info.patch | |
16 | Patch1: %{name}-link.patch | |
17 | Patch2: %{name}-ac_simd.patch | |
18 | Patch3: %{name}-ac.patch | |
19 | URL: http://www.fftw.org/ | |
20 | BuildRequires: autoconf | |
21 | BuildRequires: automake | |
22 | %ifarch alpha ppc s390 s390x sparc sparcv9 | |
23 | %if %{with fftwl} | |
24 | # for 128-bit long double support | |
25 | BuildRequires: gcc-fortran >= 5:4.1.0-1 | |
26 | BuildRequires: glibc >= 6:2.4-1 | |
27 | %endif | |
28 | %endif | |
29 | BuildRequires: libtool | |
30 | BuildRequires: texinfo | |
31 | Requires: %{name}-common = %{version}-%{release} | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | FFTW is a collection of fast C routines for computing the Discrete | |
36 | Fourier Transform in one or more dimensions. It includes complex, | |
37 | real, and parallel transforms, and can handle arbitrary array sizes | |
38 | efficiently. This RPM package includes the double precision FFTW | |
39 | uniprocessor and threads libraries. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych | |
43 | transformat Fouriera w jednym lub więcej wymiarach. Zawiera również | |
44 | zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie | |
45 | radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM | |
46 | zawiera wersje FFTW o podwójnej precyzji dla architektur | |
47 | jednoprocesorowych oraz z obsługą wątków. | |
48 | ||
49 | %description -l pt_BR.UTF-8 | |
50 | FFTW é uma coleção de rotinas rápidas em C para computar a Discrete | |
51 | Fourier Transform em uma ou mais dimensões. Incluindo transformações | |
52 | complexas, reais e paralelas, também pode manipular vetores de tamanho | |
53 | arbitrário eficientemente. Esse pacote RPM inclui bibliotecas FFTW com | |
54 | suporte a threads, normal e dupla precisão (Os arquivos de precisão | |
55 | normal tem um prefixo "s"). | |
56 | ||
57 | %package devel | |
58 | Summary: Development files for fftw | |
59 | Summary(pl.UTF-8): Pliki programistyczne do fftw | |
60 | Summary(pt_BR.UTF-8): Headers e documentação do pacote FFTW | |
61 | Group: Development/Libraries | |
62 | Requires: %{name} = %{version}-%{release} | |
63 | Requires: %{name}-common-devel = %{version}-%{release} | |
64 | ||
65 | %description devel | |
66 | This package contains the files you need to develop programs using the | |
67 | FFTW (fast fourier transform library). | |
68 | ||
69 | %description devel -l pl.UTF-8 | |
70 | Ten pakiet zawiera pliki potrzebne do tworzenia programów używających | |
71 | biblioteki FFTW (wykonującej szybką transformatę Fouriera). | |
72 | ||
73 | %description devel -l pt_BR.UTF-8 | |
74 | Este pacote contém documentação e headers adicionais para desenvolver | |
75 | programas usando a FFTW. | |
76 | ||
77 | %package static | |
78 | Summary: Static fftw libraries | |
79 | Summary(pl.UTF-8): Statyczne biblioteki fftw | |
80 | Summary(pt_BR.UTF-8): Bibliotecas estáticas do pacote FFTW | |
81 | Group: Development/Libraries | |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | ||
84 | %description static | |
85 | Static fftw libraries. | |
86 | ||
87 | %description static -l pl.UTF-8 | |
88 | Statyczne biblioteki fftw. | |
89 | ||
90 | %description static -l pt_BR.UTF-8 | |
91 | Este pacote contém as bibliotecas estáticas do pacote FFTW. | |
92 | ||
93 | %package single | |
94 | Summary: Fast Fourier Transform library - single precision | |
95 | Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - pojedynczej precyzji | |
96 | Group: Libraries | |
97 | Requires: %{name}-common = %{version}-%{release} | |
98 | ||
99 | %description single | |
100 | FFTW is a collection of fast C routines for computing the Discrete | |
101 | Fourier Transform in one or more dimensions. It includes complex, | |
102 | real, and parallel transforms, and can handle arbitrary array sizes | |
103 | efficiently. This RPM package includes the single precision FFTW | |
104 | uniprocessor and threads libraries. | |
105 | ||
106 | %description single -l pl.UTF-8 | |
107 | FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych | |
108 | transformat Fouriera w jednym lub więcej wymiarach. Zawiera również | |
109 | zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie | |
110 | radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM | |
111 | zawiera wersje FFTW o pojedynczej precyzji dla architektur | |
112 | jednoprocesorowych oraz z obsługą wątków. | |
113 | ||
114 | %package single-devel | |
115 | Summary: Development files for single precision fftw | |
116 | Summary(pl.UTF-8): Pliki programistyczne do fftw pojedynczej precyzji | |
117 | Group: Development/Libraries | |
118 | Requires: %{name}-common-devel = %{version}-%{release} | |
119 | Requires: %{name}-single = %{version}-%{release} | |
120 | ||
121 | %description single-devel | |
122 | This package contains the files you need to develop programs using the | |
123 | single precision FFTW (fast fourier transform library). | |
124 | ||
125 | %description single-devel -l pl.UTF-8 | |
126 | Ten pakiet zawiera pliki potrzebne do tworzenia programów używających | |
127 | biblioteki FFTW pojedynczej precyzji (wykonującej szybką transformatę | |
128 | Fouriera). | |
129 | ||
130 | %package single-static | |
131 | Summary: Static fftw single precision libraries | |
132 | Summary(pl.UTF-8): Statyczne biblioteki fftw pojedynczej precyzji | |
133 | Group: Development/Libraries | |
134 | Requires: %{name}-single-devel = %{version}-%{release} | |
135 | ||
136 | %description single-static | |
137 | Static fftw single precision libraries. | |
138 | ||
139 | %description single-static -l pl.UTF-8 | |
140 | Statyczne biblioteki fftw pojedynczej precyzji. | |
141 | ||
142 | %package long | |
143 | Summary: Fast Fourier Transform library - long double precision | |
144 | Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - rozszerzonej precyzji | |
145 | Group: Libraries | |
146 | Requires: %{name}-common = %{version}-%{release} | |
147 | ||
148 | %description long | |
149 | FFTW is a collection of fast C routines for computing the Discrete | |
150 | Fourier Transform in one or more dimensions. It includes complex, | |
151 | real, and parallel transforms, and can handle arbitrary array sizes | |
152 | efficiently. This RPM package includes the long double precision FFTW | |
153 | uniprocessor and threads libraries. | |
154 | ||
155 | %description long -l pl.UTF-8 | |
156 | FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych | |
157 | transformat Fouriera w jednym lub więcej wymiarach. Zawiera również | |
158 | zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie | |
159 | radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM | |
160 | zawiera wersje FFTW o rozszerzonej precyzji dla architektur | |
161 | jednoprocesorowych oraz z obsługą wątków. | |
162 | ||
163 | %package long-devel | |
164 | Summary: Development files for long double precision fftw | |
165 | Summary(pl.UTF-8): Pliki programistyczne do fftw rozszerzonej precyzji | |
166 | Group: Development/Libraries | |
167 | Requires: %{name}-common-devel = %{version}-%{release} | |
168 | Requires: %{name}-long = %{version}-%{release} | |
169 | ||
170 | %description long-devel | |
171 | This package contains the files you need to develop programs using the | |
172 | long double precision FFTW (fast fourier transform library). | |
173 | ||
174 | %description long-devel -l pl.UTF-8 | |
175 | Ten pakiet zawiera pliki potrzebne do tworzenia programów używających | |
176 | biblioteki FFTW rozszerzonej precyzji (wykonującej szybką transformatę | |
177 | Fouriera). | |
178 | ||
179 | %package long-static | |
180 | Summary: Static fftw long double precision libraries | |
181 | Summary(pl.UTF-8): Statyczne biblioteki fftw rozszerzonej precyzji | |
182 | Group: Development/Libraries | |
183 | Requires: %{name}-long-devel = %{version}-%{release} | |
184 | ||
185 | %description long-static | |
186 | Static fftw long double precision libraries. | |
187 | ||
188 | %description long-static -l pl.UTF-8 | |
189 | Statyczne biblioteki fftw rozszerzonej precyzji. | |
190 | ||
191 | %package common | |
192 | Summary: Files common for all versions of fftw libraries | |
193 | Summary(pl.UTF-8): Pliki wspólne dla wszystkich wersji bibliotek fftw | |
194 | Group: Libraries | |
195 | ||
196 | %description common | |
197 | Files common for all versions of fftw libraries (basic documentation, | |
198 | fftw-wisdom-to-conf utility). | |
199 | ||
200 | %description common -l pl.UTF-8 | |
201 | Pliki wspólne dla wszystkich wersji bibliotek fftw (podstawowa | |
202 | dokumentacja, narzędzie fftw-wisdom-to-conf). | |
203 | ||
204 | %package common-devel | |
205 | Summary: Development files common for all versions of fftw libraries | |
206 | Summary(pl.UTF-8): Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw | |
207 | Group: Development/Libraries | |
208 | Requires: %{name}-common = %{version}-%{release} | |
209 | ||
210 | %description common-devel | |
211 | Development files common for all versions of fftw libraries (header | |
212 | files, development documentation). | |
213 | ||
214 | %description common-devel -l pl.UTF-8 | |
215 | Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw | |
216 | (pliki nagłówkowe, dokumentacja programisty). | |
217 | ||
218 | %prep | |
219 | %setup -q -n fftw-%{version} | |
220 | %patch0 -p1 | |
221 | %patch1 -p1 | |
222 | %patch2 -p1 | |
223 | %patch3 -p1 | |
224 | ||
225 | %build | |
226 | %{__libtoolize} | |
227 | %{__aclocal} -I m4 | |
228 | %{__autoconf} | |
229 | %{__automake} | |
230 | ||
231 | # MMX/SSE/etc. seem to be safe because of runtime CPU detection | |
232 | for ver in single double %{?with_fftwl:long-double}; do | |
233 | OPTS="" | |
234 | # k7,SSE,3dnow,altivec only for single | |
235 | if [ "$ver" = "single" ]; then | |
236 | %ifarch i686 | |
237 | OPTS="--enable-sse" | |
238 | %endif | |
239 | %ifarch athlon | |
240 | OPTS="--enable-sse" # no "--enable-k7" - conflicts with shared, SEGV on athlons | |
241 | %endif | |
242 | %ifarch ppc | |
243 | OPTS="--enable-altivec" | |
244 | %endif | |
245 | %ifnarch i686 k6 athlon ppc | |
246 | : # keep sh happy about syntax | |
247 | %endif | |
248 | fi | |
249 | %ifarch i686 | |
250 | # SSE2 only for double | |
251 | if [ "$ver" = "double" ]; then | |
252 | OPTS="--enable-sse2" | |
253 | fi | |
254 | %endif | |
255 | install -d build-${ver} | |
256 | cd build-${ver} | |
257 | ../%configure \ | |
258 | --enable-shared \ | |
259 | --enable-threads \ | |
260 | --enable-$ver \ | |
261 | $OPTS \ | |
262 | --%{!?debug:dis}%{?debug:en}able-debug | |
263 | ||
264 | %{__make} | |
265 | cd .. | |
266 | done | |
267 | ||
268 | %install | |
269 | rm -rf $RPM_BUILD_ROOT | |
270 | ||
271 | %{__make} install -C build-single \ | |
272 | DESTDIR=$RPM_BUILD_ROOT | |
273 | ||
274 | %{__make} install -C build-double \ | |
275 | DESTDIR=$RPM_BUILD_ROOT | |
276 | ||
277 | %if %{with fftwl} | |
278 | %{__make} install -C build-long-double \ | |
279 | DESTDIR=$RPM_BUILD_ROOT | |
280 | %endif | |
281 | ||
282 | %clean | |
283 | rm -rf $RPM_BUILD_ROOT | |
284 | ||
285 | %post -p /sbin/ldconfig | |
286 | %postun -p /sbin/ldconfig | |
287 | ||
288 | %post single -p /sbin/ldconfig | |
289 | %postun single -p /sbin/ldconfig | |
290 | ||
291 | %post long -p /sbin/ldconfig | |
292 | %postun long -p /sbin/ldconfig | |
293 | ||
294 | %post common-devel -p /sbin/postshell | |
295 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
296 | ||
297 | %postun common-devel -p /sbin/postshell | |
298 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
299 | ||
300 | %files | |
301 | %defattr(644,root,root,755) | |
302 | %attr(755,root,root) %{_bindir}/fftw-wisdom | |
303 | %attr(755,root,root) %{_libdir}/libfftw3.so.*.*.* | |
304 | %attr(755,root,root) %ghost %{_libdir}/libfftw3.so.3 | |
305 | %attr(755,root,root) %{_libdir}/libfftw3_threads.so.*.*.* | |
306 | %attr(755,root,root) %ghost %{_libdir}/libfftw3_threads.so.3 | |
307 | %{_mandir}/man1/fftw-wisdom.1* | |
308 | ||
309 | %files devel | |
310 | %defattr(644,root,root,755) | |
311 | %attr(755,root,root) %{_libdir}/libfftw3.so | |
312 | %attr(755,root,root) %{_libdir}/libfftw3_threads.so | |
313 | %{_libdir}/libfftw3.la | |
314 | %{_libdir}/libfftw3_threads.la | |
315 | %{_pkgconfigdir}/fftw3.pc | |
316 | ||
317 | %files static | |
318 | %defattr(644,root,root,755) | |
319 | %{_libdir}/libfftw3.a | |
320 | %{_libdir}/libfftw3_threads.a | |
321 | ||
322 | %files single | |
323 | %defattr(644,root,root,755) | |
324 | %attr(755,root,root) %{_bindir}/fftwf-wisdom | |
325 | %attr(755,root,root) %{_libdir}/libfftw3f.so.*.*.* | |
326 | %attr(755,root,root) %ghost %{_libdir}/libfftw3f.so.3 | |
327 | %attr(755,root,root) %{_libdir}/libfftw3f_threads.so.*.*.* | |
328 | %attr(755,root,root) %ghost %{_libdir}/libfftw3f_threads.so.3 | |
329 | %{_mandir}/man1/fftwf-wisdom.1* | |
330 | ||
331 | %files single-devel | |
332 | %defattr(644,root,root,755) | |
333 | %attr(755,root,root) %{_libdir}/libfftw3f.so | |
334 | %attr(755,root,root) %{_libdir}/libfftw3f_threads.so | |
335 | %{_libdir}/libfftw3f.la | |
336 | %{_libdir}/libfftw3f_threads.la | |
337 | %{_pkgconfigdir}/fftw3f.pc | |
338 | ||
339 | %files single-static | |
340 | %defattr(644,root,root,755) | |
341 | %{_libdir}/libfftw3f.a | |
342 | %{_libdir}/libfftw3f_threads.a | |
343 | ||
344 | %if %{with fftwl} | |
345 | %files long | |
346 | %defattr(644,root,root,755) | |
347 | %attr(755,root,root) %{_bindir}/fftwl-wisdom | |
348 | %attr(755,root,root) %{_libdir}/libfftw3l.so.*.*.* | |
349 | %attr(755,root,root) %ghost %{_libdir}/libfftw3l.so.3 | |
350 | %attr(755,root,root) %{_libdir}/libfftw3l_threads.so.*.*.* | |
351 | %attr(755,root,root) %ghost %{_libdir}/libfftw3l_threads.so.3 | |
352 | %{_mandir}/man1/fftwl-wisdom.1* | |
353 | ||
354 | %files long-devel | |
355 | %defattr(644,root,root,755) | |
356 | %attr(755,root,root) %{_libdir}/libfftw3l.so | |
357 | %attr(755,root,root) %{_libdir}/libfftw3l_threads.so | |
358 | %{_libdir}/libfftw3l.la | |
359 | %{_libdir}/libfftw3l_threads.la | |
360 | %{_pkgconfigdir}/fftw3l.pc | |
361 | ||
362 | %files long-static | |
363 | %defattr(644,root,root,755) | |
364 | %{_libdir}/libfftw3l.a | |
365 | %{_libdir}/libfftw3l_threads.a | |
366 | %endif | |
367 | ||
368 | %files common | |
369 | %defattr(644,root,root,755) | |
370 | %doc AUTHORS COPYRIGHT ChangeLog NEWS README TODO | |
371 | %attr(755,root,root) %{_bindir}/fftw-wisdom-to-conf | |
372 | %{_mandir}/man1/fftw-wisdom-to-conf.1* | |
373 | ||
374 | %files common-devel | |
375 | %defattr(644,root,root,755) | |
376 | %doc doc/html doc/FAQ/fftw-faq.html | |
377 | %{_includedir}/fftw3.f | |
378 | %{_includedir}/fftw3.h | |
379 | %{_infodir}/fftw3.info* |