# Template file for 'kf6-kimageformats'
# group=kde-frameworks
pkgname=kf6-kimageformats
version=6.29.0
revision=1
build_style=cmake
configure_args="-DKIMAGEFORMATS_HEIF=ON -DKDE_INSTALL_QMLDIR=lib/qt6/qml
 -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins"
hostmakedepends="extra-cmake-modules qt6-tools qt6-base
 pkg-config"
makedepends="kf6-karchive-devel libopenexr-devel libheif-devel libraw-devel
 libjxl-devel libavif-devel"
short_desc="KDE Plugins to allow QImage to support extra file formats"
maintainer="John <me@johnnynator.dev>"
license="LGPL-2.1-or-later"
homepage="https://invent.kde.org/frameworks/kimageformats"
distfiles="${KDE_SITE}/frameworks/${version%.*}/${pkgname#kf6-}-${version}.tar.xz"
checksum=87014461a9a8ae8f110864a9ccd3002080fe395b5ff164b11f0c6ed01f1c426b

# stage builds
makedepends+=" kf6-base"
shlib_requires="KDE_Frameworks.${version%.*}"

do_check() {
	cd build
	exclude="kimageformats-read-xcf|kimageformats-read-psd|kimageformats-read-hej2|kimageformats-write-hej2"
	case "$XBPS_TARGET_MACHINE" in
		i686*) exclude+="|kimageformats-write-exr";;
		*) ;;
	esac

	# disable failing tests
	ctest -E "$exclude"
}
