Merge pull request #1780 from flatcar/jepio/portage-coreos-cargo

Allow injecting coreos-cargo.eclass into portage-stable ebuilds
This commit is contained in:
Jeremi Piotrowski 2024-03-28 15:22:47 +01:00 committed by GitHub
commit e4f3eb3f09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 29 additions and 3 deletions

View File

@ -0,0 +1,8 @@
cros_pre_src_unpack_coreos_unpack() {
local _COREOS_CARGO_SKIP_INHERIT=1
source "${CROS_ADDONS_TREE}"/../eclass/coreos-cargo.eclass
src_unpack() {
einfo "Running coreos-cargo_src_unpack"
coreos-cargo_src_unpack
}
}

View File

@ -0,0 +1,16 @@
cros_pre_src_unpack_coreos_unpack() {
local _COREOS_CARGO_SKIP_INHERIT=1
source "${CROS_ADDONS_TREE}"/../eclass/coreos-cargo.eclass
src_unpack() {
einfo "Running coreos-cargo_src_unpack"
coreos-cargo_src_unpack
}
}
cros_pre_src_install_rust_cross() {
pushd "${S}"
local rust_target="$(ls -d target/*-unknown-linux-gnu)"
rust_target="${rust_target#target/}"
ln -f target/{"${rust_target}",}/"$(usex debug debug release)/pdata_tools" || die
popd
}

View File

@ -12,10 +12,12 @@ if [[ -z ${_COREOS_CARGO_ECLASS} ]]; then
_COREOS_CARGO_ECLASS=1
# XXX: Don't require host dependencies to also be in the sysroot.
CATEGORY=dev-util PN=cargo inherit cargo
inherit toolchain-funcs
if [[ -z ${_COREOS_CARGO_SKIP_INHERIT} ]]; then
CATEGORY=dev-util PN=cargo inherit cargo
inherit toolchain-funcs
EXPORT_FUNCTIONS src_unpack
EXPORT_FUNCTIONS src_unpack
fi
# @FUNCTION: coreos-cargo_src_unpack
# @DESCRIPTION: