sys-libs/glibc: Complete compile-locale handling, hopefully
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Sat, 3 Aug 2019 22:45:06 +0000 (00:45 +0200)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Sat, 3 Aug 2019 22:45:06 +0000 (00:45 +0200)
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
sys-libs/glibc/glibc-2.30.ebuild
sys-libs/glibc/glibc-9999.ebuild

index 6743802aea090abe3fb46a866f8182ca4102078e..2d1e13c28ace119f065c5fa8fd60fd149743f521 100644 (file)
@@ -1142,6 +1142,9 @@ run_locale_gen() {
        # if the host locales.gen contains no entries, we'll install everything
        local root="$1"
        local locale_list="${root}/etc/locale.gen"
+
+       pushd "${ED}"/$(get_libdir)
+
        if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
                ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
                locale_list="${root}/usr/share/i18n/SUPPORTED"
@@ -1149,6 +1152,8 @@ run_locale_gen() {
 
        locale-gen --jobs $(makeopts_jobs) --config "${locale_list}" \
                --destdir "${root}"
+
+       popd
 }
 
 glibc_do_src_install() {
@@ -1333,6 +1338,7 @@ glibc_do_src_install() {
        # Generate all locales if this is a native build as locale generation
        if use compile-locales && ! is_crosscompile ; then
                run_locale_gen "${ED}"
+               sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
        fi
 }
 
index 0b6964c6a3b4da5db05bd868d6e95d0a3c39347b..4d0a9edb57a0d99a7333abf50b17d23a74c33bcc 100644 (file)
@@ -1142,6 +1142,9 @@ run_locale_gen() {
        # if the host locales.gen contains no entries, we'll install everything
        local root="$1"
        local locale_list="${root}/etc/locale.gen"
+
+       pushd "${ED}"/$(get_libdir)
+
        if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
                ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
                locale_list="${root}/usr/share/i18n/SUPPORTED"
@@ -1149,6 +1152,8 @@ run_locale_gen() {
 
        locale-gen --jobs $(makeopts_jobs) --config "${locale_list}" \
                --destdir "${root}"
+
+       popd
 }
 
 glibc_do_src_install() {
@@ -1333,6 +1338,7 @@ glibc_do_src_install() {
        # Generate all locales if this is a native build as locale generation
        if use compile-locales && ! is_crosscompile ; then
                run_locale_gen "${ED}"
+               sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
        fi
 }