diff --git a/conf/distro/include/rust_versions.inc b/conf/distro/include/rust_versions.inc new file mode 100644 index 0000000..79c9e8f --- /dev/null +++ b/conf/distro/include/rust_versions.inc @@ -0,0 +1,13 @@ +# include this in your distribution to easily switch between versions +# just by changing RUST_VERSION variable + +RUST_VERSION ?= "1.47.0" + +PREFERRED_VERSION_cargo ?= "${RUST_VERSION}" +PREFERRED_VERSION_cargo-native ?= "${RUST_VERSION}" +PREFERRED_VERSION_libstd-rs ?= "${RUST_VERSION}" +PREFERRED_VERSION_rust ?= "${RUST_VERSION}" +PREFERRED_VERSION_rust-cross-${TARGET_ARCH} ?= "${RUST_VERSION}" +PREFERRED_VERSION_rust-llvm ?= "${RUST_VERSION}" +PREFERRED_VERSION_rust-llvm-native ?= "${RUST_VERSION}" +PREFERRED_VERSION_rust-native ?= "${RUST_VERSION}" diff --git a/recipes-devtools/cargo/cargo.inc b/recipes-devtools/cargo/cargo.inc index 29da0d7..914c3e2 100644 --- a/recipes-devtools/cargo/cargo.inc +++ b/recipes-devtools/cargo/cargo.inc @@ -7,6 +7,8 @@ DEPENDS = "openssl zlib curl ca-certificates libssh2" LIC_FILES_CHKSUM = " \ file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d \ + file://LICENSE-APACHE;md5=71b224ca933f0676e26d5c2e2271331c \ + file://LICENSE-THIRD-PARTY;md5=f257ad009884cb88a3a87d6920e7180a \ " SRC_URI += "file://0001-Disable-http2.patch" diff --git a/recipes-devtools/cargo/cargo_1.34.2.bb b/recipes-devtools/cargo/cargo_1.34.2.bb index d79f958..79dd414 100644 --- a/recipes-devtools/cargo/cargo_1.34.2.bb +++ b/recipes-devtools/cargo/cargo_1.34.2.bb @@ -2,7 +2,10 @@ require recipes-devtools/rust/rust-source-${PV}.inc require recipes-devtools/rust/rust-snapshot-${PV}.inc require cargo.inc -LIC_FILES_CHKSUM += " \ +# This version has different LICENSE-APACHE and LICENSE-THIRD-PARTY + +LIC_FILES_CHKSUM = " \ + file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d \ file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \ file://LICENSE-THIRD-PARTY;md5=892ea68b169e69cfe75097fc38a15b56 \ " diff --git a/recipes-devtools/cargo/cargo_1.36.0.bb b/recipes-devtools/cargo/cargo_1.36.0.bb index f048779..dd050a8 100644 --- a/recipes-devtools/cargo/cargo_1.36.0.bb +++ b/recipes-devtools/cargo/cargo_1.36.0.bb @@ -1,8 +1,3 @@ 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/cargo/cargo_1.37.0.bb b/recipes-devtools/cargo/cargo_1.37.0.bb index f048779..dd050a8 100644 --- a/recipes-devtools/cargo/cargo_1.37.0.bb +++ b/recipes-devtools/cargo/cargo_1.37.0.bb @@ -1,8 +1,3 @@ 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/cargo/cargo_1.39.0.bb b/recipes-devtools/cargo/cargo_1.39.0.bb index f048779..dd050a8 100644 --- a/recipes-devtools/cargo/cargo_1.39.0.bb +++ b/recipes-devtools/cargo/cargo_1.39.0.bb @@ -1,8 +1,3 @@ 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/cargo/cargo_1.40.0.bb b/recipes-devtools/cargo/cargo_1.40.0.bb index f048779..dd050a8 100644 --- a/recipes-devtools/cargo/cargo_1.40.0.bb +++ b/recipes-devtools/cargo/cargo_1.40.0.bb @@ -1,8 +1,3 @@ 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/cargo/cargo_1.41.0.bb b/recipes-devtools/cargo/cargo_1.41.0.bb index f048779..dd050a8 100644 --- a/recipes-devtools/cargo/cargo_1.41.0.bb +++ b/recipes-devtools/cargo/cargo_1.41.0.bb @@ -1,8 +1,3 @@ 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/cargo/cargo_1.43.0.bb b/recipes-devtools/cargo/cargo_1.43.0.bb index f048779..dd050a8 100644 --- a/recipes-devtools/cargo/cargo_1.43.0.bb +++ b/recipes-devtools/cargo/cargo_1.43.0.bb @@ -1,8 +1,3 @@ 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/cargo/cargo_1.46.0.bb b/recipes-devtools/cargo/cargo_1.46.0.bb index f048779..dd050a8 100644 --- a/recipes-devtools/cargo/cargo_1.46.0.bb +++ b/recipes-devtools/cargo/cargo_1.46.0.bb @@ -1,8 +1,3 @@ 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/cargo/cargo_1.47.0.bb b/recipes-devtools/cargo/cargo_1.47.0.bb index f048779..dd050a8 100644 --- a/recipes-devtools/cargo/cargo_1.47.0.bb +++ b/recipes-devtools/cargo/cargo_1.47.0.bb @@ -1,8 +1,3 @@ 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/rust-source-1.34.2.inc b/recipes-devtools/rust/rust-source-1.34.2.inc index 5c83f6f..78a8512 100644 --- a/recipes-devtools/rust/rust-source-1.34.2.inc +++ b/recipes-devtools/rust/rust-source-1.34.2.inc @@ -7,5 +7,3 @@ SRC_URI[rust.sha256sum] = "c69a4a85a1c464368597df8878cb9e1121aae93e215616d45ad7d 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-source-1.36.0.inc b/recipes-devtools/rust/rust-source-1.36.0.inc index 1a1d07c..402d645 100644 --- a/recipes-devtools/rust/rust-source-1.36.0.inc +++ b/recipes-devtools/rust/rust-source-1.36.0.inc @@ -7,5 +7,3 @@ SRC_URI[rust.sha256sum] = "f51645b9f787af4a5d94db17f6af39db0c55980ed24fe366cad55 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-source-1.37.0.inc b/recipes-devtools/rust/rust-source-1.37.0.inc index 0169cd3..d943686 100644 --- a/recipes-devtools/rust/rust-source-1.37.0.inc +++ b/recipes-devtools/rust/rust-source-1.37.0.inc @@ -7,5 +7,3 @@ SRC_URI[rust.sha256sum] = "10abffac50a729cf74cef6dd03193a2f4647541bd19ee9281be9e 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-source-1.39.0.inc b/recipes-devtools/rust/rust-source-1.39.0.inc index 466a1ad..544f08b 100644 --- a/recipes-devtools/rust/rust-source-1.39.0.inc +++ b/recipes-devtools/rust/rust-source-1.39.0.inc @@ -7,5 +7,3 @@ SRC_URI[rust.sha256sum] = "4b0dbb356070687a606034f71dc032b783bbf8b5d3f9fff39f2c1 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-source-1.40.0.inc b/recipes-devtools/rust/rust-source-1.40.0.inc index efb4075..a30d0ee 100644 --- a/recipes-devtools/rust/rust-source-1.40.0.inc +++ b/recipes-devtools/rust/rust-source-1.40.0.inc @@ -7,5 +7,3 @@ SRC_URI[rust.sha256sum] = "6e2aa3a91697f4b225c6b394cbae6b97666f061dba491f666a528 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-source-1.41.0.inc b/recipes-devtools/rust/rust-source-1.41.0.inc index b157bcb..abdc5b2 100644 --- a/recipes-devtools/rust/rust-source-1.41.0.inc +++ b/recipes-devtools/rust/rust-source-1.41.0.inc @@ -7,5 +7,3 @@ SRC_URI[rust.sha256sum] = "38d6742e5c4c98a835de5d6e12a209e442fb3078a03b2c01bab6e 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-source-1.43.0.inc b/recipes-devtools/rust/rust-source-1.43.0.inc index ff673c1..4bc9be4 100644 --- a/recipes-devtools/rust/rust-source-1.43.0.inc +++ b/recipes-devtools/rust/rust-source-1.43.0.inc @@ -6,5 +6,3 @@ SRC_URI[rust.sha256sum] = "d0899933840369f07394b211cb0b53a5cd4634907633f0bee5411 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-source-1.46.0.inc b/recipes-devtools/rust/rust-source-1.46.0.inc index 640a273..5a1be41 100644 --- a/recipes-devtools/rust/rust-source-1.46.0.inc +++ b/recipes-devtools/rust/rust-source-1.46.0.inc @@ -7,5 +7,3 @@ SRC_URI[rust.sha256sum] = "865dae1290a205f16ded8818c6a0254cc32862985fc250a602a70 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-source-1.47.0.inc b/recipes-devtools/rust/rust-source-1.47.0.inc index 25042fa..10ebca8 100644 --- a/recipes-devtools/rust/rust-source-1.47.0.inc +++ b/recipes-devtools/rust/rust-source-1.47.0.inc @@ -6,5 +6,3 @@ SRC_URI[rust.sha256sum] = "ec2c81d2d34890486094a6407589be96161e4e301c238332d32c6 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-target.inc b/recipes-devtools/rust/rust-target.inc new file mode 100644 index 0000000..0a5b127 --- /dev/null +++ b/recipes-devtools/rust/rust-target.inc @@ -0,0 +1,10 @@ +require rust.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" diff --git a/recipes-devtools/rust/rust.inc b/recipes-devtools/rust/rust.inc index 72594fd..aada80f 100644 --- a/recipes-devtools/rust/rust.inc +++ b/recipes-devtools/rust/rust.inc @@ -2,6 +2,7 @@ SUMMARY = "Rust compiler and runtime libaries" HOMEPAGE = "http://www.rust-lang.org" SECTION = "devel" LICENSE = "MIT | Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" inherit rust inherit cargo_common diff --git a/recipes-devtools/rust/rust_1.34.2.bb b/recipes-devtools/rust/rust_1.34.2.bb index c7f9f4f..fe094e4 100644 --- a/recipes-devtools/rust/rust_1.34.2.bb +++ b/recipes-devtools/rust/rust_1.34.2.bb @@ -1,12 +1,3 @@ -require rust.inc +require rust-target.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" diff --git a/recipes-devtools/rust/rust_1.36.0.bb b/recipes-devtools/rust/rust_1.36.0.bb index c7f9f4f..fe094e4 100644 --- a/recipes-devtools/rust/rust_1.36.0.bb +++ b/recipes-devtools/rust/rust_1.36.0.bb @@ -1,12 +1,3 @@ -require rust.inc +require rust-target.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" diff --git a/recipes-devtools/rust/rust_1.37.0.bb b/recipes-devtools/rust/rust_1.37.0.bb index c7f9f4f..fe094e4 100644 --- a/recipes-devtools/rust/rust_1.37.0.bb +++ b/recipes-devtools/rust/rust_1.37.0.bb @@ -1,12 +1,3 @@ -require rust.inc +require rust-target.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" diff --git a/recipes-devtools/rust/rust_1.39.0.bb b/recipes-devtools/rust/rust_1.39.0.bb index c7f9f4f..fe094e4 100644 --- a/recipes-devtools/rust/rust_1.39.0.bb +++ b/recipes-devtools/rust/rust_1.39.0.bb @@ -1,12 +1,3 @@ -require rust.inc +require rust-target.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" diff --git a/recipes-devtools/rust/rust_1.40.0.bb b/recipes-devtools/rust/rust_1.40.0.bb index c7f9f4f..fe094e4 100644 --- a/recipes-devtools/rust/rust_1.40.0.bb +++ b/recipes-devtools/rust/rust_1.40.0.bb @@ -1,12 +1,3 @@ -require rust.inc +require rust-target.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" diff --git a/recipes-devtools/rust/rust_1.41.0.bb b/recipes-devtools/rust/rust_1.41.0.bb index c7f9f4f..fe094e4 100644 --- a/recipes-devtools/rust/rust_1.41.0.bb +++ b/recipes-devtools/rust/rust_1.41.0.bb @@ -1,12 +1,3 @@ -require rust.inc +require rust-target.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" diff --git a/recipes-devtools/rust/rust_1.43.0.bb b/recipes-devtools/rust/rust_1.43.0.bb index c7f9f4f..fe094e4 100644 --- a/recipes-devtools/rust/rust_1.43.0.bb +++ b/recipes-devtools/rust/rust_1.43.0.bb @@ -1,12 +1,3 @@ -require rust.inc +require rust-target.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" diff --git a/recipes-devtools/rust/rust_1.46.0.bb b/recipes-devtools/rust/rust_1.46.0.bb index c7f9f4f..fe094e4 100644 --- a/recipes-devtools/rust/rust_1.46.0.bb +++ b/recipes-devtools/rust/rust_1.46.0.bb @@ -1,12 +1,3 @@ -require rust.inc +require rust-target.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" diff --git a/recipes-devtools/rust/rust_1.47.0.bb b/recipes-devtools/rust/rust_1.47.0.bb index 509f2b8..894f715 100644 --- a/recipes-devtools/rust/rust_1.47.0.bb +++ b/recipes-devtools/rust/rust_1.47.0.bb @@ -1,18 +1,9 @@ -require rust.inc +require rust-target.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" - # The default behaviour of x.py changed in 1.47+ so now we need to # explicitly ask for the stage 2 compiler to be assembled. do_compile () { rust_runx build --stage 2 src/rustc } - -BBCLASSEXTEND = "native"