# Template file for 'anthy-unicode'
pkgname=anthy-unicode
version=1.0.0.20260127
revision=2
build_style=meson
build_helper=qemu
configure_args="-Dlisp_dir=/usr/share/emacs/site-lisp"
short_desc="Japanese character set input library for Unicode"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="LGPL-2.0-or-later, GPL-2.0-only, Public Domain"
homepage="https://github.com/fujiwarat/anthy-unicode/wiki"
distfiles="https://github.com/fujiwarat/anthy-unicode/releases/download/${version}/${pkgname}-${version}.tar.xz"
checksum=3b92fdd124ebe00c64099088a78c0fbcbe7457e145def00c11f726f2c3c3a34a

post_patch() {
	# Don't call date to ensure reproducibility
	vsed -e "s/'date', '+%Y%m%d'/'echo', '${version##*.}'/" -i meson.build
}

libanthy-unicode_package() {
	short_desc+=" - libraries"
	conf_files="/etc/anthy-unicode.conf"
	pkg_install() {
		vmove etc/anthy-unicode.conf
		vmove "usr/lib/*.so.*"
		vmove usr/share
	}
}

anthy-unicode-devel_package() {
	short_desc+=" - development files"
	depends="libanthy-unicode-${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
	}
}
