fish: bump to 3.7.1 (#11249)

This commit is contained in:
kenmays
2024-11-02 03:32:28 -07:00
committed by GitHub
parent 1ca81fca23
commit 7a69719cc2
4 changed files with 48 additions and 121 deletions

View File

@@ -3,11 +3,11 @@ DESCRIPTION="Fish is a shell geared towards interactive use. Its features are \
focused on user friendliness and discoverability. The language syntax \
is simple but incompatible with other shell languages."
HOMEPAGE="https://ridiculousfish.com/shell/"
COPYRIGHT="2005-2018 Axel Liljencrantz"
COPYRIGHT="2005-2024 Axel Liljencrantz"
LICENSE="GNU GPL v2"
REVISION="2"
REVISION="1"
SOURCE_URI="https://github.com/fish-shell/fish-shell/releases/download/$portVersion/fish-$portVersion.tar.xz"
CHECKSUM_SHA256="a6d45b3dc5a45dd31772e7f8dfdfecabc063986e8f67d60bd7ca60cc81db6928"
CHECKSUM_SHA256="614c9f5643cd0799df391395fa6bbc3649427bb839722ce3b114d3bbc1a3b250"
PATCHES="fish-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
@@ -25,7 +25,6 @@ PROVIDES="
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:gettext$secondaryArchSuffix
lib:libexecinfo$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
@@ -36,15 +35,20 @@ REQUIRES="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libexecinfo$secondaryArchSuffix
devel:libgettextlib$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libncursesw$secondaryArchSuffix
devel:libpcre2_32$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:gettext$secondaryArchSuffix
cmd:msgfmt$secondaryArchSuffix
cmd:msgmerge$secondaryArchSuffix
cmd:make
cmd:python3.10
cmd:xgettext$secondaryArchSuffix
"
defineDebugInfoPackage fish$secondaryArchSuffix \
@@ -56,8 +60,8 @@ BUILD()
{
mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
$cmakeDirArgs
$cmakeDirArgs \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
make $jobArgs
}
@@ -69,5 +73,6 @@ INSTALL()
TEST()
{
cd build
make test
}

View File

@@ -1,55 +0,0 @@
From b9bf14af416a8e2ee9210c87ee9800934e945b7d 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: Haiku /bin/open support
diff --git a/share/functions/open.fish b/share/functions/open.fish
index a4fce09..6d27875 100644
--- a/share/functions/open.fish
+++ b/share/functions/open.fish
@@ -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.15.1
From 7b97ca8bebf711a3f481201199209ca3417f6039 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Fri, 29 Dec 2017 09:22:51 +0100
Subject: Fish: Dirty crash fix
diff --git a/src/fish.cpp b/src/fish.cpp
index 273c85a..3f2d4e2 100644
--- a/src/fish.cpp
+++ b/src/fish.cpp
@@ -448,7 +448,16 @@ int main(int argc, char **argv) {
int exit_status = res ? STATUS_CMD_UNKNOWN : proc_get_last_status();
+#ifndef __HAIKU__
proc_fire_event(L"PROCESS_EXIT", EVENT_EXIT, getpid(), exit_status);
+#else
+ /*
+ Fish crashes at closing terminal in _IO_flush_all_lockp in libroot.so
+ Replacing getpid() with 0 silences it, but maybe introduces other problems.
+ TODO: proper fix
+ */
+ proc_fire_event(L"PROCESS_EXIT", EVENT_EXIT, 0, exit_status);
+#endif
restore_term_mode();
restore_term_foreground_process_group();
--
2.15.1

View File

@@ -1,59 +0,0 @@
From 21ae0a493f309006033103a44f31be43cc78ef08 Mon Sep 17 00:00:00 2001
From: Ivan Holmes <ivan@ivanholmes.co.uk>
Date: Wed, 17 Aug 2022 19:30:18 +0100
Subject: Don't include mount.h on Haiku
diff --git a/src/path.cpp b/src/path.cpp
index d5a649e..b920d7a 100644
--- a/src/path.cpp
+++ b/src/path.cpp
@@ -6,7 +6,9 @@
#include "path.h"
#include <errno.h>
+#ifndef __HAIKU__
#include <sys/mount.h>
+#endif
#include <sys/param.h>
#include <sys/stat.h>
#if defined(__linux__)
diff --git a/src/wutil.cpp b/src/wutil.cpp
index 21ec26d..1848948 100644
--- a/src/wutil.cpp
+++ b/src/wutil.cpp
@@ -11,7 +11,9 @@
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#ifndef __HAIKU__
#include <sys/mount.h>
+#endif
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/types.h>
--
2.36.1
From 74736c3a8584cc05327804cbb13e666dc94efe7b Mon Sep 17 00:00:00 2001
From: Ivan Holmes <ivan@ivanholmes.co.uk>
Date: Wed, 17 Aug 2022 19:30:41 +0100
Subject: remove assertion that exit codes are less than 256
diff --git a/src/proc.h b/src/proc.h
index 6ac42c7..7d9b719 100644
--- a/src/proc.h
+++ b/src/proc.h
@@ -90,7 +90,6 @@ class proc_status_t {
constexpr int zerocode = w_exitcode(0, 0);
static_assert(WIFEXITED(zerocode), "Synthetic exit status not reported as exited");
- assert(ret < 256);
return proc_status_t(w_exitcode(ret, 0 /* sig */));
}
--
2.36.1

View File

@@ -0,0 +1,36 @@
From bb8f751b7ef40a63f7b2eb2f6df9d5c257532f92 Mon Sep 17 00:00:00 2001
From: Ken mays <kmays2000@gmail.com>
Date: Tue, 22 Oct 2024 05:12:03 +0000
Subject: Fix for std::{wcstoumax|wcstoimax} issue on Haiku R1b5
# Ref: https://dev.haiku-os.org/ticket/18207
# Summary wcstoimax and wcstoumax is not available
diff --git a/src/builtins/printf.cpp b/src/builtins/printf.cpp
index 7a09438..fb136af 100644
--- a/src/builtins/printf.cpp
+++ b/src/builtins/printf.cpp
@@ -204,12 +204,20 @@ static T raw_string_to_scalar_type(const wchar_t *s, wchar_t **end);
template <>
intmax_t raw_string_to_scalar_type(const wchar_t *s, wchar_t **end) {
+#ifdef __HAIKU__
+ return std::wcstoll(s, end, 0);
+#else
return std::wcstoimax(s, end, 0);
+#endif
}
template <>
uintmax_t raw_string_to_scalar_type(const wchar_t *s, wchar_t **end) {
+#ifdef __HAIKU__
+ return std::wcstoull(s, end, 0);
+#else
return std::wcstoumax(s, end, 0);
+#endif
}
template <>
--
2.45.2