[fftw/el5] Update to 3.3.

Jussi Lehtola jussilehtola at fedoraproject.org
Sat Jul 30 17:41:33 UTC 2011


commit 66af04131aee1452b76479e5a378ba7ddc56dfa6
Author: Jussi Lehtola <jussilehtola at fedoraproject.org>
Date:   Sat Jul 30 20:41:20 2011 +0300

    Update to 3.3.

 fftw.spec |  321 +++++++++++++++++++++++++++++++++++++++++-------------------
 sources   |    2 +-
 2 files changed, 220 insertions(+), 103 deletions(-)
---
diff --git a/fftw.spec b/fftw.spec
index 14ed1ca..444c954 100644
--- a/fftw.spec
+++ b/fftw.spec
@@ -1,52 +1,67 @@
 Name:           fftw
-Version:        3.2.2
-Release:        3%{?dist}
-Summary:        Fast Fourier Transform library
+Version:        3.3
+Release:        2%{?dist}
+Summary:        A Fast Fourier Transform library
 Group:          System Environment/Libraries
 License:        GPLv2+
-URL:            http://www.fftw.org/
+URL:            http://www.fftw.org
 Source0:        http://www.fftw.org/fftw-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# OpenMP support not available on RHEL 4
 %if 0%{?rhel} == 4
 BuildRequires:  gcc-g77
+%global openmp 0
 %else
 BuildRequires:  gcc-gfortran
+%global openmp 1
 %endif
+
+# Quad precision support only available with gcc >= 4.6
+%if 0%{?fedora} >= 15
+%global quad 1
+%else
+%global quad 0
+%endif
+
 # For check phase
-BuildRequires: time perl
+BuildRequires:  time
+BuildRequires:  perl
 
 Requires(post): info 
 Requires(preun): info
 
+
 %description
 FFTW is a C subroutine library for computing the Discrete Fourier
 Transform (DFT) in one or more dimensions, of both real and complex
 data, and of arbitrary input size.
 
-# For RPMForge compatibility - the fftw package was in RPMForge before Fedora
-# EPEL was started, and is of version 2, which is API incompatible with the 3
-# series.
-
-%package -n fftw3
-Summary:        Fast Fourier Transform library
+%package libs
+Summary:        FFTW run-time library
 Group:          System Environment/Libraries
-Provides:       fftw = %{version}-%{release}
-
-%description -n fftw3
-FFTW is a C subroutine library for computing the Discrete Fourier
-Transform (DFT) in one or more dimensions, of both real and complex
-data, and of arbitrary input size.
+Provides:       fftw3 = %{version}-%{release}
+Obsoletes:      fftw3 < 3.3
+# Libs branched from rpm containing binaries in version 3.3
+Obsoletes:      fftw < 3.3
 
+%description libs
+This package contains the FFTW run-time libraries.
 
-%package -n fftw3-devel
+%package devel
 Summary:        Headers, libraries and docs for the FFTW library
 Group:          Development/Libraries
-Requires:       fftw3 = %{version}-%{release} pkgconfig
 Requires:       pkgconfig
-Provides:       fftw-devel = %{version}-%{release}
+Requires:       %{name}%{?_isa} = %{version}-%{release}
+Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
+Requires:       %{name}-libs-threads%{?_isa} = %{version}-%{release}
+%if %{openmp}
+Requires:       %{name}-libs-openmp%{?_isa} = %{version}-%{release}
+%endif
+Provides:       fftw3-devel%{?_isa} = %{version}-%{release}
+Obsoletes:      fftw3-devel%{?_isa} < 3.3
 
-%description -n fftw3-devel
+%description devel
 FFTW is a C subroutine library for computing the Discrete Fourier
 Transform (DFT) in one or more dimensions, of both real and complex
 data, and of arbitrary input size.
@@ -54,135 +69,238 @@ data, and of arbitrary input size.
 This package contains header files and development libraries needed to
 develop programs using the FFTW fast Fourier transform library.
 
+%package libs-threads
+Summary:        FFTW library with threading support
+Group:          Development/Libraries
+
+%description libs-threads
+This package contains the FFTW library compiled with threading support.
+
+%if %{openmp}
+%package libs-openmp
+Summary:        FFTW library with OpenMP support
+Group:          Development/Libraries
+
+%description libs-openmp
+This package contains the FFTW library compiled with OpenMP support.
+%endif
 
-%package -n fftw3-static
-Summary:        Static version of the FFTW library
+%package        static
+Summary:        Static versions of the FFTW libraries
 Group:          Development/Libraries
-Requires:       %{name}-devel = %{version}-%{release}
-Provides:       fftw-static = %{version}-%{release}
+Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
+Provides:       fftw3-static%{?_isa} = %{version}-%{release}
+Obsoletes:      fftw3-static%{?_isa} < 3.3
 
-%description -n fftw3-static
+%description static
 The fftw-static package contains the statically linkable version of
 the FFTW fast Fourier transform library.
 
