commit:     76fb420365bd491642a7673ace0798537cf74c56
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Wed Jan 14 00:06:47 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 14 08:43:52 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76fb4203

sys-apps/locale-gen: add 3.10

There are 82 commits in total between 3.9 and 3.10. Here is a curated
list of the more interesting ones among them.

Kerin Millar (11/82):
      Suppress bash warnings regarding setlocale(3) failures
      mkconfig: Improve the diagnostics for missing locales
      mkconfig: better detect missing/incomplete locales
      Allow localename fields to forgo a (redundant) codeset
      Introduce the LOCALEGEN_ALLOW_UNSUPPORTED environment variable
      Refrain from trying to execute chcon(1), if missing
      Add diagnostics to communicate actions taken in lieu of SELinux
      Support locale declarations consisting of only one field
      Compare both device and inode in is_eq_file()
      Check against /dev/{null,stdin} intelligently in fopen()
      Simplify the behaviour of select_config_files()

In addition to those, the man pages have undergone substantial updates,
with a greater emphasis on brevity and clarity.

Closes: https://bugs.gentoo.org/965533
Closes: https://bugs.gentoo.org/968318
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/locale-gen/locale-gen-3.10.ebuild | 70 ++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/sys-apps/locale-gen/locale-gen-3.10.ebuild 
b/sys-apps/locale-gen/locale-gen-3.10.ebuild
new file mode 100644
index 000000000000..34265f54c6cd
--- /dev/null
+++ b/sys-apps/locale-gen/locale-gen-3.10.ebuild
@@ -0,0 +1,70 @@
+# Copyright 2023-2026 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
+               if [[ -e ${EROOT}/usr/share/i18n/SUPPORTED ]]; then
+                       # Run the interpreter by name so as not to have to 
prefixify.
+                       perl mkconfig "${EROOT}"
+               else
+                       ewarn "Skipping the incorporation of locale.gen 
examples because the SUPPORTED file is absent"
+               fi
+       } | newins - locale.gen
+       if (( PIPESTATUS[0] || PIPESTATUS[1] )); then
+               die "Failed to generate and/or install locale.gen"
+       fi
+       keepdir /usr/lib/locale
+}
+
+pkg_postinst() {
+       while read -r; do ewarn "${REPLY}"; done <<-'EOF'
+       As of version 3.10, the locale.gen(5) config file grammar has been
+       simplified. For instance, "en_US.UTF-8 UTF-8" may instead be written as
+       "en_US UTF-8", or even "en_US". The grammar remains backward compatible 
with
+       version 3.9, so there is no requirement to update the /etc/locale.gen 
file.
+       EOF
+}

Reply via email to