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: Mon, 07 Nov 2022 02:34:25
Message-Id: 1667787305.24a3b295fe3c8900f92aef101c00952cdf2342cd.mattst88@gentoo
1 commit: 24a3b295fe3c8900f92aef101c00952cdf2342cd
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 7 00:45:28 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 7 02:15:05 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24a3b295
7
8 app-text/iso-codes: Version bump to 4.12.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.12.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 35aa77bce53b..00c40583824d 100644
18 --- a/app-text/iso-codes/Manifest
19 +++ b/app-text/iso-codes/Manifest
20 @@ -1 +1,2 @@
21 DIST iso-codes-v4.11.0.tar.gz 14756251 BLAKE2B dd3bc5bae4def6338527a9c7c41f0ef9603eb2a2a7e4e2a95399bc4891a0d66fa323bb1f960263662cd6b4a42902defede64ad732f4a894d3073a7a68b5b9f80 SHA512 524be572c2505b0b2d55a7a0dd8d6bdff68edbc89c569652b11070cc6412881c98ea66a001193f1540153d44d6b41d921444a1d1a2bde6929bbe445eb369ea3e
22 +DIST iso-codes-v4.12.0.tar.gz 14977180 BLAKE2B 23590e9a4f246a0879e68c521ae7f72f4dd8d41ef85e7b6efaa4e4a29b7bf2e45d5e200ae14523e4ef8d3d4c8f45e783d4231a2a1c679be1898aa04528da30d3 SHA512 d0cdac626728e4de7c5bb2f8edd968a29380d49ba2b43ebe3820756591e46d4301859da7961ec9fc9e6832e18a9a0d5562ec02dd3d8a52bec7f7cbfc3190869e
23
24 diff --git a/app-text/iso-codes/iso-codes-4.12.0.ebuild b/app-text/iso-codes/iso-codes-4.12.0.ebuild
25 new file mode 100644
26 index 000000000000..dd05fb137f64
27 --- /dev/null
28 +++ b/app-text/iso-codes/iso-codes-4.12.0.ebuild
29 @@ -0,0 +1,79 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +PYTHON_COMPAT=( python3_{8..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 +}