mirror of the now-defunct rocklinux.org
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.

79 lines
3.0 KiB

  1. #!/bin/bash
  2. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  3. #
  4. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  5. # Please add additional copyright information _after_ the line containing
  6. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  7. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  8. #
  9. # ROCK Linux: rock-src/package/base/bash/bash.conf
  10. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  11. #
  12. # This program is free software; you can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; either version 2 of the License, or
  15. # (at your option) any later version. A copy of the GNU General Public
  16. # License can be found at Documentation/COPYING.
  17. #
  18. # Many people helped and are helping developing ROCK Linux. Please
  19. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  20. # file for details.
  21. #
  22. # --- ROCK-COPYRIGHT-NOTE-END ---
  23. patchfiles="`ls $confdir/$xpkg/*.patch 2>/dev/null | tr '\n' ' '` $patchfiles"
  24. # From http://www.linuxfromscratch.org/lfs/view/stable/chapter05/bash.html:
  25. # This option turns off the use of Bash's memory allocation (malloc) function
  26. # which is known to cause segmentation faults. By turning this option off,
  27. # Bash will use the malloc functions from Glibc which are more stable.
  28. var_append extraconfopt " " "--without-bash-malloc"
  29. pkginstalled readline && var_append extraconfopt " " "--with-installed-readline"
  30. if [ $stagelevel -le 2 ] ; then
  31. hook_add preconf 5 "bash_preconf"
  32. bash_preconf() {
  33. echo "bash_cv_sys_named_pipes=yes" > config.cache
  34. # If not set in cross-builds, bash would use its own implementation
  35. # of getcwd, which causes problems for stage 3 builds.
  36. echo "bash_cv_getcwd_malloc=yes" >> config.cache
  37. }
  38. var_append extraconfopt " " "--cache-file=config.cache"
  39. fi
  40. var_append INSTALL_WRAPPER_FILTER "|" \
  41. 'sed "s,share/man/man1/bash.1\$,share/man/man1/'$xpkg'.1,"'
  42. var_append INSTALL_WRAPPER_FILTER "|" \
  43. 'sed "s,share/man/man1/bashbug.1\$,share/man/man1/'${xpkg/bash/bashbug}'.1,"'
  44. var_append INSTALL_WRAPPER_FILTER "|" \
  45. 'sed "s,share/info/bash.info\$,share/info/'$xpkg'.info,"'
  46. var_append INSTALL_WRAPPER_FILTER "|" \
  47. 'sed "s,bin/bashbug\$,bin/'${xpkg/bash/bashbug}',"'
  48. var_append INSTALL_WRAPPER_FILTER "|" \
  49. 'sed "s,usr/bin/bash\$,bin/'$xpkg',"'
  50. postmake="pkg_bash_postmake"
  51. pkg_bash_postmake() {
  52. if [ $xpkg = "$ROCKCFG_PKG_BASH_DEFAULT" ]; then
  53. echo "Creating 'usr/bin/which' and 'bin/sh' ..."
  54. # Using the filters here would create recursive symlinks.
  55. INSTALL_WRAPPER_FILTER=
  56. ln -sfv $xpkg $root/bin/bash
  57. ln -sfv $xpkg $root/bin/sh
  58. ln -sfv $xpkg.1 $root/usr/share/man/man1/bash.1
  59. ln -sfv $xpkg.info $root/usr/share/info/bash.info
  60. ln -sfv ${xpkg/bash/bashbug} $root/usr/bin/bashbug
  61. ln -sfv ${xpkg/bash/bashbug}.1 $root/usr/share/man/man1/bashbug.1
  62. echo -e '#!/bin/bash\ntype -p "$@"' > $root/usr/bin/which
  63. chmod +x $root/usr/bin/which
  64. fi
  65. if [ "$ROCKCFG_CREATE_DOCS" != 0 ] ; then
  66. echo "Unpacking bash documentation ..."
  67. tar $taropt $archdir/bash-doc-$ver.tar.bz2
  68. fi
  69. }