Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/iso-codes/
Date: Tue, 28 Feb 2023 14:50:07
Message-Id: 1677595799.f95f7bb6834aa6179ad8b54e23c8d65057e1320b.mattst88@gentoo
1 commit: f95f7bb6834aa6179ad8b54e23c8d65057e1320b
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 28 14:49:42 2023 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 28 14:49:59 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f95f7bb6
7
8 app-text/iso-codes: Version bump to 4.13.0
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 app-text/iso-codes/Manifest | 1 +
13 app-text/iso-codes/iso-codes-4.13.0.ebuild | 79 ++++++++++++++++++++++++++++++
14 2 files changed, 80 insertions(+)
15
16 diff --git a/app-text/iso-codes/Manifest b/app-text/iso-codes/Manifest
17 index c6f3a254a35a..8108cfab629e 100644
18 --- a/app-text/iso-codes/Manifest
19 +++ b/app-text/iso-codes/Manifest
20 @@ -1 +1,2 @@
21 DIST iso-codes-v4.12.0.tar.gz 14977180 BLAKE2B 23590e9a4f246a0879e68c521ae7f72f4dd8d41ef85e7b6efaa4e4a29b7bf2e45d5e200ae14523e4ef8d3d4c8f45e783d4231a2a1c679be1898aa04528da30d3 SHA512 d0cdac626728e4de7c5bb2f8edd968a29380d49ba2b43ebe3820756591e46d4301859da7961ec9fc9e6832e18a9a0d5562ec02dd3d8a52bec7f7cbfc3190869e
22 +DIST iso-codes-v4.13.0.tar.gz 14990054 BLAKE2B e9e9a166675c09ecfe62da92608e91d4d6aeb53306e6162ea432bba418d074ef54cf510071aae6407bdc1fe59c295e52e2c7862e0d5b8962f467834c117f4912 SHA512 fd180b8462eb1ee2fd49bc144fd8b1b866067512a5deec3f580689641c596f623a11f0384e8c05cb48de520e1ce7c0270a649ef37542ba51f93e244b45bc5bba
23
24 diff --git a/app-text/iso-codes/iso-codes-4.13.0.ebuild b/app-text/iso-codes/iso-codes-4.13.0.ebuild
25 new file mode 100644
26 index 000000000000..2cb3270120b4
27 --- /dev/null
28 +++ b/app-text/iso-codes/iso-codes-4.13.0.ebuild
29 @@ -0,0 +1,79 @@
30 +# Copyright 1999-2023 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +PYTHON_COMPAT=( python3_{9..11} )
36 +PLOCALES="ab ace ach af ak am an ar as ast ay az ba bar be bg bi bn bn_BD bn_IN br bs byn ca ce ch chr ckb crh cs csb cv cy da de dv dz ee el en eo es et eu fa ff fi fil fo fr frp fur fy ga gez gl gn gu gv ha haw he hi hr ht hu hy ia id io is it iu ja jam ka kab ki kk kl km kmr kn ko kok kv kw ky lo lt lv mai mhr mi mk ml mn mo mr ms mt my na nah nb nb_NO ne nl nn nso nv oc or pa pa_PK pap pi pl ps pt pt_BR ro ru rw sc sd si sk sl so son sq sr sr@latin sv sw ta te tg th ti tig tk tl tr tt tt@iqtelif tzm ug uk ur uz ve vi wa wal wo xh yo zh_CN zh_HK zh_Hans zh_Hant zh_TW zu"
37 +
38 +inherit python-any-r1
39 +
40 +DESCRIPTION="ISO language, territory, currency, script codes and their translations"
41 +HOMEPAGE="https://salsa.debian.org/iso-codes-team/iso-codes"
42 +SRC_URI="https://salsa.debian.org/${PN}-team/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.gz"
43 +
44 +LICENSE="LGPL-2.1+"
45 +SLOT="0"
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
47 +
48 +BDEPEND="${PYTHON_DEPS}
49 + sys-devel/gettext
50 +"
51 +S="${WORKDIR}/${PN}-v${PV}"
52 +
53 +# This ebuild does not install any binaries.
54 +RESTRICT="binchecks strip"
55 +
56 +DOCS=( CHANGELOG.md README.md )
57 +
58 +# plocale_find_changes doesn't support multiple directories,
59 +# so need to do the update scan ourselves.
60 +check_existing_locales() {
61 + local std loc all_locales=()
62 +
63 + ebegin "Looking for new locales"
64 + for std in "${all_stds[@]}"; do
65 + pushd "${std}" >/dev/null || die
66 + for loc in *.po; do
67 + all_locales+=( "${loc%.po}" )
68 + done
69 + popd >/dev/null
70 + done
71 +
72 + all_locales=$(echo $(printf '%s\n' "${all_locales[@]}" | LC_COLLATE=C sort -u))
73 + if [[ ${PLOCALES} != "${all_locales}" ]]; then
74 + eend 1
75 + eerror "There are changes in locales! This ebuild should be updated to:"
76 + eerror "PLOCALES=\"${all_locales}\""
77 + die "Update PLOCALES in the ebuild"
78 + else
79 + eend 0
80 + fi
81 +}
82 +
83 +src_prepare() {
84 + default
85 +
86 + local std loc mylinguas
87 + local all_stds=( iso_15924 iso_3166-{1,2,3} iso_4217 iso_639-{2,3,5} )
88 +
89 + check_existing_locales
90 +
91 + # Modify the Makefiles so they only install requested locales.
92 + for std in "${all_stds[@]}"; do
93 + einfo "Preparing ${std} ..."
94 + pushd "${std}" >/dev/null || die
95 + mylinguas=()
96 + for loc in *.po; do
97 + if has ${loc%.po} ${LINGUAS-${loc%.po}}; then
98 + mylinguas+=( "${loc}" )
99 + fi
100 + done
101 +
102 + sed \
103 + -e "/^pofiles =/s:=.*:= ${mylinguas[*]}:" \
104 + -e "/^mofiles =/s:=.*:= ${mylinguas[*]/%.po/.mo}:" \
105 + -i Makefile.am Makefile.in || die "sed in ${std} folder failed"
106 + popd >/dev/null
107 + done
108 +}