blob: b454cf77a59a09d69ba7b50a8190e388a39f9b0c (
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
|
# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer:
pkgname=palp
pkgver=2.20
pkgrel=1
pkgdesc="Package for Analyzing Lattice Polytopes"
url="http://hep.itp.tuwien.ac.at/~kreuzer/CY/CYpalp.html"
arch="all"
license="GPL-3.0-only"
options="!check" # no test suite
source="http://hep.itp.tuwien.ac.at/~kreuzer/CY/palp/palp-$pkgver.tar.gz"
_files="poly class cws nef mori"
_dimensions="4 5 6 11"
prepare() {
default_prepare
mkdir -p bin
mv Global.h Global.h.template
}
build() {
export CFLAGS="${CFLAGS/-Os/-O3}" # gotta go fast
# Inspired by https://git.sagemath.org/sage.git/plain/build/pkgs/palp/spkg-install.in
local dim file
for dim in $_dimensions; do
sed "s/^#define[^a-zA-Z]*POLY_Dmax.*/#define POLY_Dmax $dim/" Global.h.template > Global.h
make
for file in $_files; do
mv "$file".x bin/"$file-${dim}d.x"
done
done
}
package() {
local dim file
for file in $_files; do
for dim in $_dimensions; do
install -Dm755 -t "$pkgdir"/usr/bin bin/"$file-${dim}d.x"
done
ln -sf "$file"-6d.x "$pkgdir"/usr/bin/"$file.x"
done
}
sha512sums="
08d9a8543c2253297d6ff9076c7e27b9086dc758599f4a0a0348d391e583b3c9ccd9315cce6f425f62432d546a68e689def55c3a8c1f5a5e17bf7998468d1ee2 palp-2.20.tar.gz
"
|