# Template file for 'CastXML'
pkgname=CastXML
version=0.6.11
revision=1
build_style=cmake
_llvmver=19
configure_args="-DSPHINX_MAN=YES -DCastXML_INSTALL_MAN_DIR=share/man
 -DClang_DIR=${XBPS_CROSS_BASE}/usr/lib/llvm/${_llvmver}/lib/cmake/clang"
hostmakedepends="clang${_llvmver} python3-Sphinx"
makedepends="clang-tools-extra${_llvmver} llvm${_llvmver}-devel
 libedit-devel libxml2-devel zlib-devel libzstd-devel libffi-devel"
depends="clang${_llvmver}"
checkdepends="libxml2"
short_desc="C-family abstract syntax tree XML output tool"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://github.com/CastXML/CastXML"
distfiles="https://github.com/CastXML/CastXML/archive/refs/tags/v${version}.tar.gz"
checksum=fc5b49f802b67f98ecea10564bc171c660020836a48cecefc416681a2d2e1d3d

post_install() {
	rm -r ${DESTDIR}/usr/share/castxml/clang/include
	ln -s ../../../lib/llvm/${_llvmver}/lib/clang/${_llvmver}/include ${DESTDIR}/usr/share/castxml/clang/include

	rm ${DESTDIR}/usr/share/doc/castxml/{LICENSE,NOTICE}
}
