Skip to content

Commit

Permalink
Merge pull request #1780 from flatcar/jepio/portage-coreos-cargo
Browse files Browse the repository at this point in the history
Allow injecting coreos-cargo.eclass into portage-stable ebuilds
  • Loading branch information
jepio authored Mar 28, 2024
2 parents dd9e030 + b34894e commit e4f3eb3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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
}
}
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e4f3eb3

Please sign in to comment.