# Contributor: Lindsay Zhou <i@lin.moe>
# Maintainer: Lindsay Zhou <i@lin.moe>
pkgname=fcitx5-anthy
pkgver=5.1.6
pkgrel=0
pkgdesc="anthy input method support for fcitx5"
url="https://github.com/fcitx/fcitx5-anthy"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	anthy-dev
	cmake
	extra-cmake-modules
	gettext-dev
	fcitx5-dev
	fcitx5-qt-dev
	samurai
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/fcitx/fcitx5-anthy/archive/refs/tags/$pkgver.tar.gz"
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="
f37c5336d78afad0790dbf353cf1db444a148b3039b08d1e3856d4c58c4b03a85a596796b3429c443609958db62cf0411e4d0041d6dc4c390a986b568fcba06e  fcitx5-anthy-5.1.6.tar.gz
"
