-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
37 lines (33 loc) · 1.09 KB
/
template
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
# Template file for 'gfan'
pkgname=gfan
version=0.6.2
revision=1
build_style=gnu-makefile
makedepends="gmp-devel cddlib-devel"
short_desc="Package for computing Groebner fans and tropical varieties"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://math.au.dk/~jensen/software/gfan/gfan.html"
distfiles="https://math.au.dk/~jensen/software/gfan/gfan${version}.tar.gz"
checksum=a674d5e5dc43634397de0d55dd5da3c32bd358d05f72b73a50e62c1a1686f10a
# Makefile has this but our CFLAGS override it; build fails otherwise
CFLAGS="-DGMPRATIONAL"
case $XBPS_TARGET_MACHINE in
# avoid numerical noise caused by extended-precision of registers
# fixes testsuite/0009RenderStairCase
i686*) CFLAGS+=" -ffloat-store" ;;
esac
if [ -n "$CROSS_BUILD" ]; then
# depend on host gfan for installlinks
hostmakedepends+=" gfan"
fi
do_install() {
if [ -z "$CROSS_BUILD" ]; then
# Makefile doesn't support DESTDIR so we add it to PREFIX
make PREFIX=${DESTDIR}/usr install
else
vbin gfan
# use host gfan to install links
cd ${DESTDIR}/usr/bin && gfan installlinks
fi
}