Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow injecting coreos-cargo.eclass into portage-stable ebuilds #1780

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cros_pre_src_unpack_coreos_unpack() {
jepio marked this conversation as resolved.
Show resolved Hide resolved
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
jepio marked this conversation as resolved.
Show resolved Hide resolved
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