From 02c3f12b83cf823b08c61ebf5cbab2663285cccd Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 21 Dec 2019 17:23:01 +0100 Subject: [PATCH] cargo: update to 0.41.0 --- .../patches/fix-cross-sysroot-libdir.patch | 96 +++++++++++++++++++ srcpkgs/cargo/patches/link-static.patch | 8 +- srcpkgs/cargo/template | 24 ++--- 3 files changed, 112 insertions(+), 16 deletions(-) create mode 100644 srcpkgs/cargo/patches/fix-cross-sysroot-libdir.patch diff --git a/srcpkgs/cargo/patches/fix-cross-sysroot-libdir.patch b/srcpkgs/cargo/patches/fix-cross-sysroot-libdir.patch new file mode 100644 index 00000000000..a20ced2fee6 --- /dev/null +++ b/srcpkgs/cargo/patches/fix-cross-sysroot-libdir.patch @@ -0,0 +1,96 @@ +From 647ae9f8a7f9907244a8c86bceb383cbf61eb505 Mon Sep 17 00:00:00 2001 +From: Johannes Brechtmann +Date: Fri, 27 Dec 2019 18:48:31 +0100 +Subject: [PATCH] Revert "Fix wrong directories in PATH on Windows" + +This reverts commit 61188d791a29c1baae868f2ba0880c9d6db4092e. +--- + .../compiler/build_context/target_info.rs | 43 +++++++++---------- + src/cargo/core/compiler/compilation.rs | 4 +- + 2 files changed, 23 insertions(+), 24 deletions(-) + +diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs +index 3c23d2d8b..d6e5e66f8 100644 +--- src/cargo/core/compiler/build_context/target_info.rs ++++ src/cargo/core/compiler/build_context/target_info.rs +@@ -29,12 +29,8 @@ pub struct TargetInfo { + crate_types: RefCell>>, + /// `cfg` information extracted from `rustc --print=cfg`. + cfg: Vec, +- /// Path to the "lib" or "bin" directory that rustc uses for its dynamic +- /// libraries. +- pub sysroot_host_libdir: PathBuf, +- /// Path to the "lib" directory in the sysroot which rustc uses for linking +- /// target libraries. +- pub sysroot_target_libdir: PathBuf, ++ /// Path to the "lib" directory in the sysroot. ++ pub sysroot_libdir: PathBuf, + /// Extra flags to pass to `rustc`, see `env_args`. + pub rustflags: Vec, + /// Extra flags to pass to `rustdoc`, see `env_args`. +@@ -134,20 +130,24 @@ impl TargetInfo { + output_err_info(&process, &output, &error) + ), + }; +- let mut sysroot_host_libdir = PathBuf::from(line); +- if cfg!(windows) { +- sysroot_host_libdir.push("bin"); +- } else { +- sysroot_host_libdir.push("lib"); +- } +- let mut sysroot_target_libdir = PathBuf::from(line); +- sysroot_target_libdir.push("lib"); +- sysroot_target_libdir.push("rustlib"); +- sysroot_target_libdir.push(match &kind { +- CompileKind::Host => rustc.host.as_str(), +- CompileKind::Target(target) => target.short_name(), +- }); +- sysroot_target_libdir.push("lib"); ++ let mut rustlib = PathBuf::from(line); ++ let sysroot_libdir = match kind { ++ CompileKind::Host => { ++ if cfg!(windows) { ++ rustlib.push("bin"); ++ } else { ++ rustlib.push("lib"); ++ } ++ rustlib ++ } ++ CompileKind::Target(target) => { ++ rustlib.push("lib"); ++ rustlib.push("rustlib"); ++ rustlib.push(target.short_name()); ++ rustlib.push("lib"); ++ rustlib ++ } ++ }; + + let cfg = lines + .map(|line| Ok(Cfg::from_str(line)?)) +@@ -162,8 +162,7 @@ impl TargetInfo { + Ok(TargetInfo { + crate_type_process, + crate_types: RefCell::new(map), +- sysroot_host_libdir, +- sysroot_target_libdir, ++ sysroot_libdir, + // recalculate `rustflags` from above now that we have `cfg` + // information + rustflags: env_args( +diff --git a/src/cargo/core/compiler/compilation.rs b/src/cargo/core/compiler/compilation.rs +index 140a024b1..86afe35ac 100644 +--- src/cargo/core/compiler/compilation.rs ++++ src/cargo/core/compiler/compilation.rs +@@ -101,8 +101,8 @@ impl<'cfg> Compilation<'cfg> { + root_output: PathBuf::from("/"), + deps_output: PathBuf::from("/"), + host_deps_output: PathBuf::from("/"), +- host_dylib_path: bcx.info(default_kind).sysroot_host_libdir.clone(), +- target_dylib_path: bcx.info(default_kind).sysroot_target_libdir.clone(), ++ host_dylib_path: bcx.info(CompileKind::Host).sysroot_libdir.clone(), ++ target_dylib_path: bcx.info(default_kind).sysroot_libdir.clone(), + tests: Vec::new(), + binaries: Vec::new(), + extra_env: HashMap::new(), +-- +2.24.1 \ No newline at end of file diff --git a/srcpkgs/cargo/patches/link-static.patch b/srcpkgs/cargo/patches/link-static.patch index cfdcdeda9b7..fac8adbf4e0 100644 --- a/srcpkgs/cargo/patches/link-static.patch +++ b/srcpkgs/cargo/patches/link-static.patch @@ -1,8 +1,8 @@ --- Cargo.toml 2019-01-02 22:49:06.000000000 +0100 +++ Cargo.toml 2019-02-13 15:12:44.616810828 +0100 -@@ -107,3 +107,5 @@ - [features] - vendored-openssl = ['openssl/vendored'] - pretty-env-logger = ['pretty_env_logger'] +@@ -116,3 +116,5 @@ doc = false + deny-warnings = [] + vendored-openssl = ["openssl/vendored"] + pretty-env-logger = ["pretty_env_logger"] + +all-static = ['curl-sys/static-curl'] diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template index 4389d8de4b6..bef5262e20c 100644 --- a/srcpkgs/cargo/template +++ b/srcpkgs/cargo/template @@ -1,6 +1,6 @@ # Template file for 'cargo' pkgname=cargo -version=0.40.0 +version=0.41.0 revision=1 wrksrc="cargo-${version}" build_helper=rust @@ -15,9 +15,9 @@ _libgit2_ver=0.9.1 _git2_ver=0.10.1 distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz https://github.com/rust-lang/git2-rs/archive/libgit2-sys-${_libgit2_ver}.tar.gz" -checksum="b0a6808a2eaa9b20ccaeedeb04f583ee34b33d289f4d0076044b9fc2b1f4c59d +checksum="77b2e5b5207ed30dd6e6af934663f0c4553968dce575f95ca7e141444b6e9704 81e20fa9a0f6ea3e3a0e6458148f3dea4a89af87d34128d4375f2b7fd661a49c" -_cargo_dist_version=0.39.0 +_cargo_dist_version=0.40.0 build_options="static" if [ "$CROSS_BUILD" ]; then @@ -38,39 +38,39 @@ else case "$XBPS_MACHINE" in i686) checksum+=" - 2996b0fb41506e87d9b07851f40b41fed94725cf53c3d251e4e1c78eea08df4c" + d2a7ab28f0ff82a482ff24425f844b917a74059dbce550a96f0ab9fe1c131ef9" ;; x86_64) checksum+=" - 80bcb1368ce98d13cb371df89cbbed9007fb98843f34d07f2abd2c03b8f2747a" + 7b9ba52c252964724f49aab49e42bec62fca929297ef058412c7e727b0794620" ;; x86_64-musl) checksum+=" - 1d7d881a5af73fb7c3f632278d47a7d174f8347673e2263c4cd6a2f7d0278733" + 9c17f3f43c77e3cf002b3b54f871718b0a4fca30e83dca0a76a037d4943806c7" ;; ppc64le) checksum+=" - 456d019511cfe015152a7a4c1c2f518fdeb10e0c610c9bc3ef44d73861ca967e" + e420f7078262bd0735c6d368e0e46b064ea39fdbc86690932b86274616e838e6" ;; ppc64le-musl) checksum+=" - 5725c42c8356443db15f378d88f2ccb67e363ebf4beacc96ae1eac9ba36f8fe7" + e930b7da1f3ae1e0d3568c06cd4cc5f68a61813a8c53adf0e97d9592f3e3425e" ;; ppc64) checksum+=" - 73a4f13b8edda6b4c9c1818341c5d936f7b11a04f892358039d072b80ccd41dc" + d516be75b7cde33aa69db1e4fd99b222b868df3f642dada3bfed34d1db585380" ;; ppc64-musl) checksum+=" - ac18707b8df5d1f64b7e15dabd73eb7a3b0f9ef5976ef7c6ceb462b5d3feb9cd" + af226341d50cebc5af608375b6b200a1c10e14139812dc77a928140fe5120be9" ;; ppc) checksum+=" - 02c07b741062e75556f5993a05eefe6dace70fee4a45542f1c6997fa69624d7e" + a2a64bba73102caadf819dd268f5710c978ece0efa05aaa89cbae45a5443e880" ;; ppc-musl) checksum+=" - b06306fc164bffa73afd2d21d96381a28d38446e58cf01a0d1585e92b4656a23" + bbbf7037590fd38c5d4b2e2ac7ddddcc13213d05885d7c1fc2eacbffa4d920f5" ;; esac fi