[PATCH v2 1/4] ncurses: Add CONFIG_LIBNCURSES_TERMINFO

Charlie Jenkins thecharlesjenkins at gmail.com
Mon Aug 17 21:48:43 PDT 2026


Introduce a config, CONFIG_LIBNCURSES_TERMINFO, that allows a user to
install additional terminfo files into the target filesystem. This helps
avoid needing to add arbitrary additional terminfo files to the default
list while still providing an easy way to include the files.

Signed-off-by: Charlie Jenkins <thecharlesjenkins at gmail.com>
---
 package/libs/ncurses/Config.in | 13 +++++++++++++
 package/libs/ncurses/Makefile  |  9 +++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/package/libs/ncurses/Config.in b/package/libs/ncurses/Config.in
new file mode 100644
index 0000000000..a18224c30c
--- /dev/null
+++ b/package/libs/ncurses/Config.in
@@ -0,0 +1,13 @@
+# libncurses advanced configuration
+
+menu "Configuration"
+        depends on PACKAGE_libncurses
+
+config LIBNCURSES_TERMINFO
+        string "extra terminfo files"
+	help
+	  Whitespace separated list of terminfo files to install
+	  beyond the default terminfo files.
+
+endmenu
+
diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile
index 2d7fd646ca..7eded9690b 100644
--- a/package/libs/ncurses/Makefile
+++ b/package/libs/ncurses/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2026 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -52,6 +52,10 @@ define Package/libncurses-dev
   TITLE:=Development files for the ncurses library
 endef
 
+define Package/libncurses/config
+        source "$(SOURCE)/Config.in"
+endef
+
 TARGET_CFLAGS += $(FPIC) -std=gnu17
 
 CONFIGURE_ARGS += \
@@ -138,7 +142,8 @@ ifneq ($(HOST_OS),FreeBSD)
 		v/vt102 \
 		x/xterm \
 		x/xterm-color \
-		x/xterm-256color; do \
+		x/xterm-256color \
+		$(call qstrip,$(CONFIG_LIBNCURSES_TERMINFO)); do \
 		$(INSTALL_DIR) $(1)/usr/share/terminfo/`dirname $$$$file`; \
 		$(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
 			$(1)/usr/share/terminfo/$$$$file; \

-- 
2.55.0




More information about the openwrt-devel mailing list