Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/fish/
Date: Mon, 04 Jul 2022 21:07:54
Message-Id: 1656968844.b360952c80adbd55b84bb3aca972bec20a794293.gyakovlev@gentoo
1 commit: b360952c80adbd55b84bb3aca972bec20a794293
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 4 21:06:02 2022 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 4 21:07:24 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b360952c
7
8 app-shells/fish: add 3.5.0
9
10 Closes: https://bugs.gentoo.org/854987
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 app-shells/fish/Manifest | 1 +
14 app-shells/fish/fish-3.5.0.ebuild | 108 ++++++++++++++++++++++++++++++++++++++
15 2 files changed, 109 insertions(+)
16
17 diff --git a/app-shells/fish/Manifest b/app-shells/fish/Manifest
18 index 86348f3b4176..bb92772d4c31 100644
19 --- a/app-shells/fish/Manifest
20 +++ b/app-shells/fish/Manifest
21 @@ -1,2 +1,3 @@
22 DIST fish-3.4.0.tar.xz 3292216 BLAKE2B 3691e5387a8392d7d43b3b0f8b893e83e246c3532684e95a19c7b2eb4ebe80bcf04aaa1b965f5c4f6d782d0ae52269bb1cdafef76845b02f9f99d4c82ea77ce3 SHA512 463ee8d86815520c6de9777fd2b5975f06cc0842137c86cca7ae0331e95d74e755bf6f4b0bdea7e96c11371436ff9f97ce483ae026daa1e8d385f6cad8860ed4
23 DIST fish-3.4.1.tar.xz 3293068 BLAKE2B 5edcd59445e6d928fb2183deb68fb0a305f6f80c134fef48ea79d91b79af1da6b31a1e870a9df963bb27dfc5985f326d9b6d53d64b16c79f9c303aa8edfa4423 SHA512 20a2892ec0c413c4c3fcfe5fbf52fb2398de35a9172758728bd2ccdccc5fb6e0e18712a664d02db67543d47180a4d04f3998a6297d23088926b6d03baefdf981
24 +DIST fish-3.5.0.tar.xz 3326276 BLAKE2B ac8fa514a728af5bc02ea02f57344d92d3d897c5dda3a2a32b6dbaab81c795828da0cc6938f19bb6d538aa1e620b67de72225fa73b52405c94e1eecab2299faa SHA512 ccec4abcdb425563688c6112f3c9c57add16aa3a05c121d2633b655d27185e1c96c263d51d6af7d83c068580d7d0723c072f1a4853fa8b6736291beeab64b859
25
26 diff --git a/app-shells/fish/fish-3.5.0.ebuild b/app-shells/fish/fish-3.5.0.ebuild
27 new file mode 100644
28 index 000000000000..d0328d498838
29 --- /dev/null
30 +++ b/app-shells/fish/fish-3.5.0.ebuild
31 @@ -0,0 +1,108 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +PYTHON_COMPAT=( python3_{8..11} )
38 +
39 +inherit cmake python-any-r1 readme.gentoo-r1
40 +
41 +DESCRIPTION="Friendly Interactive SHell"
42 +HOMEPAGE="http://fishshell.com/"
43 +
44 +MY_PV="${PV/_beta/b}"
45 +MY_P="${PN}-${MY_PV}"
46 +
47 +if [[ ${PV} == "9999" ]]; then
48 + inherit git-r3
49 + EGIT_REPO_URI="https://github.com/${PN}-shell/${PN}-shell.git"
50 +else
51 + SRC_URI="https://github.com/${PN}-shell/${PN}-shell/releases/download/${MY_PV}/${MY_P}.tar.xz"
52 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
53 +fi
54 +
55 +LICENSE="GPL-2"
56 +SLOT="0"
57 +IUSE="+doc nls test"
58 +
59 +RESTRICT="!test? ( test )"
60 +
61 +RDEPEND="
62 + >=dev-libs/libpcre2-10.32:=[pcre32]
63 + sys-apps/coreutils
64 + sys-libs/ncurses:=[unicode(+)]
65 +"
66 +
67 +DEPEND="${RDEPEND}"
68 +BDEPEND="
69 + nls? ( sys-devel/gettext )
70 + test? (
71 + ${PYTHON_DEPS}
72 + dev-tcltk/expect
73 + $(python_gen_any_dep '
74 + dev-python/pexpect[${PYTHON_USEDEP}]
75 + ')
76 + )
77 +"
78 +# we don't need shpinx dep for release tarballs
79 +[[ ${PV} == 9999 ]] && DEPEND+=" doc? ( dev-python/sphinx )"
80 +
81 +S="${WORKDIR}/${MY_P}"
82 +
83 +python_check_deps() {
84 + use test || return 0
85 + has_version -d "dev-python/pexpect[${PYTHON_USEDEP}]"
86 +}
87 +
88 +src_prepare() {
89 + # workaround for https://github.com/fish-shell/fish-shell/issues/4883
90 + sed -i 's#${TEST_INSTALL_DIR}/${CMAKE_INSTALL_PREFIX}#${TEST_INSTALL_DIR}#' \
91 + cmake/Tests.cmake || die
92 + cmake_src_prepare
93 +}
94 +
95 +src_configure() {
96 + local mycmakeargs=(
97 + -DCMAKE_INSTALL_BINDIR="${EPREFIX}/bin"
98 + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
99 + -DCURSES_NEED_NCURSES=ON
100 + -DINSTALL_DOCS="$(usex doc)"
101 + -DWITH_GETTEXT="$(usex nls)"
102 + )
103 + # release tarballs ship pre-built docs // -DHAVE_PREBUILT_DOCS=TRUE
104 + if [[ ${PV} == 9999 ]]; then
105 + mycmakeargs+=( -DBUILD_DOCS="$(usex doc)" )
106 + else
107 + mycmakeargs+=( -DBUILD_DOCS=OFF )
108 + fi
109 + cmake_src_configure
110 +}
111 +
112 +src_install() {
113 + cmake_src_install
114 + keepdir /usr/share/fish/vendor_{completions,conf,functions}.d
115 + readme.gentoo_create_doc
116 +}
117 +
118 +src_test() {
119 + # some tests are fragile, sanitize environment
120 + local -x COLUMNS=80
121 + local -x LINES=24
122 +
123 + # very fragile, depends on terminal, size, tmux, screen and timing
124 + if [[ ${PV} != 9999 ]]; then
125 + rm -v tests/pexpects/terminal.py || die
126 + fi
127 +
128 + # zfs completion test will fail with "Permission denied the ZFS utilities must be run as root."
129 + mv "${S}"/share/completions/zfs.{fish,disabled} || die
130 +
131 + cmake_build test
132 +
133 + # now restore zfs completions
134 + mv "${S}"/share/completions/zfs.{disabled,fish} || die
135 +}
136 +
137 +pkg_postinst() {
138 + readme.gentoo_print_elog
139 +}