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

build() {
	cd "$builddir"
	cmake .\
		-DGIT_EXECUTABLE=/bin/false \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-Dbuild_xmlparser=ON
	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="2fd087d127e301ea48355ea52c9af4f2091df06551cf64da80df81f0758194b296efb1e8d3962867a6a6d2da5a3fc323842f7766a445748005b30097ded30a75  doxygen-1.8.17.src.tar.gz
a11ece43c640ffed707240f726b2005e103294e0351d7c3b6dd46ecc9bc0341b56c4bfb4e4daead3683129a1f332f283c578258aa1f611ec5a57c4da3bff8a21  doxygen-1.8.14-install.patch
5b2dc0bc3dfa9b11c0ecf28e1d502f2c1112e67b47d191aa2cf294f74e41580881e02cf009c7de06dc75b0b0c0306d5c03eeca37b0f82c65e5a51cd68738e4c3  0001-issue-7464-1.8.17-test-suite-is-failing.patch"
