diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2026-03-04 07:13:39 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2026-03-04 07:13:39 +0000 |
| commit | 37e5aa98a3c3dac9379fe0b80983f21488c3c5f9 (patch) | |
| tree | 40a1b58a345114f8ce217b4931f135fd3fa5abf6 /app-shells | |
| parent | 0949a35b020584a14ff753275f142f2d9b476a18 (diff) | |
| download | baldeagleos-repo-37e5aa98a3c3dac9379fe0b80983f21488c3c5f9.tar.gz baldeagleos-repo-37e5aa98a3c3dac9379fe0b80983f21488c3c5f9.tar.xz baldeagleos-repo-37e5aa98a3c3dac9379fe0b80983f21488c3c5f9.zip | |
Adding metadata
Diffstat (limited to 'app-shells')
| -rw-r--r-- | app-shells/fish/fish-4.5.0-r2.ebuild | 141 | ||||
| -rw-r--r-- | app-shells/fish/fish-9999.ebuild | 93 |
2 files changed, 203 insertions, 31 deletions
diff --git a/app-shells/fish/fish-4.5.0-r2.ebuild b/app-shells/fish/fish-4.5.0-r2.ebuild new file mode 100644 index 000000000000..bf7470378a5b --- /dev/null +++ b/app-shells/fish/fish-4.5.0-r2.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_{10..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 +} diff --git a/app-shells/fish/fish-9999.ebuild b/app-shells/fish/fish-9999.ebuild index f28fb1acfa56..43897415e1ba 100644 --- a/app-shells/fish/fish-9999.ebuild +++ b/app-shells/fish/fish-9999.ebuild @@ -14,7 +14,9 @@ fi RUST_MIN_VER="1.85.0" -inherit cargo cmake readme.gentoo-r1 xdg +PYTHON_COMPAT=( python3_{10..14} ) + +inherit cargo cmake python-any-r1 readme.gentoo-r1 xdg DESCRIPTION="Friendly Interactive SHell" HOMEPAGE="https://fishshell.com/" @@ -46,18 +48,46 @@ RESTRICT="!test? ( test )" BDEPEND=" virtual/pkgconfig - doc? ( dev-python/sphinx ) + ${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}" -PATCHES=( - "${FILESDIR}/${PN}-4.4.0-use-cargo-eclass-for-build.patch" -) - 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 @@ -70,41 +100,42 @@ src_unpack() { src_configure() { local mycmakeargs=( -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" - -DWITH_DOCS="$(usex doc)" - -DWITH_MESSAGE_LOCALIZATION="$(usex nls 1 0)" + -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}" ) - - cargo_src_configure --no-default-features - cmake_src_configure + local -x CMAKE_BUILD_TYPE="$(usex debug Debug Release)" + cargo_env cmake_src_configure } src_compile() { - local -x PREFIX="${EPREFIX}/usr" - local -x DATADIR="${EPREFIX}/usr/share" - local -x DOCDIR="${EPREFIX}/usr/share/doc/${PF}" - - # Bug: https://bugs.gentoo.org/950699 - local -x SYSCONFDIR="${EPREFIX}/etc" - - local -x FISH_BUILD_DOCS - FISH_BUILD_DOCS="$(usex doc 1 0)" - - # HACK: Let the rust build script know we are using CMake. - # Bug: https://bugs.gentoo.org/970077 - local -x FISH_CMAKE_BINARY_DIR="${BUILD_DIR}" - - cargo_src_compile + local -x CARGO_TERM_COLOR=always + cargo_env cmake_src_compile } src_test() { - local -x CARGO_TERM_COLOR=always - local -x TEST_VERBOSE=1 - # cargo_env cmake_src_compile fish_run_tests - cargo_env cmake_src_test fish_run_tests + # 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 \ + || : + + if [[ ${PV} == 9999 ]]; then + # https://github.com/fish-shell/fish-shell/issues/12497 + rm -v tests/checks/version.fish || : + fi + + cargo_env cmake_build fish_run_tests } src_install() { - cmake_src_install + cargo_env cmake_src_install keepdir /usr/share/fish/vendor_{completions,conf,functions}.d readme.gentoo_create_doc } |