+%package doc
+Summary:        FFTW library manual
+Group:          Documentation
+%if 0%{?rhel} > 5 || 0%{?fedora} > 12
+BuildArch:      noarch
+%endif
 
-%prep
-%setup -q -c %{name}-%{version}
-for dir in single double long; do
-  cp -a fftw-%{version} $dir
-done
-rm -rf fftw-%{version}
+%description doc
+This package contains the manual for the FFTW fast Fourier transform
+library.
 
+%prep
+%setup -q
 
 %build
-# Set Fortran compiler to be used
 %if 0%{?rhel} == 4
+# System fortran compiler is g77
 export F77=g77
 %else
+# Configure uses g77 by default, if present on system
 export F77=gfortran
 %endif
 
-CONFIG_FLAGS="--enable-shared --disable-dependency-tracking --enable-threads"
-pushd double
-        %configure $CONFIG_FLAGS
-        sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
-        sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
-        make %{?_smp_mflags}
-popd
-pushd single
-        %configure $CONFIG_FLAGS --enable-single
-        sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
-        sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
-        make %{?_smp_mflags}
-popd
-pushd long
-        %configure $CONFIG_FLAGS --enable-long-double
-        sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
-        sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
-        make %{?_smp_mflags}
-popd
+BASEFLAGS="--enable-shared --disable-dependency-tracking --enable-threads"
+%if %{openmp}
+BASEFLAGS="$BASEFLAGS --enable-openmp"
+%endif
 
+# Precisions to build
+prec_name[0]=single
+prec_name[1]=double
+prec_name[2]=long
+prec_name[3]=quad
+
+# Corresponding flags
+prec_flags[0]=--enable-single
+prec_flags[1]=--enable-double
+prec_flags[2]=--enable-long-double
+prec_flags[3]=--enable-quad-precision
+
+# Loop over precisions
+%if %{quad}
+for((iprec=0;iprec<4;iprec++))
+%else
+for((iprec=0;iprec<3;iprec++))
+%endif
+do
+ mkdir ${prec_name[iprec]}${ver_name[iver]}
+ cd ${prec_name[iprec]}${ver_name[iver]}
+ ln -s ../configure .
+ %{configure} ${BASEFLAGS} ${prec_flags[iprec]}
+ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+ make %{?_smp_mflags}
+ cd ..
+done
 
 %install
