diff --git a/app-shells/fish/Manifest b/app-shells/fish/Manifest index 9611799b7c943..221f788c819f2 100644 --- a/app-shells/fish/Manifest +++ b/app-shells/fish/Manifest @@ -1,5 +1,7 @@ DIST fish-4.4.0.tar.xz 2570412 BLAKE2B 93b74dc8c17c8d1d437b2a170715e7963d29a78781520fbb7181bfbfc158c1c1f1a245f15621cb326d4f81dc097084cd54bb14c890fee7b7ab9022a5a41f98d1 SHA512 7d5f3f43e1478ffbf46119ad535b9ece57450751aea059ce520828733733ecc8dbe6b9581703bc3150b015eb2e3b910e28284bb8b25ee05fcad24e477fd99a93 DIST fish-4.5.0.tar.xz 2567056 BLAKE2B 1ac4bb151d8513e7f772e4be239d7c634ae5e002761f8959158f7ab43a5483b70741489c43eb9d8faf513a3e3ec085571e44c7c2b860555d0b42b21f6b2d8859 SHA512 c1e4df76a9dc77a9bcf66872f79def5473f152e013281dadc41564dbcb528d0c1c80d4af93e6d7ff524f49f72cb500173d666763811a11adab5fc632fa1fcde8 +DIST fish-4.6.0.tar.xz 2596788 BLAKE2B 01981f100b28443556b2de6ea68f644d445cc22f66871cd5a9b74c007bfc7873e51fd386b1f5459a6c795d4e9bf68979a13064d2b89308cb4181293c67ff6e1b SHA512 2acc6453f102b570f0f2765739a020f63051b7ee2a7f49d086459287c9e5a8658294b0081904b4897315195c6510a7e53794da9937f6f64aa53c65eb448d68b5 DIST fish-shell-4.4.0-crates.tar.xz 7073424 BLAKE2B 256672c8061cdb257abd9e9371476237cce12d3f3b7af1bdb133eec27a5b507611d512723eccaacb8579646002eb56e8924e83abf3b6bc267f6d1a1919d16199 SHA512 842925fac09a5ae741ff1a809776bfb700f5de303d7bbd3fb3b62bf685218e53ba7fc10d61893c78f98ba4bb7494e7431a31aeffe8b201862dabb3f077329838 DIST fish-shell-4.5.0-crates.tar.xz 6870016 BLAKE2B 9d2d3f7840f4abb80e632cb565ec00c5af0829cec19eb5ac54b9e988e71f9bb8a17f644a69d6e78a61760dd9e5e880b2b0388c701e57bf99bbdd75a988a440c9 SHA512 7710995bc6e872fce68b0a813bd743f4d208343e7a30430492684e2ae775d6541940742523defacae6fd56d70e831ae482d22e82ee879fd02e91e0936566ae58 +DIST fish-shell-4.6.0-crates.tar.xz 6863628 BLAKE2B 670aab10a1e0fa3ec8f7d3bc56319a5dbcf4cc7c57861546e17f246e77131dd249bcf32f2b08fb4a510b4235a3e766cbe494119d079deb72ccfa55a901501987 SHA512 2dd2b4421ef126e355cc6df6c46bd059bee69fe22524afd84a5a0f2347bcc4d56abb8c04e0c7cb58ee782ef30000038588807922245ffc497d7a822448d4f49c DIST rust-pcre2-85b7afba1a9d9bd445779800e5bcafeb732e4421.gh.tar.gz 743187 BLAKE2B 533671ee8e97e65b93aa9103135848e8a85d79a2f525100aa0120500def9479675f6140878fa7b9bb248e51175ceac7c5710ce247af6e10385a00b23c8986b68 SHA512 9323e4d11708d8dc0e7ed607e97b8d4fac6f4a0b955e5e07b76da8152178888bc0ae2d2c109dd58b97d5faa037216e88365fcacb606f23f912d2edb82ede23ad diff --git a/app-shells/fish/fish-4.6.0.ebuild b/app-shells/fish/fish-4.6.0.ebuild new file mode 100644 index 0000000000000..c84c837afd48c --- /dev/null +++ b/app-shells/fish/fish-4.6.0.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES="" + +if [[ ${PV} != 9999 ]]; then + declare -A GIT_CRATES=( + [pcre2-sys]='https://github.com/fish-shell/rust-pcre2;85b7afba1a9d9bd445779800e5bcafeb732e4421;rust-pcre2-%commit%/pcre2-sys' + [pcre2]='https://github.com/fish-shell/rust-pcre2;85b7afba1a9d9bd445779800e5bcafeb732e4421;rust-pcre2-%commit%' + ) +fi + +RUST_MIN_VER="1.85.0" + +PYTHON_COMPAT=( python3_{11..14} ) + +inherit cargo cmake python-any-r1 readme.gentoo-r1 xdg + +DESCRIPTION="Friendly Interactive SHell" +HOMEPAGE="https://fishshell.com/" + +MY_PV="${PV/_beta/b}" +MY_P="${PN}-${MY_PV}" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/fish-shell/fish-shell.git" +else + SRC_URI=" + https://github.com/fish-shell/fish-shell/releases/download/${MY_PV}/${MY_P}.tar.xz + https://github.com/gentoo-crate-dist/fish-shell/releases/download/${MY_PV}/fish-shell-${MY_PV}-crates.tar.xz + ${CARGO_CRATE_URIS} + " + KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x64-macos" +fi + +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2 BSD BSD-2 CC0-1.0 GPL-2+ ISC LGPL-2+ MIT PSF-2 ZLIB" +# Dependent crate licenses +LICENSE+=" Apache-2.0 MIT MPL-2.0 Unicode-3.0 ZLIB" +SLOT="0" +IUSE="+doc nls test" + +RESTRICT="!test? ( test )" + +BDEPEND=" + virtual/pkgconfig + ${PYTHON_USEDEP} + doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') ) + nls? ( sys-devel/gettext ) + test? ( + app-misc/tmux + dev-vcs/git + sys-apps/less + $(python_gen_any_dep 'dev-python/pexpect[${PYTHON_USEDEP}]') + ) +" +DEPEND="dev-libs/libpcre2[pcre32]" +RDEPEND="${DEPEND}" + +QA_FLAGS_IGNORED="usr/bin/.*" + +python_check_deps() { + if use doc; then + python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" || return 1 + fi + if use test; then + python_has_version "dev-python/pexpect[${PYTHON_USEDEP}]" || return 1 + fi +} + +pkg_setup() { + if use doc || use test; then + python-any-r1_pkg_setup + fi + rust_pkg_setup + + export PKG_CONFIG_ALLOW_CROSS=1 +} + +src_prepare() { + # Bug: https://bugs.gentoo.org/952080 + sed -e '/^lto = /d' -i Cargo.toml || die "Failed to remove LTO from cargo package" + + cmake_src_prepare +} + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + cargo_live_src_unpack + else + cargo_src_unpack + fi +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" + -DCMAKE_INSTALL_DATADIR="${EPREFIX}/usr/share" + -DWITH_DOCS="$(usex doc ON OFF)" + -DWITH_MESSAGE_LOCALIZATION="$(usex nls ON OFF)" + -DRust_CARGO="${CARGO}" + -DRust_COMPILER="${RUSTC}" + ) + local -x CMAKE_BUILD_TYPE="$(usex debug Debug Release)" + cargo_env cmake_src_configure +} + +src_compile() { + local -x CARGO_TERM_COLOR=always + cargo_env cmake_src_compile +} + +src_test() { + # Very fragile tests, don't seem to work in sandboxed environment. + # No die to allow repeating tests. + rm -v \ + tests/checks/tmux-pager.fish \ + tests/checks/tmux-wrapping.fish \ + tests/checks/tmux-commandline.fish \ + tests/checks/tmux-prompt.fish \ + tests/pexpects/terminal.py \ + || : + + cargo_env cmake_build fish_run_tests +} + +src_install() { + cargo_env cmake_src_install + keepdir /usr/share/fish/vendor_{completions,conf,functions}.d + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + xdg_pkg_postinst +}