# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kiconthemes
pkgver=6.13.0
pkgrel=0
pkgdesc="Support for icon themes"
# armhf blocked by qt6-qtdeclarative -> ki18n
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only"
depends_dev="
	breeze-icons-dev
	karchive-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	ki18n-dev
	kitemviews-dev
	kwidgetsaddons-dev
	qt6-qtsvg-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	qt6-qttools-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/kiconthemes.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kiconthemes-$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() {
	case "$CARCH" in
		s390x) xvfb-run ctest --test-dir build -E "kicon(engine|loader)_unittest" ;;
		*) xvfb-run ctest --test-dir build -E "kiconengine_unittest" ;;
	esac
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
59271ecce00986f51bd70b8f42ff85ab2c8fc239fed5da68784d83a95621cc6e75fae51e42555ce3cbfef7927b75071cd2e6a9fd9211e8331ca5c6fbff2ebe5c  kiconthemes-6.13.0.tar.xz
"
