summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2023-01-09 01:10:19 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2023-01-09 01:10:38 -0800
commitc7464b451fe54c8d125852133156c8990e1231e6 (patch)
tree92d7c757d742d34005b2b5e609d4ded66eb351bf
parentapp-shells/fish: add 3.6.0 (diff)
downloadgentoo-c7464b451fe54c8d125852133156c8990e1231e6.tar.gz
gentoo-c7464b451fe54c8d125852133156c8990e1231e6.tar.bz2
gentoo-c7464b451fe54c8d125852133156c8990e1231e6.zip
app-shells/fish: sync live ebuild
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
-rw-r--r--app-shells/fish/fish-9999.ebuild27
1 files changed, 20 insertions, 7 deletions
diff --git a/app-shells/fish/fish-9999.ebuild b/app-shells/fish/fish-9999.ebuild
index fe718cdc3436..7c8b6a2c6584 100644
--- a/app-shells/fish/fish-9999.ebuild
+++ b/app-shells/fish/fish-9999.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
-inherit cmake python-any-r1 readme.gentoo-r1
+inherit cmake python-any-r1 readme.gentoo-r1 xdg
DESCRIPTION="Friendly Interactive SHell"
HOMEPAGE="https://fishshell.com/"
@@ -23,7 +23,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="+doc nls test"
+IUSE="+doc nls split-usr test"
RESTRICT="!test? ( test )"
@@ -56,14 +56,21 @@ python_check_deps() {
src_prepare() {
# workaround for https://github.com/fish-shell/fish-shell/issues/4883
- sed -i 's#${TEST_INSTALL_DIR}/${CMAKE_INSTALL_PREFIX}#${TEST_INSTALL_DIR}#' \
- cmake/Tests.cmake || die
+ if use split-usr; then
+ sed -i 's#${TEST_INSTALL_DIR}/${CMAKE_INSTALL_PREFIX}#${TEST_INSTALL_DIR}#' \
+ cmake/Tests.cmake || die
+ fi
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
- -DCMAKE_INSTALL_BINDIR="${EPREFIX}/bin"
+ # installing into /bin breaks tests on merged usr systems.
+ # sbin -> bin symlink confuses tests.
+ # so on split-usr we install to /bin.
+ # on merge-usr we set sbindir to bin.
+ $(usex split-usr "-DCMAKE_INSTALL_BINDIR=${EPREFIX}/bin" \
+ "-DCMAKE_INSTALL_SBINDIR=${EPREFIX}/usr/bin")
-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
-DCURSES_NEED_NCURSES=ON
-DINSTALL_DOCS="$(usex doc)"
@@ -90,13 +97,18 @@ src_test() {
local -x LINES=24
# very fragile, depends on terminal, size, tmux, screen and timing
+ # no die is intentional, for repeated test runs
if [[ ${PV} != 9999 ]]; then
- rm -v tests/pexpects/terminal.py || die
+ rm -v tests/pexpects/terminal.py || :
fi
# zfs completion test will fail with "Permission denied the ZFS utilities must be run as root."
mv "${S}"/share/completions/zfs.{fish,disabled} || die
+ # TODO: fix tests & submit upstream
+ # tests are confused by usr/sbin -> bin symlink, no die is intentional for repeated test runs
+ use split-usr || rm -v tests/checks/{redirect,type}.fish || :
+
cmake_build test
# now restore zfs completions
@@ -105,4 +117,5 @@ src_test() {
pkg_postinst() {
readme.gentoo_print_elog
+ xdg_pkg_postinst
}