hunspell-en_GB-ize: provide bdic format

This commit is contained in:
Đoàn Trần Công Danh 2024-03-09 22:01:28 +07:00 committed by Đoàn Trần Công Danh
parent cb882fcbfe
commit 2677a09e6d
1 changed files with 34 additions and 5 deletions

View File

@ -1,10 +1,9 @@
# Template file for 'hunspell-en_GB-ize'
_vpkgname=hunspell-en_GB
_variant="ize"
pkgname=${_vpkgname}-${_variant}
pkgname=hunspell-en_GB-ize
_vpkgname=${pkgname%-*}
_variant=${pkgname##*-}
version=2020.12.07
revision=1
create_wrksrc=yes
revision=2
hostmakedepends="unzip"
short_desc="English dictionary for hunspell ${_variant} variant"
maintainer="Leah Neukirchen <leah@vuxu.org>"
@ -15,8 +14,38 @@ checksum=869b749ec9805b87cd05f43307f20998651331b5aa5b04506413af0c2df2f231
provides="${_vpkgname}-${version}_${revision}"
replaces="${_vpkgname}>=0"
build_options="bdic"
desc_option_bdic="Enable Chromium's bdic format"
case "$XBPS_MACHINE" in
x86_64*)
hostmakedepends+=" qt6-webengine"
build_options_default="bdic"
;;
i686*)
hostmakedepends+=" qt5-webengine"
build_options_default="bdic"
;;
esac
if [ "$build_option_bdic" ]; then
depends="libreoffice-qtwebengine-dict"
fi
do_build() {
PATH="/usr/lib/qt6/libexec:/usr/lib/qt5/bin:$PATH"
if [ "$build_option_bdic" ]; then
qwebengine_convert_dict en_GB-${_variant}.dic \
en_GB-${_variant}.bdic
fi
}
do_install() {
vinstall en_GB-${_variant}.aff 644 /usr/share/hunspell en_GB.aff
vinstall en_GB-${_variant}.dic 644 /usr/share/hunspell en_GB.dic
if [ "$build_option_bdic" ]; then
vinstall en_GB-${_variant}.bdic 644 \
usr/share/hunspell-bdic en_GB.bdic
fi
vlicense README_en_GB-${_variant}.txt SCOWL
}