Fish: 2.7.1, debuginfo, crash fix (#2403)

* Fish: 2.7.1, debuginfo, crash fix

* Cleanup, disabled for every arch
This commit is contained in:
miqlas
2018-04-09 18:12:24 +02:00
committed by GitHub
parent 4eb294cc92
commit dd4ed3b8f4
2 changed files with 132 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
SUMMARY="The friendly interactive shell"
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"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/fish-shell/fish-shell/releases/download/$portVersion/fish-$portVersion.tar.gz"
CHECKSUM_SHA256="e42bb19c7586356905a58578190be792df960fa81de35effb1ca5a5a981f0c5a"
PATCHES="fish-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
fish$secondaryArchSuffix = $portVersion
cmd:fish$secondaryArchSuffix = $portVersion
cmd:fish_indent$secondaryArchSuffix = $portVersion
cmd:fish_key_reader$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libexecinfo$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libncursesw$secondaryArchSuffix
lib:libpcre2_32$secondaryArchSuffix
cmd:gettext$secondaryArchSuffix
cmd:python
cmd:ul
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= r1~alpha4_pm_hrev51519-1
devel:libexecinfo$secondaryArchSuffix
devel:libgettextlib$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libncursesw$secondaryArchSuffix
devel:libpcre2_32$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:make
"
GLOBAL_WRITABLE_FILES="
settings/fish/config.fish keep-old
"
defineDebugInfoPackage fish$secondaryArchSuffix \
"$binDir"/fish$secondaryArchSuffix \
"$binDir"/fish_indent$secondaryArchSuffix \
"$binDir"/fish_key_reader$secondaryArchSuffix
BUILD()
{
export CFLAGS="-D_BSD_SOURCE"
export CXXFLAGS=$CFLAGS
export LIBS="-lnetwork -lexecinfo"
runConfigure ./configure \
--without-included-pcre2
make $jobArgs
}
INSTALL()
{
make install
}
TEST()
{
make test
}

View File

@@ -0,0 +1,55 @@
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