# Template file for 'kdepim-runtime'
# group=kde-gear
pkgname=kdepim-runtime
version=26.04.3
revision=1
build_style=cmake
# XXX KolabLibraries, Kolabxml
configure_args="-DBUILD_TESTING=OFF
 -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins
 -DKDE_INSTALL_QMLDIR=lib/qt6/qml
 -DECM_MKSPECS_INSTALL_DIR=/usr/lib/qt6/mkspecs/modules"
hostmakedepends="extra-cmake-modules python3 kf6-kdoctools
 gettext qt6-base qt6-tools kf6-kconfig kf6-kcmutils"
makedepends="akonadi-calendar-devel akonadi-notes-devel kf6-knotifyconfig-devel
 pimcommon-devel libkgapi-devel kmbox-devel kf6-kwallet-devel
 qt6-networkauth-devel qca-qt6-devel qt6-webengine-devel
 kf6-kholidays-devel qt6-webchannel-devel kf6-kdav-devel"
checkdepends="dbus"
short_desc="KDE PIM runtime applications/libraries"
maintainer="John <me@johnnynator.dev>"
license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later, AGPL-3.0-or-later, BSD-3-Clause, BSD-2-Clause"
homepage="https://invent.kde.org/unmaintained/kdepimlibs"
distfiles="${KDE_SITE}/release-service/${version}/src/${pkgname}-${version}.tar.xz"
checksum=498744228f225176624fafbab283815b6872351f6d15bb935e2d02c1a644dd43

if [ "$XBPS_WORDSIZE$XBPS_WORDSIZE" != "64$XBPS_TARGET_WORDSIZE" ]; then
	broken="Qt6 WebEngine"
fi

do_check() {
	broken="akonadi-sqlite-synctest"
	broken+="|akonadi-sqlite-pop3test"
	broken+="|akonadi-sqlite-ewstest"
	broken+="|akonadi-sqlite-serverbusytest"
	broken+="|ewsmoveitemrequest_ut"
	broken+="|ewsdeleteitemrequest_ut"
	broken+="|ewsgetitemrequest_ut"
	broken+="|ewsunsubscriberequest_ut"
	broken+="|ewsattachment_ut"
	broken+="|ewssettings_ut"
	dbus-run-session ctest -E "($broken)"
}

post_install() {
	for license in AGPL-3.0-or-later.txt BSD-3-Clause.txt BSD-2-Clause.txt; do
		vlicense LICENSES/$license
	done
}
