aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/ldconfig
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-05-06 14:47:42 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-05-06 14:49:13 +0300
commita3d97e95f766c9c378194ee49361b375f093b26f (patch)
tree78d6e93d2a306cb1f8fd8de8646e7b6c305b1a9d /main/musl/ldconfig
parent1307a9dd234c4456d861a237088d1406fd7e7b86 (diff)
downloadaports-a3d97e95f766c9c378194ee49361b375f093b26f.tar.bz2
aports-a3d97e95f766c9c378194ee49361b375f093b26f.tar.xz
main/musl: fix iconv error messages, ldconfig to create symlinks
ldconfig is used by some packages' install script to create the SONAME symlinks in the DESTDIR. do those symlinks for non-system directories.
Diffstat (limited to 'main/musl/ldconfig')
-rw-r--r--main/musl/ldconfig17
1 files changed, 17 insertions, 0 deletions
diff --git a/main/musl/ldconfig b/main/musl/ldconfig
new file mode 100644
index 0000000000..4298c870c8
--- /dev/null
+++ b/main/musl/ldconfig
@@ -0,0 +1,17 @@
+#!/bin/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
+}
+# eat ldconfig options
+while getopts "nNvXvf:C:r:" opt; do
+ :
+done
+shift $(( $OPTIND - 1 ))
+[ $# -gt 0 ] && scan_dirs "$@"