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.

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