#
+# Conditional build:
%bcond_without fftwl # don't build "long" subpackages
#
-%ifarch alpha ppc sparc
-# sizeof(double long)==sizeof(double) on these archs
-%undefine with_fftwl
-%endif
Summary: Fast Fourier Transform library
Summary(pl): Biblioteka z funkcjami szybkiej transformaty Fouriera
Summary(pt_BR): biblioteca fast fourier transform
Name: fftw3
-Version: 3.0.1
-Release: 4
+Version: 3.1.1
+Release: 1
License: GPL
Group: Libraries
Source0: ftp://ftp.fftw.org/pub/fftw/fftw-%{version}.tar.gz
-# Source0-md5: 76cd21ecc9a7bed6343566c473c36477
+# Source0-md5: b35813b88a046e4e74a603017794ddcd
Patch0: %{name}-info.patch
Patch1: %{name}-link.patch
-Icon: fftw-logo-thumb.gif
+Patch2: %{name}-ac_simd.patch
URL: http://www.fftw.org/
BuildRequires: autoconf
BuildRequires: automake
-BuildRequires: gcc-g77
+%ifarch alpha ppc s390 s390x sparc sparcv9
+%if %{with fftwl}
+# for 128-bit long double support
+BuildRequires: gcc-fortran >= 5:4.1.0-1
+BuildRequires: glibc >= 6:2.4-1
+%endif
+%endif
BuildRequires: libtool
BuildRequires: texinfo
Requires: %{name}-common = %{version}-%{release}
%setup -q -n fftw-%{version}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
%{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
%{__autoconf}
%{__automake}
# prepare three trees (for single, double, long-double precision)
+rm -rf single double long-double
echo * > files.list
install -d single long-double
cp -a `cat files.list` single
ln -sf . double
# MMX/SSE/etc. seem to be safe because of runtime CPU detection
-for ver in single double %{?with_fftwl:long-double} ; do
+for ver in single double %{?with_fftwl:long-double}; do
OPTS=""
# k7,SSE,3dnow,altivec only for single
if [ "$ver" = "single" ]; then
-%ifarch i586 k6
- OPTS="--enable-3dnow"
-%endif
%ifarch i686
OPTS="--enable-sse"
%endif
%ifarch athlon
- OPTS="--enable-sse" # "--enable-k7" disabled - causes SEGV on athlons
+ OPTS="--enable-sse" # no "--enable-k7" - conflicts with shared, SEGV on athlons
%endif
%ifarch ppc
OPTS="--enable-altivec"
DESTDIR=$RPM_BUILD_ROOT
%if %{with fftwl}
-%{__make} install -C long-double\
+%{__make} install -C long-double \
DESTDIR=$RPM_BUILD_ROOT
%endif