From 4cbcc855382a06088e2f016f62cafdbcb7e40665 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 20 Mar 2022 00:40:44 +0000 Subject: gentoo resync : 20.03.2022 --- sys-libs/musl/musl-9999.ebuild | 46 +++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 25 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 6a5e2688dd5a..34fc6172b105 100644 --- a/sys-libs/musl/musl-9999.ebuild +++ b/sys-libs/musl/musl-9999.ebuild @@ -1,15 +1,15 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit eapi8-dosym flag-o-matic toolchain-funcs +inherit eapi8-dosym flag-o-matic toolchain-funcs prefix if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="git://git.musl-libc.org/musl" inherit git-r3 else SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz" - KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86" + KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~x86" fi GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab" GETENT_FILE="musl-getent-${GETENT_COMMIT}.c" @@ -76,11 +76,11 @@ src_configure() { just_headers && export CC=true local sysroot - is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET} + is_crosscompile && sysroot=/usr/${CTARGET} ./configure \ --target=${CTARGET} \ - --prefix=${sysroot}/usr \ - --syslibdir=${sysroot}/lib \ + --prefix=${EPREFIX}${sysroot}/usr \ + --syslibdir=${EPREFIX}${sysroot}/lib \ --disable-gcc-wrapper || die } @@ -111,8 +111,8 @@ 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-*) - dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd + local ldso=$(basename "${ED}"${sysroot}/lib/ld-musl-*) + dosym ${EPREFIX}${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd if [[ ${CATEGORY} != cross-* ]] ; then # Fish out of config: @@ -121,24 +121,20 @@ src_install() { # and print $(ARCH)$(SUBARCH). local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak) - if [[ ! -e "${ED}"/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 /lib/ld-musl-${arch}.so.1 - - # If it's still a dead symlnk, OK, we really do need to abort. - [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die - fi - - cp "${FILESDIR}"/ldconfig.in-r1 "${T}"/ldconfig.in || die + # The musl build system seems to create a symlink: + # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute) + # During cross or within prefix, there's no guarantee that the host is + # using musl so that file may not exist. Use a relative symlink within + # ${D} instead. + rm -f "${ED}"/lib/ld-musl-${arch}.so.1 || die + dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1 + + # If it's still a dead symlnk, OK, we really do need to abort. + [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die + + cp "${FILESDIR}"/ldconfig.in-r3 "${T}"/ldconfig.in || die sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die + eprefixify "${T}"/ldconfig into / dosbin "${T}"/ldconfig into /usr -- cgit v1.2.3