aboutsummaryrefslogtreecommitdiff
path: root/network/elinks/option-patches
diff options
context:
space:
mode:
authorDave Woodfall <dave@slackbuilds.org>2022-04-24 21:14:31 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-30 13:51:48 +0700
commit4b6c4b9509a3a2f01a039fb9010603609e58198f (patch)
tree680683c67d4e4df957946589afeb663b22610c5d /network/elinks/option-patches
parent9fdb3f4dd763580a9d261871a1eb1bf3bc670f11 (diff)
network/elinks: Add Patches: disable suspend, -no-connect
2 contributed patches. VERSION renumbering with commit hash. Not likely to change unless felinks fixes are back-ported though. Change download URL. Extra notes in README. Tidy up slackbuild a bit. Move stuff. Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/elinks/option-patches')
-rw-r--r--network/elinks/option-patches/0010-disable-suspend-pause.patch19
-rw-r--r--network/elinks/option-patches/0020-no-connect-by-default.patch62
2 files changed, 81 insertions, 0 deletions
diff --git a/network/elinks/option-patches/0010-disable-suspend-pause.patch b/network/elinks/option-patches/0010-disable-suspend-pause.patch
new file mode 100644
index 0000000000..9a85ad5669
--- /dev/null
+++ b/network/elinks/option-patches/0010-disable-suspend-pause.patch
@@ -0,0 +1,19 @@
+diff -Naur elinks-git20131231/src/terminal/kbd.c elinks-git20131231.patched/src/terminal/kbd.c
+--- elinks-git20131231/src/terminal/kbd.c 2013-12-18 10:38:57.000000000 -0500
++++ elinks-git20131231.patched/src/terminal/kbd.c 2020-06-25 01:32:29.333043353 -0400
+@@ -263,6 +263,15 @@
+ t.c_lflag |= TOSTOP;
+ #endif
+ t.c_oflag |= OPOST;
++
++ /* 20200625 bkw: patched code disables suspend (normally ^Z),
++ pause (normally ^S) and resume (normally ^Q). This allows
++ us to use those keys for normal keybinds. If we're running
++ elinks in tmux or screen, or in X with multiple terminals,
++ or the Linux console (multiple consoles), we don't really
++ need ^Z anyway. */
++ t.c_cc[VSUSP] = t.c_cc[VSTOP] = t.c_cc[VSTART] = vdisable;
++
+ if (tcsetattr(itrm->in.ctl, TCSANOW, &t)) return -1;
+
+ return 0;
diff --git a/network/elinks/option-patches/0020-no-connect-by-default.patch b/network/elinks/option-patches/0020-no-connect-by-default.patch
new file mode 100644
index 0000000000..e36c9aa006
--- /dev/null
+++ b/network/elinks/option-patches/0020-no-connect-by-default.patch
@@ -0,0 +1,62 @@
+diff -Naur elinks-git20131231/doc/man/man1/elinks.1.in elinks-git20131231.patched/doc/man/man1/elinks.1.in
+--- elinks-git20131231/doc/man/man1/elinks.1.in 2013-12-18 10:38:57.000000000 -0500
++++ elinks-git20131231.patched/doc/man/man1/elinks.1.in 2020-06-25 03:02:54.523412259 -0400
+@@ -141,12 +141,13 @@
+ Look up specified host and print all DNS resolved IP addresses\&.
+ .RE
+ .PP
+-\fB\-no\-connect\fR \fI[0|1]\fR (default: 0)
++\fB\-no\-connect\fR \fI[0|1]\fR (default: 1)
+ .RS 4
+ Run
+ ELinks
+-as a separate instance instead of connecting to an existing instance\&. Note that normally no runtime state files (bookmarks, history, etc\&.) are written to the disk when this option is used\&. See also
+-\-touch\-files\&.
++as a separate instance instead of connecting to an existing instance\&. Enabled
++by default in this build; use \fB\-no\-connect 0\fR to connect to an existing
++instance\&.
+ .RE
+ .PP
+ \fB\-no\-home\fR \fI[0|1]\fR (default: 0)
+@@ -238,13 +239,13 @@
+ Print given URLs in source form to stdout\&.
+ .RE
+ .PP
+-\fB\-touch\-files\fR \fI[0|1]\fR (default: 0)
++\fB\-touch\-files\fR \fI[0|1]\fR (default: 1)
+ .RS 4
+ When enabled, runtime state files (bookmarks, history, etc\&.) are written to disk, even when
+ \-no\-connect
+ or
+ \-session\-ring
+-is used\&. The option has no effect if not used in conjunction with any of these options\&.
++is used\&. The option has no effect if not used in conjunction with any of these options\&. This option is enabled by default; use \fB\-touch\-files 0\fR to disable\&.
+ .RE
+ .PP
+ \fB\-verbose\fR \fI<num>\fR (default: 1)
+diff -Naur elinks-git20131231/src/config/cmdline.c elinks-git20131231.patched/src/config/cmdline.c
+--- elinks-git20131231/src/config/cmdline.c 2013-12-18 10:38:57.000000000 -0500
++++ elinks-git20131231.patched/src/config/cmdline.c 2020-06-25 02:58:31.595442844 -0400
+@@ -848,11 +848,9 @@
+ "addresses.")),
+
+ INIT_OPT_BOOL("", N_("Run as separate instance"),
+- "no-connect", 0, 0,
++ "no-connect", 0, 1,
+ N_("Run ELinks as a separate instance instead of connecting "
+- "to an existing instance. Note that normally no runtime state "
+- "files (bookmarks, history, etc.) are written to the disk "
+- "when this option is used. See also -touch-files.")),
++ "to an existing instance. Enabled by default in this build.")),
+
+ INIT_OPT_BOOL("", N_("Disable use of files in ~/.elinks"),
+ "no-home", 0, 0,
+@@ -921,7 +919,7 @@
+ INIT_OPT_COMMAND("", NULL, "stdin", OPT_HIDDEN, redir_cmd, NULL),
+
+ INIT_OPT_BOOL("", N_("Touch files in ~/.elinks when running with -no-connect/-session-ring"),
+- "touch-files", 0, 0,
++ "touch-files", 0, 1,
+ N_("When enabled, runtime state files (bookmarks, history, "
+ "etc.) are written to disk, even when -no-connect or "
+ "-session-ring is used. The option has no effect if not used "