]>
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 |
b4a355b4 JR |
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 |
176c3f6a | 10 | Release: 3 |
8dd64783 JB |
11 | License: GPL |
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 |
b4a355b4 JR |
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 | |
b4a355b4 JR |
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 | |
b4a355b4 | 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 | |
b4a355b4 | 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 | |
b4a355b4 | 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 | |
b4a355b4 | 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 | |
b4a355b4 | 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 | |
b4a355b4 | 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 | |
b4a355b4 | 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 | |
b4a355b4 | 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 JB |
230 | |
231 | # prepare three trees (for single, double, long-double precision) | |
b1df447f | 232 | rm -rf single double long-double |
f2b41f11 JB |
233 | echo * > files.list |
234 | install -d single long-double | |
235 | cp -a `cat files.list` single | |
236 | cp -a `cat files.list` long-double | |
237 | ln -sf . double | |
238 | ||
239 | # MMX/SSE/etc. seem to be safe because of runtime CPU detection | |
7de82846 | 240 | for ver in single double %{?with_fftwl:long-double}; do |
8dd64783 JB |
241 | OPTS="" |
242 | # k7,SSE,3dnow,altivec only for single | |
243 | if [ "$ver" = "single" ]; then | |
f2b41f11 JB |
244 | %ifarch i686 |
245 | OPTS="--enable-sse" | |
8dd64783 | 246 | %endif |
f2b41f11 | 247 | %ifarch athlon |
376d0cb4 | 248 | OPTS="--enable-sse" # no "--enable-k7" - conflicts with shared, SEGV on athlons |
8dd64783 JB |
249 | %endif |
250 | %ifarch ppc | |
f2b41f11 | 251 | OPTS="--enable-altivec" |
5194fc97 JB |
252 | %endif |
253 | %ifnarch i586 i686 k6 athlon ppc | |
254 | : # keep sh happy about syntax | |
8dd64783 | 255 | %endif |
8dd64783 JB |
256 | fi |
257 | %ifarch i686 | |
258 | # SSE2 only for double | |
259 | if [ "$ver" = "double" ]; then | |
260 | OPTS="--enable-sse2" | |
fb995851 | 261 | fi |
8dd64783 | 262 | %endif |
f2b41f11 | 263 | cd $ver |
8dd64783 JB |
264 | %configure \ |
265 | --enable-shared \ | |
266 | --enable-threads \ | |
267 | --enable-$ver \ | |
268 | $OPTS \ | |
269 | --%{!?debug:dis}%{?debug:en}able-debug | |
270 | ||
271 | %{__make} | |
6fd39cfa | 272 | |
f2b41f11 | 273 | cd .. |
8dd64783 JB |
274 | done |
275 | ||
8dd64783 JB |
276 | %install |
277 | rm -rf $RPM_BUILD_ROOT | |
278 | ||
6fd39cfa PG |
279 | %{__make} install \ |
280 | DESTDIR=$RPM_BUILD_ROOT | |
8dd64783 | 281 | |
f2b41f11 JB |
282 | %{__make} install -C single \ |
283 | DESTDIR=$RPM_BUILD_ROOT | |
8dd64783 | 284 | |
7de82846 JB |
285 | %if %{with fftwl} |
286 | %{__make} install -C long-double \ | |
f2b41f11 | 287 | DESTDIR=$RPM_BUILD_ROOT |
7de82846 | 288 | %endif |
8dd64783 JB |
289 | |
290 | %clean | |
291 | rm -rf $RPM_BUILD_ROOT | |
292 | ||
293 | %post -p /sbin/ldconfig | |
294 | %postun -p /sbin/ldconfig | |
295 | ||
f2b41f11 | 296 | %post common-devel |
8dd64783 JB |
297 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 |
298 | ||
f2b41f11 | 299 | %postun common-devel |
8dd64783 JB |
300 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 |
301 | ||
302 | %files | |
303 | %defattr(644,root,root,755) | |
f2b41f11 JB |
304 | %attr(755,root,root) %{_bindir}/fftw-wisdom |
305 | %attr(755,root,root) %{_libdir}/libfftw3.so.*.*.* | |
306 | %attr(755,root,root) %{_libdir}/libfftw3_threads.so.*.*.* | |
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.*.*.* | |
326 | %attr(755,root,root) %{_libdir}/libfftw3f_threads.so.*.*.* | |
327 | %{_mandir}/man1/fftwf-wisdom.1* | |
328 | ||
329 | %files single-devel | |
330 | %defattr(644,root,root,755) | |
331 | %attr(755,root,root) %{_libdir}/libfftw3f.so | |
332 | %attr(755,root,root) %{_libdir}/libfftw3f_threads.so | |
333 | %{_libdir}/libfftw3f.la | |
334 | %{_libdir}/libfftw3f_threads.la | |
335 | %{_pkgconfigdir}/fftw3f.pc | |
336 | ||
337 | %files single-static | |
338 | %defattr(644,root,root,755) | |
339 | %{_libdir}/libfftw3f.a | |
340 | %{_libdir}/libfftw3f_threads.a | |
341 | ||
7de82846 | 342 | %if %{with fftwl} |
f2b41f11 JB |
343 | %files long |
344 | %defattr(644,root,root,755) | |
345 | %attr(755,root,root) %{_bindir}/fftwl-wisdom | |
346 | %attr(755,root,root) %{_libdir}/libfftw3l.so.*.*.* | |
347 | %attr(755,root,root) %{_libdir}/libfftw3l_threads.so.*.*.* | |
348 | %{_mandir}/man1/fftwl-wisdom.1* | |
349 | ||
350 | %files long-devel | |
351 | %defattr(644,root,root,755) | |
352 | %attr(755,root,root) %{_libdir}/libfftw3l.so | |
353 | %attr(755,root,root) %{_libdir}/libfftw3l_threads.so | |
354 | %{_libdir}/libfftw3l.la | |
355 | %{_libdir}/libfftw3l_threads.la | |
356 | %{_pkgconfigdir}/fftw3l.pc | |
357 | ||
358 | %files long-static | |
359 | %defattr(644,root,root,755) | |
360 | %{_libdir}/libfftw3l.a | |
361 | %{_libdir}/libfftw3l_threads.a | |
7de82846 | 362 | %endif |
f2b41f11 JB |
363 | |
364 | %files common | |
365 | %defattr(644,root,root,755) | |
366 | %doc AUTHORS COPYRIGHT ChangeLog NEWS README TODO | |
367 | %attr(755,root,root) %{_bindir}/fftw-wisdom-to-conf | |
368 | %{_mandir}/man1/fftw-wisdom-to-conf.1* | |
369 | ||
370 | %files common-devel | |
371 | %defattr(644,root,root,755) | |
372 | %doc doc/html doc/FAQ/fftw-faq.html | |
373 | %{_includedir}/fftw3.* | |
374 | %{_infodir}/fftw3.info* |