# Contributor: Lindsay Zhou <i@lin.moe>
# Maintainer: Lindsay Zhou <i@lin.moe>
pkgname=fcitx5-kkc
pkgver=5.1.4
pkgrel=0
pkgdesc="libkkc input method support for fcitx5"
url="https://github.com/fcitx/fcitx5-kkc"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	cmake
	extra-cmake-modules
	gettext-dev
	fcitx5-dev
	fcitx5-qt-dev
	libkkc-dev
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/fcitx/fcitx5-kkc/archive/refs/tags/$pkgver.tar.gz
	cxx17.patch
	"
options="!check" # no tests

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

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

sha512sums="
560884a33020bc198e68df9aa4ee63b96712abf31cad21111312a5186cbe44cb31b73f7b3d44cfcc7c6b4e46346e0e95dce32b5d64fb8fd1f5dc89840ce38bc3  fcitx5-kkc-5.1.4.tar.gz
e58e74bc15497462414d2fbb99c0685249de5f5a5850d39696dfde7e3c171d5932a9b2f4bfd3d4a9c2e2d103ad2456cd2e7d0545a254b55b79cecb08d953d779  cxx17.patch
"
