OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../bash/bash.conf
  5. # Copyright (C) 2010 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. bash_which=1
  17. pkg_bash_postmake() {
  18. if [ "$bash_which" = "1" ]; then
  19. echo "Creating 'usr/bin/which' and 'bin/sh' ..."
  20. echo -e '#!/bin/bash\ntype -p "$@"' > $root/usr/bin/which
  21. chmod +x $root/usr/bin/which
  22. else
  23. echo "Creating 'bin/sh' ..."
  24. fi
  25. [ -f $root/usr/bin/bash ] && \
  26. mv -v $root/usr/bin/bash $root/bin/bash
  27. ln -sfv bash $root/bin/sh
  28. if [ "$SDECFG_CREATE_DOCS" != 0 ] ; then
  29. echo "Unpacking bash documentation ..."
  30. tar $taropt `match_source_file -p bash-doc`
  31. fi
  32. }
  33. pkg_bash_preconf() {
  34. # historic hack - still needed? -ReneR
  35. touch lib/malloc/malloc.c
  36. for x in `match_source_file -p 'bash.*-.*\.patch'` ; do
  37. echo "Applying patch ${x##*/} ..."
  38. patch -p0 < $x
  39. done
  40. }
  41. pkg_bash_docver=$ver
  42. # avoid to use bash's built-in getcwd because it conflicts with
  43. # the implementation of our fl_wrapper
  44. # see: http://dev.opensde.net/issues/show/9
  45. if atstage cross; then
  46. var_append configcache ' ' 'bash_cv_getcwd_malloc=yes'
  47. fi
  48. var_append confopt " " "--without-bash-malloc"
  49. # use the installed libreadline if possible
  50. if pkginstalled readline; then
  51. var_append extraconfopt ' ' "--with-installed-readline"
  52. fi
  53. [ "$SDECFG_PKG_BASH_PROGCOMP" = 0 ] &&
  54. var_append confopt " " "--disable-progcomp"
  55. [ "$SDECFG_PKG_BASH_HELP_CMD" = 0 ] &&
  56. var_append confopt " " "--disable-help-builtin"
  57. hook_add preconf 5 "pkg_bash_preconf"
  58. hook_add premake 5 "eval $MAKE $makeopt builtins/builtext.h" # parallel make
  59. hook_add postmake 5 "pkg_bash_postmake"