From cc7f43afaecd442437d406076bfb00af81174b4a Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 26 May 2015 10:59:44 -0400 Subject: [PATCH] cargo: wire up bitbake to fetch cargo snapshot This is based on Steven Walter's proposed commit "cargo.inc: use bitbake to fetch the snapshot" --- recipes/cargo/cargo.inc | 6 ++++++ recipes/cargo/cargo_git.bb | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/recipes/cargo/cargo.inc b/recipes/cargo/cargo.inc index 35bfaee..237fb8f 100644 --- a/recipes/cargo/cargo.inc +++ b/recipes/cargo/cargo.inc @@ -14,6 +14,7 @@ DEPENDS = "openssl zlib libgit2 curl ca-certificates libssh2" SRC_URI = "\ git://github.com/rust-lang/cargo.git;protocol=https;name=cargo \ git://github.com/rust-lang/rust-installer.git;protocol=https;name=rust-installer;destsuffix=git/src/rust-installer \ + http://static-rust-lang-org.s3.amazonaws.com/cargo-dist/${CARGO_SNAPSHOT} \ " LIC_FILES_CHKSUM ="\ @@ -58,6 +59,11 @@ do_configure () { do_compile () { oe_cargo_fix_env + + rm -rf target/snapshot + mkdir -p target + cp -R ${WORKDIR}/$(basename ${CARGO_SNAPSHOT} .tar.gz) target/snapshot + oe_runmake ARGS="--verbose" } diff --git a/recipes/cargo/cargo_git.bb b/recipes/cargo/cargo_git.bb index 512a538..8475c0b 100644 --- a/recipes/cargo/cargo_git.bb +++ b/recipes/cargo/cargo_git.bb @@ -41,3 +41,7 @@ EXTRA_OECARGO_PATHS = "\ ## Failed to resolve path '/home/cody/obj/y/tmp/work/x86_64-linux/cargo-native/git+gitAUTOINC+0b84923203_9181ea8f4e_8baa8ccb39-r0/curl-rust/curl-sys/curl/.git': No such file or directory SRCREV_curl = "ac30e9a7746c8641f4871e59b831ec28530c5c73" SRCREV_libgit2 = "3b48f7f30c271ec9569f722215ee55cc5e922242" + +CARGO_SNAPSHOT = "2015-04-02/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz" +SRC_URI[md5sum] = "3d62194d02a9088cd8aae379e9498134" +SRC_URI[sha256sum] = "16b6338ba2942989693984ba4dbd057c2801e8805e6da8fa7b781b00e722d117"