Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Silva <dev@matt-silva.com>
To: buildroot@buildroot.org
Cc: Matt Silva <dev@matt-silva.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH 1/1] package/rlwrap: new package
Date: Thu, 25 Jan 2024 21:49:14 -0500	[thread overview]
Message-ID: <20240126024914.13825-1-dev@matt-silva.com> (raw)

Signed-off-by: Matt Silva <dev@matt-silva.com>
---
 package/Config.in          |  1 +
 package/rlwrap/Config.in   | 58 ++++++++++++++++++++++++++++++++++++++
 package/rlwrap/rlwrap.hash |  6 ++++
 package/rlwrap/rlwrap.mk   | 48 +++++++++++++++++++++++++++++++
 4 files changed, 113 insertions(+)
 create mode 100644 package/rlwrap/Config.in
 create mode 100644 package/rlwrap/rlwrap.hash
 create mode 100644 package/rlwrap/rlwrap.mk

diff --git a/package/Config.in b/package/Config.in
index 5b8b15fa54..0df3f49781 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2688,6 +2688,7 @@ comment "Utilities"
 	source "package/pinentry/Config.in"
 	source "package/qprint/Config.in"
 	source "package/ranger/Config.in"
+	source "package/rlwrap/Config.in"
 	source "package/rtty/Config.in"
 	source "package/screen/Config.in"
 	source "package/screenfetch/Config.in"
diff --git a/package/rlwrap/Config.in b/package/rlwrap/Config.in
new file mode 100644
index 0000000000..b4a7f7fe3e
--- /dev/null
+++ b/package/rlwrap/Config.in
@@ -0,0 +1,58 @@
+config BR2_PACKAGE_RLWRAP
+	bool "rlwrap"
+	select BR2_PACKAGE_READLINE
+	help
+	  rlwrap is a 'readline wrapper', a small utility that uses the
+	  GNU Readline library to allow the editing of keyboard input
+	  for any command.
+
+	  https://github.com/hanslub42/rlwrap
+
+if BR2_PACKAGE_RLWRAP
+
+config BR2_PACKAGE_RLWRAP_SPY_ON_READLINE
+	bool "spy on readline"
+	default y
+	help
+	  If we want to keep the display tidy when re-sizing the
+	  terminal window or printing multi-line prompts, we have to
+	  know whether or not readline is in horizontal-scroll-mode
+	  (i.e. wheter long lines are scrolled or wrapped). At present,
+	  this involves a look at a private readline variable - if you
+	  feel guilty about that, disable this option
+
+config BR2_PACKAGE_RLWRAP_HOMEGROWN_REDISPLAY
+	bool "homegrown redisplay"
+	default n
+	help
+	  Some people report double echoing of user input. Enabling this
+	  option will cure the problem - though the display will then
+	  flicker over slow connections (cf. BUGS)
+
+config BR2_PACKAGE_RLWRAP_DEBUG
+	bool "enable debug"
+	default n
+	help
+	  Adds a --debug option to rlwrap's repertoire. This will make
+	  rlwrap write debug information to a file /tmp/rlwrap.debug
+	  (cf. the output of rlwrap --help for more info)
+
+config BR2_PACKAGE_RLWRAP_PROC_MOUNTPOINT
+	string "proc mountpoint"
+	default "/proc"
+	help
+	  Mountpoint for Linux-style procfs, used for determination of
+	  slave command's working directory
+
+config BR2_PACKAGE_RLWRAP_MULTIBYTE_AWARE
+	bool "multibyte awareness"
+	default y
+	depends on BR2_USE_WCHAR
+	help
+	  Prevent rlwrap from seeing multibyte characters as multiple
+	  characters
+
+comment "rlwrap multibyte awareness needs a toolchain w/ wchar"
+	depends on !BR2_USE_WCHAR
+
+endif
diff --git a/package/rlwrap/rlwrap.hash b/package/rlwrap/rlwrap.hash
new file mode 100644
index 0000000000..b7005e860e
--- /dev/null
+++ b/package/rlwrap/rlwrap.hash
@@ -0,0 +1,6 @@
+# from https://github.com/hanslub42/rlwrap/releases/tag/0.46.1
+sha256  2711986a1248f6ac59e2aecf5586205835970040d300a42b4bf8014397e73e37  rlwrap-0.46.1.tar.gz
+
+# license files, locally calculated
+sha256  656d25fab58016ac6ac11bb126709e4f860ea063d11795232eb55987172f78ff  AUTHORS
+sha256  32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670  COPYING
diff --git a/package/rlwrap/rlwrap.mk b/package/rlwrap/rlwrap.mk
new file mode 100644
index 0000000000..6f9de8281c
--- /dev/null
+++ b/package/rlwrap/rlwrap.mk
@@ -0,0 +1,48 @@
+################################################################################
+#
+# rlwrap
+#
+################################################################################
+
+# https://github.com/hanslub42/rlwrap/releases/download/0.46.1/rlwrap-0.46.1.tar.gz
+
+RLWRAP_VERSION = 0.46.1
+RLWRAP_SOURCE = rlwrap-$(RLWRAP_VERSION).tar.gz
+RLWRAP_SITE = https://github.com/hanslub42/rlwrap/releases/download/$(RLWRAP_VERSION)
+RLWRAP_LICENSE = GPL-2.0
+RLWRAP_LICENSE_FILES = AUTHORS COPYING
+
+RLWRAP_DEPENDENCIES = readline
+
+# --enable-spy-on-readline
+ifeq ($(BR2_PACKAGE_RLWRAP_SPY_ON_READLINE),y)
+RLWRAP_CONF_OPTS += --enable-spy-on-readline
+else
+RLWRAP_CONF_OPTS += --disable-spy-on-readline
+endif
+
+# --enable-homegrown-redisplay
+ifeq ($(BR2_PACKAGE_RLWRAP_HOMEGROWN_REDISPLAY),y)
+RLWRAP_CONF_OPTS += --enable-homegrown-redisplay
+else
+RLWRAP_CONF_OPTS += --disable-homegrown-redisplay
+endif
+
+# --enable-debug
+ifeq ($(BR2_PACKAGE_RLWRAP_DEBUG),y)
+RLWRAP_CONF_OPTS += --enable-debug
+else
+RLWRAP_CONF_OPTS += --disable-debug
+endif
+
+# --enable-proc-mountpoint
+RLWRAP_CONF_OPTS += --enable-proc-mountpoint=$(BR2_PACKAGE_RLWRAP_PROC_MOUNTPOINT)
+
+# --enable-multibyte-aware
+ifeq ($(BR2_PACKAGE_RLWRAP_MULTIBYTE_AWARE),y)
+RLWRAP_CONF_OPTS += --enable-multibyte-aware
+else
+RLWRAP_CONF_OPTS += --disable-multibyte-aware
+endif
+
+$(eval $(autotools-package))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2024-01-26  2:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26  2:49 Matt Silva [this message]
2024-02-06  9:44 ` [Buildroot] [PATCH 1/1] package/rlwrap: new package Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240126024914.13825-1-dev@matt-silva.com \
    --to=dev@matt-silva.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox