public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/fish/
Date: Thu, 13 Mar 2025 17:08:02 +0000 (UTC)	[thread overview]
Message-ID: <1741885619.c449aec6f5bc6a3461c3479c44f6ba7ef95a655f.sam@gentoo> (raw)

commit:     c449aec6f5bc6a3461c3479c44f6ba7ef95a655f
Author:     idealseal <realidealseal <AT> protonmail <DOT> com>
AuthorDate: Thu Mar 13 14:23:28 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 13 17:06:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c449aec6

app-shells/fish: cleanup ebuild, make tests work

Remove all but cargo tests. Upstream has fixes for our test issues but
they weren't backported to 4.0.1.

Closes: https://bugs.gentoo.org/715976
Closes: https://bugs.gentoo.org/727684
Closes: https://bugs.gentoo.org/802873
Closes: https://bugs.gentoo.org/807742
Closes: https://bugs.gentoo.org/838187
Closes: https://bugs.gentoo.org/886161
Closes: https://bugs.gentoo.org/950051
Signed-off-by: idealseal <realidealseal <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-shells/fish/fish-4.0.1.ebuild | 104 ++++++++++----------------------------
 1 file changed, 28 insertions(+), 76 deletions(-)

diff --git a/app-shells/fish/fish-4.0.1.ebuild b/app-shells/fish/fish-4.0.1.ebuild
index 61eb5b15a6b5..5d155c4ce982 100644
--- a/app-shells/fish/fish-4.0.1.ebuild
+++ b/app-shells/fish/fish-4.0.1.ebuild
@@ -10,9 +10,7 @@ declare -A GIT_CRATES=(
 	[pcre2]='https://github.com/fish-shell/rust-pcre2;85b7afba1a9d9bd445779800e5bcafeb732e4421;rust-pcre2-%commit%'
 )
 
-PYTHON_COMPAT=( python3_{11..13} )
-
-inherit cargo cmake python-any-r1 readme.gentoo-r1 xdg
+inherit cargo cmake multiprocessing readme.gentoo-r1 xdg
 
 DESCRIPTION="Friendly Interactive SHell"
 HOMEPAGE="https://fishshell.com/"
@@ -38,34 +36,17 @@ LICENSE="GPL-2 BSD BSD-2 CC0-1.0 GPL-2+ ISC LGPL-2+ MIT PSF-2 ZLIB"
 # Dependent crate licenses
 LICENSE+=" MIT Unicode-DFS-2016 WTFPL-2 ZLIB"
 SLOT="0"
-IUSE="+doc nls split-usr test"
+IUSE="+doc nls test"
 
 RESTRICT="!test? ( test )"
 
 BDEPEND="
 	nls? ( sys-devel/gettext )
