1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/musl/parse-config
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 if [ "$SDECFG_LIBC" == "musl" ]; then
13 [ "$pkg" != "musl" ] && var_append flist''del '|' "usr/lib[^/]*/charset.alias"
15 # the most typical fix is to config.sub
17 musl_fix_configsub() {
19 echo "musl_fix_configsub: adding musl_arch_target support to $x"
21 sed -e 's,\([-]\?linux\)-gnu\*,\1-gnu\* | \1-musl\*,g' $x.orig > $x
22 diff -u $x.orig $x || true
25 musl_auto_fix_configsub() {
26 grep /config.sub $builddir/untar.txt |
28 if ! grep -q '\-musl' $builddir/$f; then
29 musl_fix_configsub $builddir/$f
33 hook_add postpatch 5 'musl_auto_fix_configsub'
36 coreutils) var_append extraconfopt ' ' '--with-included-regex' ;;
40 if [ "`echo $confdir/*.patch.musl`" != "$confdir/*.patch.musl" ]; then
41 echo_status "musl: appending patches"
42 var_append patchfiles ' ' "`echo $confdir/*.patch.musl`"