aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/APKBUILD
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2015-05-18 19:20:26 -0500
committerWilliam Pitcock <nenolod@dereferenced.org>2015-05-18 19:20:26 -0500
commit0ee848857083de56a36285494071e75a3d557139 (patch)
tree6b37f0c9a24182a7c9be3c2f07d325bf00796f1c /main/musl/APKBUILD
parent8f1c29fb594b70ca4133402b4ace9933c1b74ad3 (diff)
downloadaports-0ee848857083de56a36285494071e75a3d557139.tar.bz2
aports-0ee848857083de56a36285494071e75a3d557139.tar.xz
main/musl: add subpkg which provides stub libraries for glibc compat
Diffstat (limited to 'main/musl/APKBUILD')
-rw-r--r--main/musl/APKBUILD22
1 files changed, 20 insertions, 2 deletions
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index 398a9b98f1..5d606398f6 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=musl
pkgver=1.1.9
-pkgrel=0
+pkgrel=1
pkgdesc="the musl c library (libc) implementation"
url="http://www.musl-libc.org/"
arch="all"
@@ -10,7 +10,7 @@ license="MIT"
depends=""
depends_dev="!uclibc-dev"
makedepends="$depends_dev"
-subpackages="$pkgname-dev $pkgname-utils $pkgname-dbg"
+subpackages="$pkgname-dev $pkgname-utils $pkgname-dbg libc6-compat:compat"
source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz
ldconfig
@@ -110,6 +110,24 @@ utils() {
install -D -m755 "$srcdir"/ldconfig "$subpkgdir"/sbin
}
+compat() {
+ pkgdesc="compatibility libraries for glibc"
+
+ case "$CARCH" in
+ arm*) _ld="ld-linux-armhf.so.3" ;;
+ x86) _ld="ld-linux.so.2" ;;
+ x86_64) _ld="ld-linux-x86-64.so.2" ;;
+ mips*) _ld="ld.so.1" ;;
+ esac
+
+ mkdir -p "$subpkgdir"/lib
+ gcc -fPIC -shared -nostartfiles -x c /dev/null -o "$subpkgdir/lib/$_ld" -Wl,-soname,"$_ld"
+
+ for i in libc.so.6 libm.so.6 libpthread.so.0 librt.so.1 libutil.so.1; do
+ gcc -fPIC -shared -nostartfiles -x c /dev/null -o "$subpkgdir/lib/$i" -Wl,-soname,"$i"
+ done
+}
+
md5sums="14e8c5ac74f887d53256b3dcaf9b4aaa musl-1.1.9.tar.gz
830d01f7821b978df770b06db3790921 ldconfig
0df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c