# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kquickcharts
pkgver=6.13.0
pkgrel=0
pkgdesc="A QtQuick plugin providing high-performance charts"
# armhf blocked by qt6-qtdeclarative
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="$pkgname=$pkgver-r$pkgrel
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	qt6-qtdeclarative-private-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-dev"
_repo_url="https://invent.kde.org/frameworks/kquickcharts.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kquickcharts-$pkgver.tar.xz"
# Requires working OpenGL
options="!check"

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

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

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

sha512sums="
5303813f5e46f3634a4e5d8dc4ec20685a979b12850a3589c791759eaf4f81389a6f955a66375f552d61d51a0a3de8fb084a5a3ed87f55e9c6137200f90e8af7  kquickcharts-6.13.0.tar.xz
"
