From 61cb4cab7994f2d3be670404a18a7b67f6238d97 Mon Sep 17 00:00:00 2001 From: gentoo90 Date: Sun, 30 Sep 2018 21:44:54 +0300 Subject: [PATCH] cargo.eclass: depend on virtual/cargo instead of dev-util/cargo --- eclass/cargo.eclass | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index 675daae..9e33c22 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -6,16 +6,21 @@ # rust@gentoo.org # @AUTHOR: # Doug Goldstein +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: common functions and variables for cargo builds if [[ -z ${_CARGO_ECLASS} ]]; then _CARGO_ECLASS=1 +CARGO_DEPEND="" +[[ ${CATEGORY}/${PN} != dev-util/cargo ]] && CARGO_DEPEND="virtual/cargo" + : ${CARGO_IGNORE_FETCH_CRATES:=yes} -case ${EAPI:-0} in - 5|6|7) ;; - *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; +case ${EAPI} in + 5|6) : DEPEND="${DEPEND} ${CARGO_DEPEND}";; + 7) : BDEPEND="${BDEPEND} ${CARGO_DEPEND}";; + *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;; esac inherit multiprocessing @@ -24,8 +29,6 @@ EXPORT_FUNCTIONS src_unpack src_compile src_install IUSE="${IUSE} debug fetch-crates" -[[ ${CATEGORY}/${PN} != dev-util/cargo ]] && DEPEND=">=dev-util/cargo-0.13.0" - ECARGO_HOME="${WORKDIR}/cargo_home" ECARGO_VENDOR="${ECARGO_HOME}/gentoo"