Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] ncurses: add support for 256 colors
@ 2014-12-09 10:58 Thierry Bultel
  2014-12-09 12:21 ` Gustavo Zacarias
  0 siblings, 1 reply; 6+ messages in thread
From: Thierry Bultel @ 2014-12-09 10:58 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thierry Bultel <tbultel@free.fr>
---
 package/ncurses/Config.in  |  7 +++++++
 package/ncurses/ncurses.mk | 14 +++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/package/ncurses/Config.in b/package/ncurses/Config.in
index 44713f9..8d0a4b7 100644
--- a/package/ncurses/Config.in
+++ b/package/ncurses/Config.in
@@ -38,4 +38,11 @@ config BR2_PACKAGE_NCURSES_TARGET_PROGS
 	help
 	  Include ncurses programs in target (clear, reset, tput, ...)
 
+config BR2_PACKAGE_NCURSES_EXT_COLORS
+	bool "ncurses extended colors"
+	select BR2_PACKAGE_NCURSES_WCHAR
+	depends on BR2_USE_WCHAR
+	help
+	  compile for 256-color support
+
 endif
diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
index e7bd967..262ac94 100644
--- a/package/ncurses/ncurses.mk
+++ b/package/ncurses/ncurses.mk
@@ -12,7 +12,7 @@ HOST_NCURSES_DEPENDENCIES =
 NCURSES_PROGS = clear infocmp tabs tic toe tput tset
 NCURSES_LICENSE = MIT with advertising clause
 NCURSES_LICENSE_FILES = README
-NCURSES_CONFIG_SCRIPTS = ncurses$(NCURSES_LIB_SUFFIX)5-config
+NCURSES_CONFIG_SCRIPTS = ncurses$(NCURSES_LIB_SUFFIX)$(NCURSES_ABI_VERSION)-config
 
 NCURSES_CONF_OPTS = \
 	$(if $(BR2_PREFER_STATIC_LIB),--without-shared,--with-shared) \
@@ -107,6 +107,17 @@ define NCURSES_INSTALL_TARGET_PROGS
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_NCURSES_EXT_COLORS),y)
+NCURSES_CONF_OPTS += --enable-ext-colors
+NCURSES_ABI_VERSION = 6
+define NCURSES_INSTALL_TARGET_256_COLORS_TERMINFO
+	cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm+256color $(TARGET_DIR)/usr/share/terminfo/x
+	cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-256color $(TARGET_DIR)/usr/share/terminfo/x
+endef
+else
+NCURSES_ABI_VERSION = 5
+endif
+
 define NCURSES_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/usr/lib
 	$(NCURSES_INSTALL_TARGET_LIBS)
@@ -117,6 +128,7 @@ define NCURSES_INSTALL_TARGET_CMDS
 	cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm $(TARGET_DIR)/usr/share/terminfo/x
 	cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-color $(TARGET_DIR)/usr/share/terminfo/x
 	cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-xfree86 $(TARGET_DIR)/usr/share/terminfo/x
+	$(NCURSES_INSTALL_TARGET_256_COLORS_TERMINFO)
 	mkdir -p $(TARGET_DIR)/usr/share/terminfo/v
 	cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt100 $(TARGET_DIR)/usr/share/terminfo/v
 	cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt102 $(TARGET_DIR)/usr/share/terminfo/v
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-12 22:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09 10:58 [Buildroot] [PATCH 1/1] ncurses: add support for 256 colors Thierry Bultel
2014-12-09 12:21 ` Gustavo Zacarias
2014-12-09 14:48   ` Thierry Bultel
2014-12-11 18:14     ` Yann E. MORIN
2014-12-12 22:43       ` Thierry Bultel
2014-12-12 22:46         ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox