cvsextras d214c43
Name:           fftw
590bd67
Version:        3.3
590bd67
Release:        2%{?dist}
6d2e43d
Summary:        A Fast Fourier Transform library
cvsextras d214c43
Group:          System Environment/Libraries
42271e1
License:        GPLv2+
6d2e43d
URL:            http://www.fftw.org
19c232e
Source0:        http://www.fftw.org/fftw-%{version}.tar.gz
cvsextras 1cdce07
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
cvsextras d214c43
590bd67
# OpenMP support not available on RHEL 4
590bd67
%if 0%{?rhel} == 4
590bd67
BuildRequires:  gcc-g77
590bd67
%global openmp 0
590bd67
%else
84985df
BuildRequires:  gcc-gfortran
590bd67
%global openmp 1
590bd67
%endif
590bd67
590bd67
# Quad precision support only available with gcc >= 4.6
590bd67
%if 0%{?fedora} >= 15
590bd67
%global quad 1
590bd67
%else
590bd67
%global quad 0
590bd67
%endif
590bd67
6d2e43d
# For check phase
590bd67
BuildRequires:  time
590bd67
BuildRequires:  perl
6d2e43d
19c232e
Requires(post): info 
19c232e
Requires(preun): info
cvsextras 556f856
Quentin Spencer ac059f3
cvsextras d214c43
%description
Quentin Spencer e72406d
FFTW is a C subroutine library for computing the Discrete Fourier
Quentin Spencer e72406d
Transform (DFT) in one or more dimensions, of both real and complex
Quentin Spencer e72406d
data, and of arbitrary input size.
cvsextras d214c43
590bd67
%package libs
590bd67
Summary:        FFTW run-time library
590bd67
Group:          System Environment/Libraries
590bd67
Provides:       fftw3 = %{version}-%{release}
590bd67
Obsoletes:      fftw3 < 3.3
590bd67
# Libs branched from rpm containing binaries in version 3.3
590bd67
Obsoletes:      fftw < 3.3
cvsextras 1cdce07
590bd67
%description libs
590bd67
This package contains the FFTW run-time libraries.
590bd67
590bd67
%package devel
4844003
Summary:        Headers, libraries and docs for the FFTW library
cvsextras 1cdce07
Group:          Development/Libraries
590bd67
Requires:       pkgconfig
590bd67
Requires:       %{name}%{?_isa} = %{version}-%{release}
590bd67
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
590bd67
Requires:       %{name}-libs-threads%{?_isa} = %{version}-%{release}
590bd67
%if %{openmp}
590bd67
Requires:       %{name}-libs-openmp%{?_isa} = %{version}-%{release}
590bd67
%endif
590bd67
Provides:       fftw3-devel%{?_isa} = %{version}-%{release}
590bd67
Obsoletes:      fftw3-devel%{?_isa} < 3.3
590bd67
590bd67
%description devel
Quentin Spencer e72406d
FFTW is a C subroutine library for computing the Discrete Fourier
Quentin Spencer e72406d
Transform (DFT) in one or more dimensions, of both real and complex
Quentin Spencer e72406d
data, and of arbitrary input size.
cvsextras d214c43
cvsextras d214c43
This package contains header files and development libraries needed to
cvsextras d214c43
develop programs using the FFTW fast Fourier transform library.
cvsextras d214c43
590bd67
%package libs-threads
590bd67
Summary:        FFTW library with threading support
590bd67
Group:          Development/Libraries
590bd67
590bd67
%description libs-threads
590bd67
This package contains the FFTW library compiled with threading support.
590bd67
590bd67
%if %{openmp}
590bd67
%package libs-openmp
590bd67
Summary:        FFTW library with OpenMP support
590bd67
Group:          Development/Libraries
590bd67
590bd67
%description libs-openmp
590bd67
This package contains the FFTW library compiled with OpenMP support.
590bd67
%endif
cvsextras 1cdce07
Quentin Spencer 23d4f74
%package        static
590bd67
Summary:        Static versions of the FFTW libraries
Quentin Spencer 23d4f74
Group:          Development/Libraries
590bd67
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
590bd67
Provides:       fftw3-static%{?_isa} = %{version}-%{release}
590bd67
Obsoletes:      fftw3-static%{?_isa} < 3.3
Quentin Spencer 23d4f74
590bd67
%description static
Quentin Spencer 23d4f74
The fftw-static package contains the statically linkable version of
Quentin Spencer 23d4f74
the FFTW fast Fourier transform library.
Quentin Spencer 23d4f74
590bd67
%package doc
993b801
Summary:        FFTW library manual
993b801
Group:          Documentation
590bd67
%if 0%{?rhel} > 5 || 0%{?fedora} > 12
993b801
BuildArch:      noarch
590bd67
%endif
993b801
993b801
%description doc
993b801
This package contains the manual for the FFTW fast Fourier transform
993b801
library.
993b801
cvsextras d214c43
%prep
590bd67
%setup -q
cvsextras 1cdce07
cvsextras d214c43
%build
590bd67
%if 0%{?rhel} == 4
590bd67
# System fortran compiler is g77
590bd67
export F77=g77
590bd67
%else
6d2e43d
# Configure uses g77 by default, if present on system
19c232e
export F77=gfortran
590bd67
%endif
590bd67
590bd67
BASEFLAGS="--enable-shared --disable-dependency-tracking --enable-threads"
590bd67
%if %{openmp}
590bd67
BASEFLAGS="$BASEFLAGS --enable-openmp"
590bd67
%endif
590bd67
590bd67
# Precisions to build
590bd67
prec_name[0]=single
590bd67
prec_name[1]=double
590bd67
prec_name[2]=long
590bd67
prec_name[3]=quad
590bd67
590bd67
# Corresponding flags
590bd67
prec_flags[0]=--enable-single
590bd67
prec_flags[1]=--enable-double
590bd67
prec_flags[2]=--enable-long-double
590bd67
prec_flags[3]=--enable-quad-precision
590bd67
590bd67
# Loop over precisions
590bd67
%if %{quad}
590bd67
for((iprec=0;iprec<4;iprec++))
590bd67
%else
590bd67
for((iprec=0;iprec<3;iprec++))
590bd67
%endif
590bd67
do
590bd67
 mkdir ${prec_name[iprec]}${ver_name[iver]}
590bd67
 cd ${prec_name[iprec]}${ver_name[iver]}
590bd67
 ln -s ../configure .
590bd67
 %{configure} ${BASEFLAGS} ${prec_flags[iprec]}
590bd67
 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
590bd67
 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
590bd67
 make %{?_smp_mflags}
590bd67
 cd ..
590bd67
done
cvsextras 1cdce07
cvsextras d214c43
%install
590bd67
rm -rf %{buildroot}
590bd67
%if %{quad}
590bd67
for ver in single double long quad
590bd67
%else
590bd67
for ver in single double long
590bd67
%endif
590bd67
do
590bd67
 make -C $ver install DESTDIR=%{buildroot}
590bd67
done
590bd67
rm -f %{buildroot}%{_infodir}/dir
590bd67
rm -f %{buildroot}%{_libdir}/*.la
cvsextras d214c43
6d2e43d
%check
c128117
bdir=`pwd`
590bd67
%if %{quad}
590bd67
for ver in single double long quad
590bd67
%else
590bd67
for ver in single double long
590bd67
%endif
590bd67
do 
590bd67
 export LD_LIBRARY_PATH=$bdir/$ver/.libs:$bdir/$ver/threads/.libs
590bd67
 make -C $ver check
590bd67
done
cvsextras d214c43
cvsextras d214c43
%clean
590bd67
rm -rf %{buildroot}
cvsextras 1cdce07
590bd67
%post libs -p /sbin/ldconfig
590bd67
%postun libs -p /sbin/ldconfig
590bd67
%post libs-threads -p /sbin/ldconfig
590bd67
%postun libs-threads -p /sbin/ldconfig
590bd67
%if %{openmp}
590bd67
%post libs-openmp -p /sbin/ldconfig
590bd67
%postun libs-openmp -p /sbin/ldconfig
590bd67
%endif
cvsextras d214c43
Quentin Spencer e72406d
%post devel
Quentin Spencer e72406d
/sbin/install-info --section="Math" %{_infodir}/%{name}.info.gz %{_infodir}/dir  2>/dev/null || :
Quentin Spencer e72406d
Quentin Spencer e72406d
%preun devel
Quentin Spencer e72406d
if [ "$1" = 0 ]; then
Quentin Spencer e72406d
  /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir 2>/dev/null || :
Quentin Spencer e72406d
fi
Quentin Spencer e72406d
cvsextras d214c43
%files
cvsextras d214c43
%defattr(-,root,root,-)
19c232e
%doc %{_mandir}/man1/fftw*.1.*
19c232e
%{_bindir}/fftw*-wisdom*
590bd67
590bd67
%files libs
590bd67
%defattr(-,root,root,-)
590bd67
%doc AUTHORS COPYING COPYRIGHT ChangeLog NEWS README* TODO
590bd67
%{_libdir}/libfftw3.so.*
590bd67
%{_libdir}/libfftw3f.so.*
590bd67
%{_libdir}/libfftw3l.so.*
590bd67
%if %{quad}
590bd67
%{_libdir}/libfftw3q.so.*
590bd67
%endif
590bd67
590bd67
%if %{openmp}
590bd67
%files libs-openmp
590bd67
%defattr(-,root,root,-)
590bd67
%{_libdir}/libfftw3_omp.so.*
590bd67
%{_libdir}/libfftw3f_omp.so.*
590bd67
%{_libdir}/libfftw3l_omp.so.*
590bd67
%if %{quad}
590bd67
%{_libdir}/libfftw3q_omp.so.*
590bd67
%endif
590bd67
%endif
590bd67
590bd67
%files libs-threads
590bd67
%defattr(-,root,root,-)
590bd67
%{_libdir}/libfftw3_threads.so.*
590bd67
%{_libdir}/libfftw3f_threads.so.*
590bd67
%{_libdir}/libfftw3l_threads.so.*
590bd67
%if %{quad}
590bd67
%{_libdir}/libfftw3q_threads.so.*
590bd67
%endif
cvsextras d214c43
cvsextras d214c43
%files devel
cvsextras d214c43
%defattr(-,root,root,-)
535dd3a
%doc doc/FAQ/fftw-faq.html/
19c232e
%doc %{_infodir}/fftw3.info*
19c232e
%{_includedir}/fftw3.*
19c232e
%{_libdir}/pkgconfig/fftw3*.pc
19c232e
%{_libdir}/libfftw3*.so
cvsextras d214c43
535dd3a
%files doc
535dd3a
%defattr(-,root,root,-)
535dd3a
%doc doc/*.pdf doc/html/
535dd3a
Quentin Spencer 23d4f74
%files static
Quentin Spencer 23d4f74
%defattr(-,root,root,-)
19c232e
%{_libdir}/libfftw3*.a
Quentin Spencer 23d4f74
cvsextras d214c43
%changelog
590bd67
* Sat Jul 30 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 3.3-2
590bd67
- Conditionalize OpenMP and quadruple precision support based on capabilities
590bd67
  of system compiler.
590bd67
590bd67
* Thu Jul 28 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 3.3-1
590bd67
- Update to 3.3.
590bd67
590bd67
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.2-5
590bd67
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
590bd67
c128117
* Sat Jan 9 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 3.2.2-4
c128117
- Get rid of rpath.
c128117
535dd3a
* Sat Jan 9 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 3.2.2-3
535dd3a
- Branch out developers' manual to -doc.
535dd3a
52599f9
* Sat Jan 2 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 3.2.2-2
6d2e43d
- Add check phase.
6d2e43d
- Cosmetic changes to spec file (unified changelog format, removed unnecessary
6d2e43d
  space).
6d2e43d
- Use rm instead of find -delete, as latter is not present on EPEL-4.
6d2e43d
- Generalize obsoletes of fftw3 packages. Add Obsoletes: fftw3-static.
6d2e43d
52599f9
* Fri Jan 1 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 3.2.2-1
19c232e
- Update to 3.2.2.
19c232e
- Make file listings more explicit.
19c232e
- Don't use file dependencies for info.
19c232e
52599f9
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-3
f1610be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f1610be
52599f9
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-2
c0c9d4c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c0c9d4c
52599f9
* Sat Feb 14 2009 Conrad Meyer <konrad@tylerc.org> - 3.2.1-1
f873c60
- Bump to 3.2.1.
f873c60
52599f9
* Thu Dec 4 2008 Conrad Meyer <konrad@tylerc.org> - 3.2-1
e799400
- Bump to 3.2.
e799400
52599f9
* Fri Jul 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.1.2-7
42271e1
- fix license tag
42271e1
52599f9
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.1.2-6
00a994f
- Autorebuild for GCC 4.3
00a994f
Quentin Spencer 6f992d3
* Fri Aug 24 2007 Quentin Spencer <qspencer@users.sf.net> 3.1.2-5
Quentin Spencer 6f992d3
- Rebuild for F8.
Quentin Spencer 6f992d3
Quentin Spencer 23d4f74
* Fri Jul 27 2007 Quentin Spencer <qspencer@users.sf.net> 3.1.2-4
Quentin Spencer 23d4f74
- Split static libs into separate package (bug 249686).
Quentin Spencer 23d4f74
999875b
* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 3.1.2-3
Quentin Spencer 23d4f74
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
999875b
Quentin Spencer 2b268cb
* Tue Sep 26 2006 Quentin Spencer <qspencer@users.sf.net> 3.1.2-2
Quentin Spencer 2b268cb
- BuildRequires: pkgconfig for -devel (bug 206444).
Quentin Spencer 2b268cb
Quentin Spencer 1a49237
* Fri Sep  8 2006 Quentin Spencer <qspencer@users.sf.net> 3.1.2-1
Quentin Spencer 1a49237
- New release.
Quentin Spencer 1a49237
Quentin Spencer 1a49237
* Fri Jun  2 2006 Quentin Spencer <qspencer@users.sf.net> 3.1.1-1
Quentin Spencer 61e07eb
- New upstream release.
Quentin Spencer 61e07eb
Quentin Spencer 97633e4
* Fri Feb 24 2006 Quentin Spencer <qspencer@users.sf.net> 3.1-4
Quentin Spencer 97633e4
- Re-enable static libs (bug 181897).
Quentin Spencer 97633e4
- Build long-double version of libraries (bug 182587).
Quentin Spencer 97633e4
Quentin Spencer ac059f3
* Mon Feb 13 2006 Quentin Spencer <qspencer@users.sf.net> 3.1-3
Quentin Spencer ac059f3
- Add Obsoletes and Provides.
Quentin Spencer ac059f3
Quentin Spencer 591fc5e
* Mon Feb 13 2006 Quentin Spencer <qspencer@users.sf.net> 3.1-2
Quentin Spencer 591fc5e
- Rebuild for Fedora Extras 5.
Quentin Spencer 591fc5e
- Disable static libs.
Quentin Spencer 591fc5e
- Remove obsolete configure options.
Quentin Spencer 591fc5e
Quentin Spencer e72406d
* Wed Feb  1 2006 Quentin Spencer <qspencer@users.sf.net> 3.1-1
Quentin Spencer e72406d
- Upgrade to the 3.x branch, incorporating changes from the fftw3 spec file.
Quentin Spencer e72406d
- Add dist tag.
Quentin Spencer e72406d
52599f9
* Mon May 23 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.1.5-8
84985df
- BuildReq gcc-gfortran (#156490).
84985df
26db512
* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 2.1.5-7
26db512
- rebuild on all arches
26db512
- buildrequire compat-gcc-32-g77
26db512
95f5f47
* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
95f5f47
- rebuilt
95f5f47
dc51d8a
* Wed Nov 10 2004 Matthias Saou <http://freshrpms.net/> 2.1.5-5
dc51d8a
- Bump release to provide Extras upgrade path.
dc51d8a
cvsextras 556f856
* Tue Apr 06 2004 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:2.1.5-0.fdr.4
cvsextras 556f856
- BuildReq gcc-g77.
cvsextras 556f856
cvsextras 1cdce07
* Mon Sep 22 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:2.1.5-0.fdr.3
cvsextras 1cdce07
- Dropped post/preun scripts for info.
cvsextras 1cdce07
cvsextras 1cdce07
* Wed Sep 17 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:2.1.5-0.fdr.2
cvsextras 1cdce07
- Remove aesthetic comments.
cvsextras 1cdce07
- buildroot -> RPM_BUILD_ROOT.
cvsextras 1cdce07
- post/preun for info files.
cvsextras 1cdce07
cvsextras d214c43
* Mon Apr 07 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:2.1.5-0.fdr.1
cvsextras d214c43
- Updated to 2.1.5.
cvsextras d214c43
cvsextras d214c43
* Tue Apr 01 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:2.1.4-0.fdr.2
cvsextras d214c43
- Added Epoch:0.
cvsextras d214c43
- Added ldconfig to post and postun.
cvsextras d214c43
cvsextras d214c43
* Sun Mar 22 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 2.1.4-0.fdr.1
cvsextras d214c43
- Updated to 2.1.4.
cvsextras d214c43
cvsextras d214c43
* Fri Mar 14 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 2.1.3-0.fdr.1
cvsextras d214c43
- Fedorafied.
cvsextras d214c43
cvsextras d214c43
* Mon Oct 21 2002 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras d214c43
- Initial RPM release.