aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/musl/APKBUILD20
-rw-r--r--main/musl/iconv.c8
-rw-r--r--main/musl/ldconfig17
3 files changed, 32 insertions, 13 deletions
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index 60f33a5940..21927ddff6 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.0
-pkgrel=5
+pkgrel=6
pkgdesc="the musl c library (libc) implementation"
url="http://www.musl-libc.org/"
arch="all"
@@ -19,6 +19,7 @@ source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz
1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch
2001-default-to-localtime-timezone-if-TZ-is-undefined.patch
+ ldconfig
getopt_long.c
__stack_chk_fail_local.c
getconf.c
@@ -101,7 +102,7 @@ package() {
}
utils() {
- depends="!uclibc-utils"
+ depends="!uclibc-utils scanelf"
replaces="libiconv"
license="MIT BSD GPL2+"
@@ -113,10 +114,8 @@ utils() {
"$_builddir"/getconf \
"$_builddir"/iconv \
"$subpkgdir"/usr/bin
- cat <<EOF > "$subpkgdir"/sbin/ldconfig
-#!/bin/sh
-exit 0
-EOF
+
+ install -D -m755 "$srcdir"/ldconfig "$subpkgdir"/sbin
}
crosstool() {
@@ -131,28 +130,31 @@ md5sums="c2118c3b6afc77f46a0b23a38a8c3080 musl-1.1.0.tar.gz
a3810683ef61ac27e2f6ec9801280c81 1001-add-basic-dns-record-parsing-functions.patch
83c3bd2a50b1de5ef948704d3f4e0583 1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch
e936297ceb484b2160a4cd8a3a4eb291 2001-default-to-localtime-timezone-if-TZ-is-undefined.patch
+013be8897f27c3909ada59c62020502f ldconfig
61c6c1e84ed1df82abbe6d75e90cf21c getopt_long.c
0df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c
cb82d21fed17a116b44b830adba71c5a getconf.c
2b941c4251cac44988a4abfc50e21267 getent.c
-170ce44d0eca4bcfebdf402f21af5f71 iconv.c"
+45f92f8d59cf84d765de698a9578dbf4 iconv.c"
sha256sums="de1b43019e5361d7577e5e0213e9dde591853e9da5d4a7cd75e2e0d78bf60820 musl-1.1.0.tar.gz
6ce417df2acedd6973580ae7985b337fa6ba58bd26752a01c5dcab1f2ce8925c 0001-v1.1.0-to-c3d9d172.patch
758390768b1bc4159d56908ca332b9640cd0552ed3b4b2b8d4a6d499c54c11a1 1001-add-basic-dns-record-parsing-functions.patch
1c25880095e869b827f02997e864fdf4bf157a4e923e52d97dbd05e657aedb70 1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch
60d7aa78040ee664681e507475129f76e445291863137e568c9a3d11ae8436ce 2001-default-to-localtime-timezone-if-TZ-is-undefined.patch
+398dc26ec82cc6af056c738e8ac62da212ba978229d9839eb8b61f7ce536da4a ldconfig
d9b644ec20bc33e81a7c52b9fcf7973d835923a69faf50f03db45534b811bd96 getopt_long.c
299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c
1b540709f83b7b9a03073b39066810fdb90537d840b50c2016a84bedce038606 getconf.c
68373a55e89ce85c562d941ccf588337d6cc6c9c17689d695f65cd7607134bbe getent.c
-c24f1da0bdb201d0689efcf257d2146209cb036c313436d76ca80984ace01b0c iconv.c"
+f79a2930a2e5bb0624321589edf8b889d1e9b603e01e6b7ae214616605b3fdd7 iconv.c"
sha512sums="72dab085fa56a2f02d407074b9a4c1d409624df74924ed385b174a767113aa0a4112bd22d3eaf465b31a14b8e60a15997d6042421994673977de306ee8738b3d musl-1.1.0.tar.gz
72be49c7b0598954f5ec2f9377d1848f3d22d018f97544f5c9ea96a8cd6e7b654365703832bcbb3e98a8b2d96e445a4fb0a0573ce5355ccd8a03dbeb9acc5dbc 0001-v1.1.0-to-c3d9d172.patch
dad965258daf69371b844f76bfe5a914b0eca0ca76f3fc340b8fd7acf598b5f87bbe6d68b1f43ed0293ee0ed3bfd85d5173ccc169aa6265646248d5b8a906708 1001-add-basic-dns-record-parsing-functions.patch
72cf33738d2cf31f6ec02312bc494d754c17470b519172bb8bd7e2e29ac3b119023088a2b3fbc0dbc2fddd0078ccbae62096106cae361f8c31d6a9950043af25 1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch
8d4cae760895a18e83b5fcbdc925705a6dd98acd2270562ee6c905363096a4111cf3aa324b52a16066e30bddc9ab104883e2b25b5c68396ea27f1c50cb939f0a 2001-default-to-localtime-timezone-if-TZ-is-undefined.patch
+33e13d2242063f3dc9ec199ae9528e469a52ccae4d3726faa3c866e0c7dcf546f69294f9c00307324cee05fd965f84350ae100b8b1138f9d9c8c916de04ab0d1 ldconfig
140f3f20d30bd95ebce8c41b8cc7f616c6cbedf4ea06c729c21014e74f6043796825cc40ebc5180620ea38173afdba23f09ebf6d8b11fa05440b14d23764fca9 getopt_long.c
062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c
06064adfb4dfb45257857113b3f342f77201685f6d3b8e64e203ff618dbb254e7ecb65ecc2d108395f27154825396251b3cfbc678d197d590d93cf79ac5cb56d getconf.c
b35de9847353b273516162ed4828a810c6130fc5b7de44ee4433003b3f99647b25792d9b1c40dfc67069add11f3fb850e5c35d4f1912dccac108059bbbdfd5a2 getent.c
-cef7a6c35c909c70f49935cc84d9e675ff7b63979c222e08f3a70e3f7792607c73f28e8048d61c89f34e13b0144e79e374b73d1727419f6b7c98471c2c338077 iconv.c"
+9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf iconv.c"
diff --git a/main/musl/iconv.c b/main/musl/iconv.c
index bfd6023878..f5d5ce2aa7 100644
--- a/main/musl/iconv.c
+++ b/main/musl/iconv.c
@@ -48,9 +48,9 @@ int main(int argc, char **argv)
cd = iconv_open(to, from);
if (cd == (iconv_t)-1) {
if (iconv_open(to, "WCHAR_T") == (iconv_t)-1)
- fprintf(stderr, "iconv: destination charset %s", to);
+ fprintf(stderr, "iconv: destination charset %s: ", to);
else
- fprintf(stderr, "iconv: source charset %s", from);
+ fprintf(stderr, "iconv: source charset %s: ", from);
perror("");
exit(1);
}
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
f = stdin;
argv[optind] = "(stdin)";
} else if (!(f = fopen(argv[optind], "rb"))) {
- fprintf(stderr, "iconv: %s", argv[optind]);
+ fprintf(stderr, "iconv: %s: ", argv[optind]);
perror("");
err = 1;
continue;
@@ -101,7 +101,7 @@ int main(int argc, char **argv)
if (inb) memmove(buf, in, inb);
}
if (ferror(f)) {
- fprintf(stderr, "iconv: %s", argv[optind]);
+ fprintf(stderr, "iconv: %s: ", argv[optind]);
perror("");
err = 1;
}
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 "$@"