hunspell-en: adopted port
This commit is contained in:
parent
4b0b56c294
commit
918d70f7ce
@ -1,6 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/opt.pub
|
||||
RWSE3ohX2g5d/VHamEeXrxzzv1vRg/WWL2TpjniG3C0io0j/q9yiW4Wc6yiuPZaT58ZFvP4t4/ox7NKlmD+NucLW0qUBSu4N0w4=
|
||||
SHA256 (Pkgfile) = 04138808b39953a6666a17d3597e63c2a37c145534b4d11f604060056d3667ba
|
||||
RWSE3ohX2g5d/RJsl9PA/AoK4RnnP4iiMRfYkQFFFvscl14QvDw2A0VL+ChhUnOajf0bT/9X7lqxRedXWb5MKL5dSo6UjY238gY=
|
||||
SHA256 (Pkgfile) = ceb0ff2712c87d6f270c487af7a6a241a92a736e3387dad14b77f0f177b18f0b
|
||||
SHA256 (.footprint) = 3a4f491b6b54373a7ec694870df58feb5cc6c179319edce07442147cb64540b5
|
||||
SHA256 (hunspell-en_AU-2020.12.07.zip) = dc20557c48ae1979784e79fae6f965e999c8db2e9a0f846348e70057fce78254
|
||||
SHA256 (hunspell-en_US-2020.12.07.zip) = 616348ad645a716d91c8a6645065e710f15e9dda3ffef60cdf7ec8a4e27975af
|
||||
|
@ -1,52 +1,50 @@
|
||||
# Description: Hunspell dictionary for English
|
||||
# URL: http://wordlist.sourceforge.net/
|
||||
# Maintainer: Alan Mizrahi, alan at mizrahi dot com dot ve
|
||||
# Depends on: hunspell
|
||||
# Description: Hunspell dictionary for English
|
||||
# URL: http://wordlist.aspell.net/
|
||||
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||
# Depends on: hunspell
|
||||
|
||||
name=hunspell-en
|
||||
version=2020.12.07
|
||||
release=1
|
||||
source=(
|
||||
http://downloads.sourceforge.net/wordlist/speller/$version/hunspell-en_AU-$version.zip
|
||||
http://downloads.sourceforge.net/wordlist/speller/$version/hunspell-en_US-$version.zip
|
||||
http://downloads.sourceforge.net/wordlist/speller/$version/hunspell-en_CA-$version.zip
|
||||
http://downloads.sourceforge.net/wordlist/speller/$version/hunspell-en_GB-ise-$version.zip
|
||||
)
|
||||
source=(http://downloads.sourceforge.net/wordlist/speller/$version/hunspell-en_AU-$version.zip
|
||||
http://downloads.sourceforge.net/wordlist/speller/$version/hunspell-en_US-$version.zip
|
||||
http://downloads.sourceforge.net/wordlist/speller/$version/hunspell-en_CA-$version.zip
|
||||
http://downloads.sourceforge.net/wordlist/speller/$version/hunspell-en_GB-ise-$version.zip)
|
||||
|
||||
build() {
|
||||
declare -A missing
|
||||
missing[en_GB]="en_AG en_BS en_BW en_BZ en_DK en_GH en_HK en_IE en_IN en_JM en_NA en_NG en_NZ en_SG en_TT en_ZA en_ZW"
|
||||
missing[en_US]="en_PH"
|
||||
declare -A missing
|
||||
missing[en_GB]="en_AG en_BS en_BW en_BZ en_DK en_GH en_HK en_IE en_IN en_JM en_NA en_NG en_NZ en_SG en_TT en_ZA en_ZW"
|
||||
missing[en_US]="en_PH"
|
||||
|
||||
mkdir -p $PKG/usr/share/hunspell
|
||||
mkdir -p $PKG/usr/share/hunspell
|
||||
|
||||
cp $SRC/*.aff $SRC/*.dic $PKG/usr/share/hunspell/
|
||||
mv $PKG/usr/share/hunspell/{en_GB-ise.aff,en_GB.aff}
|
||||
mv $PKG/usr/share/hunspell/{en_GB-ise.dic,en_GB.dic}
|
||||
cp $SRC/*.aff $SRC/*.dic $PKG/usr/share/hunspell/
|
||||
mv $PKG/usr/share/hunspell/{en_GB-ise.aff,en_GB.aff}
|
||||
mv $PKG/usr/share/hunspell/{en_GB-ise.dic,en_GB.dic}
|
||||
|
||||
# Replace duplicate files with symbolic links
|
||||
pushd $PKG/usr/share/hunspell
|
||||
(md5sum * | sort | uniq --repeated -w 32 --all-repeated=separate; echo) | \
|
||||
while read sum name; do
|
||||
if [ -n "$name" ]; then
|
||||
[ -z "$dups" ] && declare -A dups
|
||||
dups[${#dups[*]}]=$name
|
||||
else
|
||||
for name in ${dups[@]}; do
|
||||
[ $name != ${dups[0]} ] && ln -s -f ${dups[0]} $name
|
||||
done
|
||||
unset dups
|
||||
fi
|
||||
done
|
||||
popd
|
||||
# Replace duplicate files with symbolic links
|
||||
pushd $PKG/usr/share/hunspell
|
||||
(md5sum * | sort | uniq --repeated -w 32 --all-repeated=separate; echo) | \
|
||||
while read sum name; do
|
||||
if [ -n "$name" ]; then
|
||||
[ -z "$dups" ] && declare -A dups
|
||||
dups[${#dups[*]}]=$name
|
||||
else
|
||||
for name in ${dups[@]}; do
|
||||
[ $name != ${dups[0]} ] && ln -s -f ${dups[0]} $name
|
||||
done
|
||||
unset dups
|
||||
fi
|
||||
done
|
||||
popd
|
||||
|
||||
# Create symbolic links for missing dictionaries
|
||||
pushd $PKG/usr/share/hunspell
|
||||
for lang in ${!missing[@]}; do
|
||||
for new in ${missing[$lang]}; do
|
||||
ln -s $lang.aff $new.aff
|
||||
ln -s $lang.dic $new.dic
|
||||
done
|
||||
done
|
||||
popd
|
||||
# Create symbolic links for missing dictionaries
|
||||
pushd $PKG/usr/share/hunspell
|
||||
for lang in ${!missing[@]}; do
|
||||
for new in ${missing[$lang]}; do
|
||||
ln -s $lang.aff $new.aff
|
||||
ln -s $lang.dic $new.dic
|
||||
done
|
||||
done
|
||||
popd
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user