public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/locale-gen/
Date: Mon, 18 Aug 2025 15:55:14 +0000 (UTC)	[thread overview]
Message-ID: <1755532224.d1ca6dabb7b7d8f474d7f95869c45b1b9a5f5e3f.sam@gentoo> (raw)

commit:     d1ca6dabb7b7d8f474d7f95869c45b1b9a5f5e3f
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Aug 17 04:03:31 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 18 15:50:24 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1ca6dab

sys-apps/locale-gen: integrate the mkconfig util into 9999

The locale-gen repo now carries the mkconfig utility. It writes a sample
/etc/locale.gen file to standard output as a columnated list, consisting
only of UTF-8 locales supported by the installed version of glibc, with
comments indicating the languages and territories in plain English.

Have the src_install() function of the live ebuild take advantage of it.

[sam: Note that this introduces a BDEPEND (but not an RDEPEND) on
 dev-perl/File-Slurper. If this is unacceptable to someone, please file
 a bug explaining why and we can discuss.]

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

 sys-apps/locale-gen/locale-gen-9999.ebuild | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/sys-apps/locale-gen/locale-gen-9999.ebuild b/sys-apps/locale-gen/locale-gen-9999.ebuild
index 45a38c7dfc25..b676a0c54f01 100644
--- a/sys-apps/locale-gen/locale-gen-9999.ebuild
+++ b/sys-apps/locale-gen/locale-gen-9999.ebuild
@@ -18,6 +18,10 @@ 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
@@ -27,6 +31,17 @@ src_install() {
 	dosbin locale-gen
 	doman *.[0-8]
 	insinto /etc
-	doins locale.gen
+	{
+		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	other threads:[~2025-08-18 15:55 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 15:55 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-10-04 18:50 [gentoo-commits] repo/gentoo:master commit in: sys-apps/locale-gen/ Sam James
2025-10-04 18:50 Sam James
2025-10-04 18:50 Sam James
2025-10-04 18:50 Sam James
2025-10-04 18:50 Sam James
2025-10-04 18:17 Arthur Zamarin
2025-10-03  1:53 Sam James
2025-09-19  8:19 Sam James
2025-09-14  4:50 Sam James
2025-09-14  4:50 Sam James
2025-09-14  0:28 Sam James
2025-09-14  0:11 Sam James
2025-09-12 20:31 Sam James
2025-09-12 20:31 Sam James
2025-08-23  1:42 Sam James
2025-08-23  1:42 Sam James
2025-08-19  0:46 Sam James
2025-08-14  2:13 Sam James
2025-08-08 17:56 Sam James
2025-08-08 11:04 Sam James
2025-08-08 11:04 Sam James
2025-08-08 11:04 Sam James
2025-08-08  5:23 Sam James
2025-08-08  5:23 Sam James
2025-07-01 21:08 Andreas K. Hüttel
2023-07-15 12:12 Arthur Zamarin
2023-07-15 12:12 Arthur Zamarin
2023-07-15 12:12 Arthur Zamarin
2023-07-09 19:07 Arthur Zamarin
2023-07-09 19:07 Arthur Zamarin
2023-07-09 19:07 Arthur Zamarin
2023-07-02 14:57 Sam James
2023-06-28 22:30 Sam James
2023-06-28 21:23 Sam James
2023-05-27  9:59 Andreas K. Hüttel
2023-05-10 19:15 Andreas K. Hüttel
2023-05-09 21:50 Andreas K. Hüttel
2023-05-09 20:59 Andreas K. Hüttel
2023-05-07  0:02 Andreas K. Hüttel
2023-05-06 23:40 Andreas K. Hüttel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1755532224.d1ca6dabb7b7d8f474d7f95869c45b1b9a5f5e3f.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox