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.

156 lines
3.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../ncurses/ncurses.conf
  5. # Copyright (C) 2006 - 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. prefix=
  17. set_confopt
  18. if ! atstage native; then
  19. var_append extraconfopt " " "--without-cxx --without-cxx-binding"
  20. fi
  21. # saving our local patches and empty the patchfiles variable
  22. localpatches=$patchfiles
  23. patchfiles=
  24. # append official patches
  25. for x in `match_source_file -p 'patch'` ; do
  26. var_append patchfiles " " "$x"
  27. done
  28. # append our local patches
  29. var_append patchfiles " " "$localpatches"
  30. # on dietlibc we won't use NLS
  31. [ "$SDECFG_LIBC" != dietlibc ] || SDECFG_DISABLE_NLS=1
  32. # on systems having NLS support we build ncurses twice
  33. if [ "$SDECFG_DISABLE_NLS" != 1 ]; then
  34. buildloops=2
  35. fi
  36. # sparc64 may need extra love
  37. if [ "$arch" == "sparc64" -a "$SDECFG_SPARC64_32BIT" = 1 ]; then
  38. # double the loops
  39. buildloops=$( expr $buildloops \* 2 )
  40. fi
  41. configscript="../configure"
  42. ncurses_preconf() {
  43. if [ $buildloop -eq 1 ]; then
  44. # first loop is easy, always simply narrowc
  45. mkdir -p narrowc
  46. cd narrowc
  47. else
  48. cd ..
  49. # then the things get a bit uglier
  50. if [ "$SDECFG_DISABLE_NLS" != 1 ]; then
  51. # NLS support
  52. if [ $buildloop -eq 2 ]; then
  53. # loop 2: normal wide
  54. mkdir -p widec
  55. cd widec
  56. var_append confopt " " "--enable-widec"
  57. var_append makeinstopt " " "includedir=$includedir/ncursesw"
  58. elif [ $buildloop -eq 3 ]; then
  59. # loop 3: altered arch, narrow.
  60. var_remove GCC_WRAPPER_INSERT ' ' '-m64'
  61. alter_arch
  62. mkdir -p narrowc_32
  63. cd narrowc_32
  64. var_remove makeinstopt " " "includedir=$includedir/ncursesw"
  65. else
  66. # loop 4: alreday altered arch, wide.
  67. mkdir -p widec_32
  68. cd widec_32
  69. var_append confopt " " "--enable-widec"
  70. var_append makeinstopt " " "includedir=$includedir/ncursesw"
  71. fi
  72. else
  73. # no NLS support
  74. # loop 2: altered arch, narrow.
  75. var_remove GCC_WRAPPER_INSERT ' ' '-m64'
  76. alter_arch
  77. mkdir -p narrowc_32
  78. cd narrowc_32
  79. fi
  80. fi
  81. }
  82. hook_add preconf 3 "ncurses_preconf"
  83. [ "$SDECFG_STATIC" != 1 ] && var_append extraconfopt " " "--with-shared"
  84. var_append extraconfopt " " "--with-normal"
  85. # Fine-Tuning:
  86. #
  87. # make tic use symbolic links not hard links
  88. var_append extraconfopt " " "--enable-symlinks"
  89. # Extensions:
  90. #
  91. # compile with SIGWINCH handler
  92. var_append extraconfopt " " "--enable-sigwinch"
  93. # Development Code:
  94. #
  95. # compile with hard-tabs code
  96. var_append extraconfopt " " "--enable-hard-tabs"
  97. # Experimental Code:
  98. #
  99. # compile with $COLORFGBG code
  100. var_append extraconfopt " " "--enable-colorfgbg"
  101. # always create compatibility symlinks for curses
  102. make_curses_symlinks() {
  103. echo "Creating compatibility symlinks for curses."
  104. if [ "$SDECFG_STATIC" != 1 ]; then
  105. ln -svf libncurses.so $root$libdir/libcurses.so
  106. fi
  107. ln -svf libncurses.a $root$libdir/libcurses.a
  108. }
  109. hook_add postmake 5 "make_curses_symlinks"
  110. remove_include_termcap() {
  111. echo "Removing 'termcap.h' from include/Makefile for 'make install'."
  112. sed -i 's,termcap.h,,g' include/Makefile
  113. }
  114. make_termcap_symlinks() {
  115. echo "Creating compatibility symlinks for termcap."
  116. if [ "$SDECFG_STATIC" != 1 ]; then
  117. ln -svf libncurses.so $root$libdir/libtermcap.so
  118. fi
  119. ln -svf libncurses.a $root$libdir/libtermcap.a
  120. }
  121. if pkginstalled termcap ; then
  122. echo_status "Found termcap package ->" \
  123. "disable ncurses internal termcap library."
  124. var_append extraconfopt " " "--disable-termcap"
  125. hook_add inmake 5 "remove_include_termcap"
  126. else
  127. hook_add postmake 6 "make_termcap_symlinks"
  128. fi