ncurses.mk 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #############################################################
  2. #
  3. # ncurses
  4. # this installs only a few vital termcap entries
  5. #
  6. #############################################################
  7. # Copyright (C) 2002 by Ken Restivo <ken@246gt.com>
  8. # $Id: ncurses.mk,v 1.7 2005/01/03 04:38:13 andersen Exp $
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU Library General Public License as
  12. # published by the Free Software Foundation; either version 2 of the
  13. # License, or (at your option) any later version.
  14. #
  15. # This program is distributed in the hope that it will be useful, but
  16. # WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. # Library General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU Library General Public
  21. # License along with this program; if not, write to the Free Software
  22. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  23. # USA
  24. # TARGETS
  25. NCURSES_VERSION = 5.7
  26. NCURSES_SITE = $(BR2_GNU_MIRROR)/ncurses
  27. NCURSES_INSTALL_STAGING = YES
  28. NCURSES_CONF_OPT = \
  29. --with-shared \
  30. --without-cxx \
  31. --without-cxx-binding \
  32. --without-ada \
  33. --without-progs \
  34. --without-tests \
  35. --disable-big-core \
  36. --without-profile \
  37. --disable-rpath \
  38. --enable-echo \
  39. --enable-const \
  40. --enable-overwrite \
  41. --enable-broken_linker \
  42. --disable-static
  43. ifneq ($(BR2_ENABLE_DEBUG),y)
  44. NCURSES_CONF_OPT += --without-debug
  45. endif
  46. define NCURSES_BUILD_CMDS
  47. $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR)
  48. endef
  49. define NCURSES_PATCH_NCURSES_CONFIG
  50. $(SED) 's^prefix="^prefix="$(STAGING_DIR)^' \
  51. $(STAGING_DIR)/usr/bin/ncurses5-config
  52. endef
  53. NCURSES_POST_STAGING_INSTALL_HOOKS += NCURSES_PATCH_NCURSES_CONFIG
  54. ifeq ($(BR2_HAVE_DEVFILES),y)
  55. define NCURSES_INSTALL_TARGET_DEVFILES
  56. mkdir -p $(TARGET_DIR)/usr/include
  57. cp -dpf $(NCURSES_DIR)/include/curses.h $(TARGET_DIR)/usr/include/curses.h
  58. cp -dpf $(NCURSES_DIR)/include/ncurses_dll.h $(TARGET_DIR)/usr/include/ncurses_dll.h
  59. cp -dpf $(NCURSES_DIR)/include/term.h $(TARGET_DIR)/usr/include/
  60. cp -dpf $(NCURSES_DIR)/include/unctrl.h $(TARGET_DIR)/usr/include/
  61. cp -dpf $(NCURSES_DIR)/include/termcap.h $(TARGET_DIR)/usr/include/
  62. cp -dpf $(NCURSES_DIR)/lib/libncurses.a $(TARGET_DIR)/usr/lib/
  63. (cd $(TARGET_DIR)/usr/lib; \
  64. ln -fs libncurses.a libcurses.a; \
  65. ln -fs libncurses.a libtermcap.a; \
  66. )
  67. (cd $(TARGET_DIR)/usr/include; ln -fs curses.h ncurses.h)
  68. rm -f $(TARGET_DIR)/usr/lib/libncurses.so
  69. (cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.so.$(NCURSES_VERSION) libncurses.so)
  70. endef
  71. endif
  72. ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PANEL),y)
  73. define NCURSES_INSTALL_TARGET_PANEL
  74. cp -dpf $(NCURSES_DIR)/lib/libpanel.so* $(TARGET_DIR)/usr/lib/
  75. endef
  76. endif
  77. ifeq ($(BR2_PACKAGE_NCURSES_TARGET_FORM),y)
  78. define NCURSES_INSTALL_TARGET_FORM
  79. cp -dpf $(NCURSES_DIR)/lib/libform.so* $(TARGET_DIR)/usr/lib/
  80. endef
  81. endif
  82. ifeq ($(BR2_PACKAGE_NCURSES_TARGET_MENU),y)
  83. define NCURSES_INSTALL_TARGET_MENU
  84. cp -dpf $(NCURSES_DIR)/lib/libmenu.so* $(TARGET_DIR)/usr/lib/
  85. endef
  86. endif
  87. define NCURSES_INSTALL_TARGET_CMDS
  88. mkdir -p $(TARGET_DIR)/usr/lib
  89. cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/usr/lib/
  90. $(NCURSES_INSTALL_TARGET_PANEL)
  91. $(NCURSES_INSTALL_TARGET_FORM)
  92. $(NCURSES_INSTALL_TARGET_MENU)
  93. ln -snf /usr/share/terminfo $(TARGET_DIR)/usr/lib/terminfo
  94. mkdir -p $(TARGET_DIR)/usr/share/terminfo/x
  95. cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm $(TARGET_DIR)/usr/share/terminfo/x
  96. cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-color $(TARGET_DIR)/usr/share/terminfo/x
  97. cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-xfree86 $(TARGET_DIR)/usr/share/terminfo/x
  98. mkdir -p $(TARGET_DIR)/usr/share/terminfo/v
  99. cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt100 $(TARGET_DIR)/usr/share/terminfo/v
  100. cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt102 $(TARGET_DIR)/usr/share/terminfo/v
  101. cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt200 $(TARGET_DIR)/usr/share/terminfo/v
  102. cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt220 $(TARGET_DIR)/usr/share/terminfo/v
  103. mkdir -p $(TARGET_DIR)/usr/share/terminfo/a
  104. cp -dpf $(STAGING_DIR)/usr/share/terminfo/a/ansi $(TARGET_DIR)/usr/share/terminfo/a
  105. mkdir -p $(TARGET_DIR)/usr/share/terminfo/l
  106. cp -dpf $(STAGING_DIR)/usr/share/terminfo/l/linux $(TARGET_DIR)/usr/share/terminfo/l
  107. -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libncurses.so*
  108. $(NCURSES_INSTALL_TARGET_DEVFILES)
  109. endef # NCURSES_INSTALL_TARGET_CMDS
  110. $(eval $(call AUTOTARGETS,package,ncurses))