svn commit: r524013 - in head/lang/rust: . files files/libgit2 files/powerpc64-elfv1
Tobias Kortkamp
tobik at FreeBSD.org
Sat Jan 25 05:41:20 UTC 2020
Author: tobik
Date: Sat Jan 25 05:41:19 2020
New Revision: 524013
URL: https://svnweb.freebsd.org/changeset/ports/524013
Log:
lang/rust: Apply some of the patches for lang/rust-bootstrap (D23133)
They should not affect the regular lang/rust build.
Added:
head/lang/rust/files/libgit2/
head/lang/rust/files/libgit2/patch-vendor_libgit2-sys_lib.rs
- copied unchanged from r524012, head/lang/rust/files/patch-vendor_libgit2-sys_lib.rs
head/lang/rust/files/patch-vendor_openssl-src_src_lib.rs (contents, props changed)
Deleted:
head/lang/rust/files/patch-vendor_libgit2-sys_lib.rs
Modified:
head/lang/rust/Makefile
head/lang/rust/files/powerpc64-elfv1/patch-src_librustc__llvm_build.rs
Modified: head/lang/rust/Makefile
==============================================================================
--- head/lang/rust/Makefile Sat Jan 25 05:25:46 2020 (r524012)
+++ head/lang/rust/Makefile Sat Jan 25 05:41:19 2020 (r524013)
@@ -42,6 +42,11 @@ USES= pkgconfig python:3.3+,build ssl tar:xz
CONFLICTS_INSTALL?= rust-nightly
+# lang/rust-bootstrap builds the bundled libgit2 and using the patch
+# to fix runtime with system libgit2 is incompatible with it. Keep
+# it separate.
+EXTRA_PATCHES= ${PATCHDIR}/libgit2
+
PLIST_FILES= lib/rustlib/components \
lib/rustlib/rust-installer-version
Copied: head/lang/rust/files/libgit2/patch-vendor_libgit2-sys_lib.rs (from r524012, head/lang/rust/files/patch-vendor_libgit2-sys_lib.rs)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/rust/files/libgit2/patch-vendor_libgit2-sys_lib.rs Sat Jan 25 05:41:19 2020 (r524013, copy of r524012, head/lang/rust/files/patch-vendor_libgit2-sys_lib.rs)
@@ -0,0 +1,30 @@
+Revert to libgit2 0.28 API per https://github.com/rust-lang/git2-rs/issues/458
+
+--- vendor/libgit2-sys/lib.rs.orig 2019-11-04 17:34:46 UTC
++++ vendor/libgit2-sys/lib.rs
+@@ -331,7 +331,6 @@ pub struct git_remote_callbacks {
+ pub push_negotiation: Option<git_push_negotiation>,
+ pub transport: Option<git_transport_cb>,
+ pub payload: *mut c_void,
+- pub resolve_url: Option<git_url_resolve_cb>,
+ }
+
+ #[repr(C)]
+@@ -385,8 +384,6 @@ pub type git_push_negotiation =
+
+ pub type git_push_update_reference_cb =
+ extern "C" fn(*const c_char, *const c_char, *mut c_void) -> c_int;
+-pub type git_url_resolve_cb =
+- extern "C" fn(*mut git_buf, *const c_char, c_int, *mut c_void) -> c_int;
+
+ #[repr(C)]
+ pub struct git_push_update {
+@@ -2280,7 +2277,7 @@ extern "C" {
+ source: *const git_tree,
+ ) -> c_int;
+ pub fn git_treebuilder_clear(bld: *mut git_treebuilder);
+- pub fn git_treebuilder_entrycount(bld: *mut git_treebuilder) -> size_t;
++ pub fn git_treebuilder_entrycount(bld: *mut git_treebuilder) -> c_uint;
+ pub fn git_treebuilder_free(bld: *mut git_treebuilder);
+ pub fn git_treebuilder_get(
+ bld: *mut git_treebuilder,
Added: head/lang/rust/files/patch-vendor_openssl-src_src_lib.rs
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/rust/files/patch-vendor_openssl-src_src_lib.rs Sat Jan 25 05:41:19 2020 (r524013)
@@ -0,0 +1,29 @@
+https://github.com/alexcrichton/openssl-src-rs/commit/5e2626a7299dde1adb25073445b72dddd93e261e
+
+--- vendor/openssl-src/src/lib.rs.orig 2020-01-08 04:20:57 UTC
++++ vendor/openssl-src/src/lib.rs
+@@ -135,6 +135,7 @@ impl Build {
+ // that bypasses basically everything `cc` does, so let's just cop
+ // out and say it's linux and hope it works.
+ "aarch64-linux-android" => "linux-aarch64",
++ "aarch64-unknown-freebsd" => "BSD-generic64",
+ "aarch64-unknown-linux-gnu" => "linux-aarch64",
+ "aarch64-unknown-linux-musl" => "linux-aarch64",
+ "aarch64-pc-windows-msvc" => "VC-WIN64-ARM",
+@@ -144,6 +145,8 @@ impl Build {
+ "arm-unknown-linux-gnueabihf" => "linux-armv4",
+ "arm-unknown-linux-musleabi" => "linux-armv4",
+ "arm-unknown-linux-musleabihf" => "linux-armv4",
++ "armv6-unknown-freebsd" => "BSD-generic32",
++ "armv7-unknown-freebsd" => "BSD-generic32",
+ "armv7-unknown-linux-gnueabihf" => "linux-armv4",
+ "armv7-unknown-linux-musleabihf" => "linux-armv4",
+ "asmjs-unknown-emscripten" => "gcc",
+@@ -159,6 +162,7 @@ impl Build {
+ "mips64el-unknown-linux-gnuabi64" => "linux64-mips64",
+ "mipsel-unknown-linux-gnu" => "linux-mips32",
+ "powerpc-unknown-linux-gnu" => "linux-ppc",
++ "powerpc64-unknown-freebsd" => "BSD-generic64",
+ "powerpc64-unknown-linux-gnu" => "linux-ppc64",
+ "powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
+ "s390x-unknown-linux-gnu" => "linux64-s390x",
Modified: head/lang/rust/files/powerpc64-elfv1/patch-src_librustc__llvm_build.rs
==============================================================================
--- head/lang/rust/files/powerpc64-elfv1/patch-src_librustc__llvm_build.rs Sat Jan 25 05:25:46 2020 (r524012)
+++ head/lang/rust/files/powerpc64-elfv1/patch-src_librustc__llvm_build.rs Sat Jan 25 05:41:19 2020 (r524013)
@@ -1,12 +1,16 @@
---- src/librustc_llvm/build.rs.orig 2019-11-04 15:45:21 UTC
+--- src/librustc_llvm/build.rs.orig 2019-12-16 15:38:05 UTC
+++ src/librustc_llvm/build.rs
-@@ -273,7 +273,10 @@ fn main() {
+@@ -273,7 +273,14 @@ fn main() {
};
// C++ runtime library
- if !target.contains("msvc") {
+ if target == "powerpc64-unknown-freebsd" {
-+ println!("cargo:rustc-link-search=native=/usr/local/lib/%CC%");
++ if is_crossed {
++ println!("cargo:rustc-link-search=native=%WRKDIR%/usr/local/lib/%CC%");
++ } else {
++ println!("cargo:rustc-link-search=native=/usr/local/lib/%CC%");
++ }
+ println!("cargo:rustc-link-lib=static=stdc++");
+ } else if !target.contains("msvc") {
if let Some(s) = llvm_static_stdcpp {
More information about the svn-ports-all
mailing list