# Template file for 'kf6-kunitconversion'
pkgname=kf6-kunitconversion
version=6.25.0
revision=1
_llvmver=21
build_style=cmake
configure_args="$(vopt_bool python BUILD_PYTHON_BINDINGS)"
hostmakedepends="extra-cmake-modules qt6-tools qt6-base gettext
 $(vopt_if python "python3-build python3-setuptools shiboken6 llvm${_llvmver}")"
makedepends="kf6-ki18n-devel
 $(vopt_if python 'libshiboken6-devel libpyside6-devel python3-devel')"
short_desc="KDE Converting physical units"
maintainer="John <me@johnnynator.dev>"
license="LGPL-2.1-or-later"
homepage="https://invent.kde.org/frameworks/kunitconversion"
distfiles="${KDE_SITE}/frameworks/${version%.*}/${pkgname#kf6-}-${version}.tar.xz"
checksum=369ef042de797ea647994c524cc43915b514850026cfddb4b24bc78bdfc3dcc8

build_options="python"
build_options_default="python"

if [ "$CROSS_BUILD" ]; then
	configure_args+=" -DECM_SHIBOKEN_ARCH=$XBPS_CROSS_RUST_TARGET"
	configure_args+=" -DSYSROOT_INCLUDE_DIRS=$XBPS_CROSS_BASE/usr/include"
fi
export LLVM_INSTALL_DIR=/usr/lib/llvm/${_llvmver}

kf6-kunitconversion-devel_package() {
	depends="$makedepends ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/cmake
		vmove "usr/lib/*.so"
	}
}
