]> git.pld-linux.org Git - packages/fftw3.git/blob - fftw3.spec
- git patch to make FFTWLibraryDepends.cmake files optional, install to proper dirs
[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.10
26 Release:        2
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:  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
41 %if %{with fftwl}
42 # for 128-bit long double support
43 BuildRequires:  gcc-fortran >= 5:4.1.0-1
44 BuildRequires:  glibc >= 6:2.4-1
45 %endif
46 %endif
47 %if %{with fftwq}
48 BuildRequires:  gcc >= 6:4.6.0
49 BuildRequires:  libquadmath-devel
50 %endif
51 %if %{with openmp}
52 BuildRequires:  gcc >= 6:4.2.0
53 BuildRequires:  libgomp-devel
54 %endif
55 BuildRequires:  libtool
56 BuildRequires:  texinfo
57 Requires:       %{name}-common = %{version}-%{release}
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %define builds  single double %{?with_fftwl:long-double} %{?with_fftwq:quad-precision}
61
62 %description
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.
68
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.
76
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").
84
85 %package devel
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}
93
94 %description devel
95 This package contains the files you need to develop programs using the
96 FFTW (fast fourier transform library).
97
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).
101
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.
105
106 %package static
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}
112
113 %description static
114 Static fftw libraries.
115
116 %description static -l pl.UTF-8
117 Statyczne biblioteki fftw.
118
119 %description static -l pt_BR.UTF-8
120 Este pacote contém as bibliotecas estáticas do pacote FFTW.
121
122 %package single
123 Summary:        Fast Fourier Transform library - single precision
124 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - pojedynczej precyzji
125 Group:          Libraries
126 Requires:       %{name}-common = %{version}-%{release}
127
128 %description single
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.
134
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.
142
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}
150
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).
154
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
158 precyzji.
159
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}
165
166 %description single-static
167 Static fftw single precision libraries.
168
169 %description single-static -l pl.UTF-8
170 Statyczne biblioteki fftw pojedynczej precyzji.
171
172 %package long
173 Summary:        Fast Fourier Transform library - long double precision
174 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - rozszerzonej precyzji
175 Group:          Libraries
176 Requires:       %{name}-common = %{version}-%{release}
177
178 %description long
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.
184
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.
192
193 %package long-devel
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}
200
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).
204
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.
209
210 %package long-static
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}
215
216 %description long-static
217 Static fftw long double precision libraries.
218
219 %description long-static -l pl.UTF-8
220 Statyczne biblioteki fftw rozszerzonej precyzji.
221
222 %package quad
223 Summary:        Fast Fourier Transform library - quad precision
224 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - poczwórnej precyzji
225 Group:          Libraries
226 Requires:       %{name}-common = %{version}-%{release}
227
228 %description quad
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.
234
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.
242
243 %package quad-devel
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
251
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).
255
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
259 precyzji.
260
261 %package quad-static
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}
266
267 %description quad-static
268 Static fftw quad precision libraries.
269
270 %description quad-static -l pl.UTF-8
271 Statyczne biblioteki fftw poczwórnej precyzji.
272
273 %package common
274 Summary:        Files common for all versions of fftw libraries
275 Summary(pl.UTF-8):      Pliki wspólne dla wszystkich wersji bibliotek fftw
276 Group:          Libraries
277
278 %description common
279 Files common for all versions of fftw libraries (basic documentation,
280 fftw-wisdom-to-conf utility).
281
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).
285
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}
291
292 %description common-devel
293 Development files common for all versions of fftw libraries (header
294 files, development documentation).
295
296 %description common-devel -l pl.UTF-8
297 Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
298 (pliki nagłówkowe, dokumentacja programisty).
299
300 %prep
301 %setup -q -n fftw-%{version}
302 %patch0 -p1
303 %patch1 -p1
304 %patch2 -p1
305 %patch3 -p1
306
307 %build
308 %{__libtoolize}
309 %{__aclocal} -I m4
310 %{__autoconf}
311 %{__automake}
312
313 # MMX/SSE/etc. seem to be safe because of runtime CPU detection
314 for ver in %{builds}; do
315         OPTS=""
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
320                 OPTS="--enable-sse"
321 %endif
322 %ifarch armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl aarch64
323                 OPTS="--enable-neon"
324 %endif
325 %ifarch ppc ppc64
326                 OPTS="--enable-altivec"
327 %endif
328                 : # keep sh happy about syntax on other archs
329         fi
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"
334 %if %{with avx256}
335                 OPTS="$OPTS --enable-avx2"
336 %endif
337 %if %{with avx512}
338                 OPTS="$OPTS --enable-avx512 --enable-kcvi"
339 %endif
340         fi
341 %endif
342 %if %{with avx128fma}
343         OPTS="$OPTS --enable-avx128-fma"
344 %endif
345 %ifarch aarch64
346         OPTS="$OPTS --enable-neon"
347 %endif
348 %ifarch ppc ppc64
349         OPTS="$OPTS --enable-vsx"
350 %endif
351 install -d build-${ver}
352 cd build-${ver}
353 ../%configure \
354         --enable-$ver \
355         --enable-debug%{!?debug:=no} \
356         --enable-openmp \
357         --enable-shared \
358         --enable-threads \
359         $OPTS
360
361 %{__make}
362 cd ..
363 done
364
365 %install
366 rm -rf $RPM_BUILD_ROOT
367 install -d $RPM_BUILD_ROOT%{_sysconfdir}/fftw
368
369 for b in %{builds} ; do
370         %{__make} install -C build-${b} \
371                 DESTDIR=$RPM_BUILD_ROOT
372 done
373
374 %clean
375 rm -rf $RPM_BUILD_ROOT
376
377 %post   -p /sbin/ldconfig
378 %postun -p /sbin/ldconfig
379
380 %post   single -p /sbin/ldconfig
381 %postun single -p /sbin/ldconfig
382
383 %post   long -p /sbin/ldconfig
384 %postun long -p /sbin/ldconfig
385
386 %post   common-devel -p /sbin/postshell
387 -/usr/sbin/fix-info-dir -c %{_infodir}
388
389 %postun common-devel -p /sbin/postshell
390 -/usr/sbin/fix-info-dir -c %{_infodir}
391
392 %files
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
399 %if %{with openmp}
400 %attr(755,root,root) %{_libdir}/libfftw3_omp.so.*.*.*
401 %attr(755,root,root) %ghost %{_libdir}/libfftw3_omp.so.3
402 %endif
403 %{_mandir}/man1/fftw-wisdom.1*
404
405 %files devel
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
411 %if %{with openmp}
412 %attr(755,root,root) %{_libdir}/libfftw3_omp.so
413 %{_libdir}/libfftw3_omp.la
414 %endif
415 %{_pkgconfigdir}/fftw3.pc
416 %{_libdir}/cmake/fftw3
417
418 %files static
419 %defattr(644,root,root,755)
420 %{_libdir}/libfftw3.a
421 %{_libdir}/libfftw3_threads.a
422 %if %{with openmp}
423 %{_libdir}/libfftw3_omp.a
424 %endif
425
426 %files single
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
433 %if %{with openmp}
434 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so.*.*.*
435 %attr(755,root,root) %ghost %{_libdir}/libfftw3f_omp.so.3
436 %endif
437 %{_mandir}/man1/fftwf-wisdom.1*
438
439 %files single-devel
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
445 %if %{with openmp}
446 %attr(755,root,root) %{_libdir}/libfftw3f_omp.so
447 %{_libdir}/libfftw3f_omp.la
448 %endif
449 %{_pkgconfigdir}/fftw3f.pc
450 %{_libdir}/cmake/fftw3f
451
452 %files single-static
453 %defattr(644,root,root,755)
454 %{_libdir}/libfftw3f.a
455 %{_libdir}/libfftw3f_threads.a
456 %if %{with openmp}
457 %{_libdir}/libfftw3f_omp.a
458 %endif
459
460 %if %{with fftwl}
461 %files long
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
468 %if %{with openmp}
469 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so.*.*.*
470 %attr(755,root,root) %ghost %{_libdir}/libfftw3l_omp.so.3
471 %endif
472 %{_mandir}/man1/fftwl-wisdom.1*
473
474 %files long-devel
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
480 %if %{with openmp}
481 %attr(755,root,root) %{_libdir}/libfftw3l_omp.so
482 %{_libdir}/libfftw3l_omp.la
483 %endif
484 %{_includedir}/fftw3l.f03
485 %{_pkgconfigdir}/fftw3l.pc
486 %{_libdir}/cmake/fftw3l
487
488 %files long-static
489 %defattr(644,root,root,755)
490 %{_libdir}/libfftw3l.a
491 %{_libdir}/libfftw3l_threads.a
492 %if %{with openmp}
493 %{_libdir}/libfftw3l_omp.a
494 %endif
495 %endif
496
497 %if %{with fftwq}
498 %files quad
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
505 %if %{with openmp}
506 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so.*.*.*
507 %attr(755,root,root) %ghost %{_libdir}/libfftw3q_omp.so.3
508 %endif
509 %{_mandir}/man1/fftwq-wisdom.1*
510
511 %files quad-devel
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
517 %if %{with openmp}
518 %attr(755,root,root) %{_libdir}/libfftw3q_omp.so
519 %{_libdir}/libfftw3q_omp.la
520 %endif
521 %{_includedir}/fftw3q.f03
522 %{_pkgconfigdir}/fftw3q.pc
523 %{_libdir}/cmake/fftw3q
524
525 %files quad-static
526 %defattr(644,root,root,755)
527 %{_libdir}/libfftw3q.a
528 %{_libdir}/libfftw3q_threads.a
529 %if %{with openmp}
530 %{_libdir}/libfftw3q_omp.a
531 %endif
532 %endif
533
534 %files common
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*
540
541 %files common-devel
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*
This page took 0.098386 seconds and 4 git commands to generate.