pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rust: add patch to permit install when using external LLVM.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Tue Mar 21 23:35:58 2023 +0100
Changeset:	5bca74ecffa62d8e9a7b43fe38940a77732384d2

Modified Files:
	rust/distinfo
Added Files:
	rust/patches/patch-src_bootstrap_install.rs

Log Message:
rust: add patch to permit install when using external LLVM.

Picked up from
https://github.com/rust-lang/rust/pull/109256

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5bca74ecffa62d8e9a7b43fe38940a77732384d2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 rust/distinfo                               |  1 +
 rust/patches/patch-src_bootstrap_install.rs | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diffs:
diff --git a/rust/distinfo b/rust/distinfo
index 4209c2bba8..6192904019 100644
--- a/rust/distinfo
+++ b/rust/distinfo
@@ -130,6 +130,7 @@ SHA1 (patch-library_std_src_sys_unix_thread__parking_netbsd.rs) = c29eb1cf074766
 SHA1 (patch-src_bootstrap_bootstrap.py) = fdb4e2e7fd61ae10f4f4b06ef895a8ebf47fbf7a
 SHA1 (patch-src_bootstrap_builder.rs) = 98daac929d2bbc9c475c39d225d50d37491528a8
 SHA1 (patch-src_bootstrap_compile.rs) = 94b05db59b8bc50dce48537aeb72ba9ce293bb07
+SHA1 (patch-src_bootstrap_install.rs) = 5b10a2706d67096791f25c723721cb4824fd584f
 SHA1 (patch-src_bootstrap_lib.rs) = f6918e0939b6fe63ae9b524d4c809375149efb15
 SHA1 (patch-src_llvm-project_llvm_CMakeLists.txt) = 7abfabb6ec70df229a69355f8c76825610165c37
 SHA1 (patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake) = 67de0d9fc105ef7ea7a0d96fa25fc779c2b89024
diff --git a/rust/patches/patch-src_bootstrap_install.rs b/rust/patches/patch-src_bootstrap_install.rs
new file mode 100644
index 0000000000..2103b4f051
--- /dev/null
+++ b/rust/patches/patch-src_bootstrap_install.rs
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Apply fix from https://github.com/rust-lang/rust/pull/109256.
+
+--- src/bootstrap/install.rs.orig	2023-03-21 21:31:48.458992230 +0000
++++ src/bootstrap/install.rs
+@@ -210,10 +210,13 @@ install!((self, builder, _config),
+         }
+     };
+     LlvmTools, alias = "llvm-tools", Self::should_build(_config), only_hosts: true, {
+-        let tarball = builder
+-            .ensure(dist::LlvmTools { target: self.target })
+-            .expect("missing llvm-tools");
+-        install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
++        if let Some(tarball) = builder.ensure(dist::LlvmTools { target: self.target }) {
++            install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
++        } else {
++            builder.info(
++                &format!("skipping llvm-tools stage{} ({}): external LLVM", self.compiler.stage, self.target),
++            );
++        }
+     };
+     Rustfmt, alias = "rustfmt", Self::should_build(_config), only_hosts: true, {
+         if let Some(tarball) = builder.ensure(dist::Rustfmt {


Home | Main Index | Thread Index | Old Index