diff --git a/recipes-devtools/cargo/cargo.inc b/recipes-devtools/cargo/cargo.inc index bccb751..0836b31 100644 --- a/recipes-devtools/cargo/cargo.inc +++ b/recipes-devtools/cargo/cargo.inc @@ -12,45 +12,11 @@ SRC_URI = "\ http://static-rust-lang-org.s3.amazonaws.com/cargo-dist/${CARGO_SNAPSHOT} \ " -B = "${S}" - # Used in libgit2-sys's build.rs, needed for pkg-config to be used export LIBGIT2_SYS_USE_PKG_CONFIG = "1" -# cargo's configure doesn't recognize --disable-static, so remove it. -DISABLE_STATIC = "" - -do_configure () { - "${S}/configure" \ - "--prefix=${prefix}" \ - "--build=${BUILD_SYS}" \ - "--host=${HOST_SYS}" \ - "--target=${TARGET_SYS}" \ - "--localstatedir=${localstatedir}" \ - "--sysconfdir=${sysconfdir}" \ - "--datadir=${datadir}" \ - "--infodir=${infodir}" \ - "--mandir=${mandir}" \ - "--libdir=${libdir}" \ - "--disable-verify-install" \ - ${EXTRA_OECONF} \ - || die "Could not configure cargo" - - cargo_do_configure -} - -do_compile () { - oe_cargo_fix_env - - rm -rf target/snapshot - mkdir -p target - cp -R ${WORKDIR}/cargo-nightly-x86_64-unknown-linux-gnu/cargo target/snapshot - - oe_runmake VERBOSE=1 -} - -do_install () { - oe_runmake prepare-image-${TARGET_SYS} IMGDIR_${TARGET_SYS}="${D}${prefix}" -} +# 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 +CARGO_class-native = "${WORKDIR}/cargo-nightly-${RUST_BUILD_SYS}/cargo/bin/cargo" BBCLASSEXTEND = "native" diff --git a/recipes-devtools/cargo/cargo_0.16.0.bb b/recipes-devtools/cargo/cargo_0.16.0.bb index 47d447d..192ac86 100644 --- a/recipes-devtools/cargo/cargo_0.16.0.bb +++ b/recipes-devtools/cargo/cargo_0.16.0.bb @@ -1,8 +1,6 @@ require cargo-snapshot.inc require cargo.inc -EXTRA_OECONF += "--cargo=${WORKDIR}/cargo-nightly-x86_64-unknown-linux-gnu/cargo/bin/cargo" - SRC_URI += " \ git://github.com/rust-lang/cargo.git;protocol=https;name=cargo;branch=rust-1.15.1 \ crate://crates.io/advapi32-sys/0.2.0 \