From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6F2041584F2 for ; Thu, 13 Mar 2025 17:08:08 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 5A1AD3431AB for ; Thu, 13 Mar 2025 17:08:08 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id B13161103C8; Thu, 13 Mar 2025 17:08:04 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A66871103C8 for ; Thu, 13 Mar 2025 17:08:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 573993431AC for ; Thu, 13 Mar 2025 17:08:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E6F4E2558 for ; Thu, 13 Mar 2025 17:08:02 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1741885619.d7389b63c47c153c1024f0cae47b342095ba80ed.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/fish/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-shells/fish/fish-9999.ebuild X-VCS-Directories: app-shells/fish/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: d7389b63c47c153c1024f0cae47b342095ba80ed X-VCS-Branch: master Date: Thu, 13 Mar 2025 17:08:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d8bfd215-edaa-47b9-9d15-593bef25ca90 X-Archives-Hash: 25b2b58f2d457d704452d92176459405 commit: d7389b63c47c153c1024f0cae47b342095ba80ed Author: idealseal protonmail com> AuthorDate: Thu Mar 13 14:24:22 2025 +0000 Commit: Sam James gentoo org> CommitDate: Thu Mar 13 17:06:59 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7389b63 app-shells/fish: sync live ebuild Enable nearly all of tests again. Signed-off-by: idealseal protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/41060 Signed-off-by: Sam James gentoo.org> app-shells/fish/fish-9999.ebuild | 106 +++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 60 deletions(-) diff --git a/app-shells/fish/fish-9999.ebuild b/app-shells/fish/fish-9999.ebuild index 443624f2a4d8..6912899db052 100644 --- a/app-shells/fish/fish-9999.ebuild +++ b/app-shells/fish/fish-9999.ebuild @@ -5,7 +5,10 @@ EAPI=8 PYTHON_COMPAT=( python3_{11..13} ) -inherit cargo cmake python-any-r1 readme.gentoo-r1 xdg +# Tests fail when build directory is not inside source directory. +BUILD_DIR="${S}/build" + +inherit cargo cmake multiprocessing python-any-r1 readme.gentoo-r1 xdg DESCRIPTION="Friendly Interactive SHell" HOMEPAGE="https://fishshell.com/" @@ -19,9 +22,10 @@ if [[ ${PV} == 9999 ]]; then 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" + KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" fi S="${WORKDIR}/${MY_P}" @@ -30,7 +34,7 @@ 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 )" @@ -38,16 +42,15 @@ BDEPEND=" nls? ( sys-devel/gettext ) test? ( ${PYTHON_DEPS} - dev-tcltk/expect $(python_gen_any_dep ' dev-python/pexpect[${PYTHON_USEDEP}] ') ) " -# we don't need shpinx dep for release tarballs +# Release tarballs contain prebuilt documentation. [[ ${PV} == 9999 ]] && BDEPEND+=" doc? ( dev-python/sphinx )" -QA_FLAGS_IGNORED="**bin/fish*" +QA_FLAGS_IGNORED="usr/bin/.*" python_check_deps() { use test || return 0 @@ -68,89 +71,72 @@ 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 files built with cargo_src_compile into the cmake build directory, - # so when we run cmake_src_install they are not rebuild + # 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_install() { - cmake_src_install - keepdir /usr/share/fish/vendor_{completions,conf,functions}.d - readme.gentoo_create_doc + cmake_src_compile } src_test() { - # tests will create temporary files + # Tests will create temporary directories. local -x TMPDIR="${T}" - # some tests are fragile, sanitize environment + # Otherwise the dimension will be 0x0 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 + # Both depend in locale variables which might not be available. + # No die to allow repeated test runs. + rm -v tests/checks/{basic,locale}.fish || : + + # Gets skipped when tmux is missing, but we want consistency across different systems. + # No die to allow repeated test runs. + rm -v tests/checks/tmux-*.fish || : - # 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 || : + # Enable colored output for building tests. + local -x CARGO_TERM_COLOR=always + # TODO: Figure out why we link again. + cargo_env cmake_build fish_run_tests +} - # cmake_src_test will invoke ctest but required files are missing - cargo_env cmake_build test +src_install() { + cmake_src_install + keepdir /usr/share/fish/vendor_{completions,conf,functions}.d + readme.gentoo_create_doc } pkg_postinst() {