# Template file for 'asymptote'
pkgname=asymptote
version=3.05
revision=2
build_style=gnu-configure
configure_args="--with-latex=/usr/share/texmf/tex/latex
 --with-context=/usr/share/texmf/tex/context/third"
hostmakedepends="bison flex texlive texlive-dvi texinfo pkg-config cmake
 python3-PyQt5-devel-tools"
makedepends="fftw-devel gc-devel gsl-devel zlib-devel libtirpc-devel
 glm libfreeglut-devel libcurl-devel
 boost-devel-minimal readline-devel ncurses-devel"
checkdepends="dvisvgm"
short_desc="C++ like vector graphic language"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="http://asymptote.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/asymptote/asymptote-${version}.src.tgz"
checksum=35c16d0a3bdd869a56e4efff4638f81c3a88b2f6b664d196471015dbf4c69a87

if [ "$CROSS_BUILD" ]; then
	hostmakedepends+=" asymptote"
fi

do_build() {
	make $makejobs
	if [ "$CROSS_BUILD" ]; then
		cp /usr/share/asymptote/asy-keywords.el .
		touch asy-keywords.el
		sed -i 's![.][.]/asy!asy!' doc/Makefile
	fi
	make $makejobs all
}
