# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/bash/bash.conf # Copyright (C) 2004 - 2024 The T2 SDE Project # Copyright (C) 1998 - 2003 ROCK Linux 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 --- bash_which=1 # work around erros such as: -ReneR # mkbuiltins.o:(.text+0x768): undefined reference to `x__nldbl_fprintf' # mkbuiltins.o:(.text+0x9e8): undefined reference to `x__nldbl_sprintf' atstage native || var_append makeopt ' ' 'CFLAGS_FOR_BUILD=' if ! atstage native; then var_append confopt ' ' '--without-emacs' # tries to run it anyway, so: export EMACS=false fi pkg_bash_postmake() { if [ "$bash_which" = "1" ]; then echo "Creating 'usr/bin/which' and 'bin/sh' ..." echo -e '#!/bin/bash\ntype -p "$@"' > $root/usr/bin/which chmod +x $root/usr/bin/which fi mkdir -pv $root$datadir/bash-completion/completions [ -f $root/usr/bin/bash ] && mv -v $root/usr/bin/bash $root/bin/bash pkginstalled mksh || ln -sfv bash $root/bin/sh } pkg_bash_preconf() { for x in `match_source_file -p 'bash..-...'`; do echo "Applying patch ${x##*/} ..." patch -p0 < $x done } atstage native || var_append confopt ' ' '--without-lispdir' atstage native || hook_add preconf 5 "echo 'bash_cv_job_control_missing=present' >> config.cache" var_append confopt " " "--without-bash-malloc" [ "$SDECFG_PKG_BASH_PROGCOMP" = 0 ] && var_append confopt " " "--disable-progcomp" [ "$SDECFG_PKG_BASH_HELP_CMD" = 0 ] && var_append confopt " " "--disable-help-builtin" hook_add preconf 5 "pkg_bash_preconf" hook_add premake 5 "eval $MAKE $makeopt builtins/builtext.h" # parallel make hook_add postmake 5 "pkg_bash_postmake"