2006-11-21 23:43:30 +11:00
|
|
|
# Description: C subroutine library for computing discrete Fourier transform.
|
2021-09-19 20:30:00 +10:00
|
|
|
# URL: https://www.fftw.org/
|
2014-11-10 23:28:07 +11:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2022-05-22 17:24:51 +10:00
|
|
|
# Depends on: gcc-fortran openmpi
|
2006-11-21 23:43:30 +11:00
|
|
|
|
|
|
|
name=fftw
|
2021-09-19 20:30:00 +10:00
|
|
|
version=3.3.10
|
2022-05-22 17:24:51 +10:00
|
|
|
release=2
|
2021-09-19 20:30:00 +10:00
|
|
|
source=(https://www.fftw.org/$name-$version.tar.gz)
|
2006-11-21 23:43:30 +11:00
|
|
|
|
|
|
|
build() {
|
2017-07-16 00:28:29 +10:00
|
|
|
cd $name-$version
|
2006-11-21 23:43:30 +11:00
|
|
|
|
2021-09-19 20:30:00 +10:00
|
|
|
# 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/:*$//')
|
|
|
|
|
2019-05-12 23:54:47 +10:00
|
|
|
local config="
|
|
|
|
F77=gfortran
|
|
|
|
--prefix=/usr
|
|
|
|
--enable-threads
|
|
|
|
--enable-shared
|
2016-08-29 13:09:25 +10:00
|
|
|
--enable-openmp"
|
|
|
|
|
|
|
|
# use upstream default CFLAGS while keeping our -march/-mtune
|
2021-09-19 20:30:00 +10:00
|
|
|
CFLAGS+=" -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -fno-schedule-insns -ffast-math -fPIC -mavx2"
|
2008-01-27 01:51:33 +11:00
|
|
|
|
2016-05-10 21:43:28 +10:00
|
|
|
# compiling single precision library
|
2006-11-21 23:43:30 +11:00
|
|
|
./configure \
|
2008-01-27 01:51:33 +11:00
|
|
|
$config \
|
2018-03-07 22:55:29 +11:00
|
|
|
--enable-single \
|
2022-05-22 17:24:51 +10:00
|
|
|
--enable-avx \
|
2018-03-07 22:55:29 +11:00
|
|
|
--enable-sse \
|
2022-05-22 17:24:51 +10:00
|
|
|
--enable-mpi
|
2006-11-21 23:43:30 +11:00
|
|
|
|
2008-01-27 01:51:33 +11:00
|
|
|
make
|
2007-02-23 15:10:12 +11:00
|
|
|
make DESTDIR=$PKG install
|
|
|
|
make clean
|
2006-11-21 23:43:30 +11:00
|
|
|
|
2016-05-10 21:43:28 +10:00
|
|
|
# compiling double precision library
|
2018-03-07 22:55:29 +11:00
|
|
|
./configure \
|
|
|
|
$config \
|
2022-05-22 17:24:51 +10:00
|
|
|
--enable-avx \
|
|
|
|
--enable-mpi \
|
|
|
|
--enable-sse2
|
2016-05-10 21:43:28 +10:00
|
|
|
|
|
|
|
make
|
|
|
|
make DESTDIR=$PKG install
|
|
|
|
make clean
|
|
|
|
|
|
|
|
# compiling long double precision library
|
2006-11-21 23:43:30 +11:00
|
|
|
./configure \
|
2008-01-27 01:51:33 +11:00
|
|
|
$config \
|
2022-05-22 17:24:51 +10:00
|
|
|
--enable-long-double \
|
|
|
|
--enable-mpi
|
2006-11-21 23:43:30 +11:00
|
|
|
|
2008-01-27 01:51:33 +11:00
|
|
|
make
|
2007-02-23 15:10:12 +11:00
|
|
|
make DESTDIR=$PKG install
|
|
|
|
make clean
|
|
|
|
|
2016-05-10 21:43:28 +10:00
|
|
|
# compiling quad precision library
|
|
|
|
./configure \
|
|
|
|
$config \
|
|
|
|
--enable-quad-precision
|
2007-02-23 15:10:12 +11:00
|
|
|
|
2008-01-27 01:51:33 +11:00
|
|
|
make
|
2007-02-23 15:10:12 +11:00
|
|
|
make DESTDIR=$PKG install
|
2016-05-10 21:43:28 +10:00
|
|
|
|
|
|
|
# clean up
|
|
|
|
rm -r $PKG/usr/share/info
|
2022-05-22 17:24:51 +10:00
|
|
|
rm $PKG/usr/lib/*.la
|
2006-11-21 23:43:30 +11:00
|
|
|
}
|