From 528314af5c1247303cfaa3b0ae7315113b9d5bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 9 Mar 2024 21:32:45 +0700 Subject: [PATCH] hunspell-ru_RU-ieyo: provide bdic format --- srcpkgs/hunspell-ru_RU-ieyo/template | 33 ++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/srcpkgs/hunspell-ru_RU-ieyo/template b/srcpkgs/hunspell-ru_RU-ieyo/template index cb1e2da610f..dc8668c7473 100644 --- a/srcpkgs/hunspell-ru_RU-ieyo/template +++ b/srcpkgs/hunspell-ru_RU-ieyo/template @@ -1,7 +1,7 @@ # Template file for 'hunspell-ru_RU-ieyo' pkgname=hunspell-ru_RU-ieyo version=0.3.9 -revision=3 +revision=4 hostmakedepends="unzip" short_desc="Russian dictionary for hunspell, variant with ie and yo" maintainer="Andrey Raugas " @@ -10,9 +10,38 @@ homepage="http://extensions.openoffice.org/en/projectrelease/russkiy-orfografich distfiles="${SOURCEFORGE_SITE}/project/aoo-extensions/5149/3/dict_ru_ru-aot-${version}-ieyo.oxt>dict-ru_RU-ieyo.zip" checksum=3b374cf18f00fd0a9b6514eb8413438ce5d425a2e04435ffd81d8acc7ee1e578 provides="hunspell-ru_RU-${version}_${revision}" -replaces="hunspell-ru_RU" +replaces="hunspell-ru_RU>=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 russian-aot-ieyo.dic \ + ru_RU.bdic + fi +} do_install() { vinstall russian-aot-ieyo.aff 644 usr/share/hunspell ru_RU.aff vinstall russian-aot-ieyo.dic 644 usr/share/hunspell ru_RU.dic + if [ "$build_option_bdic" ]; then + vinstall ru_RU.bdic 644 usr/share/hunspell-bdic + fi }