diff mbox series

Add yascreen library

Message ID 20250202200824.2157-1-bbonev@ipacct.com
State Handled Elsewhere
Headers show
Series Add yascreen library | expand

Commit Message

Boian Bonev Feb. 2, 2025, 8:08 p.m. UTC
yascreen - Yet Another Screen Library (curses replacement for daemons and embedded apps)

    small footprint
    does not have external dependencies
    allows both internal and external event loop
    allows stdin/stdout or external input/output (can work over socket)
    supports basic set of telnet sequences, making it suitable for built-in terminal interfaces for daemons
    supports a limited set of input keystroke sequences
    fully unicode compatible (parts of this depend on wcwidth in libc)
    supports utf8 verification of input
    supports utf8 input and wide character input
    supports non-utf8 input mode
    relies only on a limited subset of ansi/xterm ESC sequences, making it compatible with mostly all modern terminals (inspired by linenoise)
    there is no curses API and ancient terminal compatibility, hence less bloat
    there is no autoconf - there is no need to have one
    clean API with opaque private data, usable from C/C++
    easy cross compilation setup (by setting CC, AR, STRIP and RANLIB)

Signed-off-by: Boian Bonev <bbonev@ipacct.com>
---
 package/Config.in              |  1 +
 package/yascreen/Config.in     | 21 ++++++++++++++++++++
 package/yascreen/yascreen.hash |  3 +++
 package/yascreen/yascreen.mk   | 35 ++++++++++++++++++++++++++++++++++
 4 files changed, 60 insertions(+)
 create mode 100644 package/yascreen/Config.in
 create mode 100644 package/yascreen/yascreen.hash
 create mode 100644 package/yascreen/yascreen.mk
diff mbox series

Patch

diff --git a/package/Config.in b/package/Config.in
index 4a323d0908..aef90d54ad 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2365,6 +2365,7 @@  menu "Text and terminal handling"
 	source "package/tclap/Config.in"
 	source "package/termcolor/Config.in"
 	source "package/utf8proc/Config.in"
+	source "package/yascreen/Config.in"
 endmenu
 
 endmenu
diff --git a/package/yascreen/Config.in b/package/yascreen/Config.in
new file mode 100644
index 0000000000..2400bac848
--- /dev/null
+++ b/package/yascreen/Config.in
@@ -0,0 +1,21 @@ 
+config BR2_PACKAGE_YASCREEN
+	bool "yascreen"
+	help
+	  yascreen - Yet Another Screen Library (curses replacement for daemons and embedded apps)
+		small footprint
+		does not have external dependencies
+		allows both internal and external event loop
+		allows stdin/stdout or external input/output (can work over socket)
+		supports basic set of telnet sequences, making it suitable for built-in terminal interfaces for daemons
+		supports a limited set of input keystroke sequences
+		fully unicode compatible (parts of this depend on wcwidth in libc)
+		supports utf8 verification of input
+		supports utf8 input and wide character input
+		supports non-utf8 input mode
+		relies only on a limited subset of ansi/xterm ESC sequences, making it compatible with mostly all modern terminals (inspired by linenoise)
+		there is no curses API and ancient terminal compatibility, hence less bloat
+		there is no autoconf - there is no need to have one
+		clean API with opaque private data, usable from C/C++
+		easy cross compilation setup (by setting CC, AR, STRIP and RANLIB)
+
+	  https://github.com/bbonev/yascreen
diff --git a/package/yascreen/yascreen.hash b/package/yascreen/yascreen.hash
new file mode 100644
index 0000000000..d7e4ac505d
--- /dev/null
+++ b/package/yascreen/yascreen.hash
@@ -0,0 +1,3 @@ 
+# Locally calculated
+sha256  4f69f7f13a8ef4076d499d798b6bddfc1800d30aa19b0354006a23754de54c64  yascreen-2.06.tar.xz
+sha256  e3a994d82e644b03a792a930f574002658412f62407f5fee083f2555c5f23118  LICENSE
diff --git a/package/yascreen/yascreen.mk b/package/yascreen/yascreen.mk
new file mode 100644
index 0000000000..9e4e9db439
--- /dev/null
+++ b/package/yascreen/yascreen.mk
@@ -0,0 +1,35 @@ 
+################################################################################
+#
+# yascreen
+#
+################################################################################
+
+YASCREEN_VERSION = 2.06
+YASCREEN_SOURCE = yascreen-$(YASCREEN_VERSION).tar.xz
+YASCREEN_SITE = https://github.com/bbonev/yascreen/releases/download/v$(YASCREEN_VERSION)
+YASCREEN_LICENSE = GPL-2.0+
+YASCREEN_LICENSE_FILES = LICENSE
+YASCREEN_INSTALL_STAGING = YES
+
+define YASCREEN_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
+endef
+
+define HOST_YASCREEN_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS)
+endef
+
+define YASCREEN_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" PREFIX=/usr install
+endef
+
+define YASCREEN_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" PREFIX=/usr install
+endef
+
+define HOST_YASCREEN_INSTALL_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) PREFIX=/usr install
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))