# Template file for 'plasma-workspace'
pkgname=plasma-workspace
version=5.18.4.1
revision=1
build_style=cmake
configure_args="-DBUILD_TESTING=OFF"
hostmakedepends="extra-cmake-modules iso-codes pkg-config kdoctools kcoreaddons
 gettext"
makedepends="qt5-devel qt5-declarative-devel qt5-script-devel plasma-framework-devel
 krunner-devel kjsembed-devel knotifyconfig-devel kdesu-devel knewstuff-devel
 kcmutils-devel kidletime-devel kdelibs4support-devel libksysguard-devel
 baloo5-devel ktexteditor-devel kwin-devel libxcb-devel libXtst-devel
 libqalculate-devel prison-devel kholidays-devel ksolid-devel kpeople-devel
 libkscreen-devel kactivities5-stats-devel"
depends="kactivitymanagerd kwin iso-codes milou plasma-integration
 kquickcharts qt5-wayland"
short_desc="KDE Window manager"
maintainer="John <johnz@posteo.net>"
license="GPL-2.0-or-later, GFDL-1.2-or-later, LGPL-2.1-or-later"
homepage="https://projects.kde.org/projects/plasma/plasma-workspace"
distfiles="${KDE_SITE}/plasma/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=924d8401c3d1fe5d107b6d3facaf96c292f1d4972529831993056982f28b1601

# xorg-server-xwayland only exists for a few archs, see xorg-server/template
case "$XBPS_TARGET_MACHINE" in
	i686*|x86_64*|aarch64*|ppc*|armv7l*)
		depends+=" xorg-server-xwayland" ;;
esac

if [ "$CROSS_BUILD" ]; then
	hostmakedepends+=" kpackage-devel kconfig-devel kcoreaddons-devel plasma-framework"
	configure_args+=" -DKF5_HOST_TOOLING=/usr/lib/cmake"
fi

kworkspace_package() {
	short_desc="Plasma Workspace Library for KF5"
	pkg_install() {
		vmove "usr/lib/libkworkspace5.so.5*"
	}
}

plasma-workspace-devel_package() {
	short_desc+=" - development"
	depends="${makedepends} kworkspace>=${version}_${revision}
	 ${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/cmake
	}
}