diff --git a/build/starship/build.sh b/build/starship/build.sh new file mode 100755 index 000000000..a3b898c19 --- /dev/null +++ b/build/starship/build.sh @@ -0,0 +1,53 @@ +#!/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 2024 OmniOS Community Edition (OmniOSce) Association. + +. ../../lib/build.sh + +PROG=starship +VER=1.21.1 +PKG=ooce/terminal/starship +SUMMARY="cross-shell prompt" +DESC="The minimal, blazing-fast, and infinitely customizable prompt for any shell!" + +BUILD_DEPENDS_IPS=" + ooce/developer/rust +" + +SKIP_SSP_CHECK=1 + +CARGO_ARGS="--no-default-features --features=gix-max-perf" + +set_arch 64 + +pre_build() { + typeset arch=$1 + + export RUSTFLAGS="-C link-arg=-R$PREFIX/${LIBDIRS[$arch]}" +} + +init +clone_github_source $PROG "$GITHUB/starship/$PROG" $VER +append_builddir $PROG +patch_source +prep_build +build_rust $CARGO_ARGS +install_rust +strip_install +make_package +clean_up + +# Vim hints +# vim:ts=4:sw=4:et:fdm=marker diff --git a/build/starship/local.mog b/build/starship/local.mog new file mode 100644 index 000000000..a3f092b6d --- /dev/null +++ b/build/starship/local.mog @@ -0,0 +1,14 @@ +# +# 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 2025 OmniOS Community Edition (OmniOSce) Association. + +license LICENSE license=ISC diff --git a/build/starship/patches/do-not-strip-symbol-table.patch b/build/starship/patches/do-not-strip-symbol-table.patch new file mode 100644 index 000000000..fff048d5a --- /dev/null +++ b/build/starship/patches/do-not-strip-symbol-table.patch @@ -0,0 +1,11 @@ +diff -wpruN --no-dereference '--exclude=*.orig' a~/Cargo.toml a/Cargo.toml +--- a~/Cargo.toml 2025-01-06 16:32:07.099033407 +0000 ++++ a/Cargo.toml 2025-01-06 16:32:17.865571999 +0000 +@@ -128,7 +128,6 @@ tempfile = "3.15.0" + [profile.release] + codegen-units = 1 + lto = true +-strip = true + + [[bin]] + name = "starship" diff --git a/build/starship/patches/series b/build/starship/patches/series new file mode 100644 index 000000000..bb790b0f3 --- /dev/null +++ b/build/starship/patches/series @@ -0,0 +1 @@ +do-not-strip-symbol-table.patch diff --git a/doc/baseline b/doc/baseline index edf204e28..f28db5151 100644 --- a/doc/baseline +++ b/doc/baseline @@ -275,6 +275,7 @@ extra.omnios ooce/system/znapzend extra.omnios ooce/system/zrepl extra.omnios ooce/terminal/byobu extra.omnios ooce/terminal/minicom +extra.omnios ooce/terminal/starship extra.omnios ooce/text/asciidoc extra.omnios ooce/text/asciidoctor extra.omnios ooce/text/asciinema diff --git a/doc/packages.md b/doc/packages.md index e26c6f873..d59364997 100644 --- a/doc/packages.md +++ b/doc/packages.md @@ -226,6 +226,7 @@ | ooce/system/zrepl | 0.6.1 | https://github.com/zrepl/zrepl/releases | [omniosorg](https://github.com/omniosorg) | ooce/terminal/byobu | 5.133 | https://launchpad.net/byobu/+download https://launchpad.net/byobu/ | [omniosorg](https://github.com/omniosorg) | ooce/terminal/minicom | 2.9 | https://salsa.debian.org/api/v4/projects/minicom-team%2Fminicom/repository/tags/ https://salsa.debian.org/minicom-team/minicom/ | [omniosorg](https://github.com/omniosorg) +| ooce/terminal/starship | 1.21.1 | https://github.com/starship/starship/releases https://starship.rs | [omniosorg](https://github.com/omniosorg) | ooce/text/asciidoc | 10.2.1 | https://pypi.org/project/asciidoc | [omniosorg](https://github.com/omniosorg) | ooce/text/asciidoctor | 2.0.23 | https://github.com/asciidoctor/asciidoctor/releases/ | [omniosorg](https://github.com/omniosorg) | ooce/text/asciinema | 2.4.0 | https://github.com/asciinema/asciinema/releases | [omniosorg](https://github.com/omniosorg)