dev-util/pkgcruft: add 0.0.18

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2025-12-21 10:35:43 +00:00
parent 02111f37a0
commit 9572692ffd
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
3 changed files with 101 additions and 2 deletions

View File

@ -1 +1,2 @@
DIST pkgcruft-0.0.16.tar.xz 42817544 BLAKE2B 351e3485ac7ff9c78bbeb768e7af7600921b2edecde7ec5c9d2bedc4ca980a4037ff23e4d3a1a27ffffc2cc5755fe23e7d3b86ab545eb0906f3b85dc6d72c680 SHA512 d5696896f41562723374fbcfc274cd60b5c556af4e0d9b093f56ebfb0ad0a15bd9496376e3da3400f5a955d47a18dfbe537c514a783b01b2df3cb7418c61880b
DIST pkgcruft-0.0.18.tar.xz 35590536 BLAKE2B 07db1fa74888f5fd9a5cf900ef04c69e082fe02c5e8d10b1315c9f07ea4ddfbf8078f3d7555ac1ba3dfa6d3d54d2096932f1c682e6bfeeff22ee90d75563aa64 SHA512 c5a77a6e35f0bbda9ea07ba73a35bf5a9c6898069393b8b04b4ec7478d88ecec21e709e5ed748ecb97d2fd6ba8e9564d9efb6184d17871c7beac03d2d728ba00

View File

@ -0,0 +1,97 @@
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CRATES=" "
LLVM_COMPAT=( {17..21} )
RUST_MIN_VER="1.90.0"
inherit cargo edo llvm-r2 multiprocessing shell-completion toolchain-funcs
DESCRIPTION="QA library and tools based on pkgcraft"
HOMEPAGE="https://pkgcraft.github.io/"
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/pkgcraft/pkgcraft"
inherit git-r3
S="${WORKDIR}"/${P}/crates/${PN}
else
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
"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
# clang needed for bindgen
BDEPEND+="
$(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT}
')
test? ( dev-util/cargo-nextest )
"
QA_FLAGS_IGNORED="usr/bin/pkgcruft"
pkg_setup() {
llvm-r2_pkg_setup
rust_pkg_setup
}
src_unpack() {
if [[ ${PV} == 9999 ]] ; then
git-r3_src_unpack
cargo_live_src_unpack
else
cargo_src_unpack
fi
}
src_compile() {
# For scallop building bash
# TODO: Package scallop
tc-export AR CC
cargo_src_compile
if [[ ${PV} == 9999 ]] ; then
einfo "Generating shell completions"
mkdir shell || die
local BIN="${WORKDIR}/${P}/$(cargo_target_dir)/pkgcruft"
"${BIN}" completion bash > shell/pkgcruft.bash || die
"${BIN}" completion zsh > shell/_pkgcruft || die
"${BIN}" completion fish > shell/pkgcruft.fish || die
fi
}
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)"
# The test failures appear ebuild-related
edo cargo nextest run $(usev !debug '--release') \
--color always \
--all-features \
--tests \
--no-fail-fast
}
src_install() {
cargo_src_install
newbashcomp shell/pkgcruft.bash pkgcruft
dozshcomp shell/_pkgcruft
dofishcomp shell/pkgcruft.fish
}

View File

@ -4,8 +4,8 @@
EAPI=8
CRATES=" "
LLVM_COMPAT=( {17..20} )
RUST_MIN_VER="1.88.0"
LLVM_COMPAT=( {17..21} )
RUST_MIN_VER="1.90.0"
inherit cargo edo llvm-r2 multiprocessing shell-completion toolchain-funcs
@ -58,6 +58,7 @@ src_unpack() {
src_compile() {
# For scallop building bash
# TODO: Package scallop
tc-export AR CC
cargo_src_compile