mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
Ports: Fix building the mrsh port
This commit is contained in:
parent
1e1de4a542
commit
f0b34277bb
6 changed files with 53 additions and 28 deletions
|
@ -5,3 +5,5 @@ files="https://codeload.github.com/emersion/mrsh/legacy.tar.gz/${version} emersi
|
||||||
useconfigure=true
|
useconfigure=true
|
||||||
makeopts=
|
makeopts=
|
||||||
workdir=emersion-mrsh-d9763a3
|
workdir=emersion-mrsh-d9763a3
|
||||||
|
|
||||||
|
export CFLAGS=-Wno-deprecated-declarations
|
||||||
|
|
|
@ -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) {
|
|
|
@ -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");
|
|
12
Ports/mrsh/patches/no-undefined.patch
Normal file
12
Ports/mrsh/patches/no-undefined.patch
Normal file
|
@ -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
|
12
Ports/mrsh/patches/pipebuf.patch
Normal file
12
Ports/mrsh/patches/pipebuf.patch
Normal file
|
@ -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) {
|
27
Ports/mrsh/patches/version-script.patch
Normal file
27
Ports/mrsh/patches/version-script.patch
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue