Skip to content

Commit 8a8f7b9

Browse files
committed
Fish-shell 4.x added
1 parent 57e4279 commit 8a8f7b9

12 files changed

+177
-0
lines changed

build/fish/build.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/bash
2+
#
3+
# {{{ CDDL HEADER
4+
#
5+
# This file and its contents are supplied under the terms of the
6+
# Common Development and Distribution License ("CDDL"), version 1.0.
7+
# You may only use this file in accordance with the terms of version
8+
# 1.0 of the CDDL.
9+
#
10+
# A full copy of the text of the CDDL should have accompanied this
11+
# source. A copy of the CDDL is also available via the Internet at
12+
# http://www.illumos.org/license/CDDL.
13+
# }}}
14+
15+
# Copyright 2025 OmniOS Community Edition (OmniOSce) Association.
16+
17+
. ../../lib/build.sh
18+
19+
PROG=fish
20+
VER=4.2.0
21+
PKG=ooce/shell/fish
22+
SUMMARY="Fish is a smart and user-friendly command line shell"
23+
DESC="friendly interactive shell"
24+
25+
SKIP_SSP_CHECK=1
26+
SKIP_LICENCES=COPYING
27+
28+
BUILD_DEPENDS_IPS="ooce/developer/rust library/pcre2"
29+
30+
set_arch 64
31+
32+
CONFIGURE_OPTS+="
33+
-DCMAKE_INSTALL_SYSCONFDIR=/etc
34+
-DSYS_PCRE2_INCLUDE_DIR=/usr/include/pcre
35+
-DFISH_USE_SYSTEM_PCRE2=ON
36+
-DWITH_GETTEXT=ON
37+
"
38+
39+
init
40+
#download_source $PROG fish-$VER ""
41+
#patch_source
42+
prep_build #cmake
43+
build_rust
44+
run_testsuite check
45+
install_rust
46+
strip_install
47+
make_package
48+
clean_up
49+
50+
# Vim hints
51+
# vim:ts=4:sw=4:et:fdm=marker

