From: Jakub Bogusz Date: Fri, 29 Jul 2011 14:31:36 +0000 (+0000) Subject: - updated to 3.3 X-Git-Tag: auto/th/fftw3-3_3-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Ffftw3.git;a=commitdiff_plain;h=cbad49cda73d508afb2042cab9061310b1f52707 - updated to 3.3 - updated link patch, removed obsolete ac_simd patch - build single and double precision with sse2 and avx support (where possible) - build OpenMP libraries (with gomp bcond, gcc 4.2+ required) - build quad-precision libraries (-quad-* subpackages, fftwq bcond, gcc 4.6+ required) Changed files: fftw3-ac_simd.patch -> 1.2 fftw3-link.patch -> 1.5 fftw3.spec -> 1.43 --- diff --git a/fftw3-ac_simd.patch b/fftw3-ac_simd.patch deleted file mode 100644 index 75335fb..0000000 --- a/fftw3-ac_simd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- fftw-3.1/configure.ac.orig 2006-01-28 00:16:28.000000000 +0000 -+++ fftw-3.1/configure.ac 2006-02-08 15:02:19.000000000 +0000 -@@ -229,6 +229,8 @@ - fi - fi - AC_SUBST(SIMD_CFLAGS) -+# pass simd flags to preprocessor/compiler for proper intrinsics detection. -+CPPFLAGS="$CPPFLAGS $SIMD_CFLAGS" - - dnl Checks for header files. - AC_HEADER_STDC diff --git a/fftw3-link.patch b/fftw3-link.patch index 86b3b80..6128ff3 100644 --- a/fftw3-link.patch +++ b/fftw3-link.patch @@ -1,20 +1,27 @@ ---- fftw-3.0.1/threads/Makefile.am.orig 2003-03-16 21:00:04.000000000 +0100 -+++ fftw-3.0.1/threads/Makefile.am 2003-07-25 00:35:16.000000000 +0200 -@@ -10,3 +10,4 @@ - hc2hc-dif.c vrank-geq1-rdft2.c f77api.c f77funcs.h - +--- fftw-3.3/threads/Makefile.am.orig 2011-07-27 02:28:29.000000000 +0200 ++++ fftw-3.3/threads/Makefile.am 2011-07-28 20:21:46.135119454 +0200 +@@ -26,9 +26,11 @@ + vrank-geq1-rdft2.c f77api.c f77funcs.h + libfftw3@PREC_SUFFIX@_threads_la_CFLAGS = $(PTHREAD_CFLAGS) libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ -+libfftw3@PREC_SUFFIX@_threads_la_LIBADD = $(top_builddir)/libfftw3@PREC_SUFFIX@.la -lpthread ---- fftw-3.2.2/Makefile.am.orig 2009-07-12 12:35:49.000000000 +0200 -+++ fftw-3.2.2/Makefile.am 2010-10-14 09:20:15.323741882 +0200 ++libfftw3@PREC_SUFFIX@_threads_la_LIBADD = $(top_builddir)/libfftw3@PREC_SUFFIX@.la + + libfftw3@PREC_SUFFIX@_omp_la_SOURCES = api.c conf.c openmp.c \ + threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \ + vrank-geq1-rdft2.c f77api.c f77funcs.h + libfftw3@PREC_SUFFIX@_omp_la_CFLAGS = $(OPENMP_CFLAGS) + libfftw3@PREC_SUFFIX@_omp_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ ++libfftw3@PREC_SUFFIX@_omp_la_LIBADD = $(top_builddir)/libfftw3@PREC_SUFFIX@.la -lgomp +--- fftw-3.3/Makefile.am.orig 2011-07-27 02:28:29.000000000 +0200 ++++ fftw-3.3/Makefile.am 2011-07-28 20:18:54.851780384 +0200 @@ -13,8 +13,8 @@ ACLOCAL_AMFLAGS=-I m4 --SUBDIRS=support $(GENFFT) kernel simd dft rdft reodft api threads \ --cell libbench2 . tests doc tools m4 -+SUBDIRS=support $(GENFFT) kernel simd dft rdft reodft api . threads \ -+cell libbench2 tests doc tools m4 - EXTRA_DIST=COPYRIGHT bootstrap.sh CONVENTIONS fftw.pc.in README.Cell +-SUBDIRS=support $(GENFFT) kernel simd-support dft rdft reodft api \ +-threads libbench2 . tests mpi doc tools m4 ++SUBDIRS=support $(GENFFT) kernel simd-support dft rdft reodft api . \ ++threads libbench2 tests mpi doc tools m4 + EXTRA_DIST=COPYRIGHT bootstrap.sh CONVENTIONS fftw.pc.in - if HAVE_SIMD + SIMD_LIBS = \ diff --git a/fftw3.spec b/fftw3.spec index 4bba1e4..6157139 100644 --- a/fftw3.spec +++ b/fftw3.spec @@ -1,23 +1,25 @@ # # Conditional build: -%bcond_without fftwl # don't build "long" subpackages +%bcond_without fftwl # "long" subpackages +%bcond_without fftwq # "quad" subpackages +%bcond_without gomp # OpenMP support # Summary: Fast Fourier Transform library Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera Summary(pt_BR.UTF-8): biblioteca fast fourier transform Name: fftw3 -Version: 3.2.2 +Version: 3.3 Release: 1 License: GPL v2+ Group: Libraries Source0: ftp://ftp.fftw.org/pub/fftw/fftw-%{version}.tar.gz -# Source0-md5: b616e5c91218cc778b5aa735fefb61ae +# Source0-md5: 0728ab3ec0ebb06631ab3b80a5c3d130 Patch0: %{name}-info.patch Patch1: %{name}-link.patch -Patch2: %{name}-ac_simd.patch URL: http://www.fftw.org/ BuildRequires: autoconf BuildRequires: automake +BuildRequires: gcc-fortran %ifarch alpha ppc s390 s390x sparc sparcv9 %if %{with fftwl} # for 128-bit long double support @@ -25,11 +27,21 @@ BuildRequires: gcc-fortran >= 5:4.1.0-1 BuildRequires: glibc >= 6:2.4-1 %endif %endif +%if %{with fftwq} +BuildRequires: gcc >= 6:4.6.0 +BuildRequires: libquadmath-devel +%endif +%if %{with gomp} +BuildRequires: gcc >= 6:4.2.0 +BuildRequires: libgomp-devel +%endif BuildRequires: libtool BuildRequires: texinfo Requires: %{name}-common = %{version}-%{release} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%define builds single double %{?with_fftwl:long-double} %{?with_fftwq:quad-precision} + %description FFTW is a collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions. It includes complex, @@ -60,6 +72,7 @@ Summary(pt_BR.UTF-8): Headers e documentação do pacote FFTW Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: %{name}-common-devel = %{version}-%{release} +%{?with_gomp:Requires: libgomp-devel} %description devel This package contains the files you need to develop programs using the @@ -116,6 +129,7 @@ Summary(pl.UTF-8): Pliki programistyczne do fftw pojedynczej precyzji Group: Development/Libraries Requires: %{name}-common-devel = %{version}-%{release} Requires: %{name}-single = %{version}-%{release} +%{?with_gomp:Requires: libgomp-devel} %description single-devel This package contains the files you need to develop programs using the @@ -123,8 +137,8 @@ single precision FFTW (fast fourier transform library). %description single-devel -l pl.UTF-8 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających -biblioteki FFTW pojedynczej precyzji (wykonującej szybką transformatę -Fouriera). +biblioteki FFTW (wykonującej szybką transformatę Fouriera) pojedynczej +precyzji. %package single-static Summary: Static fftw single precision libraries @@ -165,6 +179,7 @@ Summary(pl.UTF-8): Pliki programistyczne do fftw rozszerzonej precyzji Group: Development/Libraries Requires: %{name}-common-devel = %{version}-%{release} Requires: %{name}-long = %{version}-%{release} +%{?with_gomp:Requires: libgomp-devel} %description long-devel This package contains the files you need to develop programs using the @@ -172,8 +187,8 @@ long double precision FFTW (fast fourier transform library). %description long-devel -l pl.UTF-8 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających -biblioteki FFTW rozszerzonej precyzji (wykonującej szybką transformatę -Fouriera). +biblioteki FFTW (wykonującej szybką transformatę Fouriera) +rozszerzonej precyzji. %package long-static Summary: Static fftw long double precision libraries @@ -187,6 +202,57 @@ Static fftw long double precision libraries. %description long-static -l pl.UTF-8 Statyczne biblioteki fftw rozszerzonej precyzji. +%package quad +Summary: Fast Fourier Transform library - quad precision +Summary(pl.UTF-8): Biblioteka z funkcjami szybkiej transformaty Fouriera - poczwórnej precyzji +Group: Libraries +Requires: %{name}-common = %{version}-%{release} + +%description quad +FFTW is a collection of fast C routines for computing the Discrete +Fourier Transform in one or more dimensions. It includes complex, +real, and parallel transforms, and can handle arbitrary array sizes +efficiently. This RPM package includes the quad precision FFTW +uniprocessor and threads libraries. + +%description quad -l pl.UTF-8 +FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych +transformat Fouriera w jednym lub więcej wymiarach. Zawiera również +zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie +radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM +zawiera wersje FFTW o poczwórnej precyzji dla architektur +jednoprocesorowych oraz z obsługą wątków. + +%package quad-devel +Summary: Development files for quad precision fftw +Summary(pl.UTF-8): Pliki programistyczne do fftw poczwórnej precyzji +Group: Development/Libraries +Requires: %{name}-common-devel = %{version}-%{release} +Requires: %{name}-quad = %{version}-%{release} +%{?with_gomp:Requires: libgomp-devel} +Requires: libquadmath-devel + +%description quad-devel +This package contains the files you need to develop programs using the +quad precision FFTW (fast fourier transform library). + +%description quad-devel -l pl.UTF-8 +Ten pakiet zawiera pliki potrzebne do tworzenia programów używających +biblioteki FFTW (wykonującej szybką transformatę Fouriera) poczwórnej +precyzji. + +%package quad-static +Summary: Static fftw quad precision libraries +Summary(pl.UTF-8): Statyczne biblioteki fftw poczwórnej precyzji +Group: Development/Libraries +Requires: %{name}-quad-devel = %{version}-%{release} + +%description quad-static +Static fftw quad precision libraries. + +%description quad-static -l pl.UTF-8 +Statyczne biblioteki fftw poczwórnej precyzji. + %package common Summary: Files common for all versions of fftw libraries Summary(pl.UTF-8): Pliki wspólne dla wszystkich wersji bibliotek fftw @@ -218,7 +284,6 @@ Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw %setup -q -n fftw-%{version} %patch0 -p1 %patch1 -p1 -%patch2 -p1 %build %{__libtoolize} @@ -227,11 +292,11 @@ Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw %{__automake} # 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 %{builds}; do OPTS="" # k7,SSE,3dnow,altivec only for single if [ "$ver" = "single" ]; then -%ifarch i686 +%ifarch i686 pentium3 pentium4 OPTS="--enable-sse" %endif %ifarch athlon @@ -244,15 +309,16 @@ for ver in single double %{?with_fftwl:long-double}; do : # keep sh happy about syntax %endif fi -%ifarch i686 +%ifarch i686 pentium4 # SSE2 only for double - if [ "$ver" = "double" ]; then - OPTS="--enable-sse2" + if [ "$ver" = "double" -o "$ver" = "single" ]; then + OPTS="--enable-sse2 --enable-avx" fi %endif install -d build-${ver} cd build-${ver} ../%configure \ + --enable-openmp \ --enable-shared \ --enable-threads \ --enable-$ver \ @@ -267,16 +333,10 @@ done rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_sysconfdir}/fftw -%{__make} install -C build-single \ - DESTDIR=$RPM_BUILD_ROOT - -%{__make} install -C build-double \ - DESTDIR=$RPM_BUILD_ROOT - -%if %{with fftwl} -%{__make} install -C build-long-double \ - DESTDIR=$RPM_BUILD_ROOT -%endif +for b in %{builds} ; do + %{__make} install -C build-${b} \ + DESTDIR=$RPM_BUILD_ROOT +done %clean rm -rf $RPM_BUILD_ROOT @@ -303,6 +363,10 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %ghost %{_libdir}/libfftw3.so.3 %attr(755,root,root) %{_libdir}/libfftw3_threads.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libfftw3_threads.so.3 +%if %{with gomp} +%attr(755,root,root) %{_libdir}/libfftw3_omp.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libfftw3_omp.so.3 +%endif %{_mandir}/man1/fftw-wisdom.1* %files devel @@ -311,12 +375,19 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libfftw3_threads.so %{_libdir}/libfftw3.la %{_libdir}/libfftw3_threads.la +%if %{with gomp} +%attr(755,root,root) %{_libdir}/libfftw3_omp.so +%{_libdir}/libfftw3_omp.la +%endif %{_pkgconfigdir}/fftw3.pc %files static %defattr(644,root,root,755) %{_libdir}/libfftw3.a %{_libdir}/libfftw3_threads.a +%if %{with gomp} +%{_libdir}/libfftw3_omp.a +%endif %files single %defattr(644,root,root,755) @@ -325,6 +396,10 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %ghost %{_libdir}/libfftw3f.so.3 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libfftw3f_threads.so.3 +%if %{with gomp} +%attr(755,root,root) %{_libdir}/libfftw3f_omp.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libfftw3f_omp.so.3 +%endif %{_mandir}/man1/fftwf-wisdom.1* %files single-devel @@ -333,12 +408,19 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libfftw3f_threads.so %{_libdir}/libfftw3f.la %{_libdir}/libfftw3f_threads.la +%if %{with gomp} +%attr(755,root,root) %{_libdir}/libfftw3f_omp.so +%{_libdir}/libfftw3f_omp.la +%endif %{_pkgconfigdir}/fftw3f.pc %files single-static %defattr(644,root,root,755) %{_libdir}/libfftw3f.a %{_libdir}/libfftw3f_threads.a +%if %{with gomp} +%{_libdir}/libfftw3f_omp.a +%endif %if %{with fftwl} %files long @@ -348,6 +430,10 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %ghost %{_libdir}/libfftw3l.so.3 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libfftw3l_threads.so.3 +%if %{with gomp} +%attr(755,root,root) %{_libdir}/libfftw3l_omp.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libfftw3l_omp.so.3 +%endif %{_mandir}/man1/fftwl-wisdom.1* %files long-devel @@ -356,12 +442,54 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libfftw3l_threads.so %{_libdir}/libfftw3l.la %{_libdir}/libfftw3l_threads.la +%if %{with gomp} +%attr(755,root,root) %{_libdir}/libfftw3l_omp.so +%{_libdir}/libfftw3l_omp.la +%endif %{_pkgconfigdir}/fftw3l.pc %files long-static %defattr(644,root,root,755) %{_libdir}/libfftw3l.a %{_libdir}/libfftw3l_threads.a +%if %{with gomp} +%{_libdir}/libfftw3l_omp.a +%endif +%endif + +%if %{with fftwq} +%files quad +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/fftwq-wisdom +%attr(755,root,root) %{_libdir}/libfftw3q.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libfftw3q.so.3 +%attr(755,root,root) %{_libdir}/libfftw3q_threads.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libfftw3q_threads.so.3 +%if %{with gomp} +%attr(755,root,root) %{_libdir}/libfftw3q_omp.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libfftw3q_omp.so.3 +%endif +%{_mandir}/man1/fftwq-wisdom.1* + +%files quad-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libfftw3q.so +%attr(755,root,root) %{_libdir}/libfftw3q_threads.so +%{_libdir}/libfftw3q.la +%{_libdir}/libfftw3q_threads.la +%if %{with gomp} +%attr(755,root,root) %{_libdir}/libfftw3q_omp.so +%{_libdir}/libfftw3q_omp.la +%endif +%{_pkgconfigdir}/fftw3q.pc + +%files quad-static +%defattr(644,root,root,755) +%{_libdir}/libfftw3q.a +%{_libdir}/libfftw3q_threads.a +%if %{with gomp} +%{_libdir}/libfftw3q_omp.a +%endif %endif %files common @@ -375,5 +503,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc doc/html doc/FAQ/fftw-faq.html %{_includedir}/fftw3.f +%{_includedir}/fftw3.f03 %{_includedir}/fftw3.h %{_infodir}/fftw3.info*