From e9d044d4b9b71200a96adfa280848858c0f468c9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 13 Nov 2021 13:10:00 +0000 Subject: gentoo resync : 13.11.2021 --- sys-libs/musl/musl-9999.ebuild | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'sys-libs/musl/musl-9999.ebuild') diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild index 56a2bbbc42f6..5736eadc0fb4 100644 --- a/sys-libs/musl/musl-9999.ebuild +++ b/sys-libs/musl/musl-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit flag-o-matic toolchain-funcs +inherit eapi8-dosym flag-o-matic toolchain-funcs if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="git://git.musl-libc.org/musl" inherit git-r3 @@ -120,7 +120,23 @@ src_install() { # SUBARCH = ... # and print $(ARCH)$(SUBARCH). local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak) - [[ -e "${D}"/lib/ld-musl-${arch}.so.1 ]] || die + + if [[ ! -e "${D}"/lib/ld-musl-${arch}.so.1 ]] ; then + # During cross (using crossdev), when emerging sys-libs/musl, + # if /usr/lib/libc.so.1 doesn't exist on the system, installation + # would fail. + # + # The musl build system seems to create a symlink: + # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute) + # During cross, there's no guarantee that the host is using musl + # so that file may not exist. Use a relative symlink within ${D} + # instead. + dosym8 -r /usr/lib/libc.so.1 /lib/ld-musl-${arch}.so.1 + + # If it's still a dead symlnk, OK, we really do need to abort. + [[ -e "${D}"/lib/ld-musl-${arch}.so.1 ]] || die + fi + cp "${FILESDIR}"/ldconfig.in "${T}" || die sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die into / -- cgit v1.2.3