diff --git a/science/mathematics/fftw3/actions.py b/science/mathematics/fftw3/actions.py index 1f58e7c190..d88e3a2f1b 100644 --- a/science/mathematics/fftw3/actions.py +++ b/science/mathematics/fftw3/actions.py @@ -7,6 +7,7 @@ from pisi.actionsapi import shelltools from pisi.actionsapi import autotools from pisi.actionsapi import pisitools +from pisi.actionsapi import cmaketools from pisi.actionsapi import get WorkDir="fftw-%s" % get.srcVERSION() @@ -17,12 +18,14 @@ def setup(): shelltools.copytree("../fftw-%s" % get.srcVERSION(), "../fftw-%s-double" % get.srcVERSION()) shelltools.copytree("../fftw-%s" % get.srcVERSION(), "../fftw-%s-long-double" % get.srcVERSION()) shelltools.copytree("../fftw-%s" % get.srcVERSION(), "../fftw-%s-quad" % get.srcVERSION()) + shelltools.copytree("../fftw-%s" % get.srcVERSION(), "../fftw-%s-cmake" % get.srcVERSION()) autotools.configure("--enable-sse \ --enable-shared \ --disable-static \ --disable-dependency-tracking \ --enable-threads \ + --enable-mpi \ --enable-fortran \ --enable-single") @@ -52,6 +55,22 @@ def setup(): --enable-fortran \ --enable-long-double") + shelltools.cd("../fftw-%s-cmake" % get.srcVERSION()) + shelltools.system("sed -e 's/3.6.9/3.6.10/' -i CMakeLists.txt") + cmaketools.configure("-B build \ + -D CMAKE_INSTALL_PREFIX=/usr \ + -D CMAKE_BUILD_TYPE=None \ + -D ENABLE_OPENMP=ON \ + -D ENABLE_THREADS=ON \ + -D ENABLE_FLOAT=ON \ + -D ENABLE_LONG_DOUBLE=ON \ + -D ENABLE_QUAD_PRECISION=ON \ + ") + # -D ENABLE_AVX2=ON \ + # -D ENABLE_AVX=ON \ + # -D ENABLE_SSE=ON \ + # -D ENABLE_SSE2=ON \ + #def check(): #autotools.make("check") @@ -76,7 +95,17 @@ def build(): shelltools.cd("../fftw-%s-quad" % get.srcVERSION()) autotools.make() + shelltools.cd("../fftw-%s-cmake" % get.srcVERSION()) + shelltools.system("export F77='gfortran'") + shelltools.export("CFLAGS", " -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math") + shelltools.cd("build") + cmaketools.make() + + # shelltools.cd("../fftw-%s-cmake" % get.srcVERSION()) + shelltools.system("""sed -e 's|\(IMPORTED_LOCATION_NONE\).*|\1 "/usr/lib/libfftw3.so.3"|' -i FFTW3LibraryDepends.cmake""") + def install(): + # shelltools.cd("../fftw-%s" % get.srcVERSION()) autotools.rawInstall("DESTDIR=%s" % get.installDIR()) shelltools.cd("../fftw-%s-double" % get.srcVERSION()) @@ -90,5 +119,11 @@ def install(): shelltools.cd("../fftw-%s" % get.srcVERSION()) - pisitools.dohtml("doc/html/*") + shelltools.cd("../fftw-%s-cmake" % get.srcVERSION()) + shelltools.cd("build") + cmaketools.rawInstall("DESTDIR=%s" % get.installDIR()) + pisitools.insinto("/usr/lib/cmake/fftw3", "FFTW3LibraryDepends.cmake") + + pisitools.dohtml("../doc/html/*") + shelltools.cd("..") pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "NEWS", "README", "TODO", "CONVENTIONS") diff --git a/science/mathematics/fftw3/pspec.xml b/science/mathematics/fftw3/pspec.xml index 926e5ccf67..8e2855eb66 100644 --- a/science/mathematics/fftw3/pspec.xml +++ b/science/mathematics/fftw3/pspec.xml @@ -12,11 +12,12 @@ library A library for computing the discrete Fourier transform (DFT) fftw3 is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). - ftp://ftp.fftw.org/pub/fftw/fftw-3.3.8.tar.gz + ftp://ftp.fftw.org/pub/fftw/fftw-3.3.10.tar.gz + cmake libgfortran libquadmath - gettext + openmpi-devel @@ -48,6 +49,13 @@ + + 2023-11-02 + 3.3.10 + Version bump. + Mustafa Cinasal + muscnsl@gmail.com + 2020-01-12 3.3.8