summaryrefslogtreecommitdiffstats
path: root/shell-term-fm
diff options
context:
space:
mode:
authorIsmael Luceno2020-08-21 19:40:06 +0200
committerIsmael Luceno2020-08-21 19:40:06 +0200
commit75f78e59a060f0f7675b1e654f76da1b8e009002 (patch)
tree9db29e7bb73e3a549438adc013879a1919d2898a /shell-term-fm
parente93a64d5c5fc2b435db4a817e3b45922f6b8fee3 (diff)
bash: Make ncurses and readline optional
Termcap can be used instead of ncurses, so it's optional. Readline not only can be disabled, but also a version is bundled to enable line editing without depending on the system library.
Diffstat (limited to 'shell-term-fm')
-rwxr-xr-xshell-term-fm/bash/CONFIGURE2
-rwxr-xr-xshell-term-fm/bash/DEPENDS19
-rw-r--r--shell-term-fm/bash/HISTORY3
3 files changed, 19 insertions, 5 deletions
diff --git a/shell-term-fm/bash/CONFIGURE b/shell-term-fm/bash/CONFIGURE
index 37d975a576..7f17f520d2 100755
--- a/shell-term-fm/bash/CONFIGURE
+++ b/shell-term-fm/bash/CONFIGURE
@@ -1 +1,3 @@
+config_query_option BASH_OPTS "Enable command line editing?" y \
+ '' --disable-readline &&
config_query BASH_NI_LOGIN "Make non-interactive login shells (started without --login option) parse config files?" n
diff --git a/shell-term-fm/bash/DEPENDS b/shell-term-fm/bash/DEPENDS
index 5efbf19351..8db869bc59 100755
--- a/shell-term-fm/bash/DEPENDS
+++ b/shell-term-fm/bash/DEPENDS
@@ -4,11 +4,20 @@ case "$HOST" in
*-musl) depends libiconv ;;
esac &&
-depends "readline" "--with-installed-readline" &&
-depends "ncurses" "--with-curses"
depends smgl-fhs &&
depends autoconf &&
-
-if spell_ok readline && is_version_less $(installed_version readline) 6.3; then
- force_depends readline
+optional_depends ncurses \
+ --with-curses \
+ --without-curses \
+ 'to use curses instead of termcap' &&
+if ! list_find "$BASH_OPTS" --disable-readline
+then
+ optional_depends readline \
+ --with-installed-readline '' \
+ 'to use system readline (not recommended)' &&
+ if is_depends_enabled "$SPELL" readline && spell_ok readline &&
+ is_version_less $(installed_version readline) 6.3
+ then
+ force_depends readline
+ fi
fi
diff --git a/shell-term-fm/bash/HISTORY b/shell-term-fm/bash/HISTORY
index 81163beb34..05514c7763 100644
--- a/shell-term-fm/bash/HISTORY
+++ b/shell-term-fm/bash/HISTORY
@@ -1,3 +1,6 @@
+2020-08-21 Ismael Luceno <ismael@sourcemage.org>
+ * CONFIGURE, DEPENDS: Made ncurses and readline optional
+
2020-06-28 Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de>
* DETAILS: version 5.0.17