# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
maintainer="team/kde <bribbers@disroot.org>"
pkgname=mauikit-imagetools
pkgver=4.0.0
pkgrel=0
pkgdesc="MauiKit Image Tools Components"
# armhf blocked by extra-cmake-modules
# s390x, armhf, x86, ppc64le blocked by tesseract-ocr
arch="all !armhf !s390x !x86 !ppc64le"
url="https://mauikit.org/"
license="GPL-2.0-or-later"
depends="
	kirigami
	kquickimageeditor
	"
depends_dev="
	exiv2-dev
	kcoreaddons-dev
	ki18n-dev
	kquickimageeditor-dev
	mauikit-dev
	tesseract-ocr-dev
	opencv-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtdeclarative-private-dev
	qt6-qtlocation-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
_repo_url="https://invent.kde.org/maui/mauikit-imagetools.git"
source="https://download.kde.org/stable/maui/mauikit-imagetools/$pkgver/mauikit-imagetools-$pkgver.tar.xz
	0001-$pkgname-Fix-build.patch::https://invent.kde.org/maui/mauikit-imagetools/-/merge_requests/5.patch
	"
subpackages="$pkgname-dev $pkgname-lang"
options="!check" # no tests"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

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

sha512sums="
8199f1ca6a71af3acddc5c6835dbf5957ee452499b01f38685de3919f698e1f26892525451418c3ef3589b6f6ad039553b4a1d4d6fed195bb83fc05544416f78  mauikit-imagetools-4.0.0.tar.xz
0179e8f9c8638a248f2e53d3c633eb6ba4b22dcc8ec662c87f59a37c95afec3bfee385e930065ad19f0d0870a313b223387fb6fe820624834eaf6c6ff6e39e7e  0001-mauikit-imagetools-Fix-build.patch
"