-rm -rf ${RPM_BUILD_ROOT}
-pushd double
-        make install DESTDIR=${RPM_BUILD_ROOT}
-        cp -a AUTHORS COPYING COPYRIGHT ChangeLog NEWS README* TODO ../
-        cp -a doc/ ../
-popd
-pushd single
-        make install DESTDIR=${RPM_BUILD_ROOT}
-popd
-pushd long
-        make install DESTDIR=${RPM_BUILD_ROOT}
-popd
-rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
-rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la
-
-%clean
-rm -rf ${RPM_BUILD_ROOT}
+rm -rf %{buildroot}
+%if %{quad}
+for ver in single double long quad
+%else
+for ver in single double long
+%endif
+do
+ make -C $ver install DESTDIR=%{buildroot}
+done
+rm -f %{buildroot}%{_infodir}/dir
+rm -f %{buildroot}%{_libdir}/*.la
 
 %check
 bdir=`pwd`
-export LD_LIBRARY_PATH=$bdir/single/.libs:$bdir/single/threads/.libs:$bdir/double/.libs:$bdir/double/threads/.libs:$bdir/long/.libs:$bdir/long/threads/.libs
-make -C single check
-make -C double check
-make -C long check
+%if %{quad}
+for ver in single double long quad
+%else
+for ver in single double long
+%endif
+do 
+ export LD_LIBRARY_PATH=$bdir/$ver/.libs:$bdir/$ver/threads/.libs
+ make -C $ver check
+done
 
-%post -n fftw3 -p /sbin/ldconfig
-%postun -n fftw3 -p /sbin/ldconfig
+%clean
+rm -rf %{buildroot}
+
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+%post libs-threads -p /sbin/ldconfig
+%postun libs-threads -p /sbin/ldconfig
+%if %{openmp}
+%post libs-openmp -p /sbin/ldconfig
+%postun libs-openmp -p /sbin/ldconfig
+%endif
 
-%post -n fftw3-devel
+%post devel
 /sbin/install-info --section="Math" %{_infodir}/%{name}.info.gz %{_infodir}/dir  2>/dev/null || :
 
-%preun -n fftw3-devel
+%preun devel
 if [ "$1" = 0 ]; then
   /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir 2>/dev/null || :
 fi
 
-%files -n fftw3
+%files
 %defattr(-,root,root,-)
-%doc AUTHORS COPYING COPYRIGHT ChangeLog NEWS README* TODO
 %doc %{_mandir}/man1/fftw*.1.*
 %{_bindir}/fftw*-wisdom*
-%{_libdir}/libfftw3*.so.*
 
-%files -n fftw3-devel
+%files libs
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING COPYRIGHT ChangeLog NEWS README* TODO
+%{_libdir}/libfftw3.so.*
+%{_libdir}/libfftw3f.so.*
+%{_libdir}/libfftw3l.so.*
+%if %{quad}
+%{_libdir}/libfftw3q.so.*
+%endif
+
+%if %{openmp}
+%files libs-openmp
+%defattr(-,root,root,-)
+%{_libdir}/libfftw3_omp.so.*
+%{_libdir}/libfftw3f_omp.so.*
+%{_libdir}/libfftw3l_omp.so.*
+%if %{quad}
+%{_libdir}/libfftw3q_omp.so.*
+%endif
+%endif
+
+%files libs-threads
+%defattr(-,root,root,-)
+%{_libdir}/libfftw3_threads.so.*
+%{_libdir}/libfftw3f_threads.so.*
+%{_libdir}/libfftw3l_threads.so.*
+%if %{quad}
+%{_libdir}/libfftw3q_threads.so.*
+%endif
+
+%files devel
 %defattr(-,root,root,-)
-%doc doc/*.pdf doc/html/* doc/FAQ/fftw-faq.html/
+%doc doc/FAQ/fftw-faq.html/
 %doc %{_infodir}/fftw3.info*
 %{_includedir}/fftw3.*
 %{_libdir}/pkgconfig/fftw3*.pc
 %{_libdir}/libfftw3*.so
 
-%files -n fftw3-static
+%files doc
 %defattr(-,root,root,-)
-%{_libdir}/libfftw3*.a
+%doc doc/*.pdf doc/html/
 
+%files static
+%defattr(-,root,root,-)
+%{_libdir}/libfftw3*.a
 
 %changelog
-* Fri Jan 8 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> 3.2.2-3
-- Same thing, but without changing Name tag to fftw3.
+* Sat Jul 30 2011 Jussi Lehtola <jussilehtola at fedoraproject.org> - 3.3-2
+- Conditionalize OpenMP and quadruple precision support based on capabilities
+  of system compiler.
+
+* Thu Jul 28 2011 Jussi Lehtola <jussilehtola at fedoraproject.org> - 3.3-1
+- Update to 3.3.
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.2-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sat Jan 9 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 3.2.2-4
+- Get rid of rpath.
 
-* Fri Jan 8 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> 3.2.2-2
-- Revert package name change due to RPMForge compatibility (fftw is version 2
-  series in RPMForge).
+* Sat Jan 9 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 3.2.2-3
+- Branch out developers' manual to -doc.
 
-* Fri Jan 1 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> 3.2.2-1
-- Update to 3.2.2 from rawhide tree.
-- Change name of package to fftw(-devel) to conform with Package Naming
-  Guidelines.
+* Sat Jan 2 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 3.2.2-2
+- Add check phase.
+- Cosmetic changes to spec file (unified changelog format, removed unnecessary
+  space).
+- Use rm instead of find -delete, as latter is not present on EPEL-4.
+- Generalize obsoletes of fftw3 packages. Add Obsoletes: fftw3-static.
 
-* Wed Jun 25 2008 Rex Dieter <rdieter at fedoraproject.org> 3.1.2-5.1
-- re-enable %%check
-- License: GPLv2+
+* Fri Jan 1 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 3.2.2-1
+- Update to 3.2.2.
+- Make file listings more explicit.
+- Don't use file dependencies for info.
 
-* Thu Jul 12 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 3.1.2-5
-- fftw3(-devel): Provides: fftw(-devel) = %%version ...
-- cleanup, +%%check section (disabled by default)
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
-* Tue Jul 10 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 3.1.2-4
-- (re)name -> fftw3 (epel-only, for rpmforge compatibility, #246004)
+* Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.1-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Sat Feb 14 2009 Conrad Meyer <konrad at tylerc.org> - 3.2.1-1
+- Bump to 3.2.1.
+
+* Thu Dec 4 2008 Conrad Meyer <konrad at tylerc.org> - 3.2-1
+- Bump to 3.2.
+
+* Fri Jul 18 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 3.1.2-7
+- fix license tag
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 3.1.2-6
+- Autorebuild for GCC 4.3
+
+* Fri Aug 24 2007 Quentin Spencer <qspencer at users.sf.net> 3.1.2-5
+- Rebuild for F8.
+
+* Fri Jul 27 2007 Quentin Spencer <qspencer at users.sf.net> 3.1.2-4
+- Split static libs into separate package (bug 249686).
 
 * Thu Oct 05 2006 Christian Iseli <Christian.Iseli at licr.org> 3.1.2-3
 - rebuilt for unwind info generation, broken in gcc-4.1.1-21
@@ -251,4 +369,3 @@ fi
 
 * Mon Oct 21 2002 Matthias Saou <matthias.saou at est.une.marmotte.net>
 - Initial RPM release.
-
diff --git a/sources b/sources
index 798bd7c..cc9ace7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b616e5c91218cc778b5aa735fefb61ae  fftw-3.2.2.tar.gz
+0728ab3ec0ebb06631ab3b80a5c3d130  fftw-3.3.tar.gz


More information about the scm-commits mailing list