# Description: C subroutine library for computing discrete Fourier transform. # URL: https://www.fftw.org/ # Maintainer: Danny Rawlins, crux at romster dot me # Depends on: gcc-fortran openmpi name=fftw version=3.3.10 release=2 source=(https://www.fftw.org/$name-$version.tar.gz) build() { cd $name-$version # libtool fails to link with ccache in the path [ -e '/usr/bin/ccache' ] && PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//') local config=" F77=gfortran --prefix=/usr --enable-threads --enable-shared --enable-openmp" # use upstream default CFLAGS while keeping our -march/-mtune CFLAGS+=" -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -fno-schedule-insns -ffast-math -fPIC -mavx2" # compiling single precision library ./configure \ $config \ --enable-single \ --enable-avx \ --enable-sse \ --enable-mpi make make DESTDIR=$PKG install make clean # compiling double precision library ./configure \ $config \ --enable-avx \ --enable-mpi \ --enable-sse2 make make DESTDIR=$PKG install make clean # compiling long double precision library ./configure \ $config \ --enable-long-double \ --enable-mpi make make DESTDIR=$PKG install make clean # compiling quad precision library ./configure \ $config \ --enable-quad-precision make make DESTDIR=$PKG install # clean up rm -r $PKG/usr/share/info rm $PKG/usr/lib/*.la }