# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gtk-doc
pkgver=1.34.0
pkgrel=0
pkgdesc="Documentation tool for public library API"
url="https://wiki.gnome.org/DocumentationProject/GtkDoc"
arch="noarch"
license="GPL-2.0-or-later AND GFDL-1.1-or-later"
depends="docbook-xsl python3 pkgconf glib-dev py3-pygments"
makedepends="rarian-dev gettext autoconf automake libtool"
checkdepends="bc"
source="https://download.gnome.org/sources/gtk-doc/${pkgver%.*}/gtk-doc-$pkgver.tar.xz"

# it does not seem to be possible to disable tests of pdf which requires dblatex or fop
# disable checks for now
options="!check"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-highlight=highlight
	make
}

check() {
	make check
}

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

sha512sums="
d962fe31949b5f7c70122c7ebbd98f4d21725697804bf5dd75fd7a6662753a91c9350fd1e8bed22a58a957b173f35e200fcbb4c7c2ebc45ccbc0db2e916b27ea  gtk-doc-1.34.0.tar.xz
"
