summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-libs/musl/musl-1.1.24.ebuild6
-rw-r--r--sys-libs/musl/musl-1.2.0.ebuild6
-rw-r--r--sys-libs/musl/musl-9999.ebuild6
3 files changed, 15 insertions, 3 deletions
diff --git a/sys-libs/musl/musl-1.1.24.ebuild b/sys-libs/musl/musl-1.1.24.ebuild
index 7948e4dbf5b..453281e19f2 100644
--- a/sys-libs/musl/musl-1.1.24.ebuild
+++ b/sys-libs/musl/musl-1.1.24.ebuild
@@ -98,7 +98,11 @@ src_install() {
dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
if [[ ${CATEGORY} != cross-* ]] ; then
- local arch=$("${D}"usr/lib/libc.so 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p')
+ # Fish out of config:
+ # ARCH = ...
+ # 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
cp "${FILESDIR}"/ldconfig.in "${T}" || die
sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
diff --git a/sys-libs/musl/musl-1.2.0.ebuild b/sys-libs/musl/musl-1.2.0.ebuild
index e33c6c80913..6aab4a0a5ec 100644
--- a/sys-libs/musl/musl-1.2.0.ebuild
+++ b/sys-libs/musl/musl-1.2.0.ebuild
@@ -98,7 +98,11 @@ src_install() {
dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
if [[ ${CATEGORY} != cross-* ]] ; then
- local arch=$("${D}"usr/lib/libc.so 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p')
+ # Fish out of config:
+ # ARCH = ...
+ # 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
cp "${FILESDIR}"/ldconfig.in "${T}" || die
sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild
index 50beaf64e1a..dc422c9426b 100644
--- a/sys-libs/musl/musl-9999.ebuild
+++ b/sys-libs/musl/musl-9999.ebuild
@@ -98,7 +98,11 @@ src_install() {
dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
if [[ ${CATEGORY} != cross-* ]] ; then
- local arch=$("${D}"usr/lib/libc.so 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p')
+ # Fish out of config:
+ # ARCH = ...
+ # 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
cp "${FILESDIR}"/ldconfig.in "${T}" || die
sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die