# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=threadweaver
pkgver=6.5.0
pkgrel=0
pkgdesc="High-level multithreading framework"
arch="all !armhf" # armhf blocked by qt6-qtdeclarative
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only"
depends_dev="
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc"
_repo_url="https://invent.kde.org/frameworks/threadweaver.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/threadweaver-$pkgver.tar.xz"

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

check() {
	ctest --test-dir build --output-on-failure
}

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

sha512sums="
a24a14dc25f5b53d19f3e404c1457a604643fd6256f60c11fa537c65102df59790a8884d263f4f94a163329d25edfbc4f04275f2911ba026ccb7215cb4a635a5  threadweaver-6.5.0.tar.xz
"
