]> git.pld-linux.org Git - packages/fftw3.git/blob - fftw3.spec
cd134041506ed729423360686d0402f914cddc40
[packages/fftw3.git] / fftw3.spec
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.
5 #
6 # TODO: mpi
7 #
8 # Conditional build:
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]
15 #
16
17 %ifnarch %{ix86} %{x8664} x32 ia64
18 %undefine       with_fftwq
19 %endif
20
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
24 Name:           fftw3
25 Version:        3.3.8
26 Release:        1
27 License:        GPL v2+
28 Group:          Libraries
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
39 %if %{with fftwl}
40 # for 128-bit long double support
41 BuildRequires:  gcc-fortran >= 5:4.1.0-1
42 BuildRequires:  glibc >= 6:2.4-1
43 %endif
44 %endif
45 %if %{with fftwq}
46 BuildRequires:  gcc >= 6:4.6.0
47 BuildRequires:  libquadmath-devel
48 %endif
49 %if %{with openmp}
50 BuildRequires:  gcc >= 6:4.2.0
51 BuildRequires:  libgomp-devel
52 %endif
53 BuildRequires:  libtool
54 BuildRequires:  texinfo
55 Requires:       %{name}-common = %{version}-%{release}
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %define builds  single double %{?with_fftwl:long-double} %{?with_fftwq:quad-precision}
59
60 %description
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.
66
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.
74
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").
82
83 %package devel
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}
91
92 %description devel
93 This package contains the files you need to develop programs using the
94 FFTW (fast fourier transform library).
95
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).
99
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.
103
104 %package static
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}
110
111 %description static
112 Static fftw libraries.
113
114 %description static -l pl.UTF-8
115 Statyczne biblioteki fftw.
116
117 %description static -l pt_BR.UTF-8
118 Este pacote contém as bibliotecas estáticas do pacote FFTW.
119
120 %package single
121 Summary:        Fast Fourier Transform library - single precision
122 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - pojedynczej precyzji
123 Group:          Libraries
124 Requires:       %{name}-common = %{version}-%{release}
125
126 %description single
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.
132
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.
140
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}
148
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).
152
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
156 precyzji.
157
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}
163
164 %description single-static
165 Static fftw single precision libraries.
166
167 %description single-static -l pl.UTF-8
168 Statyczne biblioteki fftw pojedynczej precyzji.
169
170 %package long
171 Summary:        Fast Fourier Transform library - long double precision
172 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - rozszerzonej precyzji
173 Group:          Libraries
174 Requires:       %{name}-common = %{version}-%{release}
175
176 %description long
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.
182
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.
190
191 %package long-devel
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}
198
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).
202
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.
207
208 %package long-static
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}
213
214 %description long-static
215 Static fftw long double precision libraries.
216
217 %description long-static -l pl.UTF-8
218 Statyczne biblioteki fftw rozszerzonej precyzji.
219
220 %package quad
221 Summary:        Fast Fourier Transform library - quad precision
222 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - poczwórnej precyzji
223 Group:          Libraries
224 Requires:       %{name}-common = %{version}-%{release}
225
226 %description quad
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.
232
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.
240
241 %package quad-devel
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
249
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).
253
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
257 precyzji.
258
259 %package quad-static
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}
264
265 %description quad-static
266 Static fftw quad precision libraries.
267
268 %description quad-static -l pl.UTF-8
269 Statyczne biblioteki fftw poczwórnej precyzji.
270
271 %package common
272 Summary:        Files common for all versions of fftw libraries
273 Summary(pl.UTF-8):      Pliki wspólne dla wszystkich wersji bibliotek fftw
274 Group:          Libraries
275
276 %description common
277 Files common for all versions of fftw libraries (basic documentation,
278 fftw-wisdom-to-conf utility).
279
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).
283
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}
289
290 %description common-devel
291 Development files common for all versions of fftw libraries (header
292 files, development documentation).
293
294 %description common-devel -l pl.UTF-8
295 Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
296 (pliki nagłówkowe, dokumentacja programisty).
297
298 %prep
299 %setup -q -n fftw-%{version}
300 %patch0 -p1
301 %patch1 -p1
302
303 %build
304 %{__libtoolize}
305 %{__aclocal} -I m4
306 %{__autoconf}
307 %{__automake}
308
309 # MMX/SSE/etc. seem to be safe because of runtime CPU detection
310 for ver in %{builds}; do
311         OPTS=""
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
316                 OPTS="--enable-sse"
317 %endif
318 %ifarch armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl aarch64
319                 OPTS="--enable-neon"
320 %endif
321 %ifarch ppc ppc64
322                 OPTS="--enable-altivec"
323 %endif
324                 : # keep sh happy about syntax on other archs
325         fi
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"
330 %if %{with avx256}
331                 OPTS="$OPTS --enable-avx2"
332 %endif
333 %if %{with avx512}
334                 OPTS="$OPTS --enable-avx512 --enable-kcvi"
335 %endif
336         fi
337 %endif
338 %if %{with avx128fma}
339         OPTS="$OPTS --enable-avx128-fma"
340 %endif
341 %ifarch aarch64
342         OPTS="$OPTS --enable-neon"
343 %endif
344 %ifarch ppc ppc64
345         OPTS="$OPTS --enable-vsx"
346 %endif
347 install -d build-${ver}
348 cd build-${ver}
349 ../%configure \
350         --enable-$ver \
351         --enable-debug%{!?debug:=no} \
352         --enable-openmp \
353         --enable-shared \
354         --enable-threads \
355         $OPTS
356
357 %{__make}
358 cd ..
359 done
360
361 %install
362 rm -rf $RPM_BUILD_ROOT
363 install -d $RPM_BUILD_ROOT%{_sysconfdir}/fftw
364
365 for b in %{builds} ; do
366         %{__make} install -C build-${b} \
367                 DESTDIR=$RPM_BUILD_ROOT
368 done
369
370 %clean
371 rm -rf $RPM_BUILD_ROOT
372
373 %post   -p /sbin/ldconfig
374 %postun -p /sbin/ldconfig
375
376 %post   single -p /sbin/ldconfig
377 %postun single -p /sbin/ldconfig
378
379 %post   long -p /sbin/ldconfig
380 %postun long -p /sbin/ldconfig
381
382 %post   common-devel -p /sbin/postshell
383 -/usr/sbin/fix-info-dir -c %{_infodir}
384
385 %postun common-devel -p /sbin/postshell
386 -/usr/sbin/fix-info-dir -c %{_infodir}
387
388 %files
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
395 %if %{with openmp}
396 %attr(755,root,root) %{_libdir}/libfftw3_omp.so.*.*.*
397 %attr(755,root,root) %ghost %{_libdir}/libfftw3_omp.so.3
398 %endif
399 %{_mandir}/man1/fftw-wisdom.1*
400
401 %files devel
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
407 %if %{with openmp}
408 %attr(755,root,root) %{_libdir}/libfftw3_omp.so
409 %{_libdir}/libfftw3_omp.la
410 %endif
411 %{_pkgconfigdir}/fftw3.pc
412 %{_libdir}/cmake/fftw3/FFTW3Config*.cmake
413
414 %files static
415 %defattr(644,root,root,755)
416 %{_libdir}/libfftw3.a
417 %{_libdir}/libfftw3_threads.a
418 %if %{with openmp}
419 %{_libdir}/libfftw3_omp.a
420 %endif
421
422 %files single
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
429 %if %{with openmp}
430 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so.*.*.*
431 %attr(755,root,root) %ghost %{_libdir}/libfftw3f_omp.so.3
432 %endif
433 %{_mandir}/man1/fftwf-wisdom.1*
434
435 %files single-devel
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
441 %if %{with openmp}
442 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so
443 %{_libdir}/libfftw3f_omp.la
444 %endif
445 %{_pkgconfigdir}/fftw3f.pc
446 %{_libdir}/cmake/fftw3/FFTW3fConfig*.cmake
447
448 %files single-static
449 %defattr(644,root,root,755)
450 %{_libdir}/libfftw3f.a
451 %{_libdir}/libfftw3f_threads.a
452 %if %{with openmp}
453 %{_libdir}/libfftw3f_omp.a
454 %endif
455
456 %if %{with fftwl}
457 %files long
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
464 %if %{with openmp}
465 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so.*.*.*
466 %attr(755,root,root) %ghost %{_libdir}/libfftw3l_omp.so.3
467 %endif
468 %{_mandir}/man1/fftwl-wisdom.1*
469
470 %files long-devel
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
476 %if %{with openmp}
477 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so
478 %{_libdir}/libfftw3l_omp.la
479 %endif
480 %{_includedir}/fftw3l.f03
481 %{_pkgconfigdir}/fftw3l.pc
482 %{_libdir}/cmake/fftw3/FFTW3lConfig*.cmake
483
484 %files long-static
485 %defattr(644,root,root,755)
486 %{_libdir}/libfftw3l.a
487 %{_libdir}/libfftw3l_threads.a
488 %if %{with openmp}
489 %{_libdir}/libfftw3l_omp.a
490 %endif
491 %endif
492
493 %if %{with fftwq}
494 %files quad
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
501 %if %{with openmp}
502 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so.*.*.*
503 %attr(755,root,root) %ghost %{_libdir}/libfftw3q_omp.so.3
504 %endif
505 %{_mandir}/man1/fftwq-wisdom.1*
506
507 %files quad-devel
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
513 %if %{with openmp}
514 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so
515 %{_libdir}/libfftw3q_omp.la
516 %endif
517 %{_includedir}/fftw3q.f03
518 %{_pkgconfigdir}/fftw3q.pc
519 %{_libdir}/cmake/fftw3/FFTW3qConfig*.cmake
520
521 %files quad-static
522 %defattr(644,root,root,755)
523 %{_libdir}/libfftw3q.a
524 %{_libdir}/libfftw3q_threads.a
525 %if %{with openmp}
526 %{_libdir}/libfftw3q_omp.a
527 %endif
528 %endif
529
530 %files common
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*
536
537 %files common-devel
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*
This page took 0.102141 seconds and 2 git commands to generate.