mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
hunspell-fr_FR: provide bdic format and other locales
This commit is contained in:
parent
91e9eda43f
commit
cb882fcbfe
1 changed files with 54 additions and 11 deletions
|
@ -1,44 +1,87 @@
|
||||||
# Template file for 'hunspell-fr_FR'
|
# Template file for 'hunspell-fr_FR'
|
||||||
pkgname=hunspell-fr_FR
|
pkgname=hunspell-fr_FR
|
||||||
version=7.0
|
version=7.0
|
||||||
revision=2
|
revision=3
|
||||||
create_wrksrc=yes
|
|
||||||
hostmakedepends="unzip"
|
hostmakedepends="unzip"
|
||||||
short_desc="French dictionary for hunspell"
|
short_desc="French dictionary for hunspell"
|
||||||
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
||||||
license="MPL-1.1"
|
license="MPL-1.1"
|
||||||
homepage="http://www.dicollecte.org/home.php?prj=fr"
|
homepage="http://www.dicollecte.org/home.php?prj=fr"
|
||||||
distfiles="http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v${version}.zip"
|
distfiles="http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v${version}.zip"
|
||||||
|
distfiles="https://sources.voidlinux.org/hunspell-fr_FR-${version}/hunspell-french-dictionaries-v${version}.zip"
|
||||||
checksum=eb7ac36dc14b9c3e3c0cabae0f90304a137da8e6ae607bcaf56d65720fbd097f
|
checksum=eb7ac36dc14b9c3e3c0cabae0f90304a137da8e6ae607bcaf56d65720fbd097f
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
_vinstall_variant() {
|
||||||
|
local _variant="$1" l
|
||||||
|
local _all_locales="fr_FR fr_BE fr_CA fr_CH fr_LU fr_MC"
|
||||||
|
vinstall fr-${_variant}.aff 644 usr/share/hunspell fr.aff
|
||||||
|
vinstall fr-${_variant}.dic 644 usr/share/hunspell fr.dic
|
||||||
|
for l in $_all_locales
|
||||||
|
do
|
||||||
|
ln -s fr.aff "${PKGDESTDIR}/usr/share/hunspell/${l}.aff"
|
||||||
|
ln -s fr.dic "${PKGDESTDIR}/usr/share/hunspell/${l}.dic"
|
||||||
|
done
|
||||||
|
if [ "$build_option_bdic" ]; then
|
||||||
|
vinstall fr-${_variant}.bdic 644 usr/share/hunspell-bdic fr.bdic
|
||||||
|
for l in $_all_locales
|
||||||
|
do
|
||||||
|
ln -s fr.bdic \
|
||||||
|
"${PKGDESTDIR}/usr/share/hunspell-bdic/${l}.bdic"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_build() {
|
||||||
|
local variant
|
||||||
|
PATH="/usr/lib/qt6/libexec:/usr/lib/qt5/bin:$PATH"
|
||||||
|
if [ "$build_option_bdic" ]; then
|
||||||
|
for variant in classique reforme1990 toutesvariantes; do
|
||||||
|
qwebengine_convert_dict fr-${variant}.dic \
|
||||||
|
fr-${variant}.bdic
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
_variant="classique"
|
_vinstall_variant classique
|
||||||
vinstall fr-${_variant}.aff 644 /usr/share/hunspell fr_FR.aff
|
|
||||||
vinstall fr-${_variant}.dic 644 /usr/share/hunspell fr_FR.dic
|
|
||||||
vdoc README_dict_fr.txt
|
vdoc README_dict_fr.txt
|
||||||
vdoc $FILESDIR/README.voidlinux
|
vdoc $FILESDIR/README.voidlinux
|
||||||
}
|
}
|
||||||
|
|
||||||
hunspell-fr_FR-reforme1990_package() {
|
hunspell-fr_FR-reforme1990_package() {
|
||||||
_variant="reforme1990"
|
|
||||||
short_desc+=" - Reforme 1990 Variant"
|
short_desc+=" - Reforme 1990 Variant"
|
||||||
provides="${sourcepkg}-${version}_${revision}"
|
provides="${sourcepkg}-${version}_${revision}"
|
||||||
replaces="${sourcepkg}>=0"
|
replaces="${sourcepkg}>=0"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vinstall ${wrksrc}/fr-${_variant}.aff 644 /usr/share/hunspell fr_FR.aff
|
_vinstall_variant reforme1990
|
||||||
vinstall ${wrksrc}/fr-${_variant}.dic 644 /usr/share/hunspell fr_FR.dic
|
|
||||||
vdoc ${wrksrc}/README_dict_fr.txt
|
vdoc ${wrksrc}/README_dict_fr.txt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hunspell-fr_FR-toutesvariantes_package() {
|
hunspell-fr_FR-toutesvariantes_package() {
|
||||||
_variant="toutesvariantes"
|
|
||||||
short_desc+=" - All variant in one file"
|
short_desc+=" - All variant in one file"
|
||||||
provides="${sourcepkg}-${version}_${revision}"
|
provides="${sourcepkg}-${version}_${revision}"
|
||||||
replaces="${sourcepkg}>=0"
|
replaces="${sourcepkg}>=0"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vinstall ${wrksrc}/fr-${_variant}.aff 644 /usr/share/hunspell fr_FR.aff
|
_vinstall_variant toutesvariantes
|
||||||
vinstall ${wrksrc}/fr-${_variant}.dic 644 /usr/share/hunspell fr_FR.dic
|
|
||||||
vdoc ${wrksrc}/README_dict_fr.txt
|
vdoc ${wrksrc}/README_dict_fr.txt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue