<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/86fdc2922ed2b932b8c1d7a676e9ca3acc8ed85a">https://github.com/macports/macports-ports/commit/86fdc2922ed2b932b8c1d7a676e9ca3acc8ed85a</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 86fdc2922ed2b932b8c1d7a676e9ca3acc8ed85a
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Sep 12 19:47:33 2017 +1000
<span style='display:block; white-space:pre;color:#404040;'> libedit: fix misbehaviour with callback-based API
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> rl_callback_read_char does el_set(e, EL_UNBUFFERED, 1) after running the
</span><span style='display:block; white-space:pre;color:#404040;'> client-supplied callback. However, if the callback ran
</span><span style='display:block; white-space:pre;color:#404040;'> rl_callback_handler_remove, this undoes part of what that function did. So,
</span><span style='display:block; white-space:pre;color:#404040;'> don't do it if the callback has been removed.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This fixes python's issues with not restoring terminal state on exit and
</span><span style='display:block; white-space:pre;color:#404040;'> incorrect prompt display, and should avoid reintroducing the problem described
</span><span style='display:block; white-space:pre;color:#404040;'> in <http://gnats.netbsd.org/48957>.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/48807
</span>---
devel/libedit/Portfile | 4 +++-
devel/libedit/files/readline.c.patch | 14 ++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libedit/Portfile b/devel/libedit/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index ce5053e..d9bbf47 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/libedit/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/libedit/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6,6 +6,7 @@ PortGroup muniversal 1.0
</span> name libedit
epoch 20090923
version 20170329-3.1
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories devel
platforms darwin
license BSD
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -29,7 +30,8 @@ patchfiles doc__Makefile.in.patch \
</span> src__Makefile.in.patch \
src__sys.h.patch \
wcsdup.patch \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ readline.c.patch
</span>
# see https://trac.macports.org/ticket/52866
# this patch is taken from
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libedit/files/readline.c.patch b/devel/libedit/files/readline.c.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..dea7f0a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/libedit/files/readline.c.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/readline.c.orig 2017-03-30 05:15:04.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/readline.c 2017-09-12 19:37:40.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2035,7 +2035,10 @@ rl_callback_read_char(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ wbuf = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (*(void (*)(const char *))rl_linefunc)(wbuf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- el_set(e, EL_UNBUFFERED, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* rl_linefunc might have called rl_callback_handler_remove */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rl_linefunc != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ el_set(e, EL_UNBUFFERED, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>