# Description: Graph visualization software
# URL: https://www.graphviz.org/
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: expat libtool zlib
# Optional: ghostscript gtk libgd librsvg libxrender pango poppler swig tcl

name=graphviz
version=10.0.1
release=1
source=(https://gitlab.com/graphviz/graphviz/-/archive/$version/$name-$version.tar.bz2)

build() {
	cd $name-$version

	# build fails if swig is installed but tcl is not
	prt-get isinst swig && ! prt-get isinst tcl && PKGMK_GRAPHVIZ='--disable-swig'

	./autogen.sh NOCONFIG
	CONFIG_SHELL=/bin/bash \
	./configure --prefix=/usr $PKGMK_GRAPHVIZ
	make
	make DESTDIR=$PKG install

	rm -r $PKG/usr/share/doc
}
