From a0b8f3652b5a1aa4dc766d9652fb72aeb15e0a32 Mon Sep 17 00:00:00 2001 From: Benda Xu Date: Thu, 2 Jun 2016 17:07:09 +0900 Subject: sys-libs/glibc/files/eblits: Prefix support. Bug: 473728 Package-Manager: portage-2.2.28 --- sys-libs/glibc/files/eblits/common.eblit | 2 +- sys-libs/glibc/files/eblits/pkg_postinst.eblit | 8 ++++---- sys-libs/glibc/files/eblits/pkg_preinst.eblit | 4 ++-- sys-libs/glibc/files/eblits/src_configure.eblit | 14 +++++++------- sys-libs/glibc/files/eblits/src_install.eblit | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys-libs/glibc/files/eblits/common.eblit b/sys-libs/glibc/files/eblits/common.eblit index c0a989cd150b..e56f10eb52ba 100644 --- a/sys-libs/glibc/files/eblits/common.eblit +++ b/sys-libs/glibc/files/eblits/common.eblit @@ -27,7 +27,7 @@ alt_headers() { } alt_build_headers() { if [[ -z ${ALT_BUILD_HEADERS} ]] ; then - ALT_BUILD_HEADERS=$(alt_headers) + ALT_BUILD_HEADERS="${EPREFIX}$(alt_headers)" if tc-is-cross-compiler ; then ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers) if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then diff --git a/sys-libs/glibc/files/eblits/pkg_postinst.eblit b/sys-libs/glibc/files/eblits/pkg_postinst.eblit index 074cf3a0b91b..8178fa1fdbab 100644 --- a/sys-libs/glibc/files/eblits/pkg_postinst.eblit +++ b/sys-libs/glibc/files/eblits/pkg_postinst.eblit @@ -6,9 +6,9 @@ eblit-glibc-pkg_postinst() { # nothing to do if just installing headers just_headers && return - if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then # Generate fastloading iconv module configuration file. - "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" fi if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then @@ -17,10 +17,10 @@ eblit-glibc-pkg_postinst() { /sbin/telinit U 2>/dev/null # if the host locales.gen contains no entries, we'll install everything - local locale_list="${ROOT}etc/locale.gen" + local locale_list="${EROOT}etc/locale.gen" 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" + locale_list="${EROOT}usr/share/i18n/SUPPORTED" fi locale-gen -j $(makeopts_jobs) --config "${locale_list}" fi diff --git a/sys-libs/glibc/files/eblits/pkg_preinst.eblit b/sys-libs/glibc/files/eblits/pkg_preinst.eblit index cb8f461b0d12..0c78b55f6ac8 100644 --- a/sys-libs/glibc/files/eblits/pkg_preinst.eblit +++ b/sys-libs/glibc/files/eblits/pkg_preinst.eblit @@ -11,7 +11,7 @@ glibc_sanity_check() { cd / #228809 - # We enter ${D} so to avoid trouble if the path contains + # We enter ${ED} so to avoid trouble if the path contains # special characters; for instance if the path contains the # colon character (:), then the linker will try to split it # and look for the libraries in an unexpected place. This can @@ -53,7 +53,7 @@ eblit-glibc-pkg_preinst() { fi [[ ${ROOT} != "/" ]] && return 0 - [[ -d ${D}/$(get_libdir) ]] || return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 glibc_sanity_check # For newer EAPIs, this was run in pkg_pretend. diff --git a/sys-libs/glibc/files/eblits/src_configure.eblit b/sys-libs/glibc/files/eblits/src_configure.eblit index be6f52cb99d1..5ecf9ab737a9 100644 --- a/sys-libs/glibc/files/eblits/src_configure.eblit +++ b/sys-libs/glibc/files/eblits/src_configure.eblit @@ -105,11 +105,11 @@ glibc_do_configure() { $(use_enable profile) $(use_with gd) --with-headers=$(alt_build_headers) - --prefix=/usr - --libdir=/usr/$(get_libdir) - --mandir=/usr/share/man - --infodir=/usr/share/info - --libexecdir=/usr/$(get_libdir)/misc/glibc + --prefix="${EPREFIX}/usr" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion="$(glibc_banner)" $(use_multiarch || echo --disable-multi-arch) @@ -130,7 +130,7 @@ glibc_do_configure() { # There is no configure option for this and we need to export it # since the glibc build will re-run configure on itself - export libc_cv_slibdir=/$(get_libdir) + export libc_cv_slibdir="${EPREFIX}/$(get_libdir)" # We take care of patching our binutils to use both hash styles, # and many people like to force gnu hash style only, so disable @@ -236,7 +236,7 @@ toolchain-glibc_headers_configure() { --build=${CBUILD_OPT:-${CBUILD}} --host=${CTARGET_OPT:-${CTARGET}} --with-headers=$(alt_build_headers) - --prefix=/usr + --prefix="${EPREFIX}/usr" ${EXTRA_ECONF} ) diff --git a/sys-libs/glibc/files/eblits/src_install.eblit b/sys-libs/glibc/files/eblits/src_install.eblit index 4a8056071a40..f0017fa53b2a 100644 --- a/sys-libs/glibc/files/eblits/src_install.eblit +++ b/sys-libs/glibc/files/eblits/src_install.eblit @@ -102,7 +102,7 @@ toolchain-glibc_src_install() { has ${ldso_abi} $(get_install_abis) || continue ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" - if [[ ! -L ${D}/${ldso_name} && ! -e ${D}/${ldso_name} ]] ; then + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} fi done @@ -111,7 +111,7 @@ toolchain-glibc_src_install() { # binary to be setuid. This is because the default owners/perms will be # exactly what we want. if in_iuse suid && ! use suid ; then - find "${D}" -name pt_chown -exec chmod -s {} + + find "${ED}" -name pt_chown -exec chmod -s {} + fi ################################################################# -- cgit v1.2.3-65-gdbad