commit:     d8be6f6a57289e5adda8264737fbf6bf7197efeb
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Thu Sep 18 23:17:46 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Sep 19 08:18:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8be6f6a

sys-apps/locale-gen: add 3.8

Kerin Millar (7):
      Capture STDERR with a piped open in generate_archive()
      Drop the $mode parameter of the fopen() subroutine
      Have list_locales() call close to wait for the child
      Shorten a comment in generate_locales()
      Have generate_archive() accept undef to signify no prior archive
      Tolerate a codeset/charmap of "UTF8" (for now)
      Bump $VERSION to 3.8

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/locale-gen/Manifest              |  1 +
 sys-apps/locale-gen/locale-gen-3.8.ebuild | 57 +++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)

diff --git a/sys-apps/locale-gen/Manifest b/sys-apps/locale-gen/Manifest
index cbe46ecf34fa..6adb7142928c 100644
--- a/sys-apps/locale-gen/Manifest
+++ b/sys-apps/locale-gen/Manifest
@@ -1,3 +1,4 @@
 DIST locale-gen-2.23.tar.bz2 7664 BLAKE2B 
a529b62fbb840c9352f06e8f5c80fc764425a2619dc69cc820f550a026d391788d5e2cfeeb46a8b5b9716da63340b4fce57a5b523edd4196ee1219c1200cb752
 SHA512 
c1245caadb04403c535a836f19bc410d0f04b5c0e297ea5be9852e6d71e08e528071ae769d63d31a677dda8fdd618b4c4d581ed525cf8786b82d8f37636db754
 DIST locale-gen-3.4.tar.bz2 21116 BLAKE2B 
97739bd3be34407639fbe77b9538e792dd1b94ba9a0612262f8df0a0cb70c3b513e1348470d5350a2ad0a2e92ac7287921c62b32c72815c82f43a271a8d3cdda
 SHA512 
38ec6801142be282e25ff913e78ca48dce5faecd5bfa0187cd85065622195c746b63ccc05b9818b7a1240b8d01f38c8ca8fa45737d6ac5ae0ac41675c1b49584
 DIST locale-gen-3.7.tar.bz2 17496 BLAKE2B 
44f894c5c54974c1e7ae00179092f1489f818c3306b1ad6fc15b7a13cb4d72bfad9910f6acc26af589a4a0469a4b0d36c5885546267e667851379aefcccddeea
 SHA512 
ae187e939ee8cd0e70561b271de4f6e8bbe9fef6c27bfe024f468eb32a74f4260c50bea85c8dabec6b675e3d1ed2d1f7a7fbb560ee6537082dd6aa85c772aea8
+DIST locale-gen-3.8.tar.bz2 17593 BLAKE2B 
0197096021286f47f4e289ee5c4cbf0220264b5784c101df567c0a5dc81a0a83999e8306e8ab72e47f4f35f92d0f7e7e40589ff3c74936e22c56e3b5a172fb15
 SHA512 
6e802283bce6a927ed020d3011a9bc4a81ef017d728a698fa6a8c74887895a87d225cdbe23cf18798a12f2e58beacfdd6ba5e3990d74ebafb4b2ba5986d35720

diff --git a/sys-apps/locale-gen/locale-gen-3.8.ebuild 
b/sys-apps/locale-gen/locale-gen-3.8.ebuild
new file mode 100644
index 000000000000..c380120ac933
--- /dev/null
+++ b/sys-apps/locale-gen/locale-gen-3.8.ebuild
@@ -0,0 +1,57 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Generate locales based upon the config file /etc/locale.gen"
+HOMEPAGE="https://gitweb.gentoo.org/proj/locale-gen.git/";
+
+if [[ ${PV} == 9999 ]] ; then
+       EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/locale-gen.git";
+       inherit git-r3
+else
+       
SRC_URI="https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/${P}.tar.bz2";
+
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+BDEPEND="
+       >=dev-lang/perl-5.36
+       dev-perl/File-Slurper
+"
+RDEPEND="
+       >=dev-lang/perl-5.36
+       !<sys-libs/glibc-2.37-r3
+"
+
+src_prepare() {
+       # EPREFIX is readonly.
+       local -x MY_EPREFIX=${EPREFIX}
+
+       eapply_user
+
+       perl -pi -e '$f //= ($. == 1 && s/^#!\h*\K/$ENV{MY_EPREFIX}/); END { 
exit !$f }' "${PN}" \
+       || die "Failed to prefixify ${PN}"
+}
+
+src_install() {
+       dosbin locale-gen
+       doman *.[0-8]
+       insinto /etc
+       {
+               cat <<-'EOF' &&
+               # This file defines which locales to incorporate into the glibc 
locale archive.
+               # See the locale.gen(5) and locale-gen(8) man pages for more 
details.
+
+               EOF
+               # Run the interpreter by name so as not to have to prefixify 
mkconfig.
+               perl mkconfig "${EROOT}"
+       } | newins - locale.gen
+       if (( PIPESTATUS[0] || PIPESTATUS[1] )); then
+               die "Failed to generate and/or install locale.gen"
+       fi
+       keepdir /usr/lib/locale
+}

Reply via email to