commit:     3eaf169929f721a64dfbbde0a4e58730cacfa6c5
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  8 22:02:45 2018 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Jan  8 22:03:21 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3eaf1699

net-misc/electrum: Migrate from LINGUAS to L10N.

Map all language_TERRITORRY codes (except pt_* and zh_*) to their
generic language equivalents. Add codes fa_IR, uk_UA, and zh_TW to
those ebuilds that were missing them.

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-misc/electrum/electrum-2.7.15.ebuild   | 30 ++++++++++++++++++++----------
 net-misc/electrum/electrum-2.8.0-r1.ebuild | 30 ++++++++++++++++++++----------
 net-misc/electrum/electrum-2.8.2.ebuild    | 30 ++++++++++++++++++++----------
 net-misc/electrum/electrum-2.8.3.ebuild    | 30 ++++++++++++++++++++----------
 net-misc/electrum/electrum-2.9.3.ebuild    | 30 ++++++++++++++++++++----------
 net-misc/electrum/electrum-3.0.3.ebuild    | 30 ++++++++++++++++++++----------
 6 files changed, 120 insertions(+), 60 deletions(-)

diff --git a/net-misc/electrum/electrum-2.7.15.ebuild 
b/net-misc/electrum/electrum-2.7.15.ebuild
index 536d54d9c39..ef6c1839e59 100644
--- a/net-misc/electrum/electrum-2.7.15.ebuild
+++ b/net-misc/electrum/electrum-2.7.15.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz";
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="amd64 x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="cli cosign email greenaddress_it ncurses qrcode +qt4 sync 
trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt4 )
@@ -72,17 +81,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die

diff --git a/net-misc/electrum/electrum-2.8.0-r1.ebuild 
b/net-misc/electrum/electrum-2.8.0-r1.ebuild
index b0058483217..85efdde7134 100644
--- a/net-misc/electrum/electrum-2.8.0-r1.ebuild
+++ b/net-misc/electrum/electrum-2.8.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz";
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="audio_modem cli cosign digitalbitbox email greenaddress_it ncurses 
qrcode +qt4 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt4 )
@@ -74,17 +83,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die

diff --git a/net-misc/electrum/electrum-2.8.2.ebuild 
b/net-misc/electrum/electrum-2.8.2.ebuild
index 82aa0e5d8a4..01a96e470f0 100644
--- a/net-misc/electrum/electrum-2.8.2.ebuild
+++ b/net-misc/electrum/electrum-2.8.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz";
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN zh_TW"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="audio_modem cli cosign digitalbitbox email greenaddress_it ncurses 
qrcode +qt4 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt4 )
@@ -74,17 +83,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die

diff --git a/net-misc/electrum/electrum-2.8.3.ebuild 
b/net-misc/electrum/electrum-2.8.3.ebuild
index 82aa0e5d8a4..312903f737a 100644
--- a/net-misc/electrum/electrum-2.8.3.ebuild
+++ b/net-misc/electrum/electrum-2.8.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz";
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR uk_UA vi_VN zh_CN zh_TW"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="audio_modem cli cosign digitalbitbox email greenaddress_it ncurses 
qrcode +qt4 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt4 )
@@ -74,17 +83,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die

diff --git a/net-misc/electrum/electrum-2.9.3.ebuild 
b/net-misc/electrum/electrum-2.9.3.ebuild
index 82aa0e5d8a4..312903f737a 100644
--- a/net-misc/electrum/electrum-2.9.3.ebuild
+++ b/net-misc/electrum/electrum-2.9.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz";
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR uk_UA vi_VN zh_CN zh_TW"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="audio_modem cli cosign digitalbitbox email greenaddress_it ncurses 
qrcode +qt4 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt4 )
@@ -74,17 +83,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die

diff --git a/net-misc/electrum/electrum-3.0.3.ebuild 
b/net-misc/electrum/electrum-3.0.3.ebuild
index aca1ddb7cae..2b62832e8ba 100644
--- a/net-misc/electrum/electrum-3.0.3.ebuild
+++ b/net-misc/electrum/electrum-3.0.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz";
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM 
id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL pl_PL pt_BR pt_PT ro_RO ru_RU 
sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fa_IR fr_FR hu_HU 
hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL pl_PL pt_BR pt_PT ro_RO 
ru_RU sk_SK sl_SI ta_IN th_TH tr_TR uk_UA vi_VN zh_CN zh_TW"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="audio_modem cli cosign digitalbitbox email greenaddress_it ncurses 
qrcode +qt5 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt5 )
@@ -71,17 +80,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die

Reply via email to