summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-07-01 17:41:47 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-07-02 23:59:10 -0700
commitd778c17e6e4ddf34b48bd594ed6ba31681bb88a9 (patch)
treec1cbbcad6c87f8627e3886645240974eb05572a8 /eclass/cargo.eclass
parentcargo.eclass: support EAPI=8, misc changes (diff)
downloadgentoo-d778c17e6e4ddf34b48bd594ed6ba31681bb88a9.tar.gz
gentoo-d778c17e6e4ddf34b48bd594ed6ba31681bb88a9.tar.bz2
gentoo-d778c17e6e4ddf34b48bd594ed6ba31681bb88a9.zip
cargo.eclass: make CRATES an eclass variable
it's needed to be present in all ebuilds for crate auditing tools to work properly. Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'eclass/cargo.eclass')
-rw-r--r--eclass/cargo.eclass17
1 files changed, 17 insertions, 0 deletions
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 9923b1c9deb2..50237d302ce6 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -52,6 +52,23 @@ IUSE="${IUSE} debug"
ECARGO_HOME="${WORKDIR}/cargo_home"
ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
+# @ECLASS-VARIABLE: CRATES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# bash string containing all crates package wants to download
+# used by cargo_crate_uris()
+# Example:
+# @CODE
+# CRATES="
+# metal-1.2.3
+# bar-4.5.6
+# iron_oxide-0.0.1
+# "
+# inherit cargo
+# ...
+# SRC_URI="$(cargo_crate_uris ${CRATES})"
+# @CODE
+
# @ECLASS-VARIABLE: CARGO_OPTIONAL
# @DEFAULT_UNSET
# @PRE_INHERIT