From 1d19e36ea385356b333c07f2005b1fabedcb1ce1 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Wed, 23 Jun 2021 20:39:58 +0200 Subject: [PATCH] sys-libs/glibc: unbreak USE=compile-locales USE=compile-locales has two errors: 1) Looks for locale.gen in the build tree where there is none. 2) Looks for locale src in the host tree, which may be old or non existent. This fixes those problems by saving a copy of EROOT in pkg_setup for later use when building locales. Also point to locale src using I18NPATH variable Signed-off-by: Joakim Tjernlund --- sys-libs/glibc/glibc-2.33.ebuild | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys-libs/glibc/glibc-2.33.ebuild b/sys-libs/glibc/glibc-2.33.ebuild index c97ef6b4c66..b825881b66c 100644 --- a/sys-libs/glibc/glibc-2.33.ebuild +++ b/sys-libs/glibc/glibc-2.33.ebuild @@ -724,6 +724,7 @@ pkg_pretend() { pkg_setup() { # see bug 682570 [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup + LOCALE_GEN_ROOT="${EROOT}" # For locale-gen later } # src_unpack @@ -1175,9 +1176,12 @@ run_locale_gen() { if [[ "${root}" == "--inplace-glibc" ]] ; then inplace="--inplace-glibc" root="$2" + # Use locale src in build tree + export I18NPATH="${ED}"/usr/share/i18n fi - local locale_list="${root}/etc/locale.gen" + # Always use hosts(EROOT) locale config + local locale_list="${LOCALE_GEN_ROOT}/etc/locale.gen" pushd "${ED}"/$(get_libdir) >/dev/null -- 2.31.1