mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
Fish: fix for the posix_spawn problem (#1763)
This commit is contained in:
@@ -5,7 +5,7 @@ is simple but incompatible with other shell languages."
|
||||
HOMEPAGE="http://ridiculousfish.com/shell/"
|
||||
COPYRIGHT="2005-2017 Axel Liljencrantz"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="2"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://github.com/fish-shell/fish-shell/releases/download/$portVersion/fish-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="7ee5bbd671c73e5323778982109241685d58a836e52013e18ee5d9f2e638fdfb"
|
||||
SOURCE_DIR="fish-$portVersion"
|
||||
|
||||
@@ -1,34 +1,32 @@
|
||||
From 9e23b7873520ffedb0a56cb08cc024eb788982dd Mon Sep 17 00:00:00 2001
|
||||
From b5d5c882b27a3304a17b651a8568bb1a52307108 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Wed, 9 Nov 2016 22:49:48 +0100
|
||||
Subject: [PATCH] Haiku /bin/open support
|
||||
Subject: Haiku /bin/open support
|
||||
|
||||
---
|
||||
share/functions/open.fish | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/share/functions/open.fish b/share/functions/open.fish
|
||||
index 533b3df..852f4a1 100644
|
||||
index e878435..3500849 100644
|
||||
--- a/share/functions/open.fish
|
||||
+++ b/share/functions/open.fish
|
||||
@@ -21,6 +21,10 @@ if not test (uname) = Darwin
|
||||
for i in $argv
|
||||
xdg-open $i
|
||||
end
|
||||
@@ -21,6 +21,10 @@ if not command -sq open
|
||||
for i in $argv
|
||||
xdg-open $i
|
||||
end
|
||||
+ else if type -q -f /bin/open
|
||||
+ for i in $argv
|
||||
+ /bin/open $i
|
||||
+ end
|
||||
else
|
||||
echo (_ 'No open utility found. Try installing "xdg-open" or "xdg-utils".')
|
||||
end
|
||||
--
|
||||
2.10.0
|
||||
else
|
||||
echo (_ 'No open utility found. Try installing "xdg-open" or "xdg-utils".')
|
||||
end
|
||||
--
|
||||
2.14.2
|
||||
|
||||
From 6841de5e4b68581ab894c1f1adef97daf6bce90a Mon Sep 17 00:00:00 2001
|
||||
|
||||
From dd9a8e92c8bdd66288553148c43654697c357969 Mon Sep 17 00:00:00 2001
|
||||
From: Kurtis Rader <krader@skepticism.us>
|
||||
Date: Sun, 4 Jun 2017 21:01:26 -0700
|
||||
Subject: [PATCH] work around Haiku stdio bug
|
||||
Subject: work around Haiku stdio bug
|
||||
|
||||
The Haiku stdio library has a bug. If we set stdout to unbuffered and it
|
||||
is attached to a tty it discards wide output. Given how we interact with
|
||||
@@ -38,18 +36,14 @@ code that writes to the tty to ultimately call write() which is true at
|
||||
this time and should remain true in the future.
|
||||
|
||||
Fixes #4100
|
||||
---
|
||||
src/path.cpp | 3 +--
|
||||
src/reader.cpp | 8 ++++----
|
||||
2 files changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/path.cpp b/src/path.cpp
|
||||
index 1888228d0..e76ed2726 100644
|
||||
index 1888228..e76ed27 100644
|
||||
--- a/src/path.cpp
|
||||
+++ b/src/path.cpp
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
|
||||
#include <errno.h>
|
||||
-#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -62,10 +56,10 @@ index 1888228d0..e76ed2726 100644
|
||||
- fputwc(L'\n', stderr);
|
||||
+ write(STDERR_FILENO, "\n", 1);
|
||||
}
|
||||
|
||||
|
||||
static void path_create(wcstring &path, const wcstring &xdg_var, const wcstring &which_dir,
|
||||
diff --git a/src/reader.cpp b/src/reader.cpp
|
||||
index 55796eebd..ebd10681c 100644
|
||||
index 96d6d29..df4262e 100644
|
||||
--- a/src/reader.cpp
|
||||
+++ b/src/reader.cpp
|
||||
@@ -693,14 +693,14 @@ void reader_write_title(const wcstring &cmd, bool reset_cursor_position) {
|
||||
@@ -75,7 +69,7 @@ index 55796eebd..ebd10681c 100644
|
||||
- fputwc(L'\a', stdout);
|
||||
+ write(STDOUT_FILENO, "\a", 1);
|
||||
}
|
||||
|
||||
|
||||
proc_pop_interactive();
|
||||
set_color(rgb_color_t::reset(), rgb_color_t::reset());
|
||||
if (reset_cursor_position && !lst.empty()) {
|
||||
@@ -84,22 +78,51 @@ index 55796eebd..ebd10681c 100644
|
||||
+ write(STDOUT_FILENO, "\r", 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1284,7 +1284,7 @@ static void reader_flash() {
|
||||
}
|
||||
|
||||
|
||||
reader_repaint();
|
||||
- fputwc(L'\a', stdout);
|
||||
+ write(STDOUT_FILENO, "\a", 1);
|
||||
|
||||
|
||||
pollint.tv_sec = 0;
|
||||
pollint.tv_nsec = 100 * 1000000;
|
||||
@@ -3216,7 +3216,7 @@ const wchar_t *reader_readline(int nchars) {
|
||||
reader_repaint_if_needed();
|
||||
}
|
||||
|
||||
|
||||
- fputwc(L'\n', stdout);
|
||||
+ write(STDOUT_FILENO, "\n", 1);
|
||||
|
||||
|
||||
// Ensure we have no pager contents when we exit.
|
||||
if (!data->pager.empty()) {
|
||||
--
|
||||
2.14.2
|
||||
|
||||
|
||||
From 4669c6a01b11698c48b299de62105059bd539a03 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Tue, 31 Oct 2017 08:25:27 +0100
|
||||
Subject: Posix_spawn is broken on Haiku.
|
||||
|
||||
|
||||
diff --git a/src/postfork.h b/src/postfork.h
|
||||
index 0a82a45..d441fe9 100644
|
||||
--- a/src/postfork.h
|
||||
+++ b/src/postfork.h
|
||||
@@ -10,9 +10,11 @@
|
||||
#if HAVE_SPAWN_H
|
||||
#include <spawn.h>
|
||||
#endif
|
||||
+#ifndef __HAIKU__
|
||||
#ifndef FISH_USE_POSIX_SPAWN
|
||||
#define FISH_USE_POSIX_SPAWN HAVE_SPAWN_H
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
class io_chain_t;
|
||||
class job_t;
|
||||
--
|
||||
2.14.2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user