blob: 679d6eed66f7c090379308162d3efa5079356b09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=fftw
pkgver=3.3.5
pkgrel=0
pkgdesc="fastest fourier transform in the west"
url="http://www.fftw.org/"
license="GPL"
depends=
makedepends="texinfo"
install=
# order of the libs split functions are important because of lib naming
subpackages="$pkgname-dev $pkgname-doc $pkgname-single-libs:single
$pkgname-long-double-libs:long_double $pkgname-double-libs:double"
source="http://www.fftw.org/$pkgname-$pkgver.tar.gz
cycle.h.patch"
arch="all"
_precision="single double long-double"
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
cd "$builddir"
default_prepare || return 1
for i in $_precision; do
cp -r "$builddir" $srcdir/$i
done
}
build() {
for i in $_precision; do
case "$i" in
single)_cf="--enable-single";;
double)_cf="";;
long-double)_cf="--enable-long-double";;
esac
case "$i--$CARCH" in
single--x86_64 | double--x86_64)
_cf="$_cf --enable-sse2 --enable-avx";;
single--arm* | single--aarch64)
_cf="$_cf --enable-neon";;
esac
msg "Building for $i precision ($_cf)"
cd "$srcdir"/$i
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--enable-shared \
--enable-threads \
$_cf \
|| return 1
make || return 1
done
}
package() {
for i in $_precision; do
cd "$srcdir"/$i
make DESTDIR="$pkgdir" install || return 1
done
}
single() {
mkdir -p "$subpkgdir"/usr/lib || return 1
mv "$pkgdir"/usr/lib/libfftw3f*.so* \
"$subpkgdir"/usr/lib/ || return 1
}
double() {
mkdir -p "$subpkgdir"/usr/lib || return 1
mv "$pkgdir"/usr/lib/libfftw3*.so* \
"$subpkgdir"/usr/lib/ || return 1
}
long_double() {
mkdir -p "$subpkgdir"/usr/lib || return 1
mv "$pkgdir"/usr/lib/libfftw3l*.so* \
"$subpkgdir"/usr/lib/ || return 1
}
md5sums="6cc08a3b9c7ee06fdd5b9eb02e06f569 fftw-3.3.5.tar.gz
81537a7e16451d3e66c025cbaba58973 cycle.h.patch"
sha256sums="8ecfe1b04732ec3f5b7d279fdb8efcad536d555f9d1e8fabd027037d45ea8bcf fftw-3.3.5.tar.gz
1f2e555ceda21146bf7fce408f1a9a12782c646df6d23f3e2202ec7342c4ad01 cycle.h.patch"
sha512sums="a81f02d884cfe4171fab479b0e5ec76eceb9c5da6d4eda1f89281b7e1efa2d8176c9ba87051595c402889eb32172d216ce40eb2bef41289c646f01002fb4ba8e fftw-3.3.5.tar.gz
d71ffb0aa658f7b22239491698426f4a97e657abc953020745f7581d2937a062a279eaa5980cd7f7fe2e8425a032eafc3d4c0cffdc79a83a3aef382c988d739a cycle.h.patch"
|