blob: a6cdc9f1535633ca9e2b0729a8f9af4d43f5c450 (
plain)
1 # Description: C subroutine library for computing discrete Fourier transform.
2 # URL: https://www.fftw.org/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: gcc-fortran
5
6 name=fftw
7 version=3.3.10
8 release=1
9 source=(https://www.fftw.org/$name-$version.tar.gz)
10
11 build() {
12 cd $name-$version
13
14 # libtool fails to link with ccache in the path
15 [ -e '/usr/bin/ccache' ] && PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')
16
17 local config="
18 F77=gfortran
19 --prefix=/usr
20 --enable-threads
21 --enable-shared
22 --enable-openmp"
23
24 # use upstream default CFLAGS while keeping our -march/-mtune
25 CFLAGS+=" -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -fno-schedule-insns -ffast-math -fPIC -mavx2"
26
27 # compiling single precision library
28 ./configure \
29 $config \
30 --enable-single \
31 --enable-sse \
32 --enable-avx
33
34 make
35 make DESTDIR=$PKG install
36 make clean
37
38 # compiling double precision library
39 ./configure \
40 $config \
41 --enable-sse2 \
42 --enable-avx
43
44 make
45 make DESTDIR=$PKG install
46 make clean
47
48 # compiling long double precision library
49 ./configure \
50 $config \
51 --enable-long-double
52
53 make
54 make DESTDIR=$PKG install
55 make clean
56
57 # compiling quad precision library
58 ./configure \
59 $config \
60 --enable-quad-precision
61
62 make
63 make DESTDIR=$PKG install
64
65 # clean up
66 rm -r $PKG/usr/share/info
67 }
|