sys-apps/locale-gen: Sync with Gentoo

It's from Gentoo commit bbfddc57eebddb1709289b86d7d0e89c704dbf11.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2025-09-01 07:14:16 +00:00 committed by Krzesimir Nowak
parent 1f4e63b76c
commit 3ee8576753
6 changed files with 209 additions and 27 deletions

View File

@ -1,2 +1,4 @@
DIST locale-gen-2.23.tar.bz2 7664 BLAKE2B a529b62fbb840c9352f06e8f5c80fc764425a2619dc69cc820f550a026d391788d5e2cfeeb46a8b5b9716da63340b4fce57a5b523edd4196ee1219c1200cb752 SHA512 c1245caadb04403c535a836f19bc410d0f04b5c0e297ea5be9852e6d71e08e528071ae769d63d31a677dda8fdd618b4c4d581ed525cf8786b82d8f37636db754
DIST locale-gen-3.0.tar.bz2 14810 BLAKE2B f88381ca53eff89016daddedcaf349d4584a991de384e08f0908b025e37df8ecc90ee0b2834e596c8330516bbabd2e17a6c460ce5190e939704ae683732cc456 SHA512 4bfc27a12b2f4822ce7fb8ac7881adc2d1c34f8722aa688c940caaed06225d99a1c81569871de3cac9980725ed9743508ade0f68b171062d607e71261951373a
DIST locale-gen-3.2.tar.bz2 16340 BLAKE2B a0558a0f84da3ea6a66903a632f261fe9cf63e21ccb32411f827367699fefd3e2e627ee018c2720dce3901e3801089c3aca6a487f2f075a9b6831529b160a0e2 SHA512 76655947a1d28cbda5be75454a3cc38e75d2914ab987bd59359f70acc6e3a3f2961675280ee8a52ada4724fb6393f1d5b6712077a89ebd3511a49c43cf459adf
DIST locale-gen-3.3.tar.bz2 19815 BLAKE2B be46b2bedfc876900998fb1a4af3c6e5b04a0005caf0590052bda3f46a532c93ead62d44a6d0b4d6d0ef4bc01df1c2916c9ffac8dd8322278b2f3d21da0aaeb1 SHA512 3f55c0fe2fc0c434dc26538366238463798fde7e9367f6dc1c824531b6bff326ad0e6f62d3b599a8c2b92a6b974fa8ef8c46e58acf80d50820cc1987c20da7cb
DIST locale-gen-3.4.tar.bz2 21116 BLAKE2B 97739bd3be34407639fbe77b9538e792dd1b94ba9a0612262f8df0a0cb70c3b513e1348470d5350a2ad0a2e92ac7287921c62b32c72815c82f43a271a8d3cdda SHA512 38ec6801142be282e25ff913e78ca48dce5faecd5bfa0187cd85065622195c746b63ccc05b9818b7a1240b8d01f38c8ca8fa45737d6ac5ae0ac41675c1b49584

View File

@ -1,26 +0,0 @@
# 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/"
SRC_URI="https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
RDEPEND="
dev-lang/perl
!<sys-libs/glibc-2.37-r3
"
src_install() {
dosbin locale-gen
doman *.[0-8]
insinto /etc
doins locale.gen
keepdir /usr/lib/locale
}

View File

@ -0,0 +1,46 @@
# 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"
# In-place editing became safer in v5.28.
BDEPEND="
>=dev-lang/perl-5.28
"
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
doins locale.gen
keepdir /usr/lib/locale
}

View File

@ -0,0 +1,46 @@
# 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"
# In-place editing became safer in v5.28.
BDEPEND="
>=dev-lang/perl-5.28
"
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
doins locale.gen
keepdir /usr/lib/locale
}

View File

@ -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
}

View File

@ -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
}