musl fix
This commit is contained in:
1 parent
428e60bac9
commit
6a3e9a2d87
2 files changed
+39
-3
No files matched your search
@@ -0,0 +1,18 @@
|
||||
#!/bin/busybox sh
|
||||
scan_dirs() {
|
||||
scanelf -qS "$@" | while read SONAME FILE; do
|
||||
TARGET="${FILE##*/}"
|
||||
LINK="${FILE%/*}/$SONAME"
|
||||
case "$FILE" in
|
||||
/lib/*|/usr/lib/*|/usr/local/lib/*) ;;
|
||||
*) [ -h "$LINK" -o ! -e "$LINK" ] && ln -sf "$TARGET" "$LINK"
|
||||
esac
|
||||
done
|
||||
return 0
|
||||
}
|
||||
# eat ldconfig options
|
||||
while getopts "nNvXvf:C:r:" opt; do
|
||||
:
|
||||
done
|
||||
shift $(( $OPTIND - 1 ))
|
||||
[ $# -gt 0 ] && scan_dirs "$@"
|
||||
@@ -7,10 +7,12 @@ description='the musl c library (libc) implementation'
|
||||
email=' aliriza.keskin@pardus.org.tr'
|
||||
maintainer=' aliriza'
|
||||
license=('MIT')
|
||||
source=('https://musl.libc.org/releases/musl-1.2.3.tar.gz')
|
||||
source=('https://musl.libc.org/releases/musl-1.2.3.tar.gz'
|
||||
'ldconfig')
|
||||
depends=( )
|
||||
makedepends=( )
|
||||
md5sums=('a507ae4f7f20bcfe566d8eb65c1af73e')
|
||||
md5sums=('a507ae4f7f20bcfe566d8eb65c1af73e'
|
||||
'SKIP')
|
||||
arch=('x86_64')
|
||||
group=(system.musl)
|
||||
|
||||
@@ -23,7 +25,7 @@ setup(){
|
||||
--enable-wrapper=all \
|
||||
--enable-debug \
|
||||
--syslibdir=/lib64 \
|
||||
--libdir=/lib64/musl \
|
||||
--libdir=/usr/lib64/musl \
|
||||
--includedir=/usr/include/musl
|
||||
}
|
||||
|
||||
@@ -33,5 +35,21 @@ build(){
|
||||
|
||||
package(){
|
||||
make install -j`nproc`
|
||||
# Alpine linux like LDSO
|
||||
local LDSO=$(make -f Makefile --eval "$(echo -e 'print-ldso:\n\t@echo $$(basename $(LDSO_PATHNAME))')" print-ldso)
|
||||
mv -f "$DESTDIR"/usr/lib64/musl/libc.so "$DESTDIR"/lib64/"$LDSO"
|
||||
ln -sf "$LDSO" "$DESTDIR"/lib64/libc.musl-$(uname -m).so.1
|
||||
ln -sf ../../../lib64/"$LDSO" "$DESTDIR"/usr/lib64/musl/libc.so
|
||||
# Glibc compability symlink
|
||||
for i in libc.so.6 libcrypt.so.1 libm.so.6 libpthread.so.0 librt.so.1 libutil.so.1; do
|
||||
ln -sf libc.so "$DESTDIR/usr/lib64/musl/$i"
|
||||
done
|
||||
# ldd
|
||||
cat >>"$DESTDIR"/usr/bin/musl-ldd <<-EOF
|
||||
#!/bin/busybox sh
|
||||
exec /usr/lib64/musl/libc.so --list "\$@"
|
||||
EOF
|
||||
chmod 755 "$DESTDIR"/usr/bin/musl-ldd
|
||||
install ../ldconfig "$DESTDIR"/usr/bin/musl-ldconfig
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user