<pre style='margin:0'>
Renee Otten (reneeotten) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/18c7394d7dca48afe260cdb419cbbc7bc3299a84">https://github.com/macports/macports-ports/commit/18c7394d7dca48afe260cdb419cbbc7bc3299a84</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 18c7394d7dc mrsh: new port
</span>18c7394d7dc is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 18c7394d7dca48afe260cdb419cbbc7bc3299a84
</span>Author: Dennis Camera <dennis.camera@riiengineering.ch>
AuthorDate: Sat Sep 30 19:39:47 2023 +0200
<span style='display:block; white-space:pre;color:#404040;'> mrsh: new port
</span>---
shells/mrsh/Portfile | 58 ++++++++++++++
shells/mrsh/files/cloexec.patch | 115 ++++++++++++++++++++++++++++
shells/mrsh/files/configure.patch | 50 ++++++++++++
shells/mrsh/files/frontend-readline.c.patch | 23 ++++++
4 files changed, 246 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/shells/mrsh/Portfile b/shells/mrsh/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..684ce4ae270
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/shells/mrsh/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,58 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup sourcehut 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup legacysupport 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+sourcehut.setup emersion mrsh a858396b
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 0.0.0-20220914
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms any
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 ba54f6093edf4fa1f8a60fee3e8f469ac26d134b \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 d7fa79295a51ae30f4476499b2c0506223a4e18b6a5b696c00ece0866c3c6861 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 83745
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description A minimal POSIX shell.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mrsh is a minimal shell striving for POSIX compliance, no less, no more.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories shells
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers nomaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license MIT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build path:bin/pkg-config:pkgconfig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# legacy-support: strndup, getline
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+legacysupport.newest_darwin_requires_legacy 10
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append configure.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ frontend-readline.c.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.c_standard 1999
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.env-append PKG_CONFIG=${prefix}/bin/pkg-config
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append --without-readline
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {![variant_isset readline]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants +libedit
</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;'>+variant readline description {Enable readline support} conflicts libedit {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:readline
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace --without-readline --with-readline=readline
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cflags-append -DHAVE_READLINE \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DHAVE_READLINE_REPLACE_LINE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant libedit description {Enable libedit support} conflicts readline {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:libedit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace --without-readline --with-readline=libedit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cflags-append -DHAVE_EDITLINE
</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;'>+platform darwin {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # O_CLOEXEC was added in Mac OS X 10.7. Only apply this patch on
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # system versions which need it.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append cloexec.patch
</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;color:#808080;'>diff --git a/shells/mrsh/files/cloexec.patch b/shells/mrsh/files/cloexec.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..6b695c7f486
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/shells/mrsh/files/cloexec.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,115 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+O_CLOEXEC was added in Mac OS X 10.7.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Revert to fcntl() to set the CLOEXEC flag for older system versions.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- builtin/dot.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ builtin/dot.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -28,11 +28,13 @@ int builtin_dot(struct mrsh_state *state, int argc, char *argv[]) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 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;'>+- int fd = open(path, O_RDONLY | O_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int fd = open(path, O_RDONLY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (fd < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fprintf(stderr, "unable to open %s for reading: %s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ argv[1], strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto error;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ free(path);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- main.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ main.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,11 +41,13 @@ int main(int argc, char *argv[]) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ strlen(init_args.command_str));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (init_args.command_file) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- fd = open(init_args.command_file, O_RDONLY | O_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fd = open(init_args.command_file, O_RDONLY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (fd < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fprintf(stderr, "failed to open %s for reading: %s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ init_args.command_file, strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fd = STDIN_FILENO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- shell/redir.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ shell/redir.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -116,18 +116,27 @@ int process_redir(const struct mrsh_io_redirect *redir, int *redir_fd) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ errno = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch (redir->op) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case MRSH_IO_LESS: // <
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- fd = open(filename, O_CLOEXEC | O_RDONLY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fd = open(filename, O_RDONLY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (fd >= 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_redir_fd = STDIN_FILENO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case MRSH_IO_GREAT: // >
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case MRSH_IO_CLOBBER: // >|
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fd = open(filename,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- O_CLOEXEC | O_WRONLY | O_CREAT | O_TRUNC, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ O_WRONLY | O_CREAT | O_TRUNC, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (fd >= 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_redir_fd = STDOUT_FILENO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case MRSH_IO_DGREAT: // >>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fd = open(filename,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- O_CLOEXEC | O_WRONLY | O_CREAT | O_APPEND, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ O_WRONLY | O_CREAT | O_APPEND, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (fd >= 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_redir_fd = STDOUT_FILENO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case MRSH_IO_LESSAND: // <&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -141,7 +150,10 @@ int process_redir(const struct mrsh_io_redirect *redir, int *redir_fd) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_redir_fd = STDOUT_FILENO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case MRSH_IO_LESSGREAT: // <>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- fd = open(filename, O_CLOEXEC | O_RDWR | O_CREAT, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fd = open(filename, O_RDWR | O_CREAT, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (fd >= 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_redir_fd = STDIN_FILENO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case MRSH_IO_DLESS: // <<
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- shell/task/task.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ shell/task/task.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -26,11 +26,13 @@ static int run_subshell(struct mrsh_context *ctx, struct mrsh_array *array) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!(ctx->state->options & MRSH_OPT_MONITOR)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // If job control is disabled, stdin is /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int fd = open("/dev/null", O_CLOEXEC | O_RDONLY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int fd = open("/dev/null", O_RDONLY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (fd < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fprintf(stderr, "failed to open /dev/null: %s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (fd != STDIN_FILENO) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dup2(fd, STDIN_FILENO);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -354,11 +356,13 @@ int run_command_list_array(struct mrsh_context *ctx, struct mrsh_array *array) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!(state->options & MRSH_OPT_MONITOR)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // If job control is disabled, stdin is /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int fd = open("/dev/null", O_CLOEXEC | O_RDONLY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int fd = open("/dev/null", O_RDONLY);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (fd < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fprintf(stderr, "failed to open /dev/null: %s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit(1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (fd != STDIN_FILENO) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dup2(fd, STDIN_FILENO);
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/shells/mrsh/files/configure.patch b/shells/mrsh/files/configure.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..7dd076e6239
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/shells/mrsh/files/configure.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,50 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- configure.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -213,32 +213,38 @@ done
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for flag in -fPIC -Wl,--no-undefined -Wl,--as-needed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ do
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- test_ldflags "$flag"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf 'Checking for linker flag %s... ' "${flag}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test_ldflags "$flag"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ echo yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ echo no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ done
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ soname=libmrsh.so.$(echo "$SOVERSION" | cut -d. -f1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printf "Checking for specifying soname for shared lib... "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if ! \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- test_ldflags -Wl,-soname,$soname || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ test_ldflags -Wl,-soname,$soname ||
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test_ldflags -Wl,-install_name,$soname
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ echo yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo "Unable to specify soname (is $(uname) supported?)" >&2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- echo yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printf "Checking for exported symbol restrictions... "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if ! \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- test_ldflags -Wl,--version-script="libmrsh.gnu.sym" || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ test_ldflags -Wl,--version-script="libmrsh.gnu.sym" ||
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test_ldflags -Wl,-exported_symbols_list,"libmrsh.darwin.sym"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ echo yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo "Unable to specify exported symbols (is $(uname) supported?)" >&2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- echo yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if [ $use_readline -eq -1 ]
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/shells/mrsh/files/frontend-readline.c.patch b/shells/mrsh/files/frontend-readline.c.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..31f22d6ed34
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/shells/mrsh/files/frontend-readline.c.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,23 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- frontend/readline.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ frontend/readline.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -8,9 +8,20 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <signal.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <unistd.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(HAVE_READLINE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#pragma GCC diagnostic push
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#pragma GCC diagnostic ignored "-Wstrict-prototypes"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#pragma clang diagnostic push
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#pragma clang diagnostic ignored "-Wstrict-prototypes"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <readline/history.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <readline/readline.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#pragma clang diagnostic pop
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#pragma GCC diagnostic pop
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(HAVE_EDITLINE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define HAVE_WCSDUP 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <editline/readline.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <histedit.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span></pre><pre style='margin:0'>
</pre>