]> git.pld-linux.org Git - packages/fftw3.git/blob - fftw3.spec
1f2ec0ba9de5d3e48b090e2af18ef20d4d8667c4
[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 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
19 Name:           fftw3
20 Version:        3.3.6
21 %define subver  pl2
22 Release:        1
23 License:        GPL v2+
24 Group:          Libraries
25 Source0:        ftp://ftp.fftw.org/pub/fftw/fftw-%{version}-%{subver}.tar.gz
26 # Source0-md5:  927e481edbb32575397eb3d62535a856
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
33 %if %{with fftwl}
34 # for 128-bit long double support
35 BuildRequires:  gcc-fortran >= 5:4.1.0-1
36 BuildRequires:  glibc >= 6:2.4-1
37 %endif
38 %endif
39 %if %{with fftwq}
40 BuildRequires:  gcc >= 6:4.6.0
41 BuildRequires:  libquadmath-devel
42 %endif
43 %if %{with openmp}
44 BuildRequires:  gcc >= 6:4.2.0
45 BuildRequires:  libgomp-devel
46 %endif
47 BuildRequires:  libtool
48 BuildRequires:  texinfo
49 Requires:       %{name}-common = %{version}-%{release}
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %define builds  single double %{?with_fftwl:long-double} %{?with_fftwq:quad-precision}
53
54 %description
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.
60
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.
68
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").
76
77 %package devel
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}
85
86 %description devel
87 This package contains the files you need to develop programs using the
88 FFTW (fast fourier transform library).
89
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).
93
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.
97
98 %package static
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}
104
105 %description static
106 Static fftw libraries.
107
108 %description static -l pl.UTF-8
109 Statyczne biblioteki fftw.
110
111 %description static -l pt_BR.UTF-8
112 Este pacote contém as bibliotecas estáticas do pacote FFTW.
113
114 %package single
115 Summary:        Fast Fourier Transform library - single precision
116 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - pojedynczej precyzji
117 Group:          Libraries
118 Requires:       %{name}-common = %{version}-%{release}
119
120 %description single
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.
126
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.
134
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}
142
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).
146
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
150 precyzji.
151
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}
157
158 %description single-static
159 Static fftw single precision libraries.
160
161 %description single-static -l pl.UTF-8
162 Statyczne biblioteki fftw pojedynczej precyzji.
163
164 %package long
165 Summary:        Fast Fourier Transform library - long double precision
166 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - rozszerzonej precyzji
167 Group:          Libraries
168 Requires:       %{name}-common = %{version}-%{release}
169
170 %description long
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.
176
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.
184
185 %package long-devel
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}
192
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).
196
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.
201
202 %package long-static
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}
207
208 %description long-static
209 Static fftw long double precision libraries.
210
211 %description long-static -l pl.UTF-8
212 Statyczne biblioteki fftw rozszerzonej precyzji.
213
214 %package quad
215 Summary:        Fast Fourier Transform library - quad precision
216 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - poczwórnej precyzji
217 Group:          Libraries
218 Requires:       %{name}-common = %{version}-%{release}
219
220 %description quad
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.
226
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.
234
235 %package quad-devel
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
243
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).
247
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
251 precyzji.
252
253 %package quad-static
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}
258
259 %description quad-static
260 Static fftw quad precision libraries.
261
262 %description quad-static -l pl.UTF-8
263 Statyczne biblioteki fftw poczwórnej precyzji.
264
265 %package common
266 Summary:        Files common for all versions of fftw libraries
267 Summary(pl.UTF-8):      Pliki wspólne dla wszystkich wersji bibliotek fftw
268 Group:          Libraries
269
270 %description common
271 Files common for all versions of fftw libraries (basic documentation,
272 fftw-wisdom-to-conf utility).
273
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).
277
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}
283
284 %description common-devel
285 Development files common for all versions of fftw libraries (header
286 files, development documentation).
287
288 %description common-devel -l pl.UTF-8
289 Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
290 (pliki nagłówkowe, dokumentacja programisty).
291
292 %prep
293 %setup -q -n fftw-%{version}-%{subver}
294 %patch0 -p1
295
296 %build
297 %{__libtoolize}
298 %{__aclocal} -I m4
299 %{__autoconf}
300 %{__automake}
301
302 # MMX/SSE/etc. seem to be safe because of runtime CPU detection
303 for ver in %{builds}; do
304         OPTS=""
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
309                 OPTS="--enable-sse"
310 %endif
311 %ifarch %{arm}
312                 OPTS="--enable-neon"
313 %endif
314 %ifarch ppc ppc64
315                 OPTS="--enable-altivec"
316 %endif
317                 : # keep sh happy about syntax on other archs
318         fi
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"
323 %if %{with avx256}
324                 OPTS="$OPTS --enable-avx2"
325 %endif
326 %if %{with avx512}
327                 OPTS="$OPTS --enable-avx512 --enable-kcvi"
328 %endif
329         fi
330 %endif
331 %if %{with avx128fma}
332         OPTS="$OPTS --enable-avx128-fma"
333 %endif
334 %ifarch aarch64
335         OPTS="$OPTS --enable-neon"
336 %endif
337 %ifarch ppc ppc64
338         OPTS="$OPTS --enable-vsx"
339 %endif
340 install -d build-${ver}
341 cd build-${ver}
342 ../%configure \
343         --enable-$ver \
344         --enable-debug%{!?debug:=no} \
345         --enable-openmp \
346         --enable-shared \
347         --enable-threads \
348         $OPTS
349
350 %{__make}
351 cd ..
352 done
353
354 %install
355 rm -rf $RPM_BUILD_ROOT
356 install -d $RPM_BUILD_ROOT%{_sysconfdir}/fftw
357
358 for b in %{builds} ; do
359         %{__make} install -C build-${b} \
360                 DESTDIR=$RPM_BUILD_ROOT
361 done
362
363 %clean
364 rm -rf $RPM_BUILD_ROOT
365
366 %post   -p /sbin/ldconfig
367 %postun -p /sbin/ldconfig
368
369 %post   single -p /sbin/ldconfig
370 %postun single -p /sbin/ldconfig
371
372 %post   long -p /sbin/ldconfig
373 %postun long -p /sbin/ldconfig
374
375 %post   common-devel -p /sbin/postshell
376 -/usr/sbin/fix-info-dir -c %{_infodir}
377
378 %postun common-devel -p /sbin/postshell
379 -/usr/sbin/fix-info-dir -c %{_infodir}
380
381 %files
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
388 %if %{with openmp}
389 %attr(755,root,root) %{_libdir}/libfftw3_omp.so.*.*.*
390 %attr(755,root,root) %ghost %{_libdir}/libfftw3_omp.so.3
391 %endif
392 %{_mandir}/man1/fftw-wisdom.1*
393
394 %files devel
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
400 %if %{with openmp}
401 %attr(755,root,root) %{_libdir}/libfftw3_omp.so
402 %{_libdir}/libfftw3_omp.la
403 %endif
404 %{_pkgconfigdir}/fftw3.pc
405
406 %files static
407 %defattr(644,root,root,755)
408 %{_libdir}/libfftw3.a
409 %{_libdir}/libfftw3_threads.a
410 %if %{with openmp}
411 %{_libdir}/libfftw3_omp.a
412 %endif
413
414 %files single
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_bindir}/fftwf-wisdom
417 %attr(755,root,root) %{_libdir}/libfftw3f.so.*.*.*
418 %attr(755,root,root) %ghost %{_libdir}/libfftw3f.so.3
419 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so.*.*.*
420 %attr(755,root,root) %ghost %{_libdir}/libfftw3f_threads.so.3
421 %if %{with openmp}
422 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so.*.*.*
423 %attr(755,root,root) %ghost %{_libdir}/libfftw3f_omp.so.3
424 %endif
425 %{_mandir}/man1/fftwf-wisdom.1*
426
427 %files single-devel
428 %defattr(644,root,root,755)
429 %attr(755,root,root) %{_libdir}/libfftw3f.so
430 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so
431 %{_libdir}/libfftw3f.la
432 %{_libdir}/libfftw3f_threads.la
433 %if %{with openmp}
434 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so
435 %{_libdir}/libfftw3f_omp.la
436 %endif
437 %{_pkgconfigdir}/fftw3f.pc
438
439 %files single-static
440 %defattr(644,root,root,755)
441 %{_libdir}/libfftw3f.a
442 %{_libdir}/libfftw3f_threads.a
443 %if %{with openmp}
444 %{_libdir}/libfftw3f_omp.a
445 %endif
446
447 %if %{with fftwl}
448 %files long
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_bindir}/fftwl-wisdom
451 %attr(755,root,root) %{_libdir}/libfftw3l.so.*.*.*
452 %attr(755,root,root) %ghost %{_libdir}/libfftw3l.so.3
453 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so.*.*.*
454 %attr(755,root,root) %ghost %{_libdir}/libfftw3l_threads.so.3
455 %if %{with openmp}
456 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so.*.*.*
457 %attr(755,root,root) %ghost %{_libdir}/libfftw3l_omp.so.3
458 %endif
459 %{_mandir}/man1/fftwl-wisdom.1*
460
461 %files long-devel
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/libfftw3l.so
464 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so
465 %{_libdir}/libfftw3l.la
466 %{_libdir}/libfftw3l_threads.la
467 %if %{with openmp}
468 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so
469 %{_libdir}/libfftw3l_omp.la
470 %endif
471 %{_includedir}/fftw3l.f03
472 %{_pkgconfigdir}/fftw3l.pc
473
474 %files long-static
475 %defattr(644,root,root,755)
476 %{_libdir}/libfftw3l.a
477 %{_libdir}/libfftw3l_threads.a
478 %if %{with openmp}
479 %{_libdir}/libfftw3l_omp.a
480 %endif
481 %endif
482
483 %if %{with fftwq}
484 %files quad
485 %defattr(644,root,root,755)
486 %attr(755,root,root) %{_bindir}/fftwq-wisdom
487 %attr(755,root,root) %{_libdir}/libfftw3q.so.*.*.*
488 %attr(755,root,root) %ghost %{_libdir}/libfftw3q.so.3
489 %attr(755,root,root) %{_libdir}/libfftw3q_threads.so.*.*.*
490 %attr(755,root,root) %ghost %{_libdir}/libfftw3q_threads.so.3
491 %if %{with openmp}
492 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so.*.*.*
493 %attr(755,root,root) %ghost %{_libdir}/libfftw3q_omp.so.3
494 %endif
495 %{_mandir}/man1/fftwq-wisdom.1*
496
497 %files quad-devel
498 %defattr(644,root,root,755)
499 %attr(755,root,root) %{_libdir}/libfftw3q.so
500 %attr(755,root,root) %{_libdir}/libfftw3q_threads.so
501 %{_libdir}/libfftw3q.la
502 %{_libdir}/libfftw3q_threads.la
503 %if %{with openmp}
504 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so
505 %{_libdir}/libfftw3q_omp.la
506 %endif
507 %{_includedir}/fftw3q.f03
508 %{_pkgconfigdir}/fftw3q.pc
509
510 %files quad-static
511 %defattr(644,root,root,755)
512 %{_libdir}/libfftw3q.a
513 %{_libdir}/libfftw3q_threads.a
514 %if %{with openmp}
515 %{_libdir}/libfftw3q_omp.a
516 %endif
517 %endif
518
519 %files common
520 %defattr(644,root,root,755)
521 %doc AUTHORS COPYRIGHT ChangeLog NEWS README TODO
522 %dir %{_sysconfdir}/fftw
523 %attr(755,root,root) %{_bindir}/fftw-wisdom-to-conf
524 %{_mandir}/man1/fftw-wisdom-to-conf.1*
525
526 %files common-devel
527 %defattr(644,root,root,755)
528 %doc doc/html doc/FAQ/fftw-faq.html
529 %{_includedir}/fftw3.f
530 %{_includedir}/fftw3.f03
531 %{_includedir}/fftw3.h
532 %{_infodir}/fftw3.info*
This page took 0.052522 seconds and 2 git commands to generate.