SUMMARY="Large set of desktop widgets"
DESCRIPTION="This repository contains add-on widgets and classes for \
applications that use the Qt Widgets module. If you are porting applications \
from KDE Platform 4 "kdeui" library, you will find many of its classes here.

Provided are action classes that can be added to toolbars or menus, a wide \
range of widgets for selecting characters, fonts, colors, actions, dates and \
times, or MIME types, as well as platform-aware dialogs for configuration \
pages, message boxes, and password requests."
HOMEPAGE="https://github.com/KDE/kwidgetsaddons/"
COPYRIGHT="2010-2021 KDE Organisation"
LICENSE="GNU LGPL v2"
REVISION="1"
SOURCE_URI="https://github.com/KDE/kwidgetsaddons/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="7be1771dc991f8717d4e4b86e87804c94aa4d0f7cbe2360a58dc0caa0717a059"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	kwidgetsaddons$secondaryArchSuffix = $portVersion
	lib:libKF5WidgetsAddons$secondaryArchSuffix = $portVersion compat >= 5
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libQt5Core$secondaryArchSuffix
	lib:libQt5Gui$secondaryArchSuffix
	lib:libQt5Xml$secondaryArchSuffix
	"

PROVIDES_devel="
	kwidgetsaddons${secondaryArchSuffix}_devel = $portVersion
	devel:libKF5WidgetsAddons$secondaryArchSuffix = $portVersion compat >= 5
	"
REQUIRES_devel="
	kwidgetsaddons$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	extra_cmake_modules$secondaryArchSuffix >= $portVersion
	devel:libQt5Core$secondaryArchSuffix >= 5.7
	"
BUILD_PREREQUIRES="
	cmd:cmake
	cmd:g++$secondaryArchSuffix
	cmd:lrelease$secondaryArchSuffix >= 5
	cmd:make
	"

BUILD()
{
	mkdir -p build
	cd build

	cmake .. $cmakeDirArgs \
		-DCMAKE_BUILD_TYPE=Release \
		-DECM_MKSPECS_INSTALL_DIR=$dataDir/Qt5/mkspecs \
		-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
	make $jobArgs
}

INSTALL()
{
	cd build
	make install
	prepareInstalledDevelLibs \
		libKF5WidgetsAddons
	packageEntries devel \
		$libDir/cmake \
		$dataDir/Qt5/mkspecs \
		$developDir
}

TEST()
{
	cd build
	make test
}
