contrib/fftw/Pkgfile

72 lines
1.4 KiB
Plaintext
Raw Normal View History

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