build/fish/local.mog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# {{{ CDDL HEADER
2+
#
3+
# This file and its contents are supplied under the terms of the
4+
# Common Development and Distribution License ("CDDL"), version 1.0.
5+
# You may only use this file in accordance with the terms of version
6+
# 1.0 of the CDDL.
7+
#
8+
# A full copy of the text of the CDDL should have accompanied this
9+
# source. A copy of the CDDL is also available via the Internet at
10+
# http://www.illumos.org/license/CDDL.
11+
# }}}
12+
13+
# Copyright 2025 OmniOS Community Edition (OmniOSce) Association.
14+
15+
license COPYING license=GPLv2
16+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--- fish-4.2.0/src/wutil/dir_iter.rs.~1~ 2025-11-10 02:19:40.000000000 -0500
2+
+++ fish-4.2.0/src/wutil/dir_iter.rs 2025-11-10 23:26:28.445480042 -0500
3+
@@ -293,6 +293,7 @@
4+
self.entry.inode = dent.d_ino;
5+
}
6+
);
7+
+ #[cfg(not(target_os = "illumos"))] {
8+
let typ = dirent_type_to_entry_type(dent.d_type);
9+
// Do not store symlinks as we will need to resolve them.
10+
if typ != Some(DirEntryType::lnk) {
11+
@@ -300,6 +301,7 @@
12+
}
13+
// This entry could be a link if it is a link or unknown.
14+
self.entry.possible_link = typ.map(|t| t == DirEntryType::lnk);
15+
+ }
16+
17+
Some(Ok(&self.entry))
18+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- fish-4.2.0/build.rs.old 2025-11-10 23:28:30.027191745 -0500
2+
+++ fish-4.2.0/build.rs 2025-11-10 23:29:12.978759154 -0500
3+
@@ -83,6 +83,7 @@
4+
("bsd", &detect_bsd),
5+
("using_cmake", &|_| option_env!("FISH_CMAKE_BINARY_DIR").is_some()),
6+
("cygwin", &detect_cygwin),
7+
+ ("illumos", &|_| env::var("CARGO_CFG_TARGET_OS").unwrap() == "illumos"),
8+
("small_main_stack", &has_small_stack),
9+
// See if libc supports the thread-safe localeconv_l(3) alternative to localeconv(3).
10+
("localeconv_l", &|target| {
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- fish-4.2.0/src/path.rs.~1~ 2025-11-10 02:19:40.000000000 -0500
2+
+++ fish-4.2.0/src/path.rs 2025-11-11 08:42:04.870713261 -0500
3+
@@ -711,7 +711,12 @@
4+
}
5+
}
6+
7+
- #[cfg(not(any(target_os = "linux", target_os = "netbsd", cygwin)))]
8+
+ #[cfg(target_os = "illumos")]
9+
+ {
10+
+ return DirRemoteness::unknown;
11+
+ }
12+
+
13+
+ #[cfg(not(any(target_os = "linux", target_os = "netbsd", cygwin, target_os = "illumos")))]
14+
{
15+
let mut buf = MaybeUninit::uninit();
16+
if unsafe { libc::statfs(narrow.as_ptr(), buf.as_mut_ptr()) } < 0 {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- fish-4.1.2/tests/test_driver.py.old 2025-10-10 08:36:52.795200178 -0400
2+
+++ fish-4.1.2/tests/test_driver.py 2025-10-10 08:37:08.394307944 -0400
3+
@@ -96,7 +96,7 @@
4+
def compile_test_helper(source_path: Path, binary_path: Path) -> None:
5+
subprocess.run(
6+
[
7+
- "cc",
8+
+ "gcc",
9+
source_path,
10+
"-o",
11+
binary_path,
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--- fish-4.2.0/src/fork_exec/spawn.rs.old 2025-11-10 23:42:49.710475725 -0500
2+
+++ fish-4.2.0/src/fork_exec/spawn.rs 2025-11-10 23:44:00.788440322 -0500
3+
@@ -116,6 +116,9 @@
4+
};
5+
6+
// Set our flags.
7+
+ #[cfg(target_os = "illumos")]
8+
+ let mut flags: i16 = 0;
9+
+ #[cfg(not(target_os = "illumos"))]
10+
let mut flags: i32 = 0;
11+
flags |= libc::POSIX_SPAWN_SETSIGDEF;
12+
flags |= libc::POSIX_SPAWN_SETSIGMASK;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- fish-4.2.0/src/builtins/ulimit.rs.old 2025-11-11 08:52:53.735806386 -0500
2+
+++ fish-4.2.0/src/builtins/ulimit.rs 2025-11-11 08:55:03.968404454 -0500
3+
@@ -21,7 +21,7 @@
4+
pub const DATA: libc::c_int = libc::RLIMIT_DATA as _;
5+
pub const FSIZE: libc::c_int = libc::RLIMIT_FSIZE as _;
6+
cfg_if!(
7+
- if #[cfg(cygwin)] {
8+
+ if #[cfg(any(cygwin,illumos))] {
9+
pub const MEMLOCK: libc::c_int = -1;
10+
} else {
11+
pub const MEMLOCK: libc::c_int = libc::RLIMIT_MEMLOCK as _;
12+
@@ -31,7 +31,7 @@
13+
pub const STACK: libc::c_int = libc::RLIMIT_STACK as _;
14+
pub const CPU: libc::c_int = libc::RLIMIT_CPU as _;
15+
cfg_if!(
16+
- if #[cfg(cygwin)] {
17+
+ if #[cfg(any(cygwin,illumos))] {
18+
pub const NPROC: libc::c_int = -1;
19+
} else {
20+
pub const NPROC: libc::c_int = libc::RLIMIT_NPROC as _;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- fish-4.0.6/Cargo.toml~ 2025-11-01 07:18:01.887587486 +0000
2+
+++ fish-4.0.6/Cargo.toml 2025-11-01 07:18:30.152119232 +0000
3+
4+
@@ -71,6 +71,10 @@ serial_test = { version = "1.0.0", default-features = false }
5+
cc = "1.0.94"
6+
rsconf = "0.2.2"
7+
8+
+[patch.crates-io]
9+
+libc = { git = "https://github.com/extrowerk/libc", branch = "illumos_patches" }
10+
+nix = { git = "https://github.com/extrowerk/nix", branch = "illumos_patches" }
11+
+
12+
[lib]
13+
crate-type = ["rlib"]
14+
path = "src/lib.rs"

build/fish/patches/series

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
01-no-d_type.patch
2+
02-illumos-build.patch
3+
03-no-local-remote-filesystem.patch
4+
04-use-gcc-test.patch
5+
05-fix-illumos-flags.patch
6+
06-fewer-rlimit-options.patch
7+
Cargo.toml.patch

0 commit comments

Comments
 (0)