-	test? (
-		${PYTHON_DEPS}
-		dev-tcltk/expect
-		$(python_gen_any_dep '
-			dev-python/pexpect[${PYTHON_USEDEP}]
-		')
-	)
 "
-# we don't need sphinx dep for release tarballs
+# Release tarballs contain prebuilt documentation.
 [[ ${PV} == 9999 ]] && BDEPEND+=" doc? ( dev-python/sphinx )"
 
-QA_FLAGS_IGNORED="**bin/fish*"
-
-python_check_deps() {
-	use test || return 0
-	python_has_version "dev-python/pexpect[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-	rust_pkg_setup
-}
+QA_FLAGS_IGNORED="usr/bin/.*"
 
 src_unpack() {
 	if [[ ${PV} == 9999 ]]; then
@@ -76,81 +57,52 @@ src_unpack() {
 	fi
 }
 
-src_prepare() {
-	# workaround for https://github.com/fish-shell/fish-shell/issues/4883
-	if use split-usr; then
-		sed -i 's#${TEST_INSTALL_DIR}/${CMAKE_INSTALL_PREFIX}#${TEST_INSTALL_DIR}#' \
-			cmake/Tests.cmake || die
-	fi
-
-	# remove the build targets from the default build set so they are not wanted
-	# if cmake_src_install is called
-	sed -i \
-		-e '
-		/function(CREATE_TARGET target)/,/endfunction(CREATE_TARGET)/ {
-			s/${target} ALL/${target}/
-		}' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
 src_configure() {
 	local mycmakeargs=(
-		# 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"
+		-DCTEST_PARALLEL_LEVEL="$(makeopts_jobs)"
 		-DINSTALL_DOCS="$(usex doc)"
-		-DWITH_GETTEXT="$(usex nls)"
 	)
-	# release tarballs ship pre-built docs // -DHAVE_PREBUILT_DOCS=TRUE
-	if [[ ${PV} == 9999 ]]; then
-		mycmakeargs+=( -DBUILD_DOCS="$(usex doc)" )
-	else
-		mycmakeargs+=( -DBUILD_DOCS=OFF )
-	fi
-	cargo_src_configure --no-default-features --bin fish --bin fish_indent --bin fish_key_reader
+	cargo_src_configure --no-default-features \
+		--bin fish \
+		--bin fish_indent \
+		--bin fish_key_reader
 	cmake_src_configure
 }
 
 src_compile() {
 	local -x PREFIX="${EPREFIX}/usr"
 	local -x DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+	local -x CMAKE_WITH_GETTEXT="$(usex nls 1 0)"
+
 	# Bug: https://bugs.gentoo.org/950699
 	local -x SYSCONFDIR="${EPREFIX}/etc"
-	local -x CMAKE_WITH_GETTEXT
-	CMAKE_WITH_GETTEXT="$(usex nls 1 0)"
+
+	# Release tarballs contain prebuilt documentation.
+	local -x FISH_BUILD_DOCS
+	if [[ ${PV} == 9999 ]]; then
+		FISH_BUILD_DOCS="$(usex doc 1 0)"
+	else
+		FISH_BUILD_DOCS=0
+	fi
+
 	cargo_src_compile
 
+	# Copy built binaries into the cmake build directory to mark the targets
+	# up-to-date in cmake.
 	for target in fish fish_indent fish_key_reader; do
 		cp "$(cargo_target_dir)/${target}" "${BUILD_DIR}" || die
 	done
+
 	cmake_src_compile
 }
 
 src_test() {
-	# tests will create temporary files
-	local -x TMPDIR="${T}"
-
-	# some tests are fragile, sanitize environment
-	local -x COLUMNS=80
-	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 || :
-	fi
-
-	# 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 || :
-
-	# tests are invoked through the `fish_run_tests` target
-	cargo_env cmake_build fish_run_tests
+	local -x CARGO_TERM_COLOR=always
+	local -x FISH_SOURCE_DIR="${S}"
+	local -x FISH_FORCE_COLOR=1
+	local -x TEST_VERBOSE=1
+	cargo_env cmake_src_test -R cargo-test
 }
 
 src_install() {


             reply	other threads:[~2025-03-13 17:08 UTC|newest]

Thread overview: 145+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 17:08 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-28 15:10 [gentoo-commits] repo/gentoo:master commit in: app-shells/fish/ Sam James
2025-03-13 17:08 Sam James
2025-03-13  9:45 Sam James
2025-03-11  9:11 Sam James
2025-03-11  9:11 Sam James
2025-03-02 17:59 Arthur Zamarin
2025-03-02 17:59 Arthur Zamarin
2025-01-21 14:34 Joonas Niilola
2025-01-21 14:34 Joonas Niilola
2024-12-02  1:06 John Helmert III
2024-08-30 14:59 Ionen Wolkens
2024-08-11 16:57 Petr Vaněk
2024-06-20 13:04 Sam James
2024-06-19  8:46 Sam James
2024-06-19  8:46 Sam James
2024-06-19  8:46 Sam James
2024-06-19  8:46 Sam James
2024-06-19  8:46 Sam James
2024-05-05 12:17 Arthur Zamarin
2024-03-15  4:17 Ulrich Müller
2024-03-09 10:46 Yixun Lan
2024-02-15  7:07 Joonas Niilola
2024-02-15  7:07 Joonas Niilola
2023-08-15  7:34 Sam James
2023-07-20 12:19 Sam James
2023-07-08  3:39 Sam James
2023-07-07  3:36 Sam James
2023-04-05 23:41 Georgy Yakovlev
2023-04-05 23:41 Georgy Yakovlev
2023-04-05 23:41 Georgy Yakovlev
2023-04-05 23:41 Georgy Yakovlev
2023-01-09  9:10 Georgy Yakovlev
2023-01-09  9:10 Georgy Yakovlev
2022-09-20  4:19 Sam James
2022-09-20  1:38 Georgy Yakovlev
2022-09-20  0:23 Georgy Yakovlev
2022-08-11 10:38 Sam James
2022-07-04 21:07 Georgy Yakovlev
2022-07-04 21:07 Georgy Yakovlev
2022-05-19  9:29 Agostino Sarubbo
2022-05-17  9:24 Agostino Sarubbo
2022-05-10 16:39 Jakov Smolić
2022-05-10 16:39 Jakov Smolić
2022-05-01 23:34 Sam James
2022-05-01  1:52 WANG Xuerui
2022-05-01  1:52 WANG Xuerui
2022-04-24 11:06 Jakov Smolić
2022-04-24 11:06 Jakov Smolić
2022-03-27  2:33 Sam James
2022-03-27  2:33 Sam James
2022-03-26 18:21 Lars Wendler
2022-03-18  9:26 Arthur Zamarin
2022-03-17  2:28 Sam James
2022-03-14  6:48 Lars Wendler
2022-03-14  6:48 Lars Wendler
2021-12-23 22:37 Georgy Yakovlev
2021-12-23 22:37 Georgy Yakovlev
2021-12-23 22:37 Georgy Yakovlev
2021-12-23 22:28 Georgy Yakovlev
2021-12-23 22:28 Georgy Yakovlev
2021-12-23 22:28 Georgy Yakovlev
2021-12-23  8:40 Arthur Zamarin
2021-12-23  8:40 Arthur Zamarin
2021-12-22  9:36 Arthur Zamarin
2021-12-21 20:56 Arthur Zamarin
2021-12-21 20:56 Arthur Zamarin
2021-12-21 20:43 Arthur Zamarin
2021-12-21 20:33 Arthur Zamarin
2021-04-07 15:08 Lars Wendler
2021-04-07 15:08 Lars Wendler
2021-03-18  9:19 Lars Wendler
2021-03-02  7:23 Lars Wendler
2021-03-02  7:23 Lars Wendler
2021-02-26 17:34 Sergei Trofimovich
2021-01-07 20:14 Sam James
2021-01-07 10:35 Sam James
2021-01-07 10:09 Sam James
2021-01-06 13:26 Fabian Groffen
2021-01-04  1:32 Sam James
2020-12-13  0:16 Sam James
2020-08-01 19:06 Sergei Trofimovich
2020-07-12  2:41 Sam James
2020-06-18 22:21 Georgy Yakovlev
2020-06-13  6:59 Matt Turner
2020-06-13  6:59 Matt Turner
2020-06-13  6:59 Matt Turner
2020-06-12 18:44 Sergei Trofimovich
2020-06-12 18:44 Sergei Trofimovich
2020-04-29  7:49 Lars Wendler
2020-04-27 20:36 Lars Wendler
2020-04-27 20:36 Lars Wendler
2020-04-13 22:42 Sergei Trofimovich
2020-04-13 22:42 Sergei Trofimovich
2020-03-25  5:09 Georgy Yakovlev
2020-03-03  8:09 Matt Turner
2020-02-13  4:34 Georgy Yakovlev
2020-02-13  4:34 Georgy Yakovlev
2020-02-05 19:26 Sergei Trofimovich
2020-01-27 21:47 Georgy Yakovlev
2019-07-29 14:31 Mikle Kolyada
2019-05-26  7:35 Sergei Trofimovich
2019-05-13 19:59 Aaron Bauman
2019-05-13  9:49 Mikle Kolyada
2019-05-12 21:57 Sergei Trofimovich
2019-04-23 22:08 Aaron Bauman
2019-03-19  0:54 Georgy Yakovlev
2019-02-19 21:17 Georgy Yakovlev
2019-02-19 21:17 Georgy Yakovlev
2019-02-11 17:07 Georgy Yakovlev
2018-12-29 23:43 Georgy Yakovlev
2018-12-29 23:43 Georgy Yakovlev
2018-12-29 23:43 Georgy Yakovlev
2018-12-29  8:43 Georgy Yakovlev
2018-12-28 18:39 Georgy Yakovlev
2018-12-28 18:39 Georgy Yakovlev
2018-06-17  1:18 Georgy Yakovlev
2018-06-04 19:25 Mart Raudsepp
2018-04-24 10:39 Mikle Kolyada
2018-04-11 20:43 Thomas Deutschmann
2018-04-11 13:42 Lars Wendler
2018-04-06 11:05 Fabian Groffen
2018-03-30  3:10 Aaron Bauman
2018-03-27  8:50 Lars Wendler
2018-02-11 10:25 Michał Górny
2018-01-23  5:58 Markus Meier
2017-12-28 15:54 Lars Wendler
2017-11-23 14:49 Lars Wendler
2017-11-07 12:50 Lars Wendler
2017-11-07 12:50 Lars Wendler
2017-10-26 18:54 Thomas Deutschmann
2017-10-03  8:25 Sergei Trofimovich
2017-06-07  0:55 Lars Wendler
2017-02-21  9:30 Lars Wendler
2017-01-13 10:36 Lars Wendler
2017-01-02 10:32 Lars Wendler
2016-12-17  5:19 Aaron Bauman
2016-11-09  8:40 Lars Wendler
2016-11-08 18:49 Lars Wendler
2016-07-10 12:33 Lars Wendler
2016-07-06 12:30 Lars Wendler
2016-07-06  9:23 Agostino Sarubbo
2016-06-06 13:33 Agostino Sarubbo
2016-05-24  8:00 Lars Wendler
2015-10-16  9:18 Patrice Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1741885619.c449aec6f5bc6a3461c3479c44f6ba7ef95a655f.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox