1 |
commit: e9b82a6e088cb33b76a08aa41afcf2306967b97a |
2 |
Author: Marco Scardovi <marco <AT> scardovi <DOT> com> |
3 |
AuthorDate: Wed Jun 9 14:04:40 2021 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 10 06:38:36 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9b82a6e |
7 |
|
8 |
app-dicts/myspell-en: update logic for en-US |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/16938 |
11 |
Bug: https://bugs.gentoo.org/731704 |
12 |
Package-Manager: Portage-3.0.19, Repoman-3.0.3 |
13 |
Signed-off-by: Marco Scardovi <marco <AT> scardovi.com> |
14 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
15 |
|
16 |
app-dicts/myspell-en/myspell-en-20210601-r1.ebuild | 52 ++++++++++++++++++++++ |
17 |
1 file changed, 52 insertions(+) |
18 |
|
19 |
diff --git a/app-dicts/myspell-en/myspell-en-20210601-r1.ebuild b/app-dicts/myspell-en/myspell-en-20210601-r1.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..e1e7bc9b3f5 |
22 |
--- /dev/null |
23 |
+++ b/app-dicts/myspell-en/myspell-en-20210601-r1.ebuild |
24 |
@@ -0,0 +1,52 @@ |
25 |
+# Copyright 1999-2021 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=7 |
29 |
+ |
30 |
+inherit myspell-r2 |
31 |
+ |
32 |
+DESCRIPTION="English dictionaries for myspell/hunspell" |
33 |
+HOMEPAGE="https://extensions.libreoffice.org/extensions/english-dictionaries" |
34 |
+SRC_URI="https://extensions.libreoffice.org/assets/downloads/41/dict-en-20210601.oxt" |
35 |
+ |
36 |
+LICENSE="BSD MIT LGPL-3+" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris" |
39 |
+ |
40 |
+PLOCALES=( "en" "en-AU" "en-CA" "en-GB" "en-US" "en-ZA" ) |
41 |
+IUSE+="${PLOCALES[@]/#/l10n_}" |
42 |
+REQUIRED_USE="|| ( ${IUSE[@]} )" |
43 |
+ |
44 |
+src_prepare() { |
45 |
+ if use l10n_en-GB || use l10n_en; then |
46 |
+ MYSPELL_HYPH+=( "hyph_en_GB.dic" ) |
47 |
+ fi |
48 |
+ if use l10n_en-US || use l10n_en; then |
49 |
+ MYSPELL_THES+=( |
50 |
+ "th_en_US_v2.dat" |
51 |
+ "th_en_US_v2.idx" |
52 |
+ ) |
53 |
+ fi |
54 |
+ |
55 |
+ MYSPELL_DICT=( ) |
56 |
+ for lang in "${PLOCALES[@]}"; do |
57 |
+ if [[ "${lang}" == "en" ]]; then |
58 |
+ continue |
59 |
+ fi |
60 |
+ local mylinguas="${lang//-/_}" |
61 |
+ if use "l10n_${lang}" || use l10n_en; then |
62 |
+ MYSPELL_DICT+=( "${mylinguas}.aff" "${mylinguas}.dic" ) |
63 |
+ else |
64 |
+ rm "README_${mylinguas}.txt" || die |
65 |
+ if [[ ${lang} == "en-US" ]]; then |
66 |
+ rm "README_hyph_en_US.txt" || die |
67 |
+ fi |
68 |
+ if [[ ${lang} == "en-GB" ]]; then |
69 |
+ rm "README_hyph_en_GB.txt" || die |
70 |
+ rm "README_en_GB_thes.txt" || die |
71 |
+ fi |
72 |
+ fi |
73 |
+ done |
74 |
+ |
75 |
+ default |
76 |
+} |