commit:     0fcf2e327095c1329a4044950cadfda036db8245
Author:     Marty E. Plummer <hanetzer <AT> protonmail <DOT> com>
AuthorDate: Fri Dec 29 11:02:09 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Dec 29 18:21:44 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fcf2e32

sys-libs/musl: prefixify build

Currently building a musl libc toolchain inside of gentoo prefix with
crossdev will fail, due to installing files outside of the prefix. Added
${EPREFIX} and ${ED} where apropriate fixed this issue.

Tested in a prefix with toolchain x86_64-gentoo-linux-musl, and tested on bare
gentoo with x86_64-gentoo-linux-musl.

Acked-by: blueness
Package-Manager: Portage-2.3.19, Repoman-2.3.6
Signed-off-by: Marty E. Plummer <hanetzer <AT> protonmail.com>

Closes: https://bugs.gentoo.org/642612
Closes: https://github.com/gentoo/gentoo/pull/6678

 sys-libs/musl/{musl-9999.ebuild => musl-1.1.18-r1.ebuild} | 4 ++--
 sys-libs/musl/musl-9999.ebuild                            | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys-libs/musl/musl-9999.ebuild 
b/sys-libs/musl/musl-1.1.18-r1.ebuild
similarity index 96%
copy from sys-libs/musl/musl-9999.ebuild
copy to sys-libs/musl/musl-1.1.18-r1.ebuild
index 9e0e184d656..c4a1c90aaf5 100644
--- a/sys-libs/musl/musl-9999.ebuild
+++ b/sys-libs/musl/musl-1.1.18-r1.ebuild
@@ -59,7 +59,7 @@ src_configure() {
        just_headers && export CC=true
 
        local sysroot
-       is_crosscompile && sysroot=/usr/${CTARGET}
+       is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
        ./configure \
                --target=${CTARGET} \
                --prefix=${sysroot}/usr \
@@ -88,7 +88,7 @@ src_install() {
        # musl provides ldd via a sym link to its ld.so
        local sysroot
        is_crosscompile && sysroot=/usr/${CTARGET}
-       local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
+       local ldso=$(basename "${ED}"${sysroot}/lib/ld-musl-*)
        dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
 
        if [[ ${CATEGORY} != cross-* ]] ; then

diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild
index 9e0e184d656..c4a1c90aaf5 100644
--- a/sys-libs/musl/musl-9999.ebuild
+++ b/sys-libs/musl/musl-9999.ebuild
@@ -59,7 +59,7 @@ src_configure() {
        just_headers && export CC=true
 
        local sysroot
-       is_crosscompile && sysroot=/usr/${CTARGET}
+       is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
        ./configure \
                --target=${CTARGET} \
                --prefix=${sysroot}/usr \
@@ -88,7 +88,7 @@ src_install() {
        # musl provides ldd via a sym link to its ld.so
        local sysroot
        is_crosscompile && sysroot=/usr/${CTARGET}
-       local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
+       local ldso=$(basename "${ED}"${sysroot}/lib/ld-musl-*)
        dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
 
        if [[ ${CATEGORY} != cross-* ]] ; then

Reply via email to