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.

82 lines
2.5 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/ncurses/ncurses.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. libdir=$root/$multilib
  24. includedir=$includedir/ncurses
  25. custmain=ncurses_main
  26. var_append extraconfopt ' ' '--with-shared'
  27. if pkginstalled libtool && [ ${stagelevel} -ge 3 ] ; then
  28. var_append extraconfopt ' ' '--with-libtool'
  29. else
  30. var_append extraconfopt ' ' '--with-normal'
  31. fi
  32. if [ $stagelevel -le 2 ] ; then
  33. var_append extraconfopt ' ' '--without-ada'
  34. var_append extraconfopt ' ' '--without-cxx --without-cxx-bindings'
  35. fi
  36. var_append makeinstopt ' ' "'INSTALL_LIB=\$(INSTALL) -m 755'"
  37. prepatch="bunzip2 < $archdir/termtypes.ti.bz2 > misc/terminfo.src"
  38. remove_include_termcap() {
  39. echo "Removing 'termcap.h' from include/Makefile for 'make install'."
  40. sed -i 's,termcap.h,,g' include/Makefile
  41. }
  42. if pkginstalled termcap ; then
  43. echo_status "Found termcap package ->" \
  44. "disable ncurses internal termcap library."
  45. var_append extraconfopt ' ' '--disable-termcap'
  46. inmake="remove_include_termcap"
  47. else
  48. hook_add postmake 6 "\
  49. ln -svf libncurses.a $libdir/libtermcap.a; \
  50. ln -svf libncurses.so $libdir/libtermcap.so"
  51. hook_add postmake 8 "\
  52. ln -svf ncurses/termcap.h $includedir/../"
  53. fi
  54. hook_add postmake 7 "\
  55. ln -svf libncurses.so $libdir/libcurses.so; \
  56. ln -svf libncurses.a $libdir/libcurses.a; \
  57. ln -svf ncurses/{ncurses,curses,term,unctrl}.h $includedir/../"
  58. ncurses_main() {
  59. ncurses_build
  60. eval "$MAKE distclean"
  61. var_append extraconfopt ' ' '--enable-widec'
  62. includedir=${includedir}w
  63. ncurses_build
  64. }
  65. ncurses_build() {
  66. hook_eval preconf
  67. eval_config_command $( eval echo $confopt )
  68. hook_eval premake
  69. eval "$MAKE $makeopt"
  70. hook_eval inmake
  71. eval "$MAKE $makeinstopt"
  72. hook_eval postmake
  73. }