瀏覽代碼

package/rlwrap: new package

Signed-off-by: Matt Silva <dev@matt-silva.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Matt Silva 1 年之前
父節點
當前提交
0a1f2fce04
共有 5 個文件被更改,包括 89 次插入0 次删除
  1. 3 0
      DEVELOPERS
  2. 1 0
      package/Config.in
  3. 42 0
      package/rlwrap/Config.in
  4. 6 0
      package/rlwrap/rlwrap.hash
  5. 37 0
      package/rlwrap/rlwrap.mk

+ 3 - 0
DEVELOPERS

@@ -2122,6 +2122,9 @@ F:	board/technologic/ts4900/
 F:	configs/ts4900_defconfig
 F:	package/ts4900-fpga/
 
+N:	Matt Silva <dev@matt-silva.com>
+F:	package/rlwrap/
+
 N:	Mauro Condarelli <mc5686@mclink.it>
 F:	package/mc/
 F:	package/python-autobahn/

+ 1 - 0
package/Config.in

@@ -2690,6 +2690,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"

+ 42 - 0
package/rlwrap/Config.in

@@ -0,0 +1,42 @@
+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"
+	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_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

+ 6 - 0
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

+ 37 - 0
package/rlwrap/rlwrap.mk

@@ -0,0 +1,37 @@
+################################################################################
+#
+# rlwrap
+#
+################################################################################
+
+RLWRAP_VERSION = 0.46.1
+RLWRAP_SITE = https://github.com/hanslub42/rlwrap/releases/download/$(RLWRAP_VERSION)
+RLWRAP_LICENSE = GPL-2.0+
+RLWRAP_LICENSE_FILES = AUTHORS COPYING
+
+RLWRAP_DEPENDENCIES = 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
+
+ifeq ($(BR2_PACKAGE_RLWRAP_HOMEGROWN_REDISPLAY),y)
+RLWRAP_CONF_OPTS += --enable-homegrown-redisplay
+else
+RLWRAP_CONF_OPTS += --disable-homegrown-redisplay
+endif
+
+ifeq ($(BR2_PACKAGE_RLWRAP_MULTIBYTE_AWARE),y)
+RLWRAP_CONF_OPTS += --enable-multibyte-aware
+else
+RLWRAP_CONF_OPTS += --disable-multibyte-aware
+endif
+
+define RLWRAP_REMOVE_FILTERS
+	$(RM) -rf $(TARGET_DIR)/usr/share/rlwrap/filters
+endef
+RLWRAP_POST_INSTALL_TARGET_HOOKS += RLWRAP_REMOVE_FILTERS
+
+$(eval $(autotools-package))