sys-libs/glibc/files/eblits: Prefix support.
authorBenda Xu <heroxbd@gentoo.org>
Thu, 2 Jun 2016 08:07:09 +0000 (17:07 +0900)
committerBenda Xu <heroxbd@gentoo.org>
Thu, 2 Jun 2016 08:08:07 +0000 (17:08 +0900)
Bug: 473728

Package-Manager: portage-2.2.28

sys-libs/glibc/files/eblits/common.eblit
sys-libs/glibc/files/eblits/pkg_postinst.eblit
sys-libs/glibc/files/eblits/pkg_preinst.eblit
sys-libs/glibc/files/eblits/src_configure.eblit
sys-libs/glibc/files/eblits/src_install.eblit

index c0a989cd150b56d4f33db804616cd2b9f375cb92..e56f10eb52ba16ec2e9657fb37704ede8941a627 100644 (file)
@@ -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
index 074cf3a0b91b0291144f10b81ae8921f7e08f79a..8178fa1fdbabb9061b5991e59325dc7eceb9b803 100644 (file)
@@ -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
index cb8f461b0d12c37bc194f0e0bdeb99a1a291db58..0c78b55f6ac8c6ad8afaf59e94fe4f28e4e31a3d 100644 (file)
@@ -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.
index be6f52cb99d1d21489f5f8367825695df2e1faf5..5ecf9ab737a9deb5b5d3fe7b4c31c69e588135cd 100644 (file)
@@ -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}
        )
 
index 4a8056071a40a69d54d6a9048dbede76a13cb63d..f0017fa53b2a5115ba3c2409b3a3d82b32c4ad58 100644 (file)
@@ -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
 
        #################################################################