# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kdiff3
pkgver=1.12.3
pkgrel=0
# armhf blocked by qt6-qtdeclarative -> ki18n
arch="all !armhf"
url="https://apps.kde.org/kdiff3/"
pkgdesc="A file and folder diff and merge tool"
license="GPL-2.0-or-later "
makedepends="
	boost-dev
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	kcrash-dev
	kdoctools-dev
	ki18n-dev
	kparts-dev
	kwidgetsaddons-dev
	qt6-qtbase-dev
	samurai
	"
checkdepends="xwayland-run"
_repo_url="https://invent.kde.org/sdk/kdiff3.git"
source="https://download.kde.org/stable/kdiff3/kdiff3-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

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

check() {
	wlheadless-run -- ctest --test-dir build
}

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

sha512sums="
a50c7164bb887ca8b3dc712061b26d5672e148f61051c0a480435413fcc5927a8e0e255bd8b6b48ce9bf868e657434fa24217fb5ef839e836bdb29a810b0c0b3  kdiff3-1.12.3.tar.xz
"
