Fix *-native cargo builds

Normally all *-native packages needs to depend on cargo-native in order
to be able to use cargo. When building cargo-native however, this is not
available and we use a snapshot.

Fixes #302.
This commit is contained in:
Johan Anderholm
2021-02-08 14:06:14 +01:00
parent c90c9b071a
commit 0025cebb12
2 changed files with 4 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ inherit cargo_common
CARGO = "cargo"
# We need cargo to compile for the target
BASEDEPENDS_append_class-target = " cargo-native"
BASEDEPENDS_append = " cargo-native"
# Ensure we get the right rust variant
DEPENDS_append_class-target = " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}"

View File

@@ -45,6 +45,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG = "1"
BBCLASSEXTEND = "native"
# When building cargo-native we don't have a built cargo to use so we must use
# the snapshot to bootstrap the build of cargo
# When building cargo-native we don't have cargo-native to use and depend on,
# so we must use the locally set up snapshot to bootstrap the build.
BASEDEPENDS_remove_class-native = "cargo-native"
CARGO_class-native = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo"