# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=doxygen
pkgver=1.8.15
pkgrel=0
pkgdesc="A documentation system for C++, C, Java, IDL and PHP"
url="http://www.doxygen.org/"
arch="all"
license="GPL"
depends=""
checkdepends="libxml2-utils"
makedepends="flex bison coreutils perl python3 cmake"
subpackages=""
source="http://doxygen.nl/files/$pkgname-$pkgver.src.tar.gz
	doxygen-1.8.14-install.patch
	"

build() {
	cd "$builddir"
	cmake .\
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-Dbuild_xmlparser=ON \
		-DMAN_INSTALL_DIR=/usr/share/man/man1 \
		-DDOC_INSTALL_DIR=/usr/share/doc/doxygen

	make
}

check() {
	cd "$builddir"
	# Remove test that use bibtex
	rm -f ./testing/012_cite.dox
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="a5512e78be66c1591d8ec7e284d5d25c92a97218c79e6fed3c538c723a8dfef4ff7085970bf271a6b639e907157cd4df9fb55d3c975f8d3302fb1012a4d92079  doxygen-1.8.15.src.tar.gz
725a29a6f21ffc8ec6ca8ed6d746a69cc78060e97704c7fe909abee603ba0a99f27dc3b80c414afd886d0ee81d9948b13f29c43f7db2e00aae8c0c3a32aa9ec1  doxygen-1.8.14-install.patch"
