SUMMARY="Foundational libraries, components, and tools of the Plasma workspaces"
DESCRIPTION="Plasma library and runtime components based upon KF5 and Qt5."
HOMEPAGE="https://github.com/KDE/plasma-framework/"
COPYRIGHT="2010-2021 KDE Organisation"
LICENSE="GNU LGPL v2"
REVISION="1"
SOURCE_URI="https://github.com/kde/plasma-framework/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="a66db19842eec360175742a0a900a8ff740d3ae89d5e56c7548fe9d56198126e"
SOURCE_DIR="plasma-framework-$portVersion"

ARCHITECTURES="all ?x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	plasma$secondaryArchSuffix = $portVersion
	cmd:plasmapkg2$secondaryArchSuffix = $portVersion
	lib:libKF5Plasma$secondaryArchSuffix = $portVersion
	lib:libKF5PlasmaQuick$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libKF5Archive$secondaryArchSuffix
	lib:libKF5Auth$secondaryArchSuffix
	lib:libKF5Codecs$secondaryArchSuffix
	lib:libKF5ConfigCore$secondaryArchSuffix
	lib:libKF5ConfigGui$secondaryArchSuffix
	lib:libKF5ConfigWidgets$secondaryArchSuffix
	lib:libKF5Completion$secondaryArchSuffix
	lib:libKF5CoreAddons$secondaryArchSuffix
	lib:libKF5GlobalAccel$secondaryArchSuffix
	lib:libKF5GuiAddons$secondaryArchSuffix
	lib:libKF5I18n$secondaryArchSuffix
	lib:libKF5IconThemes$secondaryArchSuffix
	lib:libKF5ItemViews$secondaryArchSuffix
	lib:libKF5JobWidgets$secondaryArchSuffix
	lib:libKF5KIOCore$secondaryArchSuffix
	lib:libKF5KIOGui$secondaryArchSuffix
	lib:libKF5Kirigami2$secondaryArchSuffix
	lib:libKF5Notifications$secondaryArchSuffix
	lib:libKF5Package$secondaryArchSuffix
	lib:libKF5QuickAddons$secondaryArchSuffix
	lib:libKF5Solid$secondaryArchSuffix
	lib:libKF5Service$secondaryArchSuffix
	lib:libKF5WidgetsAddons$secondaryArchSuffix
	lib:libKF5WindowSystem$secondaryArchSuffix
	lib:libKF5XmlGui$secondaryArchSuffix
	lib:libQt5Core$secondaryArchSuffix
	lib:libQt5DBus$secondaryArchSuffix
	lib:libQt5Gui$secondaryArchSuffix
	lib:libQt5Network$secondaryArchSuffix
	lib:libQt5Qml$secondaryArchSuffix
	lib:libQt5Quick$secondaryArchSuffix
	lib:libQt5QuickWidgets$secondaryArchSuffix
	lib:libQt5Widgets$secondaryArchSuffix
	lib:libQt5Xml$secondaryArchSuffix
	"

PROVIDES_devel="
	plasma${secondaryArchSuffix}_devel = $portVersion
	devel:libKF5Plasma$secondaryArchSuffix = $portVersion
	devel:libKF5PlasmaQuick$secondaryArchSuffix = $portVersion
	"
REQUIRES_devel="
	plasma$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	extra_cmake_modules$secondaryArchSuffix >= $portVersion
	devel:libKF5Activities$secondaryArchSuffix == $portVersion
	devel:libKF5Archive$secondaryArchSuffix == $portVersion
	devel:libKF5Auth$secondaryArchSuffix == $portVersion
	devel:libKF5Bookmarks$secondaryArchSuffix == $portVersion
	devel:libKF5Codecs$secondaryArchSuffix == $portVersion
	devel:libKF5ConfigCore$secondaryArchSuffix == $portVersion
	devel:libKF5ConfigWidgets$secondaryArchSuffix == $portVersion
	devel:libKF5Completion$secondaryArchSuffix == $portVersion
	devel:libKF5CoreAddons$secondaryArchSuffix == $portVersion
	devel:libKF5GlobalAccel$secondaryArchSuffix == $portVersion
	devel:libKF5GuiAddons$secondaryArchSuffix == $portVersion
	devel:libKF5DBusAddons$secondaryArchSuffix == $portVersion
	devel:libKF5Declarative$secondaryArchSuffix == $portVersion
	devel:libKF5I18n$secondaryArchSuffix == $portVersion
	devel:libKF5Iconthemes$secondaryArchSuffix == $portVersion
	devel:libKF5ItemViews$secondaryArchSuffix == $portVersion
	devel:libKF5JobWidgets$secondaryArchSuffix == $portVersion
	devel:libKF5KIOCore$secondaryArchSuffix == $portVersion
	devel:libKF5Kirigami2$secondaryArchSuffix == $portVersion
	devel:libKF5Notifications$secondaryArchSuffix
	devel:libKF5Package$secondaryArchSuffix == $portVersion
	devel:libKF5Service$secondaryArchSuffix == $portVersion
	devel:libKF5Solid$secondaryArchSuffix == $portVersion
	devel:libKF5SonnetUi$secondaryArchSuffix == $portVersion
	devel:libKF5WidgetsAddons$secondaryArchSuffix == $portVersion
	devel:libKF5WindowSystem$secondaryArchSuffix == $portVersion
	devel:libKF5XmlGui$secondaryArchSuffix == $portVersion
	devel:libQt5Core$secondaryArchSuffix >= 5.15
	"
BUILD_PREREQUIRES="
	cmd:cmake
	cmd:g++$secondaryArchSuffix
	cmd:qdbuscpp2xml$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	mkdir -p build
	cd build

	cmake .. $cmakeDirArgs \
		-DCMAKE_BUILD_TYPE=Release \
		-DKDE_INSTALL_QMLDIR=$dataDir/Qt5/qml \
		-DKDE_INSTALL_PLUGINDIR=$addOnsDir/Qt5 \
		-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
	make $jobArgs
}

INSTALL()
{
	cd build
	make install

	prepareInstalledDevelLibs libKF5Plasma libKF5PlasmaQuick

	packageEntries devel \
		$libDir/cmake \
		$developDir
}

TEST()
{
	cd build
	make test
}
