1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/bash/bash.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
15 # work around erros such as: -ReneR
16 # mkbuiltins.o:(.text+0x768): undefined reference to `x__nldbl_fprintf'
17 # mkbuiltins.o:(.text+0x9e8): undefined reference to `x__nldbl_sprintf'
18 atstage native || var_append makeopt ' ' 'CFLAGS_FOR_BUILD='
20 if ! atstage native; then
21 var_append confopt ' ' '--without-emacs' # tries to run it anyway, so:
26 if [ "$bash_which" = "1" ]; then
27 echo "Creating 'usr/bin/which' and 'bin/sh' ..."
28 echo -e '#!/bin/bash\ntype -p "$@"' > $root/usr/bin/which
29 chmod +x $root/usr/bin/which
31 echo "Creating 'bin/sh' ..."
33 [ -f $root/usr/bin/bash ] &&
34 mv -v $root/usr/bin/bash $root/bin/bash
35 pkginstalled dash || ln -sfv bash $root/bin/sh
39 # historic hack - still needed? -ReneR
40 touch lib/malloc/malloc.c
41 for x in `match_source_file -p 'bash..-...'`; do
42 echo "Applying patch ${x##*/} ..."
47 atstage native || var_append confopt ' ' '--without-lispdir'
48 atstage native || hook_add preconf 5 "echo 'bash_cv_job_control_missing=present' >> config.cache"
49 var_append confopt " " "--without-bash-malloc"
51 [ "$SDECFG_PKG_BASH_PROGCOMP" = 0 ] &&
52 var_append confopt " " "--disable-progcomp"
53 [ "$SDECFG_PKG_BASH_HELP_CMD" = 0 ] &&
54 var_append confopt " " "--disable-help-builtin"
56 hook_add preconf 5 "pkg_bash_preconf"
57 hook_add premake 5 "eval $MAKE $makeopt builtins/builtext.h" # parallel make
58 hook_add postmake 5 "pkg_bash_postmake"