contrib/fftw/Pkgfile

68 lines
1.3 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
# Depends on: gcc-fortran
name=fftw
2021-09-19 12:30:00 +02:00
version=3.3.10
2008-11-18 08:22:05 +01:00
release=1
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 \
--enable-sse \
--enable-avx
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 \
--enable-sse2 \
--enable-avx
2016-05-10 13:43:28 +02:00
make
make DESTDIR=$PKG install
make clean
# compiling long double precision library
./configure \
$config \
2016-05-10 13:43:28 +02:00
--enable-long-double
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
}