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: 8ccbf6a5ea78a16dbc3e1306e234cc5c
32 Patch0: %{name}-info.patch
33 Patch1: %{name}-flags.patch
34 Patch2: fftw-cmake.patch
35 Patch3: fftw-cmakedir.patch
36 URL: http://www.fftw.org/
37 BuildRequires: autoconf >= 2.50
38 BuildRequires: automake >= 1:1.7
39 BuildRequires: gcc-fortran
40 %ifarch alpha ppc s390 s390x sparc sparcv9
42 # for 128-bit long double support
43 BuildRequires: gcc-fortran >= 5:4.1.0-1
44 BuildRequires: glibc >= 6:2.4-1
48 BuildRequires: gcc >= 6:4.6.0
49 BuildRequires: libquadmath-devel
52 BuildRequires: gcc >= 6:4.2.0
53 BuildRequires: libgomp-devel
55 BuildRequires: libtool
56 BuildRequires: texinfo
57 Requires: %{name}-common = %{version}-%{release}
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60 %define builds single double %{?with_fftwl:long-double} %{?with_fftwq:quad-precision}
63 FFTW is a collection of fast C routines for computing the Discrete
64 Fourier Transform in one or more dimensions. It includes complex,
65 real, and parallel transforms, and can handle arbitrary array sizes
66 efficiently. This RPM package includes the double precision FFTW
67 uniprocessor and threads libraries.
69 %description -l pl.UTF-8
70 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
71 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
72 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
73 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
74 zawiera wersje FFTW o podwójnej precyzji dla architektur
75 jednoprocesorowych oraz z obsługą wątków.
77 %description -l pt_BR.UTF-8
78 FFTW é uma coleção de rotinas rápidas em C para computar a Discrete
79 Fourier Transform em uma ou mais dimensões. Incluindo transformações
80 complexas, reais e paralelas, também pode manipular vetores de tamanho
81 arbitrário eficientemente. Esse pacote RPM inclui bibliotecas FFTW com
82 suporte a threads, normal e dupla precisão (Os arquivos de precisão
83 normal tem um prefixo "s").
86 Summary: Development files for fftw
87 Summary(pl.UTF-8): Pliki programistyczne do fftw
88 Summary(pt_BR.UTF-8): Headers e documentação do pacote FFTW
89 Group: Development/Libraries
90 Requires: %{name} = %{version}-%{release}
91 Requires: %{name}-common-devel = %{version}-%{release}
92 %{?with_openmp:Requires: libgomp-devel}
95 This package contains the files you need to develop programs using the
96 FFTW (fast fourier transform library).
98 %description devel -l pl.UTF-8
99 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
100 biblioteki FFTW (wykonującej szybką transformatę Fouriera).
102 %description devel -l pt_BR.UTF-8
103 Este pacote contém documentação e headers adicionais para desenvolver
104 programas usando a FFTW.
107 Summary: Static fftw libraries
108 Summary(pl.UTF-8): Statyczne biblioteki fftw
109 Summary(pt_BR.UTF-8): Bibliotecas estáticas do pacote FFTW
110 Group: Development/Libraries
111 Requires: %{name}-devel = %{version}-%{release}
114 Static fftw libraries.
116 %description static -l pl.UTF-8
117 Statyczne biblioteki fftw.
119 %description static -l pt_BR.UTF-8
120 Este pacote contém as bibliotecas estáticas do pacote FFTW.
123 Summary: Fast Fourier Transform library - single precision
124 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - pojedynczej precyzji
126 Requires: %{name}-common = %{version}-%{release}
129 FFTW is a collection of fast C routines for computing the Discrete
130 Fourier Transform in one or more dimensions. It includes complex,
131 real, and parallel transforms, and can handle arbitrary array sizes
132 efficiently. This RPM package includes the single precision FFTW
133 uniprocessor and threads libraries.
135 %description single -l pl.UTF-8
136 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
137 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
138 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
139 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
140 zawiera wersje FFTW o pojedynczej precyzji dla architektur
141 jednoprocesorowych oraz z obsługą wątków.
143 %package single-devel
144 Summary: Development files for single precision fftw
145 Summary(pl.UTF-8): Pliki programistyczne do fftw pojedynczej precyzji
146 Group: Development/Libraries
147 Requires: %{name}-common-devel = %{version}-%{release}
148 Requires: %{name}-single = %{version}-%{release}
149 %{?with_openmp:Requires: libgomp-devel}
151 %description single-devel
152 This package contains the files you need to develop programs using the
153 single precision FFTW (fast fourier transform library).
155 %description single-devel -l pl.UTF-8
156 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
157 biblioteki FFTW (wykonującej szybką transformatę Fouriera) pojedynczej
160 %package single-static
161 Summary: Static fftw single precision libraries
162 Summary(pl.UTF-8): Statyczne biblioteki fftw pojedynczej precyzji
163 Group: Development/Libraries
164 Requires: %{name}-single-devel = %{version}-%{release}
166 %description single-static
167 Static fftw single precision libraries.
169 %description single-static -l pl.UTF-8
170 Statyczne biblioteki fftw pojedynczej precyzji.
173 Summary: Fast Fourier Transform library - long double precision
174 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - rozszerzonej precyzji
176 Requires: %{name}-common = %{version}-%{release}
179 FFTW is a collection of fast C routines for computing the Discrete
180 Fourier Transform in one or more dimensions. It includes complex,
181 real, and parallel transforms, and can handle arbitrary array sizes
182 efficiently. This RPM package includes the long double precision FFTW
183 uniprocessor and threads libraries.
185 %description long -l pl.UTF-8
186 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
187 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
188 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
189 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
190 zawiera wersje FFTW o rozszerzonej precyzji dla architektur
191 jednoprocesorowych oraz z obsługą wątków.
194 Summary: Development files for long double precision fftw
195 Summary(pl.UTF-8): Pliki programistyczne do fftw rozszerzonej precyzji
196 Group: Development/Libraries
197 Requires: %{name}-common-devel = %{version}-%{release}
198 Requires: %{name}-long = %{version}-%{release}
199 %{?with_openmp:Requires: libgomp-devel}
201 %description long-devel
202 This package contains the files you need to develop programs using the
203 long double precision FFTW (fast fourier transform library).
205 %description long-devel -l pl.UTF-8
206 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
207 biblioteki FFTW (wykonującej szybką transformatę Fouriera)
208 rozszerzonej precyzji.
211 Summary: Static fftw long double precision libraries
212 Summary(pl.UTF-8): Statyczne biblioteki fftw rozszerzonej precyzji
213 Group: Development/Libraries
214 Requires: %{name}-long-devel = %{version}-%{release}
216 %description long-static
217 Static fftw long double precision libraries.
219 %description long-static -l pl.UTF-8
220 Statyczne biblioteki fftw rozszerzonej precyzji.
223 Summary: Fast Fourier Transform library - quad precision
224 Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - poczwórnej precyzji
226 Requires: %{name}-common = %{version}-%{release}
229 FFTW is a collection of fast C routines for computing the Discrete
230 Fourier Transform in one or more dimensions. It includes complex,
231 real, and parallel transforms, and can handle arbitrary array sizes
232 efficiently. This RPM package includes the quad precision FFTW
233 uniprocessor and threads libraries.
235 %description quad -l pl.UTF-8
236 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
237 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
238 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
239 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
240 zawiera wersje FFTW o poczwórnej precyzji dla architektur
241 jednoprocesorowych oraz z obsługą wątków.
244 Summary: Development files for quad precision fftw
245 Summary(pl.UTF-8): Pliki programistyczne do fftw poczwórnej precyzji
246 Group: Development/Libraries
247 Requires: %{name}-common-devel = %{version}-%{release}
248 Requires: %{name}-quad = %{version}-%{release}
249 %{?with_openmp:Requires: libgomp-devel}
250 Requires: libquadmath-devel
252 %description quad-devel
253 This package contains the files you need to develop programs using the
254 quad precision FFTW (fast fourier transform library).
256 %description quad-devel -l pl.UTF-8
257 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
258 biblioteki FFTW (wykonującej szybką transformatę Fouriera) poczwórnej
262 Summary: Static fftw quad precision libraries
263 Summary(pl.UTF-8): Statyczne biblioteki fftw poczwórnej precyzji
264 Group: Development/Libraries
265 Requires: %{name}-quad-devel = %{version}-%{release}
267 %description quad-static
268 Static fftw quad precision libraries.
270 %description quad-static -l pl.UTF-8
271 Statyczne biblioteki fftw poczwórnej precyzji.
274 Summary: Files common for all versions of fftw libraries
275 Summary(pl.UTF-8): Pliki wspólne dla wszystkich wersji bibliotek fftw
279 Files common for all versions of fftw libraries (basic documentation,
280 fftw-wisdom-to-conf utility).
282 %description common -l pl.UTF-8
283 Pliki wspólne dla wszystkich wersji bibliotek fftw (podstawowa
284 dokumentacja, narzędzie fftw-wisdom-to-conf).
286 %package common-devel
287 Summary: Development files common for all versions of fftw libraries
288 Summary(pl.UTF-8): Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
289 Group: Development/Libraries
290 Requires: %{name}-common = %{version}-%{release}
292 %description common-devel
293 Development files common for all versions of fftw libraries (header
294 files, development documentation).
296 %description common-devel -l pl.UTF-8
297 Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
298 (pliki nagłówkowe, dokumentacja programisty).
301 %setup -q -n fftw-%{version}
313 # MMX/SSE/etc. seem to be safe because of runtime CPU detection
314 for ver in %{builds}; do
316 # SSE,altivec,neon@arm[32] only for single
317 if [ "$ver" = "single" ]; then
318 %ifarch pentium3 athlon
319 # for SSE2-aware subarchs SSE for single precision is enabled by --enable-sse2 option
322 %ifarch armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl aarch64
326 OPTS="--enable-altivec"
328 : # keep sh happy about syntax on other archs
330 %ifarch i686 pentium4 %{x8664} x32
331 # SSE/SSE2 and AVX only for single and double
332 if [ "$ver" = "double" -o "$ver" = "single" ]; then
333 OPTS="$OPTS --enable-sse2 --enable-avx"
335 OPTS="$OPTS --enable-avx2"
338 OPTS="$OPTS --enable-avx512 --enable-kcvi"
342 %if %{with avx128fma}
343 OPTS="$OPTS --enable-avx128-fma"
346 OPTS="$OPTS --enable-neon"
349 OPTS="$OPTS --enable-vsx"
351 install -d build-${ver}
355 --enable-debug%{!?debug:=no} \
366 rm -rf $RPM_BUILD_ROOT
367 install -d $RPM_BUILD_ROOT%{_sysconfdir}/fftw
369 for b in %{builds} ; do
370 %{__make} install -C build-${b} \
371 DESTDIR=$RPM_BUILD_ROOT
375 rm -rf $RPM_BUILD_ROOT
377 %post -p /sbin/ldconfig
378 %postun -p /sbin/ldconfig
380 %post single -p /sbin/ldconfig
381 %postun single -p /sbin/ldconfig
383 %post long -p /sbin/ldconfig
384 %postun long -p /sbin/ldconfig
386 %post common-devel -p /sbin/postshell
387 -/usr/sbin/fix-info-dir -c %{_infodir}
389 %postun common-devel -p /sbin/postshell
390 -/usr/sbin/fix-info-dir -c %{_infodir}
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_bindir}/fftw-wisdom
395 %attr(755,root,root) %{_libdir}/libfftw3.so.*.*.*
396 %attr(755,root,root) %ghost %{_libdir}/libfftw3.so.3
397 %attr(755,root,root) %{_libdir}/libfftw3_threads.so.*.*.*
398 %attr(755,root,root) %ghost %{_libdir}/libfftw3_threads.so.3
400 %attr(755,root,root) %{_libdir}/libfftw3_omp.so.*.*.*
401 %attr(755,root,root) %ghost %{_libdir}/libfftw3_omp.so.3
403 %{_mandir}/man1/fftw-wisdom.1*
406 %defattr(644,root,root,755)
407 %attr(755,root,root) %{_libdir}/libfftw3.so
408 %attr(755,root,root) %{_libdir}/libfftw3_threads.so
409 %{_libdir}/libfftw3.la
410 %{_libdir}/libfftw3_threads.la
412 %attr(755,root,root) %{_libdir}/libfftw3_omp.so
413 %{_libdir}/libfftw3_omp.la
415 %{_pkgconfigdir}/fftw3.pc
416 %{_libdir}/cmake/fftw3
419 %defattr(644,root,root,755)
420 %{_libdir}/libfftw3.a
421 %{_libdir}/libfftw3_threads.a
423 %{_libdir}/libfftw3_omp.a
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_bindir}/fftwf-wisdom
429 %attr(755,root,root) %{_libdir}/libfftw3f.so.*.*.*
430 %attr(755,root,root) %ghost %{_libdir}/libfftw3f.so.3
431 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so.*.*.*
432 %attr(755,root,root) %ghost %{_libdir}/libfftw3f_threads.so.3
434 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so.*.*.*
435 %attr(755,root,root) %ghost %{_libdir}/libfftw3f_omp.so.3
437 %{_mandir}/man1/fftwf-wisdom.1*
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_libdir}/libfftw3f.so
442 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so
443 %{_libdir}/libfftw3f.la
444 %{_libdir}/libfftw3f_threads.la
446 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so
447 %{_libdir}/libfftw3f_omp.la
449 %{_pkgconfigdir}/fftw3f.pc
450 %{_libdir}/cmake/fftw3f
453 %defattr(644,root,root,755)
454 %{_libdir}/libfftw3f.a
455 %{_libdir}/libfftw3f_threads.a
457 %{_libdir}/libfftw3f_omp.a
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_bindir}/fftwl-wisdom
464 %attr(755,root,root) %{_libdir}/libfftw3l.so.*.*.*
465 %attr(755,root,root) %ghost %{_libdir}/libfftw3l.so.3
466 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so.*.*.*
467 %attr(755,root,root) %ghost %{_libdir}/libfftw3l_threads.so.3
469 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so.*.*.*
470 %attr(755,root,root) %ghost %{_libdir}/libfftw3l_omp.so.3
472 %{_mandir}/man1/fftwl-wisdom.1*
475 %defattr(644,root,root,755)
476 %attr(755,root,root) %{_libdir}/libfftw3l.so
477 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so
478 %{_libdir}/libfftw3l.la
479 %{_libdir}/libfftw3l_threads.la
481 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so
482 %{_libdir}/libfftw3l_omp.la
484 %{_includedir}/fftw3l.f03
485 %{_pkgconfigdir}/fftw3l.pc
486 %{_libdir}/cmake/fftw3l
489 %defattr(644,root,root,755)
490 %{_libdir}/libfftw3l.a
491 %{_libdir}/libfftw3l_threads.a
493 %{_libdir}/libfftw3l_omp.a
499 %defattr(644,root,root,755)
500 %attr(755,root,root) %{_bindir}/fftwq-wisdom
501 %attr(755,root,root) %{_libdir}/libfftw3q.so.*.*.*
502 %attr(755,root,root) %ghost %{_libdir}/libfftw3q.so.3
503 %attr(755,root,root) %{_libdir}/libfftw3q_threads.so.*.*.*
504 %attr(755,root,root) %ghost %{_libdir}/libfftw3q_threads.so.3
506 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so.*.*.*
507 %attr(755,root,root) %ghost %{_libdir}/libfftw3q_omp.so.3
509 %{_mandir}/man1/fftwq-wisdom.1*
512 %defattr(644,root,root,755)
513 %attr(755,root,root) %{_libdir}/libfftw3q.so
514 %attr(755,root,root) %{_libdir}/libfftw3q_threads.so
515 %{_libdir}/libfftw3q.la
516 %{_libdir}/libfftw3q_threads.la
518 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so
519 %{_libdir}/libfftw3q_omp.la
521 %{_includedir}/fftw3q.f03
522 %{_pkgconfigdir}/fftw3q.pc
523 %{_libdir}/cmake/fftw3q
526 %defattr(644,root,root,755)
527 %{_libdir}/libfftw3q.a
528 %{_libdir}/libfftw3q_threads.a
530 %{_libdir}/libfftw3q_omp.a
535 %defattr(644,root,root,755)
536 %doc AUTHORS COPYRIGHT ChangeLog NEWS README TODO
537 %dir %{_sysconfdir}/fftw
538 %attr(755,root,root) %{_bindir}/fftw-wisdom-to-conf
539 %{_mandir}/man1/fftw-wisdom-to-conf.1*
542 %defattr(644,root,root,755)
543 %doc doc/html doc/FAQ/fftw-faq.html
544 %{_includedir}/fftw3.f
545 %{_includedir}/fftw3.f03
546 %{_includedir}/fftw3.h
547 %{_infodir}/fftw3.info*