# 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-applications
pkgname=eventviews
pkgver=24.08.0
pkgrel=0
pkgdesc="Library for creating events"
# armhf blocked by extra-cmake-modules
# ppc64le, s390x, riscv64 and armv7 blocked by qt6-qtwebengine -> akonadi
# loongarch64 blocked by calendarsupport
arch="all !armhf !ppc64le !s390x !riscv64 !armv7 !loongarch64"
url="https://kontact.kde.org/"
license="GPL-2.0-or-later"
depends_dev="
	akonadi-calendar-dev
	akonadi-dev
	calendarsupport-dev
	kcalendarcore-dev
	kcalutils-dev
	kcodecs-dev
	kcompletion-dev
	kdiagram-dev
	kguiaddons-dev
	kholidays-dev
	ki18n-dev
	kiconthemes-dev
	kmime-dev
	kservice-dev
	libkdepim-dev
	qt6-qtbase-dev
	"
checkdepends="xvfb-run"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	graphviz
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/pim/eventviews.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/eventviews-$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() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
80bc03eef626a9f8e14f8096b807b8329aa4fd14a642f55e3dae5f6860204ea566d9e4ad8a6d15d2376747d43d1e205330f91cfe52cf41c47dff73250855426e  eventviews-24.08.0.tar.xz
"
