summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-07-18 12:58:49 +0200
committerAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-07-21 10:06:06 +0200
commit3fedb57b270438afe6b8cc855cb3e7fa9593c80f (patch)
tree3461eecd5a4d96fe88ccda3d9cb5c340af6abf34
parent98e00712e3f6369db0bc591fdee49bcb27df570b (diff)
downloadrust-3fedb57b270438afe6b8cc855cb3e7fa9593c80f.tar.gz
rust-3fedb57b270438afe6b8cc855cb3e7fa9593c80f.tar.xz
rust: bump to 1.19.0
Signed-off-by: Marc-Antoine Perennou <keruspe@exherbo.org>
-rw-r--r--packages/dev-lang/rust/files/hash.patch28
-rw-r--r--packages/dev-lang/rust/files/hash2.patch50
-rw-r--r--packages/dev-lang/rust/files/rustbuild.patch971
-rw-r--r--packages/dev-lang/rust/rust-1.19.0.exheres-0 (renamed from packages/dev-lang/rust/rust-1.18.0-r1.exheres-0)7
-rw-r--r--packages/dev-lang/rust/rust-build.exlib30
5 files changed, 6 insertions, 1080 deletions
diff --git a/packages/dev-lang/rust/files/hash.patch b/packages/dev-lang/rust/files/hash.patch
deleted file mode 100644
index 9bc481f..0000000
--- a/packages/dev-lang/rust/files/hash.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f58e09236ba1fd1ac4e7f182c6b6be7f2c5e54ac Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Thu, 15 Jun 2017 16:48:05 +0200
-Subject: [PATCH] hash 'CFG_RELEASE_CHANNEL' in metadata for crates
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/cargo/ops/cargo_rustc/context.rs | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/tools/cargo/src/cargo/ops/cargo_rustc/context.rs b/src/tools/cargo/src/cargo/ops/cargo_rustc/context.rs
-index fa1ddd00..6c3748d3 100644
---- a/src/tools/cargo/src/cargo/ops/cargo_rustc/context.rs
-+++ b/src/tools/cargo/src/cargo/ops/cargo_rustc/context.rs
-@@ -491,6 +491,10 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
- rustc.verbose_version.hash(&mut hasher);
- }
-
-+ if let Ok(ref channel) = env::var("CFG_RELEASE_CHANNEL") {
-+ channel.hash(&mut hasher);
-+ }
-+
- Some(Metadata(hasher.finish()))
- }
-
---
-2.13.1
-
diff --git a/packages/dev-lang/rust/files/hash2.patch b/packages/dev-lang/rust/files/hash2.patch
deleted file mode 100644
index f574f7c..0000000
--- a/packages/dev-lang/rust/files/hash2.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From fde7d7049b184041691c1d8955a402a86aba30fd Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Fri, 16 Jun 2017 10:25:43 +0200
-Subject: [PATCH] rustbuild: ensure CFG_RELEASE_CHANNEL is always defined
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/compile.rs | 3 ---
- src/bootstrap/lib.rs | 4 ++++
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index 9a07e8a8b1..0d10972be1 100644
---- a/src/bootstrap/compile.rs
-+++ b/src/bootstrap/compile.rs
-@@ -245,7 +245,6 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) {
- // Set some configuration variables picked up by build scripts and
- // the compiler alike
- cargo.env("CFG_RELEASE", build.rust_release())
-- .env("CFG_RELEASE_CHANNEL", &build.config.channel)
- .env("CFG_VERSION", build.rust_version())
- .env("CFG_PREFIX", build.config.prefix.clone().unwrap_or(PathBuf::new()));
-
-@@ -461,8 +460,6 @@ pub fn tool(build: &Build, stage: u32, target: &str, tool: &str) {
- cargo.env("LIBZ_SYS_STATIC", "1");
- }
-
-- cargo.env("CFG_RELEASE_CHANNEL", &build.config.channel);
--
- let info = GitInfo::new(&dir);
- if let Some(sha) = info.sha() {
- cargo.env("CFG_COMMIT_HASH", sha);
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index c8cd71f8f2..e2a6ea4fc1 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -429,6 +429,10 @@ impl Build {
- .env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_libdir(compiler));
- }
-
-+ // Ensure we have access to the release channel we're building everywhere.
-+ // This is used by cargo to compute the libraries hash.
-+ cargo.env("CFG_RELEASE_CHANNEL", &self.config.channel);
-+
- // There are two invariants we must maintain:
- // * stable crates cannot depend on unstable crates (general Rust rule),
- // * crates that end up in the sysroot must be unstable (rustbuild rule).
---
-2.13.1
-
diff --git a/packages/dev-lang/rust/files/rustbuild.patch b/packages/dev-lang/rust/files/rustbuild.patch
deleted file mode 100644
index c24947a..0000000
--- a/packages/dev-lang/rust/files/rustbuild.patch
+++ /dev/null
@@ -1,971 +0,0 @@
-From 81d2629c7fe86244b31b6528714c0256c7806325 Mon Sep 17 00:00:00 2001
-From: Josh Stone <jistone@redhat.com>
-Date: Tue, 25 Apr 2017 15:34:31 -0700
-Subject: [PATCH 01/15] Build the rustc-src tarball before the rust-src
- component
-
----
- src/bootstrap/dist.rs | 60 ++++++++++++++++++++++++++++-----------------------
- 1 file changed, 33 insertions(+), 27 deletions(-)
-
-diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index 4328c4e3f1..e8c9a96b22 100644
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -369,13 +369,11 @@ pub fn rust_src(build: &Build) {
-
- println!("Dist src");
-
-- let name = pkgname(build, "rust-src");
-- let image = tmpdir(build).join(format!("{}-image", name));
-- let _ = fs::remove_dir_all(&image);
--
-- let dst = image.join("lib/rustlib/src");
-- let dst_src = dst.join("rust");
-- t!(fs::create_dir_all(&dst_src));
-+ // Make sure that the root folder of tarball has the correct name
-+ let plain_name = format!("rustc-{}-src", build.rust_package_vers());
-+ let plain_dst_src = tmpdir(build).join(&plain_name);
-+ let _ = fs::remove_dir_all(&plain_dst_src);
-+ t!(fs::create_dir_all(&plain_dst_src));
-
- // This is the set of root paths which will become part of the source package
- let src_files = [
-@@ -424,13 +422,13 @@ pub fn rust_src(build: &Build) {
-
- // Copy the directories using our filter
- for item in &src_dirs {
-- let dst = &dst_src.join(item);
-+ let dst = &plain_dst_src.join(item);
- t!(fs::create_dir(dst));
- cp_filtered(&build.src.join(item), dst, &filter_fn);
- }
- // Copy the files normally
- for item in &src_files {
-- copy(&build.src.join(item), &dst_src.join(item));
-+ copy(&build.src.join(item), &plain_dst_src.join(item));
- }
-
- // If we're building from git sources, we need to vendor a complete distribution.
-@@ -455,10 +453,35 @@ pub fn rust_src(build: &Build) {
- // Vendor all Cargo dependencies
- let mut cmd = Command::new(&build.cargo);
- cmd.arg("vendor")
-- .current_dir(&dst_src.join("src"));
-+ .current_dir(&plain_dst_src.join("src"));
- build.run(&mut cmd);
- }
-
-+ // Create the version file
-+ write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes());
-+
-+ // Create plain source tarball
-+ let tarball = rust_src_location(build);
-+ if let Some(dir) = tarball.parent() {
-+ t!(fs::create_dir_all(dir));
-+ }
-+ let mut cmd = Command::new("tar");
-+ cmd.arg("-czf").arg(sanitize_sh(&tarball))
-+ .arg(&plain_name)
-+ .current_dir(tmpdir(build));
-+ build.run(&mut cmd);
-+
-+
-+ let name = pkgname(build, "rust-src");
-+ let image = tmpdir(build).join(format!("{}-image", name));
-+ let _ = fs::remove_dir_all(&image);
-+
-+ let dst = image.join("lib/rustlib/src");
-+ let dst_src = dst.join("rust");
-+ t!(fs::create_dir_all(&dst_src));
-+
-+ cp_r(&plain_dst_src, &dst_src);
-+
- // Create source tarball in rust-installer format
- let mut cmd = Command::new(SH_CMD);
- cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
-@@ -473,23 +496,6 @@ pub fn rust_src(build: &Build) {
- .arg("--legacy-manifest-dirs=rustlib,cargo");
- build.run(&mut cmd);
-
-- // Rename directory, so that root folder of tarball has the correct name
-- let plain_name = format!("rustc-{}-src", build.rust_package_vers());
-- let plain_dst_src = tmpdir(build).join(&plain_name);
-- let _ = fs::remove_dir_all(&plain_dst_src);
-- t!(fs::create_dir_all(&plain_dst_src));
-- cp_r(&dst_src, &plain_dst_src);
--
-- // Create the version file
-- write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes());
--
-- // Create plain source tarball
-- let mut cmd = Command::new("tar");
-- cmd.arg("-czf").arg(sanitize_sh(&rust_src_location(build)))
-- .arg(&plain_name)
-- .current_dir(tmpdir(build));
-- build.run(&mut cmd);
--
- t!(fs::remove_dir_all(&image));
- t!(fs::remove_dir_all(&plain_dst_src));
- }
---
-2.13.0
-
-
-From 6d36eeef3a343c173a483b5684203e832128147c Mon Sep 17 00:00:00 2001
-From: Josh Stone <jistone@redhat.com>
-Date: Tue, 25 Apr 2017 15:58:07 -0700
-Subject: [PATCH 02/15] Reduce the contents of the rust-src component
-
----
- src/bootstrap/dist.rs | 30 +++++++++++++++++++++++++++++-
- 1 file changed, 29 insertions(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index e8c9a96b22..7e04b3660c 100644
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -480,7 +480,35 @@ pub fn rust_src(build: &Build) {
- let dst_src = dst.join("rust");
- t!(fs::create_dir_all(&dst_src));
-
-- cp_r(&plain_dst_src, &dst_src);
-+ // This is the reduced set of paths which will become the rust-src component
-+ // (essentially libstd and all of its path dependencies)
-+ let std_src_dirs = [
-+ "src/build_helper",
-+ "src/liballoc",
-+ "src/liballoc_jemalloc",
-+ "src/liballoc_system",
-+ "src/libcollections",
-+ "src/libcompiler_builtins",
-+ "src/libcore",
-+ "src/liblibc",
-+ "src/libpanic_abort",
-+ "src/libpanic_unwind",
-+ "src/librand",
-+ "src/librustc_asan",
-+ "src/librustc_lsan",
-+ "src/librustc_msan",
-+ "src/librustc_tsan",
-+ "src/libstd",
-+ "src/libstd_unicode",
-+ "src/libunwind",
-+ "src/rustc/libc_shim",
-+ ];
-+
-+ for item in &std_src_dirs {
-+ let dst = &dst_src.join(item);
-+ t!(fs::create_dir_all(dst));
-+ cp_r(&plain_dst_src.join(item), dst);
-+ }
-
- // Create source tarball in rust-installer format
- let mut cmd = Command::new(SH_CMD);
---
-2.13.0
-
-
-From f74eacf847c15a6261122d7a20d21dff926fbd28 Mon Sep 17 00:00:00 2001
-From: Josh Stone <jistone@redhat.com>
-Date: Wed, 26 Apr 2017 12:37:12 -0700
-Subject: [PATCH 03/15] Add a distcheck for rust-src completeness
-
----
- src/bootstrap/check.rs | 21 +++++++++++++++++++++
- src/bootstrap/dist.rs | 7 +++++++
- 2 files changed, 28 insertions(+)
-
-diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
-index f8f641060c..e05520429e 100644
---- a/src/bootstrap/check.rs
-+++ b/src/bootstrap/check.rs
-@@ -645,6 +645,7 @@ pub fn distcheck(build: &Build) {
- return
- }
-
-+ println!("Distcheck");
- let dir = build.out.join("tmp").join("distcheck");
- let _ = fs::remove_dir_all(&dir);
- t!(fs::create_dir_all(&dir));
-@@ -662,6 +663,26 @@ pub fn distcheck(build: &Build) {
- build.run(Command::new(build_helper::make(&build.config.build))
- .arg("check")
- .current_dir(&dir));
-+
-+ // Now make sure that rust-src has all of libstd's dependencies
-+ println!("Distcheck rust-src");
-+ let dir = build.out.join("tmp").join("distcheck-src");
-+ let _ = fs::remove_dir_all(&dir);
-+ t!(fs::create_dir_all(&dir));
-+
-+ let mut cmd = Command::new("tar");
-+ cmd.arg("-xzf")
-+ .arg(dist::rust_src_installer(build))
-+ .arg("--strip-components=1")
-+ .current_dir(&dir);
-+ build.run(&mut cmd);
-+
-+ let toml = dir.join("rust-src/lib/rustlib/src/rust/src/libstd/Cargo.toml");
-+ build.run(Command::new(&build.cargo)
-+ .arg("generate-lockfile")
-+ .arg("--manifest-path")
-+ .arg(&toml)
-+ .current_dir(&dir));
- }
-
- /// Test the build system itself
-diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index 7e04b3660c..5db9ac8295 100644
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -310,11 +310,18 @@ pub fn std(build: &Build, compiler: &Compiler, target: &str) {
- t!(fs::remove_dir_all(&image));
- }
-
-+/// The path to the complete rustc-src tarball
- pub fn rust_src_location(build: &Build) -> PathBuf {
- let plain_name = format!("rustc-{}-src", build.rust_package_vers());
- distdir(build).join(&format!("{}.tar.gz", plain_name))
- }
-
-+/// The path to the rust-src component installer
-+pub fn rust_src_installer(build: &Build) -> PathBuf {
-+ let name = pkgname(build, "rust-src");
-+ distdir(build).join(&format!("{}.tar.gz", name))
-+}
-+
- /// Creates a tarball of save-analysis metadata, if available.
- pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
- assert!(build.config.extended);
---
-2.13.0
-
-
-From 07a55b27aa9e44208db279d3557da1d9e27c8f66 Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Thu, 27 Apr 2017 11:51:02 +0200
-Subject: [PATCH 04/15] rustbuild: build cargo and rls as part of extended
- build
-
-Build them directly in the `./x.py build` phase, don't wait for
-`./x.py dist`
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/step.rs | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs
-index 17902a39df..ed83deef76 100644
---- a/src/bootstrap/step.rs
-+++ b/src/bootstrap/step.rs
-@@ -571,6 +571,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
- .dep(|s| s.name("libstd-tool"))
- .run(move |s| compile::tool(build, s.stage, s.target, "qemu-test-client"));
- rules.build("tool-cargo", "cargo")
-+ .default(build.config.extended)
- .dep(|s| s.name("maybe-clean-tools"))
- .dep(|s| s.name("libstd-tool"))
- .dep(|s| s.stage(0).host(s.target).name("openssl"))
-@@ -584,6 +585,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
- .run(move |s| compile::tool(build, s.stage, s.target, "cargo"));
- rules.build("tool-rls", "rls")
- .host(true)
-+ .default(build.config.extended)
- .dep(|s| s.name("librustc-tool"))
- .dep(|s| s.stage(0).host(s.target).name("openssl"))
- .dep(move |s| {
---
-2.13.0
-
-
-From 4f1e33cecb7d37c1c871a72afedcffdf0c5d66dd Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Thu, 27 Apr 2017 11:52:48 +0200
-Subject: [PATCH 05/15] rustbuild: pass version number as param in install
- phase
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/install.rs | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
-index d508616e4b..e99451fd52 100644
---- a/src/bootstrap/install.rs
-+++ b/src/bootstrap/install.rs
-@@ -46,24 +46,24 @@ pub fn install(build: &Build, stage: u32, host: &str) {
- let empty_dir = build.out.join("tmp/empty_dir");
- t!(fs::create_dir_all(&empty_dir));
- if build.config.docs {
-- install_sh(&build, "docs", "rust-docs", stage, host, &prefix,
-- &docdir, &libdir, &mandir, &empty_dir);
-+ install_sh(&build, "docs", "rust-docs", &build.rust_package_vers(),
-+ stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
- }
-
- for target in build.config.target.iter() {
-- install_sh(&build, "std", "rust-std", stage, target, &prefix,
-+ install_sh(&build, "std", "rust-std", &build.rust_package_vers(), stage, target, &prefix,
- &docdir, &libdir, &mandir, &empty_dir);
- }
-
-- install_sh(&build, "rustc", "rustc", stage, host, &prefix,
-+ install_sh(&build, "rustc", "rustc", &build.rust_package_vers(), stage, host, &prefix,
- &docdir, &libdir, &mandir, &empty_dir);
- t!(fs::remove_dir_all(&empty_dir));
- }
-
--fn install_sh(build: &Build, package: &str, name: &str, stage: u32, host: &str,
-+fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: &str,
- prefix: &Path, docdir: &Path, libdir: &Path, mandir: &Path, empty_dir: &Path) {
- println!("Install {} stage{} ({})", package, stage, host);
-- let package_name = format!("{}-{}-{}", name, build.rust_package_vers(), host);
-+ let package_name = format!("{}-{}-{}", name, version, host);
-
- let mut cmd = Command::new("sh");
- cmd.current_dir(empty_dir)
---
-2.13.0
-
-
-From 38c7b79f37d522e449858e7db91dba23631d2e47 Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Thu, 27 Apr 2017 11:49:03 +0200
-Subject: [PATCH 06/15] rustbuild: add rls_package_vers
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/lib.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 5e046f4167..180a2bbaa4 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -1028,6 +1028,11 @@ impl Build {
- self.package_vers(&self.release_num("cargo"))
- }
-
-+ /// Returns the value of `package_vers` above for rls
-+ fn rls_package_vers(&self) -> String {
-+ self.package_vers(&self.release_num("rls"))
-+ }
-+
- /// Returns the `version` string associated with this compiler for Rust
- /// itself.
- ///
---
-2.13.0
-
-
-From ce4ccd8fb28bd6e1362eabc0c7219dea5e9becaa Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Thu, 27 Apr 2017 11:53:18 +0200
-Subject: [PATCH 07/15] rustbuild: install cargo and rls when extended build is
- enabled
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/install.rs | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
-index e99451fd52..b8dde1df72 100644
---- a/src/bootstrap/install.rs
-+++ b/src/bootstrap/install.rs
-@@ -51,12 +51,20 @@ pub fn install(build: &Build, stage: u32, host: &str) {
- }
-
- for target in build.config.target.iter() {
-- install_sh(&build, "std", "rust-std", &build.rust_package_vers(), stage, target, &prefix,
-- &docdir, &libdir, &mandir, &empty_dir);
-+ install_sh(&build, "std", "rust-std", &build.rust_package_vers(),
-+ stage, target, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-+ }
-+
-+ install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
-+ stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-+
-+ if build.config.extended {
-+ install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
-+ stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-+ install_sh(&build, "rls", "rls", &build.rls_package_vers(),
-+ stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
- }
-
-- install_sh(&build, "rustc", "rustc", &build.rust_package_vers(), stage, host, &prefix,
-- &docdir, &libdir, &mandir, &empty_dir);
- t!(fs::remove_dir_all(&empty_dir));
- }
-
---
-2.13.0
-
-
-From be7b09c1113671cb3edd4ef95541e894bec77212 Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Thu, 27 Apr 2017 15:05:29 +0200
-Subject: [PATCH 08/15] rustbuild: install rustc after cargo and rls
-
-This way its files take precedence (e.g. README.md and stuff)
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/install.rs | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
-index b8dde1df72..c805522fbf 100644
---- a/src/bootstrap/install.rs
-+++ b/src/bootstrap/install.rs
-@@ -55,9 +55,6 @@ pub fn install(build: &Build, stage: u32, host: &str) {
- stage, target, &prefix, &docdir, &libdir, &mandir, &empty_dir);
- }
-
-- install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
-- stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
--
- if build.config.extended {
- install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
- stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-@@ -65,6 +62,9 @@ pub fn install(build: &Build, stage: u32, host: &str) {
- stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
- }
-
-+ install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
-+ stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-+
- t!(fs::remove_dir_all(&empty_dir));
- }
-
---
-2.13.0
-
-
-From 6ca14569b476f4b62280ce4875a06e33727f9f75 Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Fri, 28 Apr 2017 10:48:49 +0200
-Subject: [PATCH 09/15] rustbuild: only build cargo for host
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/step.rs | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs
-index ed83deef76..909fcdd4ab 100644
---- a/src/bootstrap/step.rs
-+++ b/src/bootstrap/step.rs
-@@ -571,6 +571,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
- .dep(|s| s.name("libstd-tool"))
- .run(move |s| compile::tool(build, s.stage, s.target, "qemu-test-client"));
- rules.build("tool-cargo", "cargo")
-+ .host(true)
- .default(build.config.extended)
- .dep(|s| s.name("maybe-clean-tools"))
- .dep(|s| s.name("libstd-tool"))
---
-2.13.0
-
-
-From 21b9870acb7da3c6c572875899754e390f1ebbb2 Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Fri, 28 Apr 2017 10:58:46 +0200
-Subject: [PATCH 10/15] rustbuild: pass bindir to install_sh
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/install.rs | 19 ++++++++++++-------
- 1 file changed, 12 insertions(+), 7 deletions(-)
-
-diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
-index c805522fbf..c16e6c7281 100644
---- a/src/bootstrap/install.rs
-+++ b/src/bootstrap/install.rs
-@@ -25,14 +25,17 @@ use dist::{sanitize_sh, tmpdir};
- pub fn install(build: &Build, stage: u32, host: &str) {
- let prefix_default = PathBuf::from("/usr/local");
- let docdir_default = PathBuf::from("share/doc/rust");
-- let mandir_default = PathBuf::from("share/man");
-+ let bindir_default = PathBuf::from("bin");
- let libdir_default = PathBuf::from("lib");
-+ let mandir_default = PathBuf::from("share/man");
- let prefix = build.config.prefix.as_ref().unwrap_or(&prefix_default);
- let docdir = build.config.docdir.as_ref().unwrap_or(&docdir_default);
-+ let bindir = build.config.bindir.as_ref().unwrap_or(&bindir_default);
- let libdir = build.config.libdir.as_ref().unwrap_or(&libdir_default);
- let mandir = build.config.mandir.as_ref().unwrap_or(&mandir_default);
-
- let docdir = prefix.join(docdir);
-+ let bindir = prefix.join(bindir);
- let libdir = prefix.join(libdir);
- let mandir = prefix.join(mandir);
-
-@@ -40,6 +43,7 @@ pub fn install(build: &Build, stage: u32, host: &str) {
-
- let prefix = add_destdir(&prefix, &destdir);
- let docdir = add_destdir(&docdir, &destdir);
-+ let bindir = add_destdir(&bindir, &destdir);
- let libdir = add_destdir(&libdir, &destdir);
- let mandir = add_destdir(&mandir, &destdir);
-
-@@ -47,29 +51,29 @@ pub fn install(build: &Build, stage: u32, host: &str) {
- t!(fs::create_dir_all(&empty_dir));
- if build.config.docs {
- install_sh(&build, "docs", "rust-docs", &build.rust_package_vers(),
-- stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-+ stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
- }
-
- for target in build.config.target.iter() {
- install_sh(&build, "std", "rust-std", &build.rust_package_vers(),
-- stage, target, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-+ stage, target, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
- }
-
- if build.config.extended {
- install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
-- stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-+ stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
- install_sh(&build, "rls", "rls", &build.rls_package_vers(),
-- stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-+ stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
- }
-
- install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
-- stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-+ stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
-
- t!(fs::remove_dir_all(&empty_dir));
- }
-
- fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: &str,
-- prefix: &Path, docdir: &Path, libdir: &Path, mandir: &Path, empty_dir: &Path) {
-+ prefix: &Path, docdir: &Path, bindir: &Path, libdir: &Path, mandir: &Path, empty_dir: &Path) {
- println!("Install {} stage{} ({})", package, stage, host);
- let package_name = format!("{}-{}-{}", name, version, host);
-
-@@ -78,6 +82,7 @@ fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u3
- .arg(sanitize_sh(&tmpdir(build).join(&package_name).join("install.sh")))
- .arg(format!("--prefix={}", sanitize_sh(prefix)))
- .arg(format!("--docdir={}", sanitize_sh(docdir)))
-+ .arg(format!("--bindir={}", sanitize_sh(bindir)))
- .arg(format!("--libdir={}", sanitize_sh(libdir)))
- .arg(format!("--mandir={}", sanitize_sh(mandir)))
- .arg("--disable-ldconfig");
---
-2.13.0
-
-
-From 9b844f5676f93a022d49a058347fcf08518381b5 Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Fri, 28 Apr 2017 11:08:47 +0200
-Subject: [PATCH 11/15] rustbuild: pass sysconfdir to install_sh
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/install.rs | 23 +++++++++++++++++------
- 1 file changed, 17 insertions(+), 6 deletions(-)
-
-diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
-index c16e6c7281..386b001971 100644
---- a/src/bootstrap/install.rs
-+++ b/src/bootstrap/install.rs
-@@ -24,16 +24,19 @@ use dist::{sanitize_sh, tmpdir};
- /// Installs everything.
- pub fn install(build: &Build, stage: u32, host: &str) {
- let prefix_default = PathBuf::from("/usr/local");
-+ let sysconfdir_default = PathBuf::from("/etc");
- let docdir_default = PathBuf::from("share/doc/rust");
- let bindir_default = PathBuf::from("bin");
- let libdir_default = PathBuf::from("lib");
- let mandir_default = PathBuf::from("share/man");
- let prefix = build.config.prefix.as_ref().unwrap_or(&prefix_default);
-+ let sysconfdir = build.config.sysconfdir.as_ref().unwrap_or(&sysconfdir_default);
- let docdir = build.config.docdir.as_ref().unwrap_or(&docdir_default);
- let bindir = build.config.bindir.as_ref().unwrap_or(&bindir_default);
- let libdir = build.config.libdir.as_ref().unwrap_or(&libdir_default);
- let mandir = build.config.mandir.as_ref().unwrap_or(&mandir_default);
-
-+ let sysconfdir = prefix.join(sysconfdir);
- let docdir = prefix.join(docdir);
- let bindir = prefix.join(bindir);
- let libdir = prefix.join(libdir);
-@@ -42,6 +45,7 @@ pub fn install(build: &Build, stage: u32, host: &str) {
- let destdir = env::var_os("DESTDIR").map(PathBuf::from);
-
- let prefix = add_destdir(&prefix, &destdir);
-+ let sysconfdir = add_destdir(&sysconfdir, &destdir);
- let docdir = add_destdir(&docdir, &destdir);
- let bindir = add_destdir(&bindir, &destdir);
- let libdir = add_destdir(&libdir, &destdir);
-@@ -51,29 +55,35 @@ pub fn install(build: &Build, stage: u32, host: &str) {
- t!(fs::create_dir_all(&empty_dir));
- if build.config.docs {
- install_sh(&build, "docs", "rust-docs", &build.rust_package_vers(),
-- stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
-+ stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ &mandir, &empty_dir);
- }
-
- for target in build.config.target.iter() {
- install_sh(&build, "std", "rust-std", &build.rust_package_vers(),
-- stage, target, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
-+ stage, target, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ &mandir, &empty_dir);
- }
-
- if build.config.extended {
- install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
-- stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
-+ stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ &mandir, &empty_dir);
- install_sh(&build, "rls", "rls", &build.rls_package_vers(),
-- stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
-+ stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ &mandir, &empty_dir);
- }
-
- install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
-- stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
-+ stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ &mandir, &empty_dir);
-
- t!(fs::remove_dir_all(&empty_dir));
- }
-
- fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: &str,
-- prefix: &Path, docdir: &Path, bindir: &Path, libdir: &Path, mandir: &Path, empty_dir: &Path) {
-+ prefix: &Path, sysconfdir: &Path, docdir: &Path, bindir: &Path, libdir: &Path,
-+ mandir: &Path, empty_dir: &Path) {
- println!("Install {} stage{} ({})", package, stage, host);
- let package_name = format!("{}-{}-{}", name, version, host);
-
-@@ -81,6 +91,7 @@ fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u3
- cmd.current_dir(empty_dir)
- .arg(sanitize_sh(&tmpdir(build).join(&package_name).join("install.sh")))
- .arg(format!("--prefix={}", sanitize_sh(prefix)))
-+ .arg(format!("--sysconfdir={}", sanitize_sh(sysconfdir)))
- .arg(format!("--docdir={}", sanitize_sh(docdir)))
- .arg(format!("--bindir={}", sanitize_sh(bindir)))
- .arg(format!("--libdir={}", sanitize_sh(libdir)))
---
-2.13.0
-
-
-From cb9e3d84a3827d6370059650a2883cb25e516f4a Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Wed, 17 May 2017 12:15:15 +0200
-Subject: [PATCH 12/15] rustbuild: install rust-analysis and rust-src when
- extended build is enabled
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/install.rs | 26 ++++++++++++++++++--------
- 1 file changed, 18 insertions(+), 8 deletions(-)
-
-diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
-index 386b001971..5d5ee67c95 100644
---- a/src/bootstrap/install.rs
-+++ b/src/bootstrap/install.rs
-@@ -55,37 +55,47 @@ pub fn install(build: &Build, stage: u32, host: &str) {
- t!(fs::create_dir_all(&empty_dir));
- if build.config.docs {
- install_sh(&build, "docs", "rust-docs", &build.rust_package_vers(),
-- stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ stage, Some(host), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
- &mandir, &empty_dir);
- }
-
- for target in build.config.target.iter() {
- install_sh(&build, "std", "rust-std", &build.rust_package_vers(),
-- stage, target, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ stage, Some(target), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
- &mandir, &empty_dir);
- }
-
- if build.config.extended {
- install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
-- stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ stage, Some(host), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
- &mandir, &empty_dir);
- install_sh(&build, "rls", "rls", &build.rls_package_vers(),
-- stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ stage, Some(host), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ &mandir, &empty_dir);
-+ install_sh(&build, "analysis", "rust-analysis", &build.rust_package_vers(),
-+ stage, Some(host), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ &mandir, &empty_dir);
-+ install_sh(&build, "src", "rust-src", &build.rust_package_vers(),
-+ stage, None, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
- &mandir, &empty_dir);
- }
-
- install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
-- stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
-+ stage, Some(host), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
- &mandir, &empty_dir);
-
- t!(fs::remove_dir_all(&empty_dir));
- }
-
--fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: &str,
-+fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: Option<&str>,
- prefix: &Path, sysconfdir: &Path, docdir: &Path, bindir: &Path, libdir: &Path,
- mandir: &Path, empty_dir: &Path) {
-- println!("Install {} stage{} ({})", package, stage, host);
-- let package_name = format!("{}-{}-{}", name, version, host);
-+ println!("Install {} stage{} ({:?})", package, stage, host);
-+ let package_name = if let Some(host) = host {
-+ format!("{}-{}-{}", name, version, host)
-+ } else {
-+ format!("{}-{}", name, version)
-+ };
-
- let mut cmd = Command::new("sh");
- cmd.current_dir(empty_dir)
---
-2.13.0
-
-
-From 5cab29ea346c58f63e2cf272c18588f77d3f94b1 Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Fri, 28 Apr 2017 11:01:15 +0200
-Subject: [PATCH 13/15] rustbuild: allow configuring bindir
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/config.rs | 10 ++++++++--
- src/bootstrap/config.toml.example | 9 ++++++---
- 2 files changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 34fbc33d98..c800508cdb 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -100,6 +100,7 @@ pub struct Config {
- pub musl_root: Option<PathBuf>,
- pub prefix: Option<PathBuf>,
- pub docdir: Option<PathBuf>,
-+ pub bindir: Option<PathBuf>,
- pub libdir: Option<PathBuf>,
- pub libdir_relative: Option<PathBuf>,
- pub mandir: Option<PathBuf>,
-@@ -165,9 +166,10 @@ struct Build {
- #[derive(RustcDecodable, Default, Clone)]
- struct Install {
- prefix: Option<String>,
-- mandir: Option<String>,
- docdir: Option<String>,
-+ bindir: Option<String>,
- libdir: Option<String>,
-+ mandir: Option<String>,
- }
-
- /// TOML representation of how the LLVM build is configured.
-@@ -315,9 +317,10 @@ impl Config {
-
- if let Some(ref install) = toml.install {
- config.prefix = install.prefix.clone().map(PathBuf::from);
-- config.mandir = install.mandir.clone().map(PathBuf::from);
- config.docdir = install.docdir.clone().map(PathBuf::from);
-+ config.bindir = install.bindir.clone().map(PathBuf::from);
- config.libdir = install.libdir.clone().map(PathBuf::from);
-+ config.mandir = install.mandir.clone().map(PathBuf::from);
- }
-
- if let Some(ref llvm) = toml.llvm {
-@@ -526,6 +529,9 @@ impl Config {
- "CFG_DOCDIR" => {
- self.docdir = Some(PathBuf::from(value));
- }
-+ "CFG_BINDIR" => {
-+ self.bindir = Some(PathBuf::from(value));
-+ }
- "CFG_LIBDIR" => {
- self.libdir = Some(PathBuf::from(value));
- }
-diff --git a/src/bootstrap/config.toml.example b/src/bootstrap/config.toml.example
-index fad7902204..b91317398d 100644
---- a/src/bootstrap/config.toml.example
-+++ b/src/bootstrap/config.toml.example
-@@ -160,15 +160,18 @@
- # Instead of installing to /usr/local, install to this path instead.
- #prefix = "/usr/local"
-
-+# Where to install documentation in `prefix` above
-+#docdir = "share/doc/rust"
-+
-+# Where to install binaries in `prefix` above
-+#bindir = "bin"
-+
- # Where to install libraries in `prefix` above
- #libdir = "lib"
-
- # Where to install man pages in `prefix` above
- #mandir = "share/man"
-
--# Where to install documentation in `prefix` above
--#docdir = "share/doc/rust"
--
- # =============================================================================
- # Options for compiling Rust code itself
- # =============================================================================
---
-2.13.0
-
-
-From f3bd42e156877fc63c77ab0981228d66f27a384b Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Fri, 28 Apr 2017 11:03:58 +0200
-Subject: [PATCH 14/15] rustbuild: allow configuring sysconfdir
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/config.rs | 6 ++++++
- src/bootstrap/config.toml.example | 4 ++++
- 2 files changed, 10 insertions(+)
-
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index c800508cdb..b1e2727ca6 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -99,6 +99,7 @@ pub struct Config {
- // Fallback musl-root for all targets
- pub musl_root: Option<PathBuf>,
- pub prefix: Option<PathBuf>,
-+ pub sysconfdir: Option<PathBuf>,
- pub docdir: Option<PathBuf>,
- pub bindir: Option<PathBuf>,
- pub libdir: Option<PathBuf>,
-@@ -166,6 +167,7 @@ struct Build {
- #[derive(RustcDecodable, Default, Clone)]
- struct Install {
- prefix: Option<String>,
-+ sysconfdir: Option<String>,
- docdir: Option<String>,
- bindir: Option<String>,
- libdir: Option<String>,
-@@ -317,6 +319,7 @@ impl Config {
-
- if let Some(ref install) = toml.install {
- config.prefix = install.prefix.clone().map(PathBuf::from);
-+ config.sysconfdir = install.sysconfdir.clone().map(PathBuf::from);
- config.docdir = install.docdir.clone().map(PathBuf::from);
- config.bindir = install.bindir.clone().map(PathBuf::from);
- config.libdir = install.libdir.clone().map(PathBuf::from);
-@@ -526,6 +529,9 @@ impl Config {
- "CFG_PREFIX" => {
- self.prefix = Some(PathBuf::from(value));
- }
-+ "CFG_SYSCONFDIR" => {
-+ self.sysconfdir = Some(PathBuf::from(value));
-+ }
- "CFG_DOCDIR" => {
- self.docdir = Some(PathBuf::from(value));
- }
-diff --git a/src/bootstrap/config.toml.example b/src/bootstrap/config.toml.example
-index b91317398d..f55599c0d6 100644
---- a/src/bootstrap/config.toml.example
-+++ b/src/bootstrap/config.toml.example
-@@ -160,6 +160,10 @@
- # Instead of installing to /usr/local, install to this path instead.
- #prefix = "/usr/local"
-
-+# Where to install system configuration files
-+# If this is a relative path, it will get installed in `prefix` above
-+#sysconfdir = "/etc"
-+
- # Where to install documentation in `prefix` above
- #docdir = "share/doc/rust"
-
---
-2.13.0
-
-
-From 14a25dbcb8e35be7312de7559b46856e902cdca7 Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Tue, 6 Jun 2017 16:25:50 +0200
-Subject: [PATCH 15/15] fix exherbo stable build
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/install.rs | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
-index 5d5ee67c95..39822aa6dc 100644
---- a/src/bootstrap/install.rs
-+++ b/src/bootstrap/install.rs
-@@ -96,14 +96,13 @@ fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u3
- } else {
- format!("{}-{}", name, version)
- };
-+ format!("{:?} {:?}", sysconfdir, bindir);
-
- let mut cmd = Command::new("sh");
- cmd.current_dir(empty_dir)
- .arg(sanitize_sh(&tmpdir(build).join(&package_name).join("install.sh")))
- .arg(format!("--prefix={}", sanitize_sh(prefix)))
-- .arg(format!("--sysconfdir={}", sanitize_sh(sysconfdir)))
- .arg(format!("--docdir={}", sanitize_sh(docdir)))
-- .arg(format!("--bindir={}", sanitize_sh(bindir)))
- .arg(format!("--libdir={}", sanitize_sh(libdir)))
- .arg(format!("--mandir={}", sanitize_sh(mandir)))
- .arg("--disable-ldconfig");
---
-2.13.0
-
-From fee7c68e59b452cd637ba91532d6b77baa95ef10 Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Wed, 7 Jun 2017 17:53:23 +0200
-Subject: [PATCH] Include rustc version in metadata
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/cargo/ops/cargo_rustc/context.rs | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/cargo/src/cargo/ops/cargo_rustc/context.rs b/cargo/src/cargo/ops/cargo_rustc/context.rs
-index 1b1242f903..f569c1befb 100644
---- a/cargo/src/cargo/ops/cargo_rustc/context.rs
-+++ b/cargo/src/cargo/ops/cargo_rustc/context.rs
-@@ -482,6 +482,10 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
- unit.target.name().hash(&mut hasher);
- unit.target.kind().hash(&mut hasher);
-
-+ if let Ok(ref rustc) = self.config.rustc() {
-+ rustc.verbose_version.hash(&mut hasher);
-+ }
-+
- Some(Metadata(hasher.finish()))
- }
-
-From c7afc348b83b2267ce2bae405f0f023a404481d4 Mon Sep 17 00:00:00 2001
-From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-Date: Fri, 16 Jun 2017 10:30:52 +0200
-Subject: [PATCH] fix comment
-
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
----
- src/bootstrap/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 180a2bbaa4..8272fb4a80 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -507,7 +507,7 @@ impl Build {
- .env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_libdir(compiler));
- }
-
-- // There are two invariants we try must maintain:
-+ // There are two invariants we must maintain:
- // * stable crates cannot depend on unstable crates (general Rust rule),
- // * crates that end up in the sysroot must be unstable (rustbuild rule).
- //
---
-2.13.1
-
diff --git a/packages/dev-lang/rust/rust-1.18.0-r1.exheres-0 b/packages/dev-lang/rust/rust-1.19.0.exheres-0
index 4ff3f6d..2a9cf1b 100644
--- a/packages/dev-lang/rust/rust-1.18.0-r1.exheres-0
+++ b/packages/dev-lang/rust/rust-1.19.0.exheres-0
@@ -2,15 +2,10 @@
# Distributed under the terms of the GNU General Public License v2
# Get these from src/stage0.txt
-require rust-build [ date=2017-04-27 rustc_required=1.17.0 bootstrap_cargo=0.18.0 importance=1000 ]
+require rust-build [ date=2017-06-08 rustc_required=1.18.0 bootstrap_cargo=0.19.0 importance=1000 ]
PLATFORMS="~amd64"
SLOT="stable"
-DEFAULT_SRC_PREPARE_PATCHES=(
- "${FILES}"/rustbuild.patch
- "${FILES}"/hash2.patch
- -p3 "${FILES}"/hash.patch
-)
DOWNLOADS="https://static.rust-lang.org/dist/${MY_PNV}.tar.gz"
diff --git a/packages/dev-lang/rust/rust-build.exlib b/packages/dev-lang/rust/rust-build.exlib
index 695f5a2..ef3bb65 100644
--- a/packages/dev-lang/rust/rust-build.exlib
+++ b/packages/dev-lang/rust/rust-build.exlib
@@ -139,18 +139,8 @@ rust-build_src_unpack() {
edo cd "${WORK}"/src/bootstrap
ecargo_fetch
-
- if ever at_least 1.19; then
- for tool in cargo rls rust-installer; do
- edo cd "${WORK}"/src/tools/${tool}
- ecargo_fetch
- done
- else
- for tool in cargo rls; do
- edo cd "${WORK}"/${tool}
- ecargo_fetch
- done
- fi
+ edo cd "${WORK}"/src
+ ecargo_fetch
}
rust-build_src_prepare() {
@@ -248,7 +238,7 @@ $(option !internal-llvm "llvm-config = \"/usr/host/bin/llvm-config\"")
# android-ndk = this has no use to us
# musl-root = TODO for musl people
[dist]
-src-tarball = $(ever at_least 1.19 && echo false || echo true)
+src-tarball = false
EOF
cargo_src_configure
@@ -257,24 +247,14 @@ EOF
rust-build_src_compile(){
unset SUDO_USER
esandbox allow "${CARGO_HOME}"
- edo ./x.py build
- edo ./x.py doc
+ edo ./x.py dist
esandbox disallow "${CARGO_HOME}"
}
rust-build_src_install() {
unset SUDO_USER
esandbox allow "${CARGO_HOME}"
- if ever at_least 1.19; then
- DESTDIR="${IMAGE}" edo ./x.py install
- else
- DESTDIR="${IMAGE}" edo ./x.py dist --install
- edo mkdir "${IMAGE}"/etc
- edo mv "${IMAGE}"{/usr,}/etc/bash_completions.d
- edo mv "${IMAGE}"/etc/bash_completion{s,}.d
- edo mv "${IMAGE}"/usr/{,$(exhost --target)}/bin
- edo find "${IMAGE}" -type d -empty -delete
- fi
+ DESTDIR="${IMAGE}" edo ./x.py install
esandbox disallow "${CARGO_HOME}"
local alternatives=()
local rustlib_alt_files=(