]>
Commit | Line | Data |
---|---|---|
7de82846 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without fftwl # don't build "long" subpackages | |
4 | # | |
f2b41f11 | 5 | Summary: Fast Fourier Transform library |
b8f7299a ER |
6 | Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera |
7 | Summary(pt_BR.UTF-8): biblioteca fast fourier transform | |
8dd64783 | 8 | Name: fftw3 |
82327122 | 9 | Version: 3.1.2 |
5861ac73 | 10 | Release: 5 |
2e6b9bdb | 11 | License: GPL v2+ |
8dd64783 JB |
12 | Group: Libraries |
13 | Source0: ftp://ftp.fftw.org/pub/fftw/fftw-%{version}.tar.gz | |
82327122 | 14 | # Source0-md5: 08f2e21c9fd02f4be2bd53a62592afa4 |
8dd64783 | 15 | Patch0: %{name}-info.patch |
f2b41f11 | 16 | Patch1: %{name}-link.patch |
b1df447f | 17 | Patch2: %{name}-ac_simd.patch |
176c3f6a | 18 | Patch3: %{name}-ac.patch |
8dd64783 JB |
19 | URL: http://www.fftw.org/ |
20 | BuildRequires: autoconf | |
21 | BuildRequires: automake | |
7de82846 JB |
22 | %ifarch alpha ppc s390 s390x sparc sparcv9 |
23 | %if %{with fftwl} | |
335eed51 PS |
24 | # for 128-bit long double support |
25 | BuildRequires: gcc-fortran >= 5:4.1.0-1 | |
26 | BuildRequires: glibc >= 6:2.4-1 | |
7de82846 JB |
27 | %endif |
28 | %endif | |
8dd64783 | 29 | BuildRequires: libtool |
bf578b06 | 30 | BuildRequires: texinfo |
f24101b7 | 31 | Requires: %{name}-common = %{version}-%{release} |
8dd64783 JB |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %description | |
35 | FFTW is a collection of fast C routines for computing the Discrete | |
36 | Fourier Transform in one or more dimensions. It includes complex, | |
37 | real, and parallel transforms, and can handle arbitrary array sizes | |
38 | efficiently. This RPM package includes the double precision FFTW | |
39 | uniprocessor and threads libraries. | |
40 | ||
b4a355b4 | 41 | %description -l pl.UTF-8 |
8dd64783 | 42 | FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych |
b4a355b4 JR |
43 | transformat Fouriera w jednym lub więcej wymiarach. Zawiera również |
44 | zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie | |
45 | radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM | |
46 | zawiera wersje FFTW o podwójnej precyzji dla architektur | |
47 | jednoprocesorowych oraz z obsługą wątków. | |
48 | ||
49 | %description -l pt_BR.UTF-8 | |
50 | FFTW é uma coleção de rotinas rápidas em C para computar a Discrete | |
51 | Fourier Transform em uma ou mais dimensões. Incluindo transformações | |
52 | complexas, reais e paralelas, também pode manipular vetores de tamanho | |
53 | arbitrário eficientemente. Esse pacote RPM inclui bibliotecas FFTW com | |
54 | suporte a threads, normal e dupla precisão (Os arquivos de precisão | |
8dd64783 JB |
55 | normal tem um prefixo "s"). |
56 | ||
57 | %package devel | |
f2b41f11 | 58 | Summary: Development files for fftw |
b8f7299a ER |
59 | Summary(pl.UTF-8): Pliki programistyczne do fftw |
60 | Summary(pt_BR.UTF-8): Headers e documentação do pacote FFTW | |
8dd64783 | 61 | Group: Development/Libraries |
f24101b7 JB |
62 | Requires: %{name} = %{version}-%{release} |
63 | Requires: %{name}-common-devel = %{version}-%{release} | |
8dd64783 JB |
64 | |
65 | %description devel | |
f2b41f11 JB |
66 | This package contains the files you need to develop programs using the |
67 | FFTW (fast fourier transform library). | |
8dd64783 | 68 | |
b4a355b4 JR |
69 | %description devel -l pl.UTF-8 |
70 | Ten pakiet zawiera pliki potrzebne do tworzenia programów używających | |
71 | biblioteki FFTW (wykonującej szybką transformatę Fouriera). | |
8dd64783 | 72 | |
b4a355b4 JR |
73 | %description devel -l pt_BR.UTF-8 |
74 | Este pacote contém documentação e headers adicionais para desenvolver | |
0210e72d | 75 | programas usando a FFTW. |
8dd64783 JB |
76 | |
77 | %package static | |
78 | Summary: Static fftw libraries | |
b8f7299a ER |
79 | Summary(pl.UTF-8): Statyczne biblioteki fftw |
80 | Summary(pt_BR.UTF-8): Bibliotecas estáticas do pacote FFTW | |
8dd64783 | 81 | Group: Development/Libraries |
f24101b7 | 82 | Requires: %{name}-devel = %{version}-%{release} |
8dd64783 JB |
83 | |
84 | %description static | |
85 | Static fftw libraries. | |
86 | ||
b4a355b4 | 87 | %description static -l pl.UTF-8 |
8dd64783 JB |
88 | Statyczne biblioteki fftw. |
89 | ||
b4a355b4 JR |
90 | %description static -l pt_BR.UTF-8 |
91 | Este pacote contém as bibliotecas estáticas do pacote FFTW. | |
8dd64783 | 92 | |
f2b41f11 JB |
93 | %package single |
94 | Summary: Fast Fourier Transform library - single precision | |
b8f7299a | 95 | Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - pojedynczej precyzji |
f2b41f11 | 96 | Group: Libraries |
f24101b7 | 97 | Requires: %{name}-common = %{version}-%{release} |
f2b41f11 JB |
98 | |
99 | %description single | |
100 | FFTW is a collection of fast C routines for computing the Discrete | |
101 | Fourier Transform in one or more dimensions. It includes complex, | |
102 | real, and parallel transforms, and can handle arbitrary array sizes | |
103 | efficiently. This RPM package includes the single precision FFTW | |
104 | uniprocessor and threads libraries. | |
105 | ||
b4a355b4 | 106 | %description single -l pl.UTF-8 |
f2b41f11 | 107 | FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych |
b4a355b4 JR |
108 | transformat Fouriera w jednym lub więcej wymiarach. Zawiera również |
109 | zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie | |
110 | radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM | |
f2b41f11 | 111 | zawiera wersje FFTW o pojedynczej precyzji dla architektur |
b4a355b4 | 112 | jednoprocesorowych oraz z obsługą wątków. |
f2b41f11 JB |
113 | |
114 | %package single-devel | |
115 | Summary: Development files for single precision fftw | |
b8f7299a | 116 | Summary(pl.UTF-8): Pliki programistyczne do fftw pojedynczej precyzji |
f2b41f11 | 117 | Group: Development/Libraries |
f24101b7 JB |
118 | Requires: %{name}-common-devel = %{version}-%{release} |
119 | Requires: %{name}-single = %{version}-%{release} | |
f2b41f11 JB |
120 | |
121 | %description single-devel | |
122 | This package contains the files you need to develop programs using the | |
123 | single precision FFTW (fast fourier transform library). | |
124 | ||
b4a355b4 JR |
125 | %description single-devel -l pl.UTF-8 |
126 | Ten pakiet zawiera pliki potrzebne do tworzenia programów używających | |
127 | biblioteki FFTW pojedynczej precyzji (wykonującej szybką transformatę | |
f2b41f11 JB |
128 | Fouriera). |
129 | ||
130 | %package single-static | |
131 | Summary: Static fftw single precision libraries | |
b8f7299a | 132 | Summary(pl.UTF-8): Statyczne biblioteki fftw pojedynczej precyzji |
f2b41f11 | 133 | Group: Development/Libraries |
f24101b7 | 134 | Requires: %{name}-single-devel = %{version}-%{release} |
f2b41f11 JB |
135 | |
136 | %description single-static | |
137 | Static fftw single precision libraries. | |
138 | ||
b4a355b4 | 139 | %description single-static -l pl.UTF-8 |
f2b41f11 JB |
140 | Statyczne biblioteki fftw pojedynczej precyzji. |
141 | ||
142 | %package long | |
143 | Summary: Fast Fourier Transform library - long double precision | |
b8f7299a | 144 | Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - rozszerzonej precyzji |
f2b41f11 | 145 | Group: Libraries |
f24101b7 | 146 | Requires: %{name}-common = %{version}-%{release} |
f2b41f11 JB |
147 | |
148 | %description long | |
149 | FFTW is a collection of fast C routines for computing the Discrete | |
150 | Fourier Transform in one or more dimensions. It includes complex, | |
151 | real, and parallel transforms, and can handle arbitrary array sizes | |
152 | efficiently. This RPM package includes the long double precision FFTW | |
153 | uniprocessor and threads libraries. | |
154 | ||
b4a355b4 | 155 | %description long -l pl.UTF-8 |
f2b41f11 | 156 | FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych |
b4a355b4 JR |
157 | transformat Fouriera w jednym lub więcej wymiarach. Zawiera również |
158 | zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie | |
159 | radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM | |
f2b41f11 | 160 | zawiera wersje FFTW o rozszerzonej precyzji dla architektur |
b4a355b4 | 161 | jednoprocesorowych oraz z obsługą wątków. |
f2b41f11 JB |
162 | |
163 | %package long-devel | |
164 | Summary: Development files for long double precision fftw | |
b8f7299a | 165 | Summary(pl.UTF-8): Pliki programistyczne do fftw rozszerzonej precyzji |
f2b41f11 | 166 | Group: Development/Libraries |
f24101b7 JB |
167 | Requires: %{name}-common-devel = %{version}-%{release} |
168 | Requires: %{name}-long = %{version}-%{release} | |
f2b41f11 JB |
169 | |
170 | %description long-devel | |
171 | This package contains the files you need to develop programs using the | |
172 | long double precision FFTW (fast fourier transform library). | |
173 | ||
b4a355b4 JR |
174 | %description long-devel -l pl.UTF-8 |
175 | Ten pakiet zawiera pliki potrzebne do tworzenia programów używających | |
176 | biblioteki FFTW rozszerzonej precyzji (wykonującej szybką transformatę | |
f2b41f11 JB |
177 | Fouriera). |
178 | ||
179 | %package long-static | |
180 | Summary: Static fftw long double precision libraries | |
b8f7299a | 181 | Summary(pl.UTF-8): Statyczne biblioteki fftw rozszerzonej precyzji |
f2b41f11 | 182 | Group: Development/Libraries |
f24101b7 | 183 | Requires: %{name}-long-devel = %{version}-%{release} |
f2b41f11 JB |
184 | |
185 | %description long-static | |
186 | Static fftw long double precision libraries. | |
187 | ||
b4a355b4 | 188 | %description long-static -l pl.UTF-8 |
f2b41f11 JB |
189 | Statyczne biblioteki fftw rozszerzonej precyzji. |
190 | ||
191 | %package common | |
192 | Summary: Files common for all versions of fftw libraries | |
b8f7299a | 193 | Summary(pl.UTF-8): Pliki wspólne dla wszystkich wersji bibliotek fftw |
f2b41f11 JB |
194 | Group: Libraries |
195 | ||
196 | %description common | |
197 | Files common for all versions of fftw libraries (basic documentation, | |
198 | fftw-wisdom-to-conf utility). | |
199 | ||
b4a355b4 JR |
200 | %description common -l pl.UTF-8 |
201 | Pliki wspólne dla wszystkich wersji bibliotek fftw (podstawowa | |
202 | dokumentacja, narzędzie fftw-wisdom-to-conf). | |
f2b41f11 JB |
203 | |
204 | %package common-devel | |
205 | Summary: Development files common for all versions of fftw libraries | |
b8f7299a | 206 | Summary(pl.UTF-8): Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw |
f2b41f11 | 207 | Group: Development/Libraries |
f24101b7 | 208 | Requires: %{name}-common = %{version}-%{release} |
f2b41f11 JB |
209 | |
210 | %description common-devel | |
211 | Development files common for all versions of fftw libraries (header | |
212 | files, development documentation). | |
213 | ||
b4a355b4 JR |
214 | %description common-devel -l pl.UTF-8 |
215 | Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw | |
216 | (pliki nagłówkowe, dokumentacja programisty). | |
f2b41f11 | 217 | |
8dd64783 JB |
218 | %prep |
219 | %setup -q -n fftw-%{version} | |
f2b41f11 JB |
220 | %patch0 -p1 |
221 | %patch1 -p1 | |
b1df447f | 222 | %patch2 -p1 |
176c3f6a | 223 | %patch3 -p1 |
8dd64783 JB |
224 | |
225 | %build | |
226 | %{__libtoolize} | |
376d0cb4 | 227 | %{__aclocal} -I m4 |
8dd64783 JB |
228 | %{__autoconf} |
229 | %{__automake} | |
f2b41f11 | 230 | |
f2b41f11 | 231 | # MMX/SSE/etc. seem to be safe because of runtime CPU detection |
7de82846 | 232 | for ver in single double %{?with_fftwl:long-double}; do |
8dd64783 JB |
233 | OPTS="" |
234 | # k7,SSE,3dnow,altivec only for single | |
235 | if [ "$ver" = "single" ]; then | |
f2b41f11 JB |
236 | %ifarch i686 |
237 | OPTS="--enable-sse" | |
8dd64783 | 238 | %endif |
f2b41f11 | 239 | %ifarch athlon |
376d0cb4 | 240 | OPTS="--enable-sse" # no "--enable-k7" - conflicts with shared, SEGV on athlons |
8dd64783 JB |
241 | %endif |
242 | %ifarch ppc | |
f2b41f11 | 243 | OPTS="--enable-altivec" |
5194fc97 | 244 | %endif |
5861ac73 | 245 | %ifnarch i686 k6 athlon ppc |
5194fc97 | 246 | : # keep sh happy about syntax |
8dd64783 | 247 | %endif |
8dd64783 JB |
248 | fi |
249 | %ifarch i686 | |
250 | # SSE2 only for double | |
251 | if [ "$ver" = "double" ]; then | |
252 | OPTS="--enable-sse2" | |
fb995851 | 253 | fi |
8dd64783 | 254 | %endif |
2e6b9bdb JB |
255 | install -d build-${ver} |
256 | cd build-${ver} | |
257 | ../%configure \ | |
8dd64783 JB |
258 | --enable-shared \ |
259 | --enable-threads \ | |
260 | --enable-$ver \ | |
261 | $OPTS \ | |
262 | --%{!?debug:dis}%{?debug:en}able-debug | |
263 | ||
264 | %{__make} | |
f2b41f11 | 265 | cd .. |
8dd64783 JB |
266 | done |
267 | ||
8dd64783 JB |
268 | %install |
269 | rm -rf $RPM_BUILD_ROOT | |
270 | ||
2e6b9bdb | 271 | %{__make} install -C build-single \ |
6fd39cfa | 272 | DESTDIR=$RPM_BUILD_ROOT |
8dd64783 | 273 | |
2e6b9bdb | 274 | %{__make} install -C build-double \ |
f2b41f11 | 275 | DESTDIR=$RPM_BUILD_ROOT |
8dd64783 | 276 | |
7de82846 | 277 | %if %{with fftwl} |
2e6b9bdb | 278 | %{__make} install -C build-long-double \ |
f2b41f11 | 279 | DESTDIR=$RPM_BUILD_ROOT |
7de82846 | 280 | %endif |
8dd64783 JB |
281 | |
282 | %clean | |
283 | rm -rf $RPM_BUILD_ROOT | |
284 | ||
285 | %post -p /sbin/ldconfig | |
286 | %postun -p /sbin/ldconfig | |
287 | ||
2fd5163a | 288 | %post single -p /sbin/ldconfig |
289 | %postun single -p /sbin/ldconfig | |
290 | ||
291 | %post long -p /sbin/ldconfig | |
292 | %postun long -p /sbin/ldconfig | |
293 | ||
677edac6 ER |
294 | %post common-devel -p /sbin/postshell |
295 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
8dd64783 | 296 | |
677edac6 ER |
297 | %postun common-devel -p /sbin/postshell |
298 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
8dd64783 JB |
299 | |
300 | %files | |
301 | %defattr(644,root,root,755) | |
f2b41f11 JB |
302 | %attr(755,root,root) %{_bindir}/fftw-wisdom |
303 | %attr(755,root,root) %{_libdir}/libfftw3.so.*.*.* | |
2e6b9bdb | 304 | %attr(755,root,root) %ghost %{_libdir}/libfftw3.so.3 |
f2b41f11 | 305 | %attr(755,root,root) %{_libdir}/libfftw3_threads.so.*.*.* |
2e6b9bdb | 306 | %attr(755,root,root) %ghost %{_libdir}/libfftw3_threads.so.3 |
f2b41f11 | 307 | %{_mandir}/man1/fftw-wisdom.1* |
8dd64783 JB |
308 | |
309 | %files devel | |
310 | %defattr(644,root,root,755) | |
f2b41f11 JB |
311 | %attr(755,root,root) %{_libdir}/libfftw3.so |
312 | %attr(755,root,root) %{_libdir}/libfftw3_threads.so | |
313 | %{_libdir}/libfftw3.la | |
314 | %{_libdir}/libfftw3_threads.la | |
315 | %{_pkgconfigdir}/fftw3.pc | |
8dd64783 JB |
316 | |
317 | %files static | |
318 | %defattr(644,root,root,755) | |
f2b41f11 JB |
319 | %{_libdir}/libfftw3.a |
320 | %{_libdir}/libfftw3_threads.a | |
321 | ||
322 | %files single | |
323 | %defattr(644,root,root,755) | |
324 | %attr(755,root,root) %{_bindir}/fftwf-wisdom | |
325 | %attr(755,root,root) %{_libdir}/libfftw3f.so.*.*.* | |
2e6b9bdb | 326 | %attr(755,root,root) %ghost %{_libdir}/libfftw3f.so.3 |
f2b41f11 | 327 | %attr(755,root,root) %{_libdir}/libfftw3f_threads.so.*.*.* |
2e6b9bdb | 328 | %attr(755,root,root) %ghost %{_libdir}/libfftw3f_threads.so.3 |
f2b41f11 JB |
329 | %{_mandir}/man1/fftwf-wisdom.1* |
330 | ||
331 | %files single-devel | |
332 | %defattr(644,root,root,755) | |
333 | %attr(755,root,root) %{_libdir}/libfftw3f.so | |
334 | %attr(755,root,root) %{_libdir}/libfftw3f_threads.so | |
335 | %{_libdir}/libfftw3f.la | |
336 | %{_libdir}/libfftw3f_threads.la | |
337 | %{_pkgconfigdir}/fftw3f.pc | |
338 | ||
339 | %files single-static | |
340 | %defattr(644,root,root,755) | |
341 | %{_libdir}/libfftw3f.a | |
342 | %{_libdir}/libfftw3f_threads.a | |
343 | ||
7de82846 | 344 | %if %{with fftwl} |
f2b41f11 JB |
345 | %files long |
346 | %defattr(644,root,root,755) | |
347 | %attr(755,root,root) %{_bindir}/fftwl-wisdom | |
348 | %attr(755,root,root) %{_libdir}/libfftw3l.so.*.*.* | |
2e6b9bdb | 349 | %attr(755,root,root) %ghost %{_libdir}/libfftw3l.so.3 |
f2b41f11 | 350 | %attr(755,root,root) %{_libdir}/libfftw3l_threads.so.*.*.* |
2e6b9bdb | 351 | %attr(755,root,root) %ghost %{_libdir}/libfftw3l_threads.so.3 |
f2b41f11 JB |
352 | %{_mandir}/man1/fftwl-wisdom.1* |
353 | ||
354 | %files long-devel | |
355 | %defattr(644,root,root,755) | |
356 | %attr(755,root,root) %{_libdir}/libfftw3l.so | |
357 | %attr(755,root,root) %{_libdir}/libfftw3l_threads.so | |
358 | %{_libdir}/libfftw3l.la | |
359 | %{_libdir}/libfftw3l_threads.la | |
360 | %{_pkgconfigdir}/fftw3l.pc | |
361 | ||
362 | %files long-static | |
363 | %defattr(644,root,root,755) | |
364 | %{_libdir}/libfftw3l.a | |
365 | %{_libdir}/libfftw3l_threads.a | |
7de82846 | 366 | %endif |
f2b41f11 JB |
367 | |
368 | %files common | |
369 | %defattr(644,root,root,755) | |
370 | %doc AUTHORS COPYRIGHT ChangeLog NEWS README TODO | |
371 | %attr(755,root,root) %{_bindir}/fftw-wisdom-to-conf | |
372 | %{_mandir}/man1/fftw-wisdom-to-conf.1* | |
373 | ||
374 | %files common-devel | |
375 | %defattr(644,root,root,755) | |
376 | %doc doc/html doc/FAQ/fftw-faq.html | |
2e6b9bdb JB |
377 | %{_includedir}/fftw3.f |
378 | %{_includedir}/fftw3.h | |
f2b41f11 | 379 | %{_infodir}/fftw3.info* |