1 # NOTE (for distributors from NEWS file): don't enable too many SIMD variants in
2 # distribution builds, because it increases planing time; by default enable just
3 # most popular ones (like SSE, AVX).
4 # The rest are available by bconds.
9 %bcond_without fftwl # "long" subpackages
10 %bcond_without fftwq # "quad" subpackages
11 %bcond_without openmp # OpenMP support
12 %bcond_with avx128fma # AVX128/FMA instructions (for some AMD machines)
13 %bcond_with avx256 # AVX2 256-bit FMA instructions
14 %bcond_with avx512 # AVX512 and KCVI [experimental]
16 Summary: Fast Fourier Transform library
17 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera
18 Summary(pt_BR.UTF-8): biblioteca fast fourier transform
24 #Source0Download: http://fftw.org/download.html
25 Source0: http://fftw.org/fftw-%{version}.tar.gz
26 # Source0-md5: 0d5915d7d39b3253c1cc05030d79ac47
27 Patch0: %{name}-info.patch
28 URL: http://www.fftw.org/
29 BuildRequires: autoconf >= 2.50
30 BuildRequires: automake >= 1:1.7
31 BuildRequires: gcc-fortran
32 %ifarch alpha ppc s390 s390x sparc sparcv9
34 # for 128-bit long double support
35 BuildRequires: gcc-fortran >= 5:4.1.0-1
36 BuildRequires: glibc >= 6:2.4-1
40 BuildRequires: gcc >= 6:4.6.0
41 BuildRequires: libquadmath-devel
44 BuildRequires: gcc >= 6:4.2.0
45 BuildRequires: libgomp-devel
47 BuildRequires: libtool
48 BuildRequires: texinfo
49 Requires: %{name}-common = %{version}-%{release}
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 %define builds single double %{?with_fftwl:long-double} %{?with_fftwq:quad-precision}
55 FFTW is a collection of fast C routines for computing the Discrete
56 Fourier Transform in one or more dimensions. It includes complex,
57 real, and parallel transforms, and can handle arbitrary array sizes
58 efficiently. This RPM package includes the double precision FFTW
59 uniprocessor and threads libraries.
61 %description -l pl.UTF-8
62 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
63 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
64 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
65 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
66 zawiera wersje FFTW o podwójnej precyzji dla architektur
67 jednoprocesorowych oraz z obsługą wątków.
69 %description -l pt_BR.UTF-8
70 FFTW é uma coleção de rotinas rápidas em C para computar a Discrete
71 Fourier Transform em uma ou mais dimensões. Incluindo transformações
72 complexas, reais e paralelas, também pode manipular vetores de tamanho
73 arbitrário eficientemente. Esse pacote RPM inclui bibliotecas FFTW com
74 suporte a threads, normal e dupla precisão (Os arquivos de precisão
75 normal tem um prefixo "s").
78 Summary: Development files for fftw
79 Summary(pl.UTF-8): Pliki programistyczne do fftw
80 Summary(pt_BR.UTF-8): Headers e documentação do pacote FFTW
81 Group: Development/Libraries
82 Requires: %{name} = %{version}-%{release}
83 Requires: %{name}-common-devel = %{version}-%{release}
84 %{?with_openmp:Requires: libgomp-devel}
87 This package contains the files you need to develop programs using the
88 FFTW (fast fourier transform library).
90 %description devel -l pl.UTF-8
91 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
92 biblioteki FFTW (wykonującej szybką transformatę Fouriera).
94 %description devel -l pt_BR.UTF-8
95 Este pacote contém documentação e headers adicionais para desenvolver
96 programas usando a FFTW.
99 Summary: Static fftw libraries
100 Summary(pl.UTF-8): Statyczne biblioteki fftw
101 Summary(pt_BR.UTF-8): Bibliotecas estáticas do pacote FFTW
102 Group: Development/Libraries
103 Requires: %{name}-devel = %{version}-%{release}
106 Static fftw libraries.
108 %description static -l pl.UTF-8
109 Statyczne biblioteki fftw.
111 %description static -l pt_BR.UTF-8
112 Este pacote contém as bibliotecas estáticas do pacote FFTW.
115 Summary: Fast Fourier Transform library - single precision
116 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - pojedynczej precyzji
118 Requires: %{name}-common = %{version}-%{release}
121 FFTW is a collection of fast C routines for computing the Discrete
122 Fourier Transform in one or more dimensions. It includes complex,
123 real, and parallel transforms, and can handle arbitrary array sizes
124 efficiently. This RPM package includes the single precision FFTW
125 uniprocessor and threads libraries.
127 %description single -l pl.UTF-8
128 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
129 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
130 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
131 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
132 zawiera wersje FFTW o pojedynczej precyzji dla architektur
133 jednoprocesorowych oraz z obsługą wątków.
135 %package single-devel
136 Summary: Development files for single precision fftw
137 Summary(pl.UTF-8): Pliki programistyczne do fftw pojedynczej precyzji
138 Group: Development/Libraries
139 Requires: %{name}-common-devel = %{version}-%{release}
140 Requires: %{name}-single = %{version}-%{release}
141 %{?with_openmp:Requires: libgomp-devel}
143 %description single-devel
144 This package contains the files you need to develop programs using the
145 single precision FFTW (fast fourier transform library).
147 %description single-devel -l pl.UTF-8
148 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
149 biblioteki FFTW (wykonującej szybką transformatę Fouriera) pojedynczej
152 %package single-static
153 Summary: Static fftw single precision libraries
154 Summary(pl.UTF-8): Statyczne biblioteki fftw pojedynczej precyzji
155 Group: Development/Libraries
156 Requires: %{name}-single-devel = %{version}-%{release}
158 %description single-static
159 Static fftw single precision libraries.
161 %description single-static -l pl.UTF-8
162 Statyczne biblioteki fftw pojedynczej precyzji.
165 Summary: Fast Fourier Transform library - long double precision
166 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - rozszerzonej precyzji
168 Requires: %{name}-common = %{version}-%{release}
171 FFTW is a collection of fast C routines for computing the Discrete
172 Fourier Transform in one or more dimensions. It includes complex,
173 real, and parallel transforms, and can handle arbitrary array sizes
174 efficiently. This RPM package includes the long double precision FFTW
175 uniprocessor and threads libraries.
177 %description long -l pl.UTF-8
178 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
179 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
180 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
181 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
182 zawiera wersje FFTW o rozszerzonej precyzji dla architektur
183 jednoprocesorowych oraz z obsługą wątków.
186 Summary: Development files for long double precision fftw
187 Summary(pl.UTF-8): Pliki programistyczne do fftw rozszerzonej precyzji
188 Group: Development/Libraries
189 Requires: %{name}-common-devel = %{version}-%{release}
190 Requires: %{name}-long = %{version}-%{release}
191 %{?with_openmp:Requires: libgomp-devel}
193 %description long-devel
194 This package contains the files you need to develop programs using the
195 long double precision FFTW (fast fourier transform library).
197 %description long-devel -l pl.UTF-8
198 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
199 biblioteki FFTW (wykonującej szybką transformatę Fouriera)
200 rozszerzonej precyzji.
203 Summary: Static fftw long double precision libraries
204 Summary(pl.UTF-8): Statyczne biblioteki fftw rozszerzonej precyzji
205 Group: Development/Libraries
206 Requires: %{name}-long-devel = %{version}-%{release}
208 %description long-static
209 Static fftw long double precision libraries.
211 %description long-static -l pl.UTF-8
212 Statyczne biblioteki fftw rozszerzonej precyzji.
215 Summary: Fast Fourier Transform library - quad precision
216 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - poczwórnej precyzji
218 Requires: %{name}-common = %{version}-%{release}
221 FFTW is a collection of fast C routines for computing the Discrete
222 Fourier Transform in one or more dimensions. It includes complex,
223 real, and parallel transforms, and can handle arbitrary array sizes
224 efficiently. This RPM package includes the quad precision FFTW
225 uniprocessor and threads libraries.
227 %description quad -l pl.UTF-8
228 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
229 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
230 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
231 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
232 zawiera wersje FFTW o poczwórnej precyzji dla architektur
233 jednoprocesorowych oraz z obsługą wątków.
236 Summary: Development files for quad precision fftw
237 Summary(pl.UTF-8): Pliki programistyczne do fftw poczwórnej precyzji
238 Group: Development/Libraries
239 Requires: %{name}-common-devel = %{version}-%{release}
240 Requires: %{name}-quad = %{version}-%{release}
241 %{?with_openmp:Requires: libgomp-devel}
242 Requires: libquadmath-devel
244 %description quad-devel
245 This package contains the files you need to develop programs using the
246 quad precision FFTW (fast fourier transform library).
248 %description quad-devel -l pl.UTF-8
249 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
250 biblioteki FFTW (wykonującej szybką transformatę Fouriera) poczwórnej
254 Summary: Static fftw quad precision libraries
255 Summary(pl.UTF-8): Statyczne biblioteki fftw poczwórnej precyzji
256 Group: Development/Libraries
257 Requires: %{name}-quad-devel = %{version}-%{release}
259 %description quad-static
260 Static fftw quad precision libraries.
262 %description quad-static -l pl.UTF-8
263 Statyczne biblioteki fftw poczwórnej precyzji.
266 Summary: Files common for all versions of fftw libraries
267 Summary(pl.UTF-8): Pliki wspólne dla wszystkich wersji bibliotek fftw
271 Files common for all versions of fftw libraries (basic documentation,
272 fftw-wisdom-to-conf utility).
274 %description common -l pl.UTF-8
275 Pliki wspólne dla wszystkich wersji bibliotek fftw (podstawowa
276 dokumentacja, narzędzie fftw-wisdom-to-conf).
278 %package common-devel
279 Summary: Development files common for all versions of fftw libraries
280 Summary(pl.UTF-8): Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
281 Group: Development/Libraries
282 Requires: %{name}-common = %{version}-%{release}
284 %description common-devel
285 Development files common for all versions of fftw libraries (header
286 files, development documentation).
288 %description common-devel -l pl.UTF-8
289 Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
290 (pliki nagłówkowe, dokumentacja programisty).
293 %setup -q -n fftw-%{version}
302 # MMX/SSE/etc. seem to be safe because of runtime CPU detection
303 for ver in %{builds}; do
305 # SSE,altivec,neon@arm[32] only for single
306 if [ "$ver" = "single" ]; then
307 %ifarch pentium3 athlon
308 # for SSE2-aware subarchs SSE for single precision is enabled by --enable-sse2 option
311 %ifarch %{arm} aarch64
315 OPTS="--enable-altivec"
317 : # keep sh happy about syntax on other archs
319 %ifarch i686 pentium4 %{x8664} x32
320 # SSE/SSE2 and AVX only for single and double
321 if [ "$ver" = "double" -o "$ver" = "single" ]; then
322 OPTS="$OPTS --enable-sse2 --enable-avx"
324 OPTS="$OPTS --enable-avx2"
327 OPTS="$OPTS --enable-avx512 --enable-kcvi"
331 %if %{with avx128fma}
332 OPTS="$OPTS --enable-avx128-fma"
335 OPTS="$OPTS --enable-neon"
338 OPTS="$OPTS --enable-vsx"
340 install -d build-${ver}
344 --enable-debug%{!?debug:=no} \
355 rm -rf $RPM_BUILD_ROOT
356 install -d $RPM_BUILD_ROOT%{_sysconfdir}/fftw
358 for b in %{builds} ; do
359 %{__make} install -C build-${b} \
360 DESTDIR=$RPM_BUILD_ROOT
364 rm -rf $RPM_BUILD_ROOT
366 %post -p /sbin/ldconfig
367 %postun -p /sbin/ldconfig
369 %post single -p /sbin/ldconfig
370 %postun single -p /sbin/ldconfig
372 %post long -p /sbin/ldconfig
373 %postun long -p /sbin/ldconfig
375 %post common-devel -p /sbin/postshell
376 -/usr/sbin/fix-info-dir -c %{_infodir}
378 %postun common-devel -p /sbin/postshell
379 -/usr/sbin/fix-info-dir -c %{_infodir}
382 %defattr(644,root,root,755)
383 %attr(755,root,root) %{_bindir}/fftw-wisdom
384 %attr(755,root,root) %{_libdir}/libfftw3.so.*.*.*
385 %attr(755,root,root) %ghost %{_libdir}/libfftw3.so.3
386 %attr(755,root,root) %{_libdir}/libfftw3_threads.so.*.*.*
387 %attr(755,root,root) %ghost %{_libdir}/libfftw3_threads.so.3
389 %attr(755,root,root) %{_libdir}/libfftw3_omp.so.*.*.*
390 %attr(755,root,root) %ghost %{_libdir}/libfftw3_omp.so.3
392 %{_mandir}/man1/fftw-wisdom.1*
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/libfftw3.so
397 %attr(755,root,root) %{_libdir}/libfftw3_threads.so
398 %{_libdir}/libfftw3.la
399 %{_libdir}/libfftw3_threads.la
401 %attr(755,root,root) %{_libdir}/libfftw3_omp.so
402 %{_libdir}/libfftw3_omp.la
404 %{_pkgconfigdir}/fftw3.pc
405 %{_libdir}/cmake/fftw3/FFTW3Config*.cmake
408 %defattr(644,root,root,755)
409 %{_libdir}/libfftw3.a
410 %{_libdir}/libfftw3_threads.a
412 %{_libdir}/libfftw3_omp.a
416 %defattr(644,root,root,755)
417 %attr(755,root,root) %{_bindir}/fftwf-wisdom
418 %attr(755,root,root) %{_libdir}/libfftw3f.so.*.*.*
419 %attr(755,root,root) %ghost %{_libdir}/libfftw3f.so.3
420 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so.*.*.*
421 %attr(755,root,root) %ghost %{_libdir}/libfftw3f_threads.so.3
423 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so.*.*.*
424 %attr(755,root,root) %ghost %{_libdir}/libfftw3f_omp.so.3
426 %{_mandir}/man1/fftwf-wisdom.1*
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_libdir}/libfftw3f.so
431 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so
432 %{_libdir}/libfftw3f.la
433 %{_libdir}/libfftw3f_threads.la
435 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so
436 %{_libdir}/libfftw3f_omp.la
438 %{_pkgconfigdir}/fftw3f.pc
439 %{_libdir}/cmake/fftw3/FFTW3fConfig*.cmake
442 %defattr(644,root,root,755)
443 %{_libdir}/libfftw3f.a
444 %{_libdir}/libfftw3f_threads.a
446 %{_libdir}/libfftw3f_omp.a
451 %defattr(644,root,root,755)
452 %attr(755,root,root) %{_bindir}/fftwl-wisdom
453 %attr(755,root,root) %{_libdir}/libfftw3l.so.*.*.*
454 %attr(755,root,root) %ghost %{_libdir}/libfftw3l.so.3
455 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so.*.*.*
456 %attr(755,root,root) %ghost %{_libdir}/libfftw3l_threads.so.3
458 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so.*.*.*
459 %attr(755,root,root) %ghost %{_libdir}/libfftw3l_omp.so.3
461 %{_mandir}/man1/fftwl-wisdom.1*
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_libdir}/libfftw3l.so
466 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so
467 %{_libdir}/libfftw3l.la
468 %{_libdir}/libfftw3l_threads.la
470 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so
471 %{_libdir}/libfftw3l_omp.la
473 %{_includedir}/fftw3l.f03
474 %{_pkgconfigdir}/fftw3l.pc
475 %{_libdir}/cmake/fftw3/FFTW3lConfig*.cmake
478 %defattr(644,root,root,755)
479 %{_libdir}/libfftw3l.a
480 %{_libdir}/libfftw3l_threads.a
482 %{_libdir}/libfftw3l_omp.a
488 %defattr(644,root,root,755)
489 %attr(755,root,root) %{_bindir}/fftwq-wisdom
490 %attr(755,root,root) %{_libdir}/libfftw3q.so.*.*.*
491 %attr(755,root,root) %ghost %{_libdir}/libfftw3q.so.3
492 %attr(755,root,root) %{_libdir}/libfftw3q_threads.so.*.*.*
493 %attr(755,root,root) %ghost %{_libdir}/libfftw3q_threads.so.3
495 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so.*.*.*
496 %attr(755,root,root) %ghost %{_libdir}/libfftw3q_omp.so.3
498 %{_mandir}/man1/fftwq-wisdom.1*
501 %defattr(644,root,root,755)
502 %attr(755,root,root) %{_libdir}/libfftw3q.so
503 %attr(755,root,root) %{_libdir}/libfftw3q_threads.so
504 %{_libdir}/libfftw3q.la
505 %{_libdir}/libfftw3q_threads.la
507 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so
508 %{_libdir}/libfftw3q_omp.la
510 %{_includedir}/fftw3q.f03
511 %{_pkgconfigdir}/fftw3q.pc
512 %{_libdir}/cmake/fftw3/FFTW3qConfig*.cmake
515 %defattr(644,root,root,755)
516 %{_libdir}/libfftw3q.a
517 %{_libdir}/libfftw3q_threads.a
519 %{_libdir}/libfftw3q_omp.a
524 %defattr(644,root,root,755)
525 %doc AUTHORS COPYRIGHT ChangeLog NEWS README TODO
526 %dir %{_sysconfdir}/fftw
527 %attr(755,root,root) %{_bindir}/fftw-wisdom-to-conf
528 %{_mandir}/man1/fftw-wisdom-to-conf.1*
531 %defattr(644,root,root,755)
532 %doc doc/html doc/FAQ/fftw-faq.html
533 %{_includedir}/fftw3.f
534 %{_includedir}/fftw3.f03
535 %{_includedir}/fftw3.h
536 %dir %{_libdir}/cmake/fftw3
537 %{_infodir}/fftw3.info*