diff --git a/Ports/mrsh/package.sh b/Ports/mrsh/package.sh index aaab409cba..1239715347 100755 --- a/Ports/mrsh/package.sh +++ b/Ports/mrsh/package.sh @@ -5,3 +5,5 @@ files="https://codeload.github.com/emersion/mrsh/legacy.tar.gz/${version} emersi useconfigure=true makeopts= workdir=emersion-mrsh-d9763a3 + +export CFLAGS=-Wno-deprecated-declarations diff --git a/Ports/mrsh/patches/disable-pipebuf.patch b/Ports/mrsh/patches/disable-pipebuf.patch deleted file mode 100644 index 586daf96f4..0000000000 --- a/Ports/mrsh/patches/disable-pipebuf.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/shell/redir.c 2020-02-03 18:09:07.918039522 +0300 -+++ b/shell/redir.c 2020-02-03 18:10:13.701606476 +0300 -@@ -46,7 +46,7 @@ - - // We can write at most PIPE_BUF bytes without blocking. If we want to write - // more, we need to fork and continue writing in another process. -- size_t remaining = PIPE_BUF; -+ size_t remaining = 0; - bool more = false; - size_t i; - for (i = 0; i < lines->len; ++i) { diff --git a/Ports/mrsh/patches/disable-sysctl.patch b/Ports/mrsh/patches/disable-sysctl.patch deleted file mode 100644 index ec8c9c3364..0000000000 --- a/Ports/mrsh/patches/disable-sysctl.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/builtin/times.c 2020-02-03 17:40:26.634489515 +0300 -+++ b/builtin/times.c 2020-02-03 17:41:52.351246681 +0300 -@@ -16,11 +16,14 @@ - } - - struct tms buf; -+/* - long clk_tck = sysconf(_SC_CLK_TCK); - if (clk_tck == -1) { - perror("sysconf"); - return 1; - } -+*/ -+ long clk_tck = 1000; - - if (times(&buf) == (clock_t)-1) { - perror("times"); diff --git a/Ports/mrsh/patches/no-undefined.patch b/Ports/mrsh/patches/no-undefined.patch new file mode 100644 index 0000000000..4254accf7e --- /dev/null +++ b/Ports/mrsh/patches/no-undefined.patch @@ -0,0 +1,12 @@ +diff -Naur emersion-mrsh-d9763a3/configure emersion-mrsh-d9763a3.serenity/configure +--- emersion-mrsh-d9763a3/configure 2021-04-12 10:11:00.100738824 +0200 ++++ emersion-mrsh-d9763a3.serenity/configure 2021-04-12 10:11:57.028449759 +0200 +@@ -198,7 +198,7 @@ + fi + done + +-for flag in -fPIC -Wl,--no-undefined -Wl,--as-needed ++for flag in -fPIC -Wl,--as-needed + do + test_ldflags "$flag" + done diff --git a/Ports/mrsh/patches/pipebuf.patch b/Ports/mrsh/patches/pipebuf.patch new file mode 100644 index 0000000000..27ec1299bf --- /dev/null +++ b/Ports/mrsh/patches/pipebuf.patch @@ -0,0 +1,12 @@ +diff -Naur emersion-mrsh-d9763a3/shell/redir.c emersion-mrsh-d9763a3.serenity/shell/redir.c +--- emersion-mrsh-d9763a3/shell/redir.c 2020-01-27 16:43:09.000000000 +0100 ++++ emersion-mrsh-d9763a3.serenity/shell/redir.c 2021-04-12 10:17:08.980846918 +0200 +@@ -46,7 +46,7 @@ + + // We can write at most PIPE_BUF bytes without blocking. If we want to write + // more, we need to fork and continue writing in another process. +- size_t remaining = PIPE_BUF; ++ size_t remaining = 4096; + bool more = false; + size_t i; + for (i = 0; i < lines->len; ++i) { diff --git a/Ports/mrsh/patches/version-script.patch b/Ports/mrsh/patches/version-script.patch new file mode 100644 index 0000000000..ec36227d71 --- /dev/null +++ b/Ports/mrsh/patches/version-script.patch @@ -0,0 +1,27 @@ +diff -Naur emersion-mrsh-d9763a3/libmrsh.serenity.sym emersion-mrsh-d9763a3.serenity/libmrsh.serenity.sym +--- emersion-mrsh-d9763a3/libmrsh.serenity.sym 1970-01-01 01:00:00.000000000 +0100 ++++ emersion-mrsh-d9763a3.serenity/libmrsh.serenity.sym 2021-04-12 09:48:47.446767471 +0200 +@@ -0,0 +1,7 @@ ++{ ++ global: ++ mrsh_*; ++ main; ++ local: ++ *; ++}; +diff -Naur emersion-mrsh-d9763a3/configure emersion-mrsh-d9763a3.serenity/configure +--- emersion-mrsh-d9763a3/configure 2021-04-12 10:05:17.437801859 +0200 ++++ emersion-mrsh-d9763a3.serenity/configure 2021-04-12 10:05:10.304338346 +0200 +@@ -217,9 +217,11 @@ + fi + + printf "Checking for exported symbol restrictions... " +-if ! \ ++if ! (\ + test_ldflags -Wl,--version-script="libmrsh.gnu.sym" || \ ++ test_ldflags -Wl,--version-script="libmrsh.serenity.sym" || \ + test_ldflags -Wl,-exported_symbols_list,"libmrsh.darwin.sym" ++) + then + echo no + echo "Unable to specify exported symbols (is $(uname) supported?)" >&2