diff --git a/srcpkgs/hunspell-pt_PT-preao/template b/srcpkgs/hunspell-pt_PT-preao/template index e0b9f86156e..a267eacdc28 100644 --- a/srcpkgs/hunspell-pt_PT-preao/template +++ b/srcpkgs/hunspell-pt_PT-preao/template @@ -1,16 +1,49 @@ # Template file for 'hunspell-pt_PT-preao' pkgname=hunspell-pt_PT-preao version=20220621 -revision=1 +revision=2 short_desc="Pre-1990 Portuguese dictionary for hunspell" maintainer="Luis Henriques " license="GPL-2.0-only, LGPL-2.1-only, MPL-1.1" homepage="https://natura.di.uminho.pt/wiki/doku.php?id=dicionarios:main" distfiles="https://natura.di.uminho.pt/download/sources/Dictionaries/hunspell/${pkgname}-${version}.tar.gz" checksum=ddfe261e867f0c5489ec06f2d83f390b28e9631d667e88a33670b6ce755b4cf5 +provides="hunspell-pt_PT-0.1_1" +replaces="hunspell-pt_PT>=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 pt_PT-preao.dic \ + pt_PT.bdic + fi +} do_install() { vinstall pt_PT-preao.aff 644 usr/share/hunspell vinstall pt_PT-preao.dic 644 usr/share/hunspell + ln -s pt_PT-preao.aff "${PKGDESTDIR}/usr/share/hunspell/pt_PT.aff" + ln -s pt_PT-preao.dic "${PKGDESTDIR}/usr/share/hunspell/pt_PT.dic" + if [ "$build_option_bdic" ]; then + vinstall pt_PT.bdic 644 usr/share/hunspell-bdic + fi vdoc README_pt_PT.txt }