mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sys-apps/locale-gen: add 3.2-r1 and 3.3-r1 and revise 9999 per bug #961743
Upon locale-gen-3.0 being introduced, the ebuild lost the ability to
prefixify the locale-gen script in src_prepare(). Address this issue so
that the shebang is properly adjusted for Gentoo Prefix environments.
I eschewed the use of the prefix eclass because I consider its
implementation to be substandard. I also eschewed the use of sed(1)
because it encourages pattern injection and seldom returns a useful exit
status. Instead, perl is used to replace the shebang. I could think of
no reason not to, given that dev-lang/perl is already a requirement.
Reported-by: Nick Bowler <nbowler@draconx.ca>
Fixes: ecc3beb504
Closes: https://bugs.gentoo.org/961743
Signed-off-by: Kerin Millar <kfm@plushkava.net>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -18,11 +18,25 @@ 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/^#!\K\//$ENV{MY_EPREFIX}\//); END { exit !$f }' "${PN}" \
|
||||
|| die "Failed to prefixify ${PN}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dosbin locale-gen
|
||||
doman *.[0-8]
|
||||
@@ -18,11 +18,25 @@ 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/^#!\K\//$ENV{MY_EPREFIX}\//); END { exit !$f }' "${PN}" \
|
||||
|| die "Failed to prefixify ${PN}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dosbin locale-gen
|
||||
doman *.[0-8]
|
||||
@@ -27,6 +27,16 @@ RDEPEND="
|
||||
!<sys-libs/glibc-2.37-r3
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
# EPREFIX is readonly.
|
||||
local -x MY_EPREFIX=${EPREFIX}
|
||||
|
||||
eapply_user
|
||||
|
||||
perl -pi -e '$f //= ($. == 1 && s/^#!\K\//$ENV{MY_EPREFIX}\//); END { exit !$f }' "${PN}" \
|
||||
|| die "Failed to prefixify ${PN}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dosbin locale-gen
|
||||
doman *.[0-8]
|
||||
|
||||
Reference in New Issue
Block a user