From a4f6f21436f3da89f4c8657e8907994f44f5efd7 Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Sat, 12 May 2018 07:33:37 +0000 Subject: [PATCH] Rust: add recipe for 1.19.0 --- dev-lang/rust/patches/rust-1.19.0.patchset | 646 ++++++++++++++++++ .../rust/patches/rust-libc-1.19.0.patchset | 26 + dev-lang/rust/rust-1.19.0.recipe | 208 ++++++ 3 files changed, 880 insertions(+) create mode 100644 dev-lang/rust/patches/rust-1.19.0.patchset create mode 100644 dev-lang/rust/patches/rust-libc-1.19.0.patchset create mode 100644 dev-lang/rust/rust-1.19.0.recipe diff --git a/dev-lang/rust/patches/rust-1.19.0.patchset b/dev-lang/rust/patches/rust-1.19.0.patchset new file mode 100644 index 000000000..0707f044c --- /dev/null +++ b/dev-lang/rust/patches/rust-1.19.0.patchset @@ -0,0 +1,646 @@ +From e83d9584c435d07743ac67f2ca0fba5e1d43104f Mon Sep 17 00:00:00 2001 +From: Niels Sascha Reedijk +Date: Wed, 20 Sep 2017 17:36:59 +0000 +Subject: [PATCH 1/5] Haiku: reduce stack memory to 16MB (max on Haiku) + +--- + src/librustdoc/lib.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs +index 380ee9c06a..d03c11d8f6 100644 +--- a/src/librustdoc/lib.rs ++++ b/src/librustdoc/lib.rs +@@ -104,7 +104,7 @@ struct Output { + } + + pub fn main() { +- const STACK_SIZE: usize = 32_000_000; // 32MB ++ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku + env_logger::init().unwrap(); + let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || { + get_args().map(|args| main_args(&args)).unwrap_or(1) +-- +2.16.2 + + +From 61fde85d115a502a1e04b286bbc84c9f8794666b Mon Sep 17 00:00:00 2001 +From: Niels Sascha Reedijk +Date: Tue, 8 May 2018 12:33:03 +0000 +Subject: [PATCH 2/5] Haiku: update libc dependency to 0.2.31 + +--- + src/Cargo.lock | 64 +++++++++++++++++++++++++++++----------------------------- + 1 file changed, 32 insertions(+), 32 deletions(-) + +diff --git a/src/Cargo.lock b/src/Cargo.lock +index dcda218ff4..36dd6c445c 100644 +--- a/src/Cargo.lock ++++ b/src/Cargo.lock +@@ -74,7 +74,7 @@ dependencies = [ + "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + ] +@@ -85,7 +85,7 @@ version = "0.1.10" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -117,7 +117,7 @@ dependencies = [ + "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -165,7 +165,7 @@ dependencies = [ + "hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -199,7 +199,7 @@ dependencies = [ + "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -227,7 +227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -300,7 +300,7 @@ version = "0.4.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -312,7 +312,7 @@ version = "0.3.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -375,7 +375,7 @@ name = "filetime" + version = "0.1.10" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -391,7 +391,7 @@ name = "flate2" + version = "0.2.19" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + ] + +@@ -410,7 +410,7 @@ version = "0.4.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + ] + +@@ -443,7 +443,7 @@ version = "0.6.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -528,7 +528,7 @@ name = "jobserver" + version = "0.1.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + ] + +@@ -555,7 +555,7 @@ dependencies = [ + + [[package]] + name = "libc" +-version = "0.2.22" ++version = "0.2.31" + source = "registry+https://github.com/rust-lang/crates.io-index" + + [[package]] +@@ -566,7 +566,7 @@ dependencies = [ + "cmake 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -579,7 +579,7 @@ version = "0.2.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "cmake 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -591,7 +591,7 @@ version = "1.0.13" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + ] + +@@ -611,7 +611,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -641,7 +641,7 @@ name = "memchr" + version = "0.1.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -649,7 +649,7 @@ name = "memchr" + version = "1.0.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -658,7 +658,7 @@ version = "0.1.9" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -679,7 +679,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + ] +@@ -755,7 +755,7 @@ name = "num_cpus" + version = "1.4.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -771,7 +771,7 @@ dependencies = [ + "bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)", + ] + +@@ -787,7 +787,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", + "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + ] +@@ -892,7 +892,7 @@ name = "rand" + version = "0.3.15" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -1531,7 +1531,7 @@ version = "0.4.13" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + ] + +@@ -1562,7 +1562,7 @@ version = "0.2.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + ] + +@@ -1580,7 +1580,7 @@ version = "2.0.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -1589,7 +1589,7 @@ version = "3.1.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -1745,7 +1745,7 @@ name = "xattr" + version = "0.1.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -1802,7 +1802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + "checksum jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "443ae8bc0af6c106e6e8b77e04684faecc1a5ce94e058f4c2b0a037b0ea1b133" + "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" + "checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" +-"checksum libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "babb8281da88cba992fa1f4ddec7d63ed96280a1a53ec9b919fd37b53d71e502" ++"checksum libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d1419b2939a0bc44b77feb34661583c7546b532b192feab36249ab584b86856c" + "checksum libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "df18a822100352d9863b302faf6f8f25c0e77f0e60feb40e5dbe1238b7f13b1d" + "checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75" + "checksum libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e5ee912a45d686d393d5ac87fac15ba0ba18daae14e8e7543c63ebf7fb7e970c" +-- +2.16.2 + + +From 3d47278dc981d381cd2661662900464e33f7bdff Mon Sep 17 00:00:00 2001 +From: Niels Sascha Reedijk +Date: Wed, 9 May 2018 17:31:41 +0000 +Subject: [PATCH 3/5] Haiku: there is no setpriority on this platform. + +--- + src/bootstrap/lib.rs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs +index 00cbc589ae..7b9e996f48 100644 +--- a/src/bootstrap/lib.rs ++++ b/src/bootstrap/lib.rs +@@ -112,7 +112,7 @@ pub mod util; + #[cfg(windows)] + mod job; + +-#[cfg(unix)] ++#[cfg(all(unix, not(target_os = "haiku")))] + mod job { + use libc; + +@@ -123,7 +123,7 @@ mod job { + } + } + +-#[cfg(not(any(unix, windows)))] ++#[cfg(any(target_os = "haiku", not(any(unix, windows))))] + mod job { + pub unsafe fn setup(_build: &mut ::Build) { + } +-- +2.16.2 + + +From 8f1cbeb66d97bd2590ef22455bd8d78e754f1a2a Mon Sep 17 00:00:00 2001 +From: Alexander von Gluck IV +Date: Fri, 25 Aug 2017 17:12:20 -0500 +Subject: [PATCH 4/5] haiku/librustc_back: Remove incorrect no_integrated_as + +* Makes rust bootstrap incorrectly search for xxx.s vs xxx.0.s +* Not needed or incorrect fix for another issue. +--- + src/librustc_back/target/haiku_base.rs | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/librustc_back/target/haiku_base.rs b/src/librustc_back/target/haiku_base.rs +index 8e7f463563..3fd0389104 100644 +--- a/src/librustc_back/target/haiku_base.rs ++++ b/src/librustc_back/target/haiku_base.rs +@@ -19,7 +19,6 @@ pub fn opts() -> TargetOptions { + has_rpath: false, + target_family: Some("unix".to_string()), + linker_is_gnu: true, +- no_integrated_as: true, + .. Default::default() + } + } +-- +2.16.2 + + +From d13a1a067c5c3cad7d16cbc79162ded7cfdf2a27 Mon Sep 17 00:00:00 2001 +From: Niels Sascha Reedijk +Date: Fri, 11 May 2018 20:27:24 +0000 +Subject: [PATCH 5/5] Haiku: add dependency on patched version of backtrace + +--- + src/Cargo.lock | 68 +++++++++++++++++++++++++++++++++++++--------------------- + src/Cargo.toml | 4 ++++ + 2 files changed, 48 insertions(+), 24 deletions(-) + +diff --git a/src/Cargo.lock b/src/Cargo.lock +index 36dd6c445c..47497bb5e1 100644 +--- a/src/Cargo.lock ++++ b/src/Cargo.lock +@@ -67,10 +67,10 @@ version = "0.0.0" + + [[package]] + name = "backtrace" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" ++version = "0.3.2" ++source = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2#e5abec2fdb6023facae1819558dd55a80419a881" + dependencies = [ +- "backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ++ "backtrace-sys 0.1.10 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)", + "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -79,10 +79,16 @@ dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + ] + ++[[package]] ++name = "backtrace" ++version = "0.3.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++replace = "backtrace 0.3.2 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)" ++ + [[package]] + name = "backtrace-sys" + version = "0.1.10" +-source = "registry+https://github.com/rust-lang/crates.io-index" ++source = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2#e5abec2fdb6023facae1819558dd55a80419a881" + dependencies = [ + "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -158,15 +164,15 @@ dependencies = [ + "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", +- "fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", +- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ++ "fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ++ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", +- "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -196,7 +202,7 @@ dependencies = [ + "cargo 0.20.0", + "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", +- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ++ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -215,6 +221,11 @@ dependencies = [ + name = "cargotest2" + version = "0.1.0" + ++[[package]] ++name = "cc" ++version = "1.0.15" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ + [[package]] + name = "cfg-if" + version = "0.1.0" +@@ -299,7 +310,7 @@ name = "curl" + version = "0.4.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", ++ "curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -308,7 +319,7 @@ dependencies = [ + + [[package]] + name = "curl-sys" +-version = "0.3.11" ++version = "0.3.12" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -316,6 +327,7 @@ dependencies = [ + "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ++ "vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + ] + +@@ -363,7 +375,7 @@ name = "error-chain" + version = "0.10.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ++ "backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -406,7 +418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + + [[package]] + name = "fs2" +-version = "0.4.1" ++version = "0.4.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -439,12 +451,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + + [[package]] + name = "git2" +-version = "0.6.6" ++version = "0.6.10" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", +- "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -456,7 +468,7 @@ version = "0.7.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ++ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + ] +@@ -560,12 +572,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + + [[package]] + name = "libgit2-sys" +-version = "0.6.12" ++version = "0.6.18" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ ++ "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", +- "curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", +- "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", ++ "curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -1701,6 +1713,11 @@ name = "utf8-ranges" + version = "1.0.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + ++[[package]] ++name = "vcpkg" ++version = "0.2.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ + [[package]] + name = "vec_map" + version = "0.6.0" +@@ -1766,19 +1783,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + "checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" + "checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699" + "checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" +-"checksum backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +-"checksum backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d192fd129132fbc97497c1f2ec2c2c5174e376b95f535199ef4fe0a293d33842" ++"checksum backtrace 0.3.2 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)" = "" ++"checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76" ++"checksum backtrace-sys 0.1.10 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)" = "" + "checksum bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23" + "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" + "checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4" + "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" + "checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32" ++"checksum cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0ebb87d1116151416c0cf66a0e3fb6430cccd120fd6300794b4dfaa050ac40ba" + "checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c" + "checksum clap 2.19.3 (registry+https://github.com/rust-lang/crates.io-index)" = "95b78f3fe0fc94c13c731714363260e04b557a637166f33a4570d3189d642374" + "checksum cmake 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)" = "92278eb79412c8f75cfc89e707a1bb3a6490b68f7f2e78d15c774f30fe701122" + "checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97" + "checksum curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c90e1240ef340dd4027ade439e5c7c2064dd9dc652682117bd50d1486a3add7b" +-"checksum curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "23e7e544dc5e1ba42c4a4a678bd47985e84b9c3f4d3404c29700622a029db9c3" ++"checksum curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "f00c8ba847fb0730c293069b4d1203dc01bf3c2e1f90b4e55f426ed8f4a1eeac" + "checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" + "checksum diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0a515461b6c8c08419850ced27bc29e86166dcdcde8fbe76f8b1f0589bb49472" + "checksum docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab32ea6e284d87987066f21a9e809a73c14720571ef34516f0890b3d355ccfd8" +@@ -1788,11 +1807,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + "checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922" + "checksum flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "36df0166e856739905cd3d7e0b210fe818592211a008862599845e012d8d304c" + "checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d" +-"checksum fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34edaee07555859dc13ca387e6ae05686bb4d0364c95d649b6dab959511f4baf" ++"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866" + "checksum gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)" = "5f837c392f2ea61cb1576eac188653df828c861b7137d74ea4a5caa89621f9e6" + "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" + "checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" +-"checksum git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa01936ac96555c083c0e8553f672616274408d9d3fc5b8696603fbf63ff43ee" ++"checksum git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "40a111aecd59985496012976beca164b4f6c930d507a099831e06b07f19d54f1" + "checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e" + "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" + "checksum hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf088f042a467089e9baa4972f57f9247e42a0cc549ba264c7a04fbb8ecb89d4" +@@ -1803,7 +1822,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" + "checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" + "checksum libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d1419b2939a0bc44b77feb34661583c7546b532b192feab36249ab584b86856c" +-"checksum libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "df18a822100352d9863b302faf6f8f25c0e77f0e60feb40e5dbe1238b7f13b1d" ++"checksum libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "82fc20bd8beefe7c9f98aae2d3cff78e57f544cdd83d58fe181ec37a5fbe0c77" + "checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75" + "checksum libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e5ee912a45d686d393d5ac87fac15ba0ba18daae14e8e7543c63ebf7fb7e970c" + "checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" +@@ -1882,6 +1901,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + "checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" + "checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" + "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" ++"checksum vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ed0f6789c8a85ca41bbc1c9d175422116a9869bd1cf31bb08e1493ecce60380" + "checksum vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac5efe5cb0fa14ec2f84f83c701c562ee63f6dcc680861b21d65c682adfb05f" + "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + "checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" +diff --git a/src/Cargo.toml b/src/Cargo.toml +index 015d658d22..883e8d7278 100644 +--- a/src/Cargo.toml ++++ b/src/Cargo.toml +@@ -33,3 +33,7 @@ debug-assertions = false + [profile.test] + debug = false + debug-assertions = false ++ ++[replace] ++"backtrace:0.3.2" = { git = "https://github.com/nielx/backtrace-rs", branch = "haiku-0.3.2" } ++ +-- +2.16.2 + diff --git a/dev-lang/rust/patches/rust-libc-1.19.0.patchset b/dev-lang/rust/patches/rust-libc-1.19.0.patchset new file mode 100644 index 000000000..5c2ca92b1 --- /dev/null +++ b/dev-lang/rust/patches/rust-libc-1.19.0.patchset @@ -0,0 +1,26 @@ +From 0c43e2dfd71beb4b1866cbc5c6523dfbaf9cbf69 Mon Sep 17 00:00:00 2001 +From: Jessica Hamilton +Date: Sat, 2 Sep 2017 06:50:49 -0500 +Subject: [PATCH] haiku: res_init link name is __res_init. + +--- + src/unix/mod.rs | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/unix/mod.rs b/src/unix/mod.rs +index a235d6a4..2267c307 100644 +--- a/src/unix/mod.rs ++++ b/src/unix/mod.rs +@@ -697,7 +697,8 @@ extern { + #[cfg_attr(any( + all(target_os = "linux", not(target_env = "musl")), + target_os = "freebsd", +- target_os = "dragonfly"), ++ target_os = "dragonfly", ++ target_os = "haiku"), + link_name = "__res_init")] + #[cfg_attr(any(target_os = "macos", target_os = "ios"), + link_name = "res_9_init")] +-- +2.16.2 + diff --git a/dev-lang/rust/rust-1.19.0.recipe b/dev-lang/rust/rust-1.19.0.recipe new file mode 100644 index 000000000..19115210e --- /dev/null +++ b/dev-lang/rust/rust-1.19.0.recipe @@ -0,0 +1,208 @@ +SUMMARY="Modern and safe systems programming language" +DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races." +HOMEPAGE="http://www.rust-lang.org/" +LICENSE="MIT" +COPYRIGHT="2017, The Rust Project Developers" +srcGitRev="1.19.0" +srcGitRev2="c8a8767c56ad3d3f4eb45c87b95026936fb9aa35" +srcGitRev3="b4ff403041f17957f735ad750c3241a3a428b9b7" +srcGitRev4="da282f1bb7277b4d30fa1599ee29ad8eb4dd2a92" +srcGitRev5="03562b0cb26a00f49d4eaf18ca3e49608110b0c8" +srcGitRev6="2153316469829c338eab18835b879d01c3a986a8" +cargoVersion="0.20.0" +srcGitRev8="c0e8c56d76bdf6bd16c64338f81c04d48c60f117" +srcGitRev9="876582e9d0fbdc9cecb03133c28db96e9ff8c844" +srcGitRev10="ad7de198561b3a12217ea2da76d796d9c7fc0ed3" +srcGitRev11="bfe80cfa8db75500e67ca8762465d27662674637" +srcGitRev12="0.1.6" +SOURCE_URI="https://github.com/rust-lang/rust/archive/$srcGitRev.tar.gz" +SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev2.tar.gz" +SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev3.tar.gz" +SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev4.tar.gz" +SOURCE_URI_5="https://github.com/rust-lang/libc/archive/$srcGitRev5.tar.gz" +SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev6.tar.gz" +SOURCE_URI_7="https://github.com/rust-lang/cargo/archive/$cargoVersion.tar.gz" +SOURCE_URI_8="https://github.com/rust-lang-nursery/nomicon/archive/$srcGitRev8.tar.gz" +SOURCE_URI_9="https://github.com/rust-lang-nursery/reference/archive/$srcGitRev9.tar.gz" +SOURCE_URI_10="https://github.com/rust-lang/book/archive/$srcGitRev10.tar.gz" +SOURCE_URI_11="https://github.com/rust-lang-nursery/rls/archive/$srcGitRev11.tar.gz" +SOURCE_URI_12="https://github.com/alexcrichton/cargo-vendor/archive/$srcGitRev12.tar.gz" +SOURCE_FILENAME="rust-$srcGitRev.tar.gz" +CHECKSUM_SHA256="7e1ecb476118b79b5abed02bc7a724bb65413057e26f1d2b8538c572f7463be0" +CHECKSUM_SHA256_2="ac595c03dd5dcd3ad66eee76bec2e95770259e4aa4db5df875c2bbcf7781a441" +CHECKSUM_SHA256_3="dfcce5a555e0aff5f7ba7681968b77529c806c3109ede78eb1b45a0c4455db4b" +CHECKSUM_SHA256_4="623889a326754e93a4a7a8a3487699ea786f4ca9b118f7468c12f8b9966905e6" +CHECKSUM_SHA256_5="2ecccc8810c1e84e1b8bbcb564c96d1df5aefce13663efc006621a30685a9e4f" +CHECKSUM_SHA256_6="495850c84eab4f20277a839a12283dd27fb9e61daf0c7dec0e76d1bc1a5a437b" +CHECKSUM_SHA256_7="f0e21d23cffd3510ba8a65e6a4d1010073afc0e573d9d92c23d22b868ca0bc42" +CHECKSUM_SHA256_8="a15a4bbc86a207e9cc9604ed0f7a7039f9365034063096e4f6e44eb8832fffec" +CHECKSUM_SHA256_9="0c5e47826948cf30345cd5c09f237566dfc995b7f1f2c8751e306c5488f05ecb" +CHECKSUM_SHA256_10="31d77c9ccb2924f8381a09b6eb8b7efe74fbc280c581a21728e0c50878413ec0" +CHECKSUM_SHA256_11="666ba8fb85cd875471ba1d71c9e674516cd7891ea954721276a9a99a1e4aa7d8" +CHECKSUM_SHA256_12="927f6b782f0be32c6027335bbd49fb40cffa922095ffacc9a0aca78e45023f1a" +SOURCE_DIR="rust-$srcGitRev" +PATCHES="rust-$portVersion.patchset" +PATCHES_5="rust-libc-$portVersion.patchset" +PATCHES_12="cargo-vendor-$srcGitRev12.patchset" +REVISION="1" +ARCHITECTURES="!x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + rust$secondaryArchSuffix = $portVersion + cmd:rustc = $portVersion + cmd:rustdoc = $portVersion + cmd:rust_gdb = $portVersion + cmd:rust_lldb = $portVersion + cmd:cargo$secondaryArchSuffix = $cargoVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libcurl$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcurl$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cargo$secondaryArchSuffix == 0.19.0 + cmd:cmake + cmd:cmp + cmd:file + cmd:find + cmd:git + cmd:gcc$secondaryArchSuffix + cmd:grep + cmd:ld$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:python + cmd:rustc == 1.18.0 + cmd:sed + cmd:tar + cmd:which + cmd:xargs + " + +BUILD() +{ + # With the new build system, Rust always makes a tarball with the source + # In older recipes we symlinked the other git submodules, now we have to + # copy them + rm -rf src/tools/cargo src/compiler-rt src/llvm src/tools/rust-installer \ + src/liblibc src/rt/hoedown src/doc/nomicon src/doc/reference \ + src/doc/book src/tools/rls + cp -r /sources-2/compiler-rt-$srcGitRev2 src/compiler-rt + cp -r /sources-3/rust-installer-$srcGitRev3 src/tools/rust-installer + cp -r /sources-4/hoedown-$srcGitRev4 src/rt/hoedown + cp -r /sources-5/libc-$srcGitRev5 src/liblibc + cp -r /sources-6/llvm-$srcGitRev6 src/llvm + cp -r /sources-7/cargo-$cargoVersion src/tools/cargo + cp -r /sources-8/nomicon-$srcGitRev8 src/doc/nomicon + cp -r /sources-9/reference-$srcGitRev9 src/doc/reference + cp -r /sources-10/book-$srcGitRev10 src/doc/book + cp -r /sources-11/rls-$srcGitRev11 src/tools/rls + + # write the build configuration + cat >config.toml <<- EOL + [llvm] + targets = "X86" + + [build] + cargo = "/$relativeBinDir/cargo" + rustc = "/boot/system/bin/rustc" + submodules = false + extended = true + + [install] + prefix = "$prefix" + libdir = "$relativeLibDir" + mandir = "$relativeManDir" + docdir = "$relativeDevelopDocDir" + sysconfdir = "$relativeDataDir" + + [rust] + channel = "stable" + use-jemalloc = false + rpath = false +EOL + + # the install step of rust depends on the cargo vendor command + # build it separately here + cd /sources-12/cargo-vendor-$srcGitRev12 + cargo install --force + + # now build rust and cargo + cd /sources/rust-$srcGitRev + ./x.py dist +} + +INSTALL() +{ + # we will manually invoke the install scripts + if [ $effectiveTargetArchitecture = x86 ]; then + architecture="i686-unknown-haiku" + fi + if [ $effectiveTargetArchitecture = x86_64 ]; then + architecture="x86_64-unknown-haiku" + fi + + # let's install the packages one by one + cd /sources/rust-$srcGitRev/build/tmp/dist/ + for module in "rust-docs-$srcGitRev-$architecture" \ + "rust-std-$srcGitRev-$architecture" \ + "rustc-$srcGitRev-$architecture" \ + "rust-analysis-$srcGitRev-$architecture" \ + "cargo-$cargoVersion-$architecture" + do + ./$module/install.sh \ + --prefix=$prefix \ + --docdir=$developDocDir \ + --libdir=$libDir \ + --mandir=$manDir \ + --sysconfdir=$dataDir \ + --disable-ldconfig + done + + # move the cargo and binaries (in case of a secondary arch) + if [ -n "$secondaryArchSuffix" ]; then + mkdir -p $binDir + mv $prefix/bin/cargo $binDir/cargo + fi + + # remove zsh data, it is not used on Haiku anyway + rm -rf $prefix/share + + # move the `rustlib` folder to the developLibDirs (as it is a framework of sorts) + # do create a link in $prefix/lib as that is where rustc expects things to live + # Note; this actually seems to be a bug in the Rust build system. The path + # to rustlib is hardcoded in the rustc binary, but it does allow it to be + # set to libdir_relative (see config.rs in the bootstrap tool). This variable + # is only set when the configure script is used to generate the config, not + # with config.toml + mkdir -p $developLibDir + mv $libDir/rustlib $developLibDir + cd $prefix/lib + ln -s $developLibDir/rustlib rustlib + + # clean out unneccesary files created by the rust installer + rm $developLibDir/rustlib/components + rm $developLibDir/rustlib/install.log + rm $developLibDir/rustlib/manifest-cargo + rm $developLibDir/rustlib/manifest-rust-analysis-*haiku + rm $developLibDir/rustlib/manifest-rust-docs + rm $developLibDir/rustlib/manifest-rust-std-*-haiku + rm $developLibDir/rustlib/manifest-rustc + rm $developLibDir/rustlib/rust-installer-version + rm $developLibDir/rustlib/uninstall.sh +} + +TEST() +{ + make check +}