commit: 8c7556f073ee9ed76fc37cb35aed52601ae11530 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Dec 23 18:50:17 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Dec 23 18:51:27 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c7556f0
sys-libs/pkgcraft: unbundle sys-libs/scallop, sync with ::pkgcraft-overlay Imported from ::pkgcraft-overlay [0] at commit 5ac6edab4885f6c5937db6f0a7183c341cc7501b. No release yet w/ unbundled scallop so no revbump for that. [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> sys-libs/pkgcraft/pkgcraft-9999.ebuild | 66 ++++++++++++++-------------------- 1 file changed, 26 insertions(+), 40 deletions(-) diff --git a/sys-libs/pkgcraft/pkgcraft-9999.ebuild b/sys-libs/pkgcraft/pkgcraft-9999.ebuild index 4ffc093050e7..1f0b66192358 100644 --- a/sys-libs/pkgcraft/pkgcraft-9999.ebuild +++ b/sys-libs/pkgcraft/pkgcraft-9999.ebuild @@ -3,41 +3,48 @@ EAPI=8 -CRATES=" " +RUST_MIN_VER="1.90.0" -RUST_MIN_VER="1.85.0" - -inherit edo cargo flag-o-matic multiprocessing toolchain-funcs +inherit cargo edo DESCRIPTION="C library for pkgcraft" HOMEPAGE="https://pkgcraft.github.io/" +MY_PN=${PN}-c +MY_P=${MY_PN}-${PV} + if [[ ${PV} == 9999 ]] ; then + SCALLOP_VERSION="9999" EGIT_REPO_URI="https://github.com/pkgcraft/pkgcraft" inherit git-r3 - - S="${WORKDIR}"/${P}/crates/pkgcraft-c - - BDEPEND="test? ( dev-util/cargo-nextest )" + S="${WORKDIR}"/${P}/crates/${MY_PN} else - MY_P=${PN}-c-${PV} + # 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/${MY_P}/${MY_P}.tar.xz" S="${WORKDIR}"/${MY_P} - - KEYWORDS="~amd64 ~arm64" + KEYWORDS="~amd64" fi LICENSE="MIT" -# Dependent crate licenses +# dependent crate licenses LICENSE+=" Apache-2.0 BSD ISC MIT MPL-2.0 Unicode-DFS-2016" SLOT="0/${PV}" -IUSE="test" -RESTRICT="!test? ( test )" -# clang needed for bindgen -BDEPEND+=" +# 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}" +# clang needed by bindgen to generate bash bindings +BDEPEND=" dev-util/cargo-c llvm-core/clang + virtual/pkgconfig " QA_FLAGS_IGNORED="usr/lib.*/libpkgcraft.so.*" @@ -52,6 +59,9 @@ src_unpack() { } src_compile() { + # use system scallop library + export SCALLOP_NO_VENDOR=1 + local cargoargs=( --library-type=cdylib --prefix=/usr @@ -59,33 +69,9 @@ src_compile() { $(usev !debug '--release') ) - # For scallop building bash - tc-export AR CC - - # scallop uses modified bash-5.2 which relies on unprotoyped functions - append-cflags -std=gnu17 - - # Can pass -vv if need more output from e.g. scallop configure edo cargo cbuild "${cargoargs[@]}" } -src_test() { - if [[ ${PV} == 9999 ]] ; then - # It's interesting to test the whole thing rather than just - # pkgcraft-c. - cd "${WORKDIR}"/${P} || die - - local -x NEXTEST_TEST_THREADS="$(makeopts_jobs)" - - # Need nextest per README (separate processes required) - # Invocation from https://github.com/pkgcraft/pkgcraft/blob/main/.github/workflows/ci.yml#L56 - edo cargo nextest run $(usev !debug '--release') --color always --all-features --tests - else - # There are no tests for pkgcraft-c. Test via e.g. dev-python/pkgcraft. - :; - fi -} - src_install() { local cargoargs=( --library-type=cdylib
