commit: fae4214c0372f1adc371129313864d860bba09d2 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Dec 23 18:37:36 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Dec 23 18:38:34 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fae4214c
dev-vcs/pkgcruft-git: unbundle sys-libs/scallop, sync with ::pkgcraft-overlay Imported from ::pkgcraft-overlay [0] at commit 5ac6edab4885f6c5937db6f0a7183c341cc7501b. I've kept the test restriction as I can still get a link failure with LTO but not poked more yet. Also kept --release for tests as with the rest of the suite for now. [0] https://github.com/pkgcraft/pkgcraft-overlay Co-authored-by: Tim Harder <radhermit <AT> gentoo.org> Signed-off-by: Sam James <sam <AT> gentoo.org> dev-vcs/pkgcruft-git/pkgcruft-git-0.0.5-r2.ebuild | 81 +++++++++++++++++++++++ dev-vcs/pkgcruft-git/pkgcruft-git-9999.ebuild | 53 +++++++-------- 2 files changed, 105 insertions(+), 29 deletions(-) diff --git a/dev-vcs/pkgcruft-git/pkgcruft-git-0.0.5-r2.ebuild b/dev-vcs/pkgcruft-git/pkgcruft-git-0.0.5-r2.ebuild new file mode 100644 index 000000000000..4e9de853122d --- /dev/null +++ b/dev-vcs/pkgcruft-git/pkgcruft-git-0.0.5-r2.ebuild @@ -0,0 +1,81 @@ +# Copyright 2023-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( {19..21} ) +RUST_MIN_VER="1.90.0" + +inherit cargo edo llvm-r2 multiprocessing + +DESCRIPTION="QA support for verifying git commits via pkgcruft" +HOMEPAGE="https://pkgcraft.github.io/" + +if [[ ${PV} == 9999 ]] ; then + SCALLOP_VERSION="9999" + EGIT_REPO_URI="https://github.com/pkgcraft/pkgcraft" + inherit git-r3 + S="${WORKDIR}"/${P}/crates/${PN} +else + # For releases, SCALLOP_VERSION must match the value of PACKAGE_VERSION in + # the vendored library's configure script. + # + # To get the value from the repo use the following command: + # sed -rn "/^PACKAGE_VERSION=/ s/^.*='(.*)'/\1/p" **/scallop/bash/configure + SCALLOP_VERSION="5.3.9.20251212" + SRC_URI="https://github.com/pkgcraft/pkgcraft/releases/download/${P}/${P}.tar.xz" + KEYWORDS="~amd64" +fi + +LICENSE="MIT" +# dependent crate licenses +LICENSE+=" + Apache-2.0 BSD-2 BSD CC0-1.0 CDLA-Permissive-2.0 ISC MIT MPL-2.0 + Unicode-3.0 +" +SLOT="0" +IUSE="test" +# Fails to link w/ missing tree-sitter or libssh2 with some CFLAGS +# TODO: Debug and report upstream +RESTRICT="!test? ( test ) test" + +# Strict dependency versioning is required since the system library must match +# the vendored copy as scallop exports many parts of bash that aren't meant to +# be a public interface and compatibility is not guaranteed between releases. +RDEPEND="~sys-libs/scallop-${SCALLOP_VERSION}" +DEPEND=" + ${RDEPEND} + dev-libs/libgit2:= + dev-libs/openssl:= +" +# clang needed by bindgen to generate bash bindings +BDEPEND+=" + dev-libs/protobuf[protoc(+)] + virtual/pkgconfig + $(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}') + test? ( dev-util/cargo-nextest ) +" + +QA_FLAGS_IGNORED="usr/bin/pkgcruft-git" + +pkg_setup() { + llvm-r2_pkg_setup + rust_pkg_setup + + # use system scallop library + export SCALLOP_NO_VENDOR=1 +} + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + cargo_live_src_unpack + else + cargo_src_unpack + fi +} + +src_test() { + local -x NEXTEST_TEST_THREADS="$(makeopts_jobs)" + edo cargo nextest run $(usev !debug '--release') --color always --tests --no-fail-fast +} diff --git a/dev-vcs/pkgcruft-git/pkgcruft-git-9999.ebuild b/dev-vcs/pkgcruft-git/pkgcruft-git-9999.ebuild index 2a63acf9b8c4..4e9de853122d 100644 --- a/dev-vcs/pkgcruft-git/pkgcruft-git-9999.ebuild +++ b/dev-vcs/pkgcruft-git/pkgcruft-git-9999.ebuild @@ -3,48 +3,56 @@ EAPI=8 -CRATES=" " -LLVM_COMPAT=( {17..21} ) +LLVM_COMPAT=( {19..21} ) RUST_MIN_VER="1.90.0" -inherit cargo edo llvm-r2 multiprocessing toolchain-funcs +inherit cargo edo llvm-r2 multiprocessing DESCRIPTION="QA support for verifying git commits via pkgcruft" HOMEPAGE="https://pkgcraft.github.io/" if [[ ${PV} == 9999 ]] ; then + SCALLOP_VERSION="9999" EGIT_REPO_URI="https://github.com/pkgcraft/pkgcraft" inherit git-r3 - S="${WORKDIR}"/${P}/crates/${PN} else + # For releases, SCALLOP_VERSION must match the value of PACKAGE_VERSION in + # the vendored library's configure script. + # + # To get the value from the repo use the following command: + # sed -rn "/^PACKAGE_VERSION=/ s/^.*='(.*)'/\1/p" **/scallop/bash/configure + SCALLOP_VERSION="5.3.9.20251212" SRC_URI="https://github.com/pkgcraft/pkgcraft/releases/download/${P}/${P}.tar.xz" - KEYWORDS="~amd64" fi LICENSE="MIT" -# Dependent crate licenses +# dependent crate licenses LICENSE+=" Apache-2.0 BSD-2 BSD CC0-1.0 CDLA-Permissive-2.0 ISC MIT MPL-2.0 Unicode-3.0 " SLOT="0" IUSE="test" -# Fails to link w/ missing libssh2 with some CFLAGS +# Fails to link w/ missing tree-sitter or libssh2 with some CFLAGS +# TODO: Debug and report upstream RESTRICT="!test? ( test ) test" +# Strict dependency versioning is required since the system library must match +# the vendored copy as scallop exports many parts of bash that aren't meant to +# be a public interface and compatibility is not guaranteed between releases. +RDEPEND="~sys-libs/scallop-${SCALLOP_VERSION}" DEPEND=" + ${RDEPEND} dev-libs/libgit2:= dev-libs/openssl:= " -RDEPEND="${DEPEND}" -# clang needed for bindgen +# clang needed by bindgen to generate bash bindings BDEPEND+=" - $(llvm_gen_dep ' - llvm-core/clang:${LLVM_SLOT} - ') dev-libs/protobuf[protoc(+)] + virtual/pkgconfig + $(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}') test? ( dev-util/cargo-nextest ) " @@ -53,6 +61,9 @@ QA_FLAGS_IGNORED="usr/bin/pkgcruft-git" pkg_setup() { llvm-r2_pkg_setup rust_pkg_setup + + # use system scallop library + export SCALLOP_NO_VENDOR=1 } src_unpack() { @@ -64,23 +75,7 @@ src_unpack() { fi } -src_compile() { - # For scallop building bash - # TODO: Package scallop - tc-export AR CC - - cargo_src_compile -} - src_test() { - unset CLICOLOR CLICOLOR_FORCE - - # TODO: Maybe move into eclass (and maybe have a cargo_enable_tests - # helper) local -x NEXTEST_TEST_THREADS="$(makeopts_jobs)" - - edo cargo nextest run $(usev !debug '--release') \ - --color always \ - --tests \ - --no-fail-fast + edo cargo nextest run $(usev !debug '--release') --color always --tests --no-fail-fast }
