X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=fftw3.spec;h=0f943d1106c1ae242f3897a4c7e7ce0dfab31f23;hb=HEAD;hp=8c6c06bc67da030bf4cbf34c72f8a811dd9a651e;hpb=c9635814c90f26ec1ff62adbf4db034ab3506e67;p=packages%2Ffftw3.git diff --git a/fftw3.spec b/fftw3.spec index 8c6c06b..0f943d1 100644 --- a/fftw3.spec +++ b/fftw3.spec @@ -1,23 +1,41 @@ +# NOTE (for distributors from NEWS file): don't enable too many SIMD variants in +# distribution builds, because it increases planing time; by default enable just +# most popular ones (like SSE, AVX). +# The rest are available by bconds. +# +# TODO: mpi # # Conditional build: -%bcond_without fftwl # "long" subpackages -%bcond_without fftwq # "quad" subpackages -%bcond_without gomp # OpenMP support +%bcond_without fftwl # "long" subpackages +%bcond_without fftwq # "quad" subpackages +%bcond_without openmp # OpenMP support +%bcond_with avx128fma # AVX128/FMA instructions (for some AMD machines) +%bcond_with avx256 # AVX2 256-bit FMA instructions +%bcond_with avx512 # AVX512 and KCVI [experimental] # + +%ifnarch %{ix86} %{x8664} x32 ia64 +%undefine with_fftwq +%endif + 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.3.4 -Release: 1 +Version: 3.3.10 +Release: 2 License: GPL v2+ Group: Libraries -Source0: ftp://ftp.fftw.org/pub/fftw/fftw-%{version}.tar.gz -# Source0-md5: 2edab8c06b24feeb3b82bbb3ebf3e7b3 +#Source0Download: http://fftw.org/download.html +Source0: http://fftw.org/fftw-%{version}.tar.gz +# Source0-md5: 8ccbf6a5ea78a16dbc3e1306e234cc5c Patch0: %{name}-info.patch +Patch1: %{name}-flags.patch +Patch2: fftw-cmake.patch +Patch3: fftw-cmakedir.patch URL: http://www.fftw.org/ -BuildRequires: autoconf -BuildRequires: automake +BuildRequires: autoconf >= 2.50 +BuildRequires: automake >= 1:1.7 BuildRequires: gcc-fortran %ifarch alpha ppc s390 s390x sparc sparcv9 %if %{with fftwl} @@ -30,7 +48,7 @@ BuildRequires: glibc >= 6:2.4-1 BuildRequires: gcc >= 6:4.6.0 BuildRequires: libquadmath-devel %endif -%if %{with gomp} +%if %{with openmp} BuildRequires: gcc >= 6:4.2.0 BuildRequires: libgomp-devel %endif @@ -71,7 +89,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} +%{?with_openmp:Requires: libgomp-devel} %description devel This package contains the files you need to develop programs using the @@ -128,7 +146,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} +%{?with_openmp:Requires: libgomp-devel} %description single-devel This package contains the files you need to develop programs using the @@ -178,7 +196,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} +%{?with_openmp:Requires: libgomp-devel} %description long-devel This package contains the files you need to develop programs using the @@ -228,7 +246,7 @@ 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} +%{?with_openmp:Requires: libgomp-devel} Requires: libquadmath-devel %description quad-devel @@ -282,6 +300,9 @@ Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw %prep %setup -q -n fftw-%{version} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build %{__libtoolize} @@ -292,36 +313,50 @@ Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw # MMX/SSE/etc. seem to be safe because of runtime CPU detection for ver in %{builds}; do OPTS="" - # k7,SSE,3dnow,altivec only for single + # SSE,altivec,neon@arm[32] only for single if [ "$ver" = "single" ]; then -%ifarch i686 pentium3 pentium4 +%ifarch pentium3 athlon + # for SSE2-aware subarchs SSE for single precision is enabled by --enable-sse2 option OPTS="--enable-sse" %endif -%ifarch athlon - OPTS="--enable-sse" # no "--enable-k7" - conflicts with shared, SEGV on athlons +%ifarch armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl aarch64 + OPTS="--enable-neon" %endif -%ifarch ppc +%ifarch ppc ppc64 OPTS="--enable-altivec" %endif -%ifnarch i686 k6 athlon ppc - : # keep sh happy about syntax -%endif + : # keep sh happy about syntax on other archs fi -%ifarch i686 pentium4 - # SSE2 only for double +%ifarch i686 pentium4 %{x8664} x32 + # SSE/SSE2 and AVX only for single and double if [ "$ver" = "double" -o "$ver" = "single" ]; then - OPTS="--enable-sse2 --enable-avx" + OPTS="$OPTS --enable-sse2 --enable-avx" +%if %{with avx256} + OPTS="$OPTS --enable-avx2" +%endif +%if %{with avx512} + OPTS="$OPTS --enable-avx512 --enable-kcvi" +%endif fi %endif +%if %{with avx128fma} + OPTS="$OPTS --enable-avx128-fma" +%endif +%ifarch aarch64 + OPTS="$OPTS --enable-neon" +%endif +%ifarch ppc ppc64 + OPTS="$OPTS --enable-vsx" +%endif install -d build-${ver} cd build-${ver} ../%configure \ + --enable-$ver \ + --enable-debug%{!?debug:=no} \ --enable-openmp \ --enable-shared \ --enable-threads \ - --enable-$ver \ - $OPTS \ - --%{!?debug:dis}%{?debug:en}able-debug + $OPTS %{__make} cd .. @@ -361,7 +396,7 @@ 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} +%if %{with openmp} %attr(755,root,root) %{_libdir}/libfftw3_omp.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libfftw3_omp.so.3 %endif @@ -373,17 +408,18 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libfftw3_threads.so %{_libdir}/libfftw3.la %{_libdir}/libfftw3_threads.la -%if %{with gomp} +%if %{with openmp} %attr(755,root,root) %{_libdir}/libfftw3_omp.so %{_libdir}/libfftw3_omp.la %endif %{_pkgconfigdir}/fftw3.pc +%{_libdir}/cmake/fftw3 %files static %defattr(644,root,root,755) %{_libdir}/libfftw3.a %{_libdir}/libfftw3_threads.a -%if %{with gomp} +%if %{with openmp} %{_libdir}/libfftw3_omp.a %endif @@ -394,7 +430,7 @@ 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} +%if %{with openmp} %attr(755,root,root) %{_libdir}/libfftw3f_omp.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libfftw3f_omp.so.3 %endif @@ -406,17 +442,18 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libfftw3f_threads.so %{_libdir}/libfftw3f.la %{_libdir}/libfftw3f_threads.la -%if %{with gomp} +%if %{with openmp} %attr(755,root,root) %{_libdir}/libfftw3f_omp.so %{_libdir}/libfftw3f_omp.la %endif %{_pkgconfigdir}/fftw3f.pc +%{_libdir}/cmake/fftw3f %files single-static %defattr(644,root,root,755) %{_libdir}/libfftw3f.a %{_libdir}/libfftw3f_threads.a -%if %{with gomp} +%if %{with openmp} %{_libdir}/libfftw3f_omp.a %endif @@ -428,7 +465,7 @@ 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} +%if %{with openmp} %attr(755,root,root) %{_libdir}/libfftw3l_omp.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libfftw3l_omp.so.3 %endif @@ -440,18 +477,19 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libfftw3l_threads.so %{_libdir}/libfftw3l.la %{_libdir}/libfftw3l_threads.la -%if %{with gomp} +%if %{with openmp} %attr(755,root,root) %{_libdir}/libfftw3l_omp.so %{_libdir}/libfftw3l_omp.la %endif %{_includedir}/fftw3l.f03 %{_pkgconfigdir}/fftw3l.pc +%{_libdir}/cmake/fftw3l %files long-static %defattr(644,root,root,755) %{_libdir}/libfftw3l.a %{_libdir}/libfftw3l_threads.a -%if %{with gomp} +%if %{with openmp} %{_libdir}/libfftw3l_omp.a %endif %endif @@ -464,7 +502,7 @@ rm -rf $RPM_BUILD_ROOT %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} +%if %{with openmp} %attr(755,root,root) %{_libdir}/libfftw3q_omp.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libfftw3q_omp.so.3 %endif @@ -476,18 +514,19 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libfftw3q_threads.so %{_libdir}/libfftw3q.la %{_libdir}/libfftw3q_threads.la -%if %{with gomp} +%if %{with openmp} %attr(755,root,root) %{_libdir}/libfftw3q_omp.so %{_libdir}/libfftw3q_omp.la %endif %{_includedir}/fftw3q.f03 %{_pkgconfigdir}/fftw3q.pc +%{_libdir}/cmake/fftw3q %files quad-static %defattr(644,root,root,755) %{_libdir}/libfftw3q.a %{_libdir}/libfftw3q_threads.a -%if %{with gomp} +%if %{with openmp} %{_libdir}/libfftw3q_omp.a %endif %endif