summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jolly <kangie@gentoo.org>2024-11-07 23:14:49 +1000
committerMatt Jolly <kangie@gentoo.org>2024-11-09 15:31:34 +1000
commit583a1a9ac556d01e1b0df6fe64e67cb646fa4118 (patch)
treedef3726121549c7b3688ab3fc45b2fcefea5ea19
parentcargo: update for rust eclass (diff)
downloadgentoo-583a1a9ac556d01e1b0df6fe64e67cb646fa4118.tar.gz
gentoo-583a1a9ac556d01e1b0df6fe64e67cb646fa4118.tar.bz2
gentoo-583a1a9ac556d01e1b0df6fe64e67cb646fa4118.zip
toolchain: inherit rust eclass for `RUST_DEPEND`
`RUST_OPTIONAL` is set so that ebuilds must explicitly consume Rust features. Signed-off-by: Matt Jolly <kangie@gentoo.org>
-rw-r--r--eclass/toolchain.eclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index b25c5dcf0929..6e3a974f373e 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -14,6 +14,8 @@
if [[ -z ${_TOOLCHAIN_ECLASS} ]]; then
_TOOLCHAIN_ECLASS=1
+RUST_OPTIONAL="1"
+
case ${EAPI} in
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
@@ -22,7 +24,7 @@ esac
DESCRIPTION="The GNU Compiler Collection"
HOMEPAGE="https://gcc.gnu.org/"
-inherit edo flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix
+inherit edo flag-o-matic gnuconfig libtool multilib pax-utils rust toolchain-funcs prefix
[[ -n ${TOOLCHAIN_HAS_TESTS} ]] && inherit python-any-r1
@@ -427,7 +429,7 @@ fi
if tc_has_feature rust && tc_version_is_at_least 14.0.0_pre20230421 ; then
# This was added upstream in r14-9968-g3e1e73fc995844 as a temporary measure.
# See https://inbox.sourceware.org/gcc/34fec7ea-8762-4cac-a1c8-ff54e20e31ed@embecosm.com/
- BDEPEND+=" rust? ( virtual/rust )"
+ BDEPEND+=" rust? ( ${RUST_DEPEND} )"
fi
PDEPEND=">=sys-devel/gcc-config-2.11"