# Template file for 'afdko'
pkgname=afdko
version=4.0.3
revision=1
_antlr=4.13.2
build_style=cmake
makedepends="libxml2-devel"
checkdepends="python3-pytest fonttools python3-defcon python3-fontpens"
short_desc="Adobe Font Development Kit for OpenType"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="Apache-2.0"
homepage="https://adobe-type-tools.github.io/afdko/"
distfiles="https://github.com/adobe-type-tools/afdko/releases/download/${version}/afdko-${version}.tar.gz
 https://www.antlr.org/download/antlr4-cpp-runtime-${_antlr}-source.zip"
checksum="5feed7c2468e25b25fce0479c04af07f4ed2680bc9251bb4c4aef9ec2fba5720
 0ed13668906e86dbc0dcddf30fdee68c10203dea4e83852b4edb810821bee3c4"

skip_extraction="antlr4-cpp-runtime-${_antlr}-source.zip"

pre_configure() {
	configure_args+=" -DANTLR4_ZIP_REPOSITORY=$XBPS_SRCDISTDIR/$pkgname-$version/$skip_extraction"
}

do_check() {
	cd build
	ctest -E "checkoutlinesufo_test|makeinstancesufo_test|makeotf_test"
}
