diff --git a/recipes-devtools/cargo/cargo-1.39.0/0001-Disable-http2.patch b/recipes-devtools/cargo/cargo-1.39.0/0001-Disable-http2.patch new file mode 100644 index 0000000..c804297 --- /dev/null +++ b/recipes-devtools/cargo/cargo-1.39.0/0001-Disable-http2.patch @@ -0,0 +1,29 @@ +From 0e2384133664ebeb548b782ad763c3a627c1bc66 Mon Sep 17 00:00:00 2001 +From: Johan Anderholm +Date: Sun, 27 Jan 2019 10:19:00 +0100 +Subject: [PATCH] Disable http2 + +http2 requires that curl is build with nghttp2 which in turn depends on +many dependencies and ultimately a dependency loop in the case of +curl-native. As long as multiplexing is disabled in cargo this should +be fine. + +Upstream-Status: Inappropriate + +--- + src/tools/cargo/Cargo.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Cargo.toml b/Cargo.toml +index d15aa2513..ba9c77d25 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -24,7 +24,7 @@ bytesize = "1.0" + crates-io = { path = "crates/crates-io", version = "0.26" } + crossbeam-utils = "0.6" + crypto-hash = "0.3.1" +-curl = { version = "0.4.21", features = ['http2'] } ++curl = { version = "0.4.21" } + curl-sys = "0.4.18" + env_logger = "0.6.0" + pretty_env_logger = { version = "0.3", optional = true } diff --git a/recipes-devtools/cargo/cargo_1.39.0.bb b/recipes-devtools/cargo/cargo_1.39.0.bb new file mode 100644 index 0000000..f048779 --- /dev/null +++ b/recipes-devtools/cargo/cargo_1.39.0.bb @@ -0,0 +1,8 @@ +require recipes-devtools/rust/rust-source-${PV}.inc +require recipes-devtools/rust/rust-snapshot-${PV}.inc +require cargo.inc + +LIC_FILES_CHKSUM += " \ + file://LICENSE-APACHE;md5=71b224ca933f0676e26d5c2e2271331c \ + file://LICENSE-THIRD-PARTY;md5=f257ad009884cb88a3a87d6920e7180a \ +" diff --git a/recipes-devtools/rust/libstd-rs_1.39.0.bb b/recipes-devtools/rust/libstd-rs_1.39.0.bb new file mode 100644 index 0000000..69cb48a --- /dev/null +++ b/recipes-devtools/rust/libstd-rs_1.39.0.bb @@ -0,0 +1,8 @@ +require rust-source-${PV}.inc +require libstd-rs.inc + +LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" + +CARGO_FEATURES ?= "panic-unwind backtrace" + +CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" diff --git a/recipes-devtools/rust/rust-cross_1.39.0.bb b/recipes-devtools/rust/rust-cross_1.39.0.bb new file mode 100644 index 0000000..ddc25d3 --- /dev/null +++ b/recipes-devtools/rust/rust-cross_1.39.0.bb @@ -0,0 +1,2 @@ +require rust-cross.inc +require rust-source-${PV}.inc diff --git a/recipes-devtools/rust/rust-llvm-ncsa.inc b/recipes-devtools/rust/rust-llvm-ncsa.inc new file mode 100644 index 0000000..28d7578 --- /dev/null +++ b/recipes-devtools/rust/rust-llvm-ncsa.inc @@ -0,0 +1,5 @@ +LICENSE = "NCSA" + +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa" + +require rust-llvm.inc diff --git a/recipes-devtools/rust/rust-llvm.inc b/recipes-devtools/rust/rust-llvm.inc index b4bef38..eb8052a 100644 --- a/recipes-devtools/rust/rust-llvm.inc +++ b/recipes-devtools/rust/rust-llvm.inc @@ -1,11 +1,11 @@ SUMMARY = "LLVM compiler framework (packaged with rust)" -LICENSE = "NCSA" +LICENSE ?= "Apache-2.0-with-LLVM-exception" SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch" S = "${RUSTSRC}/src/llvm-project/llvm" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa" +LIC_FILES_CHKSUM ?= "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa" inherit cmake pythonnative diff --git a/recipes-devtools/rust/rust-llvm_1.34.2.bb b/recipes-devtools/rust/rust-llvm_1.34.2.bb index d41fa28..6fce32f 100644 --- a/recipes-devtools/rust/rust-llvm_1.34.2.bb +++ b/recipes-devtools/rust/rust-llvm_1.34.2.bb @@ -1,5 +1,5 @@ require rust-source-${PV}.inc -require rust-llvm.inc +require rust-llvm-ncsa.inc LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648" diff --git a/recipes-devtools/rust/rust-llvm_1.36.0.bb b/recipes-devtools/rust/rust-llvm_1.36.0.bb index d41fa28..6fce32f 100644 --- a/recipes-devtools/rust/rust-llvm_1.36.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.36.0.bb @@ -1,5 +1,5 @@ require rust-source-${PV}.inc -require rust-llvm.inc +require rust-llvm-ncsa.inc LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648" diff --git a/recipes-devtools/rust/rust-llvm_1.37.0.bb b/recipes-devtools/rust/rust-llvm_1.37.0.bb index d41fa28..6fce32f 100644 --- a/recipes-devtools/rust/rust-llvm_1.37.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.37.0.bb @@ -1,5 +1,5 @@ require rust-source-${PV}.inc -require rust-llvm.inc +require rust-llvm-ncsa.inc LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648" diff --git a/recipes-devtools/rust/rust-llvm_1.39.0.bb b/recipes-devtools/rust/rust-llvm_1.39.0.bb new file mode 100644 index 0000000..ac77a4b --- /dev/null +++ b/recipes-devtools/rust/rust-llvm_1.39.0.bb @@ -0,0 +1,16 @@ +require rust-source-${PV}.inc +require rust-llvm.inc + +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" + +do_install_prepend () { + # the install does a sed on this without installing the file + # we don't need it for anything + mkdir -p "${D}/usr/share/llvm/cmake" + touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake" +} + +do_install_append () { + # we don't need any of this stuff to build Rust + rm -rf "${D}/usr/lib/cmake" +} diff --git a/recipes-devtools/rust/rust-snapshot-1.39.0.inc b/recipes-devtools/rust/rust-snapshot-1.39.0.inc new file mode 100644 index 0000000..67d0edf --- /dev/null +++ b/recipes-devtools/rust/rust-snapshot-1.39.0.inc @@ -0,0 +1,24 @@ +## This is information on the rust-snapshot (binary) used to build our current release. +## snapshot info is taken from rust/src/stage0.txt +## TODO: find a way to add additional SRC_URIs based on the contents of an +## earlier SRC_URI. +RS_VERSION = "1.38.0" + +RUSTC_SNAPSHOT = "rustc-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu" +RUST_STD_SNAPSHOT = "rust-std-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu" +CARGO_VERSION = "0.39.0" +CARGO_SNAPSHOT = "cargo-${CARGO_VERSION}-${BUILD_ARCH}-unknown-linux-gnu" + +SRC_URI += " \ + https://static.rust-lang.org/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ + https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ + https://static.rust-lang.org/dist/${CARGO_SNAPSHOT}.tar.xz;name=cargo-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ + " + +# TODO: Add hashes for other architecture toolchains as well. Make a script? +SRC_URI[rustc-snapshot-x86_64.md5sum] = "53278262a3996982cd68730db7cb1efd" +SRC_URI[rustc-snapshot-x86_64.sha256sum] = "0fedde3406cf3367ceb00f493698e6bfc3264bd7f7253c85de7a042b45f873fa" +SRC_URI[rust-std-snapshot-x86_64.md5sum] = "0d32b76359613f73671acd13ea57b7ea" +SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "51b334337804baeff7524e5496d396f254894d7529860d236975e9ed8fcca371" +SRC_URI[cargo-snapshot-x86_64.md5sum] = "7274cfe12905fe8ea6edbe131d3f6637" +SRC_URI[cargo-snapshot-x86_64.sha256sum] = "80bcb1368ce98d13cb371df89cbbed9007fb98843f34d07f2abd2c03b8f2747a" diff --git a/recipes-devtools/rust/rust-source-1.39.0.inc b/recipes-devtools/rust/rust-source-1.39.0.inc new file mode 100644 index 0000000..466a1ad --- /dev/null +++ b/recipes-devtools/rust/rust-source-1.39.0.inc @@ -0,0 +1,11 @@ +SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust" + +SRC_URI[rust.md5sum] = "ee76b165cd95ef420765bfb568adb450" +SRC_URI[rust.sha256sum] = "4b0dbb356070687a606034f71dc032b783bbf8b5d3f9fff39f2c1fbc4f171c29" + +# later versions of rust change the directory that they unextract to +RUSTSRC = "${WORKDIR}/rustc-${PV}-src" +# set this as our default +S = "${RUSTSRC}" + +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" diff --git a/recipes-devtools/rust/rust_1.39.0.bb b/recipes-devtools/rust/rust_1.39.0.bb new file mode 100644 index 0000000..c7f9f4f --- /dev/null +++ b/recipes-devtools/rust/rust_1.39.0.bb @@ -0,0 +1,12 @@ +require rust.inc +require rust-source-${PV}.inc +require rust-snapshot-${PV}.inc + +DEPENDS += "rust-llvm (=${PV})" + +# Otherwise we'll depend on what we provide +INHIBIT_DEFAULT_RUST_DEPS_class-native = "1" +# We don't need to depend on gcc-native because yocto assumes it exists +PROVIDES_class-native = "virtual/${TARGET_PREFIX}rust" + +BBCLASSEXTEND = "native"