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]
17 %ifnarch %{ix86} %{x8664} x32 ia64
21 Summary: Fast Fourier Transform library
22 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera
23 Summary(pt_BR.UTF-8): biblioteca fast fourier transform
29 #Source0Download: http://fftw.org/download.html
30 Source0: http://fftw.org/fftw-%{version}.tar.gz
31 # Source0-md5: 8aac833c943d8e90d51b697b27d4384d
32 Patch0: %{name}-info.patch
33 Patch1: %{name}-flags.patch
34 URL: http://www.fftw.org/
35 BuildRequires: autoconf >= 2.50
36 BuildRequires: automake >= 1:1.7
37 BuildRequires: gcc-fortran
38 %ifarch alpha ppc s390 s390x sparc sparcv9
40 # for 128-bit long double support
41 BuildRequires: gcc-fortran >= 5:4.1.0-1
42 BuildRequires: glibc >= 6:2.4-1
46 BuildRequires: gcc >= 6:4.6.0
47 BuildRequires: libquadmath-devel
50 BuildRequires: gcc >= 6:4.2.0
51 BuildRequires: libgomp-devel
53 BuildRequires: libtool
54 BuildRequires: texinfo
55 Requires: %{name}-common = %{version}-%{release}
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 %define builds single double %{?with_fftwl:long-double} %{?with_fftwq:quad-precision}
61 FFTW is a collection of fast C routines for computing the Discrete
62 Fourier Transform in one or more dimensions. It includes complex,
63 real, and parallel transforms, and can handle arbitrary array sizes
64 efficiently. This RPM package includes the double precision FFTW
65 uniprocessor and threads libraries.
67 %description -l pl.UTF-8
68 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
69 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
70 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
71 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
72 zawiera wersje FFTW o podwójnej precyzji dla architektur
73 jednoprocesorowych oraz z obsługą wątków.
75 %description -l pt_BR.UTF-8
76 FFTW é uma coleção de rotinas rápidas em C para computar a Discrete
77 Fourier Transform em uma ou mais dimensões. Incluindo transformações
78 complexas, reais e paralelas, também pode manipular vetores de tamanho
79 arbitrário eficientemente. Esse pacote RPM inclui bibliotecas FFTW com
80 suporte a threads, normal e dupla precisão (Os arquivos de precisão
81 normal tem um prefixo "s").
84 Summary: Development files for fftw
85 Summary(pl.UTF-8): Pliki programistyczne do fftw
86 Summary(pt_BR.UTF-8): Headers e documentação do pacote FFTW
87 Group: Development/Libraries
88 Requires: %{name} = %{version}-%{release}
89 Requires: %{name}-common-devel = %{version}-%{release}
90 %{?with_openmp:Requires: libgomp-devel}
93 This package contains the files you need to develop programs using the
94 FFTW (fast fourier transform library).
96 %description devel -l pl.UTF-8
97 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
98 biblioteki FFTW (wykonującej szybką transformatę Fouriera).
100 %description devel -l pt_BR.UTF-8
101 Este pacote contém documentação e headers adicionais para desenvolver
102 programas usando a FFTW.
105 Summary: Static fftw libraries
106 Summary(pl.UTF-8): Statyczne biblioteki fftw
107 Summary(pt_BR.UTF-8): Bibliotecas estáticas do pacote FFTW
108 Group: Development/Libraries
109 Requires: %{name}-devel = %{version}-%{release}
112 Static fftw libraries.
114 %description static -l pl.UTF-8
115 Statyczne biblioteki fftw.
117 %description static -l pt_BR.UTF-8
118 Este pacote contém as bibliotecas estáticas do pacote FFTW.
121 Summary: Fast Fourier Transform library - single precision
122 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - pojedynczej precyzji
124 Requires: %{name}-common = %{version}-%{release}
127 FFTW is a collection of fast C routines for computing the Discrete
128 Fourier Transform in one or more dimensions. It includes complex,
129 real, and parallel transforms, and can handle arbitrary array sizes
130 efficiently. This RPM package includes the single precision FFTW
131 uniprocessor and threads libraries.
133 %description single -l pl.UTF-8
134 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
135 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
136 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
137 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
138 zawiera wersje FFTW o pojedynczej precyzji dla architektur
139 jednoprocesorowych oraz z obsługą wątków.
141 %package single-devel
142 Summary: Development files for single precision fftw
143 Summary(pl.UTF-8): Pliki programistyczne do fftw pojedynczej precyzji
144 Group: Development/Libraries
145 Requires: %{name}-common-devel = %{version}-%{release}
146 Requires: %{name}-single = %{version}-%{release}
147 %{?with_openmp:Requires: libgomp-devel}
149 %description single-devel
150 This package contains the files you need to develop programs using the
151 single precision FFTW (fast fourier transform library).
153 %description single-devel -l pl.UTF-8
154 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
155 biblioteki FFTW (wykonującej szybką transformatę Fouriera) pojedynczej
158 %package single-static
159 Summary: Static fftw single precision libraries
160 Summary(pl.UTF-8): Statyczne biblioteki fftw pojedynczej precyzji
161 Group: Development/Libraries
162 Requires: %{name}-single-devel = %{version}-%{release}
164 %description single-static
165 Static fftw single precision libraries.
167 %description single-static -l pl.UTF-8
168 Statyczne biblioteki fftw pojedynczej precyzji.
171 Summary: Fast Fourier Transform library - long double precision
172 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - rozszerzonej precyzji
174 Requires: %{name}-common = %{version}-%{release}
177 FFTW is a collection of fast C routines for computing the Discrete
178 Fourier Transform in one or more dimensions. It includes complex,
179 real, and parallel transforms, and can handle arbitrary array sizes
180 efficiently. This RPM package includes the long double precision FFTW
181 uniprocessor and threads libraries.
183 %description long -l pl.UTF-8
184 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
185 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
186 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
187 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
188 zawiera wersje FFTW o rozszerzonej precyzji dla architektur
189 jednoprocesorowych oraz z obsługą wątków.
192 Summary: Development files for long double precision fftw
193 Summary(pl.UTF-8): Pliki programistyczne do fftw rozszerzonej precyzji
194 Group: Development/Libraries
195 Requires: %{name}-common-devel = %{version}-%{release}
196 Requires: %{name}-long = %{version}-%{release}
197 %{?with_openmp:Requires: libgomp-devel}
199 %description long-devel
200 This package contains the files you need to develop programs using the
201 long double precision FFTW (fast fourier transform library).
203 %description long-devel -l pl.UTF-8
204 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
205 biblioteki FFTW (wykonującej szybką transformatę Fouriera)
206 rozszerzonej precyzji.
209 Summary: Static fftw long double precision libraries
210 Summary(pl.UTF-8): Statyczne biblioteki fftw rozszerzonej precyzji
211 Group: Development/Libraries
212 Requires: %{name}-long-devel = %{version}-%{release}
214 %description long-static
215 Static fftw long double precision libraries.
217 %description long-static -l pl.UTF-8
218 Statyczne biblioteki fftw rozszerzonej precyzji.
221 Summary: Fast Fourier Transform library - quad precision
222 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - poczwórnej precyzji
224 Requires: %{name}-common = %{version}-%{release}
227 FFTW is a collection of fast C routines for computing the Discrete
228 Fourier Transform in one or more dimensions. It includes complex,
229 real, and parallel transforms, and can handle arbitrary array sizes
230 efficiently. This RPM package includes the quad precision FFTW
231 uniprocessor and threads libraries.
233 %description quad -l pl.UTF-8
234 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
235 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
236 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
237 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
238 zawiera wersje FFTW o poczwórnej precyzji dla architektur
239 jednoprocesorowych oraz z obsługą wątków.
242 Summary: Development files for quad precision fftw
243 Summary(pl.UTF-8): Pliki programistyczne do fftw poczwórnej precyzji
244 Group: Development/Libraries
245 Requires: %{name}-common-devel = %{version}-%{release}
246 Requires: %{name}-quad = %{version}-%{release}
247 %{?with_openmp:Requires: libgomp-devel}
248 Requires: libquadmath-devel
250 %description quad-devel
251 This package contains the files you need to develop programs using the
252 quad precision FFTW (fast fourier transform library).
254 %description quad-devel -l pl.UTF-8
255 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
256 biblioteki FFTW (wykonującej szybką transformatę Fouriera) poczwórnej
260 Summary: Static fftw quad precision libraries
261 Summary(pl.UTF-8): Statyczne biblioteki fftw poczwórnej precyzji
262 Group: Development/Libraries
263 Requires: %{name}-quad-devel = %{version}-%{release}
265 %description quad-static
266 Static fftw quad precision libraries.
268 %description quad-static -l pl.UTF-8
269 Statyczne biblioteki fftw poczwórnej precyzji.
272 Summary: Files common for all versions of fftw libraries
273 Summary(pl.UTF-8): Pliki wspólne dla wszystkich wersji bibliotek fftw
277 Files common for all versions of fftw libraries (basic documentation,
278 fftw-wisdom-to-conf utility).
280 %description common -l pl.UTF-8
281 Pliki wspólne dla wszystkich wersji bibliotek fftw (podstawowa
282 dokumentacja, narzędzie fftw-wisdom-to-conf).
284 %package common-devel
285 Summary: Development files common for all versions of fftw libraries
286 Summary(pl.UTF-8): Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
287 Group: Development/Libraries
288 Requires: %{name}-common = %{version}-%{release}
290 %description common-devel
291 Development files common for all versions of fftw libraries (header
292 files, development documentation).
294 %description common-devel -l pl.UTF-8
295 Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
296 (pliki nagłówkowe, dokumentacja programisty).
299 %setup -q -n fftw-%{version}
309 # MMX/SSE/etc. seem to be safe because of runtime CPU detection
310 for ver in %{builds}; do
312 # SSE,altivec,neon@arm[32] only for single
313 if [ "$ver" = "single" ]; then
314 %ifarch pentium3 athlon
315 # for SSE2-aware subarchs SSE for single precision is enabled by --enable-sse2 option
318 %ifarch armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl aarch64
322 OPTS="--enable-altivec"
324 : # keep sh happy about syntax on other archs
326 %ifarch i686 pentium4 %{x8664} x32
327 # SSE/SSE2 and AVX only for single and double
328 if [ "$ver" = "double" -o "$ver" = "single" ]; then
329 OPTS="$OPTS --enable-sse2 --enable-avx"
331 OPTS="$OPTS --enable-avx2"
334 OPTS="$OPTS --enable-avx512 --enable-kcvi"
338 %if %{with avx128fma}
339 OPTS="$OPTS --enable-avx128-fma"
342 OPTS="$OPTS --enable-neon"
345 OPTS="$OPTS --enable-vsx"
347 install -d build-${ver}
351 --enable-debug%{!?debug:=no} \
362 rm -rf $RPM_BUILD_ROOT
363 install -d $RPM_BUILD_ROOT%{_sysconfdir}/fftw
365 for b in %{builds} ; do
366 %{__make} install -C build-${b} \
367 DESTDIR=$RPM_BUILD_ROOT
371 rm -rf $RPM_BUILD_ROOT
373 %post -p /sbin/ldconfig
374 %postun -p /sbin/ldconfig
376 %post single -p /sbin/ldconfig
377 %postun single -p /sbin/ldconfig
379 %post long -p /sbin/ldconfig
380 %postun long -p /sbin/ldconfig
382 %post common-devel -p /sbin/postshell
383 -/usr/sbin/fix-info-dir -c %{_infodir}
385 %postun common-devel -p /sbin/postshell
386 -/usr/sbin/fix-info-dir -c %{_infodir}
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_bindir}/fftw-wisdom
391 %attr(755,root,root) %{_libdir}/libfftw3.so.*.*.*
392 %attr(755,root,root) %ghost %{_libdir}/libfftw3.so.3
393 %attr(755,root,root) %{_libdir}/libfftw3_threads.so.*.*.*
394 %attr(755,root,root) %ghost %{_libdir}/libfftw3_threads.so.3
396 %attr(755,root,root) %{_libdir}/libfftw3_omp.so.*.*.*
397 %attr(755,root,root) %ghost %{_libdir}/libfftw3_omp.so.3
399 %{_mandir}/man1/fftw-wisdom.1*
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_libdir}/libfftw3.so
404 %attr(755,root,root) %{_libdir}/libfftw3_threads.so
405 %{_libdir}/libfftw3.la
406 %{_libdir}/libfftw3_threads.la
408 %attr(755,root,root) %{_libdir}/libfftw3_omp.so
409 %{_libdir}/libfftw3_omp.la
411 %{_pkgconfigdir}/fftw3.pc
412 %{_libdir}/cmake/fftw3/FFTW3Config*.cmake
415 %defattr(644,root,root,755)
416 %{_libdir}/libfftw3.a
417 %{_libdir}/libfftw3_threads.a
419 %{_libdir}/libfftw3_omp.a
423 %defattr(644,root,root,755)
424 %attr(755,root,root) %{_bindir}/fftwf-wisdom
425 %attr(755,root,root) %{_libdir}/libfftw3f.so.*.*.*
426 %attr(755,root,root) %ghost %{_libdir}/libfftw3f.so.3
427 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so.*.*.*
428 %attr(755,root,root) %ghost %{_libdir}/libfftw3f_threads.so.3
430 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so.*.*.*
431 %attr(755,root,root) %ghost %{_libdir}/libfftw3f_omp.so.3
433 %{_mandir}/man1/fftwf-wisdom.1*
436 %defattr(644,root,root,755)
437 %attr(755,root,root) %{_libdir}/libfftw3f.so
438 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so
439 %{_libdir}/libfftw3f.la
440 %{_libdir}/libfftw3f_threads.la
442 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so
443 %{_libdir}/libfftw3f_omp.la
445 %{_pkgconfigdir}/fftw3f.pc
446 %{_libdir}/cmake/fftw3/FFTW3fConfig*.cmake
449 %defattr(644,root,root,755)
450 %{_libdir}/libfftw3f.a
451 %{_libdir}/libfftw3f_threads.a
453 %{_libdir}/libfftw3f_omp.a
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_bindir}/fftwl-wisdom
460 %attr(755,root,root) %{_libdir}/libfftw3l.so.*.*.*
461 %attr(755,root,root) %ghost %{_libdir}/libfftw3l.so.3
462 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so.*.*.*
463 %attr(755,root,root) %ghost %{_libdir}/libfftw3l_threads.so.3
465 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so.*.*.*
466 %attr(755,root,root) %ghost %{_libdir}/libfftw3l_omp.so.3
468 %{_mandir}/man1/fftwl-wisdom.1*
471 %defattr(644,root,root,755)
472 %attr(755,root,root) %{_libdir}/libfftw3l.so
473 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so
474 %{_libdir}/libfftw3l.la
475 %{_libdir}/libfftw3l_threads.la
477 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so
478 %{_libdir}/libfftw3l_omp.la
480 %{_includedir}/fftw3l.f03
481 %{_pkgconfigdir}/fftw3l.pc
482 %{_libdir}/cmake/fftw3/FFTW3lConfig*.cmake
485 %defattr(644,root,root,755)
486 %{_libdir}/libfftw3l.a
487 %{_libdir}/libfftw3l_threads.a
489 %{_libdir}/libfftw3l_omp.a
495 %defattr(644,root,root,755)
496 %attr(755,root,root) %{_bindir}/fftwq-wisdom
497 %attr(755,root,root) %{_libdir}/libfftw3q.so.*.*.*
498 %attr(755,root,root) %ghost %{_libdir}/libfftw3q.so.3
499 %attr(755,root,root) %{_libdir}/libfftw3q_threads.so.*.*.*
500 %attr(755,root,root) %ghost %{_libdir}/libfftw3q_threads.so.3
502 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so.*.*.*
503 %attr(755,root,root) %ghost %{_libdir}/libfftw3q_omp.so.3
505 %{_mandir}/man1/fftwq-wisdom.1*
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_libdir}/libfftw3q.so
510 %attr(755,root,root) %{_libdir}/libfftw3q_threads.so
511 %{_libdir}/libfftw3q.la
512 %{_libdir}/libfftw3q_threads.la
514 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so
515 %{_libdir}/libfftw3q_omp.la
517 %{_includedir}/fftw3q.f03
518 %{_pkgconfigdir}/fftw3q.pc
519 %{_libdir}/cmake/fftw3/FFTW3qConfig*.cmake
522 %defattr(644,root,root,755)
523 %{_libdir}/libfftw3q.a
524 %{_libdir}/libfftw3q_threads.a
526 %{_libdir}/libfftw3q_omp.a
531 %defattr(644,root,root,755)
532 %doc AUTHORS COPYRIGHT ChangeLog NEWS README TODO
533 %dir %{_sysconfdir}/fftw
534 %attr(755,root,root) %{_bindir}/fftw-wisdom-to-conf
535 %{_mandir}/man1/fftw-wisdom-to-conf.1*
538 %defattr(644,root,root,755)
539 %doc doc/html doc/FAQ/fftw-faq.html
540 %{_includedir}/fftw3.f
541 %{_includedir}/fftw3.f03
542 %{_includedir}/fftw3.h
543 %dir %{_libdir}/cmake/fftw3
544 %{_infodir}/fftw3.info*