# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/musl/parse-config # Copyright (C) 2004 - 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- if [ "$SDECFG_LIBC" == "musl" ]; then [ "$pkg" != "musl" ] && var_append flist''del '|' "usr/lib[^/]*/charset.alias" # the most typical fix is to config.sub # musl_fix_configsub() { for x; do echo "musl_fix_configsub: adding musl_arch_target support to $x" cp -f $x $x.orig sed -e 's,\([-]\?linux\)-gnu\*,\1-gnu\* | \1-musl\*,g' $x.orig > $x diff -u $x.orig $x || true done } musl_auto_fix_configsub() { grep /config.sub $builddir/untar.txt | while read f; do if ! grep -q '\-musl' $builddir/$f; then musl_fix_configsub $builddir/$f fi done } hook_add postpatch 5 'musl_auto_fix_configsub' case "$pkg" in coreutils) var_append extraconfopt ' ' '--with-included-regex' ;; esac # patching if [ "`echo $confdir/*.patch.musl`" != "$confdir/*.patch.musl" ]; then var_append patchfiles ' ' "`echo $confdir/*.patch.musl`" fi fi