290d0ac224
Uses three patches taken from sagemath, cf https://git.sagemath.org/sage.git/plain/build/pkgs/gfan/patches?h=9.5.beta7 - fix location of cddlib include files - normalize the output of one failing test - make tests return an error so build aborts Also fixes for 32 bit bugs catched by testsuite: - add `-ffloat-store` to CFLAGS to fix `0009RenderStairCase` - patch typedef for `int64` which causes hang in `0602ResultantFanProjection`
38 lines
1.1 KiB
Bash
38 lines
1.1 KiB
Bash
# Template file for 'gfan'
|
|
pkgname=gfan
|
|
version=0.6.2
|
|
revision=1
|
|
wrksrc=gfan$version
|
|
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
|
|
}
|