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