Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions build/fish/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/usr/bin/bash
#
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}

# Copyright 2026 OmniOS Community Edition (OmniOSce) Association.

. ../../lib/build.sh

PROG=fish
VER=4.5.0
PKG=ooce/shell/fish
SUMMARY="Fish is a smart and user-friendly command line shell"
DESC="friendly interactive shell"

SKIP_SSP_CHECK=1
SKIP_LICENCES=COPYING
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the licence is GPLv2 like stated in local.mog can the pattern in doc/licences be adjusted to parse it properly than just "skipping" it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't fully GPLv2 : https://github.com/fish-shell/fish-shell/blob/master/COPYING
How should I handle this?


BUILD_DEPENDS_IPS="
ooce/developer/rust
ooce/developer/cmake
library/pcre2
runtime/python-$PYTHONPKGVER
"

RUN_DEPENDS_IPS="
library/pcre2
runtime/python-$PYTHONPKGVER
"

XFORM_ARGS+=" -DPREFIX=${PREFIX#/}"

set_arch 64
set_clangver

CONFIGURE_OPTS+="
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=$PREFIX
-DCMAKE_VERBOSE_MAKEFILE=1
-DCMAKE_INSTALL_SYSCONFDIR="/etc"
-DSYS_PCRE2_INCLUDE_DIR="/usr/include/pcre"
-DFISH_USE_SYSTEM_PCRE2=ON
-DWITH_MESSAGE_LOCALIZATION=ON
-DWITH_DOCS=OFF
"

# use GNU msgfmt; otherwise the build fails
PATH="$GNUBIN:$PATH:$OOCEBIN"

crate_patch() {
logmsg "Fetching crates"
logcmd $CARGO fetch --manifest-path $TMPDIR/$BUILDDIR/Cargo.toml \
|| logerr "Fetching crates failed"
logmsg "Patching crates"
pushd $CARGO_HOME >/dev/null
for patchfile in $SRCDIR/patches-crate/*.patch; do \
gpatch --backup --version-control=numbered -p0 < $patchfile ; \
done ;
popd >/dev/null
}

pre_configure() {
typeset arch=$1

CONFIGURE_OPTS[$arch]="
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=$PREFIX
-DCMAKE_VERBOSE_MAKEFILE=1
-DCMAKE_INSTALL_SYSCONFDIR="/etc"
-DSYS_PCRE2_INCLUDE_DIR="/usr/include/pcre"
-DFISH_USE_SYSTEM_PCRE2=ON
-DWITH_GETTEXT=ON
-DBUILD_DOCS=OFF
"
}

init
download_source $PROG fish-$VER ""
patch_source
export CARGO_HOME=$TMPDIR/cargo_crates
mkdir -p $CARGO_HOME
crate_patch
prep_build cmake
build -noctf
#run_testsuite check
strip_install
make_package
clean_up

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker
16 changes: 16 additions & 0 deletions build/fish/local.mog
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}

# Copyright 2026 OmniOS Community Edition (OmniOSce) Association.

license COPYING license=GPLv2

20 changes: 20 additions & 0 deletions build/fish/patches-crate/01-libc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.180/src/unix/solarish/mod.rs.~1~ 2006-07-23 21:21:28.000000000 -0400
+++ registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.180/src/unix/solarish/mod.rs 2025-11-11 09:06:45.275025555 -050
@@ -2390,6 +2390,9 @@
// sys/sendfile.h
pub const SFV_FD_SELF: c_int = -2;

+// command names for confstr sys/unistd.h
+pub const _CS_PATH: c_int = 65;
+
const fn _CMSG_HDR_ALIGN(p: usize) -> usize {
(p + _CMSG_HDR_ALIGNMENT - 1) & !(_CMSG_HDR_ALIGNMENT - 1)
}
@@ -2756,6 +2759,7 @@
addrlen: *mut crate::socklen_t,
) -> ssize_t;
pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int;
+ pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int;
pub fn futimesat(fd: c_int, path: *const c_char, times: *const crate::timeval) -> c_int;
pub fn futimens(dirfd: c_int, times: *const crate::timespec) -> c_int;
pub fn utimensat(
Loading