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.

111 lines
3.5 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 - 2020 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. else
  21. var_append extraconfopt " " "--with-cxx-binding --with-cxx-shared --enable-ext-colors"
  22. fi
  23. # no gzip on manpages
  24. var_append extraconfopt " " "--with-manpage-format=normal"
  25. # no debug and no ada
  26. var_append extraconfopt " " "--without-debug --without-ada --without-tests"
  27. # on dietlibc we won't use NLS
  28. [ "$SDECFG_LIBC" != dietlibc ] || SDECFG_DISABLE_NLS=1
  29. ncurses_preconf() {
  30. # Don't install a static library that is not handled by configure:
  31. sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in
  32. }
  33. # functions we use when termcap package is installed
  34. remove_include_termcap() {
  35. echo "Removing 'termcap.h' from include/Makefile for 'make install'."
  36. sed -i 's,termcap.h,,g' include/Makefile
  37. }
  38. make_compat() {
  39. for lib in ncurses form panel menu tinfo; do
  40. rm -vf $root$libdir/lib${lib}.so
  41. echo "INPUT(-l${lib}w)" > $root$libdir/lib${lib}.so
  42. ln -sfv $root$libdir/pkgconfig/${lib}w.pc $root$libdir/pkgconfig/${lib}.pc
  43. done
  44. # our ncurses needs tinfo
  45. echo "INPUT(-lncursesw -ltinfow)" > $root$libdir/libncurses.so
  46. rm -vf $root$libdir/libcursesw.so
  47. echo "INPUT(-lncursesw -ltinfow)" > $root$libdir/libcursesw.so
  48. ln -sfv $root$libdir/libncurses.so $root$libdir/libcurses.so
  49. }
  50. if atstage toolchain; then
  51. var_append confopt ' ' '--prefix=$root --without-debug --without-ada --enable-widec --enable-overwrite'
  52. else
  53. var_append confopt ' ' '--prefix=/$prefix --without-debug --without-normal --enable-widec --enable-overwrite'
  54. hook_add preconf 3 "ncurses_preconf"
  55. [ "$SDECFG_STATIC" != 1 ] && var_append extraconfopt " " "--with-shared"
  56. # Fine-Tuning:
  57. #
  58. # make tic use symbolic links not hard links
  59. var_append extraconfopt " " "--enable-symlinks"
  60. # Extensions:
  61. #
  62. # compile with SIGWINCH handler
  63. var_append extraconfopt " " "--enable-sigwinch"
  64. # Development Code:
  65. #
  66. # compile with hard-tabs code
  67. var_append extraconfopt " " "--enable-hard-tabs"
  68. # Experimental Code:
  69. #
  70. # compile with $COLORFGBG code
  71. var_append extraconfopt " " "--enable-colorfgbg"
  72. # some compat things
  73. hook_add postmake 7 "make_compat"
  74. if pkginstalled termcap ; then
  75. echo_status "Found termcap package ->" \
  76. "disable ncurses internal termcap library."
  77. var_append extraconfopt " " "--disable-termcap"
  78. hook_add inmake 5 "remove_include_termcap"
  79. else
  80. # generate separate terminfo library
  81. var_append extraconfopt " " "--with-termlib"
  82. hook_add postmake 6 " \
  83. ln -svf libncurses.so $root/$libdir/libtermcap.so"
  84. fi
  85. # generate and install .pc files for pkg-config
  86. if pkginstalled pkgconfig; then
  87. var_append extraconfopt " " "--enable-pc-files"
  88. # without this .pc files will get installed into $datadir/pkgconfig
  89. var_append extraconfopt " " "--with-pkg-config-libdir=$libdir/pkgconfig"
  90. fi
  91. fi