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. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/ncurses/ncurses.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  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; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. libdir=$root/lib
  23. includedir=$includedir/ncurses
  24. custmain=ncurses_main
  25. var_append extraconfopt ' ' '--with-shared'
  26. if pkginstalled libtool && [ ${stagelevel} -gt 3 ] ; then
  27. var_append extraconfopt ' ' '--with-libtool'
  28. else
  29. var_append extraconfopt ' ' '--with-normal'
  30. fi
  31. prepatch="bunzip2 < $archdir/termtypes.ti.bz2 > misc/terminfo.src"
  32. remove_include_termcap() {
  33. echo "Removing 'termcap.h' from include/Makefile for 'make install'."
  34. sed -i 's,termcap.h,,g' include/Makefile
  35. }
  36. if pkginstalled termcap ; then
  37. echo_status "Found termcap package ->" \
  38. "disable ncurses internal termcap library."
  39. var_append extraconfopt ' ' '--disable-termcap'
  40. inmake="remove_include_termcap"
  41. else
  42. hook_add postmake 6 "\
  43. ln -svf libncurses.a $libdir/libtermcap.a; \
  44. ln -svf libncurses.so $libdir/libtermcap.so"
  45. hook_add postmake 8 "\
  46. ln -svf ncurses/termcap.h $includedir/../"
  47. fi
  48. hook_add postmake 7 "\
  49. ln -svf libncurses.so $libdir/libcurses.so; \
  50. ln -svf libncurses.a $libdir/libcurses.a; \
  51. ln -svf ncurses/ncurses.h ncurses/curses.h ncurses/term.h ncurses/unctrl.h $includedir/../"
  52. if [ $stagelevel = 1 ] ; then
  53. var_append extraconfopt ' ' '--without-cxx --without-cxx-bindings'
  54. fi
  55. var_append makeinstopt ' ' "'INSTALL_LIB=\$(INSTALL) -m 755'"
  56. ncurses_main() {
  57. ncurses_build
  58. eval "$MAKE distclean"
  59. var_append extraconfopt ' ' '--enable-widec'
  60. includedir=${includedir}w
  61. ncurses_build
  62. }
  63. ncurses_build() {
  64. hook_eval preconf
  65. eval_config_command $( eval echo $confopt )
  66. hook_eval premake
  67. eval "$MAKE $makeopt"
  68. hook_eval inmake
  69. eval "$MAKE $makeinstopt"
  70. hook_eval postmake
  71. }