From ccaccfe4f1da8c11d9fa110f6e4eb847358769d7 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 18 Jun 2024 00:10:02 +0100 Subject: gentoo auto-resync : 18:06:2024 - 00:10:02 --- eclass/cargo.eclass | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'eclass/cargo.eclass') diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index 40d98211ce7f..7db34efb4e17 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -48,7 +48,7 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo" # @PRE_INHERIT # @DESCRIPTION: # Bash string containing all crates that are to be downloaded. -# It is used by cargo_crate_uris. +# It is used by cargo_crate_uris. Typically generated by app-portage/pycargoebuild. # # Ideally, crate names and versions should be separated by a `@` # character. A legacy syntax using hyphen is also supported but it is @@ -319,6 +319,16 @@ _cargo_gen_git_config() { fi } +# @FUNCTION: cargo_target_dir +# @DESCRIPTION: +# Return the directory within target that contains the build, e.g. +# target/aarch64-unknown-linux-gnu/release. +cargo_target_dir() { + local abi + tc-is-cross-compiler && abi=/$(rust_abi) + echo "${CARGO_TARGET_DIR:-target}${abi}/$(usex debug debug release)" +} + # @FUNCTION: cargo_src_unpack # @DESCRIPTION: # Unpacks the package and the cargo registry. -- cgit v1.2.3