commit:     ba04241e5184252af15449da3abd8b01694de18b
Author:     Robert Siebeck <gentoo.2019 <AT> r123 <DOT> de>
AuthorDate: Thu Sep 15 07:44:49 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Sep 22 11:34:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba04241e

app-dicts/myspell-de: support installing country-specific locales

Country-specific locales for Austria, Switzerland and Germany can be selected
via USE flags. Using the de locale will install the files for all countries.

Signed-off-by: Robert Siebeck <gentoo.2019 <AT> r123.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../myspell-de/myspell-de-2017.01.12-r1.ebuild     | 53 ++++++++++++++++++++++
 profiles/desc/l10n.desc                            |  2 +
 2 files changed, 55 insertions(+)

diff --git a/app-dicts/myspell-de/myspell-de-2017.01.12-r1.ebuild 
b/app-dicts/myspell-de/myspell-de-2017.01.12-r1.ebuild
new file mode 100644
index 000000000000..262d7cdec76b
--- /dev/null
+++ b/app-dicts/myspell-de/myspell-de-2017.01.12-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit myspell-r2
+
+MY_PV=$(ver_rs 1- -)   # YYYY-MM-DD
+
+DESCRIPTION="German (AT,CH,DE) dictionaries for myspell/hunspell"
+HOMEPAGE="
+       
https://extensions.libreoffice.org/extensions/german-de-at-frami-dictionaries
+       
https://extensions.libreoffice.org/extensions/german-de-ch-frami-dictionaries
+       
https://extensions.libreoffice.org/extensions/german-de-de-frami-dictionaries
+"
+SRC_URI="
+       l10n_de? (
+               
https://extensions.libreoffice.org/extensions/german-de-at-frami-dictionaries/$(ver_rs
 1 -)/@@download/file/dict-de_AT-frami_${MY_PV}.oxt
+               
https://extensions.libreoffice.org/extensions/german-de-ch-frami-dictionaries/$(ver_rs
 1 -)/@@download/file/dict-de_CH-frami_${MY_PV}.oxt
+               
https://extensions.libreoffice.org/extensions/german-de-de-frami-dictionaries/${MY_PV}/@@download/file/dict-de_DE-frami_${MY_PV}.oxt
 )
+       l10n_de-AT? ( 
https://extensions.libreoffice.org/extensions/german-de-at-frami-dictionaries/$(ver_rs
 1 -)/@@download/file/dict-de_AT-frami_${MY_PV}.oxt )
+       l10n_de-CH? ( 
https://extensions.libreoffice.org/extensions/german-de-ch-frami-dictionaries/$(ver_rs
 1 -)/@@download/file/dict-de_CH-frami_${MY_PV}.oxt )
+       l10n_de-DE? ( 
https://extensions.libreoffice.org/extensions/german-de-de-frami-dictionaries/${MY_PV}/@@download/file/dict-de_DE-frami_${MY_PV}.oxt
 )
+"
+
+LICENSE="GPL-3 GPL-2 LGPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 
~riscv ~sparc ~x86"
+
+PLOCALES=( "de-AT" "de-CH" "de-DE" )
+IUSE+="+l10n_de ${PLOCALES[@]/#/l10n_}"
+REQUIRED_USE="|| ( l10n_de ${PLOCALES[@]/#/l10n_} )"
+
+src_prepare() {
+       # fixing file names
+       for i in *_frami.*; do
+               mv "${i}" "${i/_frami}" || die
+       done
+
+       MYSPELL_DICT=( )
+       MYSPELL_HYPH=( )
+       MYSPELL_THES=( )
+       for lang in "${PLOCALES[@]}"; do
+               local mylinguas="${lang//-/_}"
+               if use "l10n_${lang}" || use l10n_de; then
+                       MYSPELL_DICT+=( "${mylinguas}.aff" "${mylinguas}.dic" )
+                       MYSPELL_HYPH+=( "hyph_${mylinguas}.dic" )
+                       MYSPELL_THES+=( "th_${mylinguas}_v2.dat" 
"th_${mylinguas}_v2.idx" )
+               fi
+       done
+
+       default
+}

diff --git a/profiles/desc/l10n.desc b/profiles/desc/l10n.desc
index e50db4be3262..8507b4ecd5b2 100644
--- a/profiles/desc/l10n.desc
+++ b/profiles/desc/l10n.desc
@@ -56,7 +56,9 @@ cy - Welsh
 da - Danish
 de - German
 de-1901 - German (traditional orthography)
+de-AT - German (Austria)
 de-CH - German (Switzerland)
+de-DE - German (Germany)
 dgo - Dogri (individual language)
 doi - Dogri (macrolanguage)
 dsb - Lower Sorbian

Reply via email to