# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kalk
pkgver=25.04.2
pkgrel=0
pkgdesc="A powerful cross-platfrom calculator application"
# Blocked by qt6-qtdeclarative
arch="all !armhf"
url="https://invent.kde.org/utilities/kalk"
license="GPL-3.0-or-later"
makedepends="
	bison
	extra-cmake-modules
	flex
	gmp-dev
	kconfig-dev
	kcoreaddons-dev
	ki18n-dev
	kirigami-dev
	kunitconversion-dev
	libqalculate-dev
	mpfr-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtdeclarative-private-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/utilities/kalk.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kalk-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_TESTING=ON
	cmake --build build
}

check() {
	ctest --test-dir build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
f4dfc4558bdf2d39bbd7f708032df16785320a9c6eb4530b58933baf99362c40517f775e33ff9002e6791c00b017c76ac0c35f700e316ee0aed6709d0e2c68ed  kalk-25.04.2.tar.xz
"
