commit: b1010d53560610e992ae36e1d5a704b5225a56eb
parent: 45e1c6b5778c8b4b67f69ce5742c9ba620d94802
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 4 May 2019 11:21:58 +0200
sys-libs/gcompat: bump to 0.4.0
Diffstat:
2 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/sys-libs/gcompat/Manifest b/sys-libs/gcompat/Manifest
@@ -1 +1,2 @@
DIST gcompat-0.3.0.tar.xz 20812 BLAKE2B 9783cd5c4fd9da508749043b9f554f8dd9015045aa3b35d18892daf4f5575b8eb5b884c0b3a13a454f6b4ca23f777f49eeeb936150fe75743ef51032f3729d1f SHA512 1f7dd73efd556b7e0f7f1c80751185583de24daf4ab235b488ea1ab98cea2d3a94abed341b922be0bd43c8d539a00176b892c78acf09f2adacb279c09648b3be
+DIST gcompat-0.4.0.tar.xz 22908 BLAKE2B cf42820245d11e91a58882323e546f972abf89323643c9f5f676592d67a5837fa51fecdce768b4e8e77236425bbe3c0a7b21946972685ea855352ef9b139dac8 SHA512 32b4038a031b9af2d5febb547fe9268eb829f40bb2437c94afe5b939e06e7337448ad7f2dce34362829d19672ede54eec8fc34dc755736dbc76f347906ba5ead
diff --git a/sys-libs/gcompat/gcompat-0.4.0.ebuild b/sys-libs/gcompat/gcompat-0.4.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 2018 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib-minimal
+
+DESCRIPTION="The GNU C Library compatibility layer for musl"
+HOMEPAGE="https://code.foxkit.us/adelie/gcompat"
+KEYWORDS="~x86 ~amd64"
+LICENSE="UoI-NCSA"
+SRC_URI="https://distfiles.adelielinux.org/source/gcompat/${P}.tar.xz"
+SLOT="0"
+
+get_loader_name() {
+ # Loosely based on Adélie APKBUILD
+ # TODO: Check against glibc’s logic
+
+ case "$ABI" in
+ x86) echo "ld-linux.so.2" ;;
+ amd64) echo "ld-linux-x86-64.so.2" ;;
+ arm*) echo "ld-linux-armhf.so.3" ;;
+ arm64) echo "ld-linux-aarch64.so.1" ;;
+ mips | powerpc | s390) echo "ld.so.1" ;;
+ esac
+}
+
+get_linker_path() {
+ local arch=$(ldd 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p')
+ echo "/lib/ld-musl-${arch}.so.1"
+}
+
+src_compile() {
+ emake \
+ LINKER_PATH="$(get_linker_path)" \
+ LOADER_NAME="$(get_loader_name)"
+}
+
+src_install() {
+ emake \
+ LINKER_PATH="$(get_linker_path)" \
+ LOADER_NAME="$(get_loader_name)" \
+ DESTDIR="${D}" \
+ install
+}