Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/tagainijisho/
Date: Mon, 08 Jan 2018 07:25:55
Message-Id: 1515396338.29111e77caf81c872c298d33bafddb86c09900cf.ulm@gentoo
1 commit: 29111e77caf81c872c298d33bafddb86c09900cf
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 8 07:25:11 2018 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 8 07:25:38 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29111e77
7
8 app-i18n/tagainijisho: Migrate from LINGUAS to L10N.
9
10 Package-Manager: Portage-2.3.19, Repoman-2.3.6
11
12 app-i18n/tagainijisho/tagainijisho-1.0.3-r1.ebuild | 27 ++++++++++++++--------
13 1 file changed, 17 insertions(+), 10 deletions(-)
14
15 diff --git a/app-i18n/tagainijisho/tagainijisho-1.0.3-r1.ebuild b/app-i18n/tagainijisho/tagainijisho-1.0.3-r1.ebuild
16 index 66e285c37c3..6b4b8db7eed 100644
17 --- a/app-i18n/tagainijisho/tagainijisho-1.0.3-r1.ebuild
18 +++ b/app-i18n/tagainijisho/tagainijisho-1.0.3-r1.ebuild
19 @@ -18,8 +18,8 @@ DEPEND="dev-qt/qtcore:4
20 >=dev-db/sqlite-3.11:3"
21 RDEPEND="${DEPEND}"
22
23 -pkg_linguas=( ar cs de es fa_IR fi_FI fr hu id it nb nl pl pt ru sv th tr vi )
24 -IUSE+=" ${pkg_linguas[@]/#/linguas_}"
25 +pkg_langs=( ar cs de es fa fi fr hu id it nb nl pl pt ru sv th tr vi )
26 +IUSE+=" ${pkg_langs[@]/#/l10n_}"
27
28 PATCHES=( "${FILESDIR}"/${P}-sqlite.patch )
29
30 @@ -27,22 +27,29 @@ src_configure() {
31 # GUI linguae
32 # en is not optional, and build fails if none other then en is set, so adding ja as non-optional too
33 # linguae undeclared in IUSE will trigger an error, which is a handy check
34 - for lingua in $(ls -1 i18n/*.ts | sed -e 's/.*tagainijisho_\(.*\)\.ts/\1/' | grep -v en | grep -v ja); do
35 - if ! use linguas_${lingua}; then
36 - rm i18n/tagainijisho_${lingua}.ts || die
37 + local lang use_lang
38 + for lang in i18n/*.ts; do
39 + lang=${lang#i18n/tagainijisho_}
40 + lang=${lang%.ts}
41 + case ${lang} in
42 + fa_IR|fi_FI) use_lang=${lang%%_*} ;; # use generic tags instead
43 + *) use_lang=${lang} ;;
44 + esac
45 + if [[ ${lang} != en && ${lang} != ja ]] && ! use l10n_${use_lang}; then
46 + rm i18n/tagainijisho_${lang}.ts || die
47 fi
48 done
49
50 # Dictionary linguae
51 # en is not optional here either, but nothing special needs to be done
52 # here too, linguae undeclared in IUSE will trigger an error
53 - local cmake_linguas
54 - for lingua in $(sed -e 's/;/ /g' -ne '/set(DICT_LANG ".*")/s/.*"\(.*\)".*/\1/p' CMakeLists.txt); do
55 - if use linguas_${lingua}; then
56 - cmake_linguas+=";${lingua}"
57 + local cmake_langs
58 + for lang in $(sed -e 's/;/ /g' -ne '/set(DICT_LANG ".*")/s/.*"\(.*\)".*/\1/p' CMakeLists.txt); do
59 + if use l10n_${lang}; then
60 + cmake_langs+=";${lang}"
61 fi
62 done
63 - mycmakeargs=( -DDICT_LANG="${cmake_linguas};" )
64 + mycmakeargs=( -DDICT_LANG="${cmake_langs};" )
65
66 cmake-utils_src_configure
67 }