diff --git a/dev-lang/rust/patches/rust-1.21.0.patchset b/dev-lang/rust/patches/rust-1.21.0.patchset new file mode 100644 index 000000000..de2c36c07 --- /dev/null +++ b/dev-lang/rust/patches/rust-1.21.0.patchset @@ -0,0 +1,546 @@ +From 2567868d660e7e4524d2850c493e606c49faff15 Mon Sep 17 00:00:00 2001 +From: Niels Sascha Reedijk +Date: Wed, 20 Sep 2017 17:36:59 +0000 +Subject: [PATCH 1/3] 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 61a8165d26..130b7ba15d 100644 +--- a/src/librustdoc/lib.rs ++++ b/src/librustdoc/lib.rs +@@ -99,7 +99,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.4 + + +From b119cb6a3e00bacc275f6ddf29075fdb0454597d Mon Sep 17 00:00:00 2001 +From: Niels Sascha Reedijk +Date: Wed, 9 May 2018 17:31:41 +0000 +Subject: [PATCH 2/3] 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 84a9e56b64..b12ec2bf60 100644 +--- a/src/bootstrap/lib.rs ++++ b/src/bootstrap/lib.rs +@@ -168,7 +168,7 @@ mod tool; + #[cfg(windows)] + mod job; + +-#[cfg(unix)] ++#[cfg(all(unix, not(target_os = "haiku")))] + mod job { + use libc; + +@@ -179,7 +179,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.4 + + +From 61479b9ff89c1cc9a8feb8bf9adea2d1aa766754 Mon Sep 17 00:00:00 2001 +From: Niels Sascha Reedijk +Date: Sun, 20 May 2018 17:21:13 +0000 +Subject: [PATCH 3/3] Haiku: update various Cargo dependencies to versions that + build on Haiku * (external) liblibc, from 0.2.29 to 0.2.31 * backtrace, to + a customized backtrace that contains fixes for Haiku * libgit2-sys to + version 0.6.18 (includes a fix for a bug that causes cargo to exit on a + crash) * git2 to version 0.6.10 * socket2 to version 0.2.3 + +--- + src/Cargo.lock | 123 +++++++++++++++++++++++++++++++-------------------------- + src/Cargo.toml | 3 ++ + 2 files changed, 71 insertions(+), 55 deletions(-) + +diff --git a/src/Cargo.lock b/src/Cargo.lock +index 19f3042c70..8b84065cbb 100644 +--- a/src/Cargo.lock ++++ b/src/Cargo.lock +@@ -80,31 +80,37 @@ version = "0.2.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)", +- "libc 0.2.29 (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)", + ] + + [[package]] + name = "backtrace" + version = "0.3.2" +-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 = [ +- "backtrace-sys 0.1.12 (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.2 (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.29 (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.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +-name = "backtrace-sys" +-version = "0.1.12" ++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 = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2#e5abec2fdb6023facae1819558dd55a80419a881" + dependencies = [ + "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -140,7 +146,7 @@ dependencies = [ + "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.14 (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.29 (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.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -191,7 +197,7 @@ dependencies = [ + "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.2 (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)", + "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)", +@@ -200,8 +206,8 @@ dependencies = [ + "ignore 0.2.2 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", +- "libgit2-sys 0.6.12 (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.18 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.8 (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.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -230,7 +236,7 @@ dependencies = [ + "cargo 0.22.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)", + "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -243,6 +249,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.2" +@@ -297,7 +308,7 @@ dependencies = [ + "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.10 (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.29 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + ] +@@ -319,7 +330,7 @@ version = "0.4.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "core-foundation-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -327,7 +338,7 @@ name = "core-foundation-sys" + version = "0.4.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -353,10 +364,10 @@ version = "0.4.8" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (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.17 (registry+https://github.com/rust-lang/crates.io-index)", +- "socket2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ++ "socket2 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)", + ] + +@@ -366,7 +377,7 @@ version = "0.3.14" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (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.16 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -468,7 +479,7 @@ name = "filetime" + version = "0.1.10" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -488,7 +499,7 @@ name = "flate2" + version = "0.2.19" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.29 (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)", + ] + +@@ -512,7 +523,7 @@ 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)", +- "libc 0.2.29 (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)", + ] + +@@ -533,12 +544,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.29 (registry+https://github.com/rust-lang/crates.io-index)", +- "libgit2-sys 0.6.12 (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.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.17 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -550,7 +561,7 @@ version = "0.7.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "curl 0.4.8 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + ] +@@ -690,7 +701,7 @@ name = "jobserver" + version = "0.1.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.29 (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)", + ] + +@@ -742,18 +753,18 @@ dependencies = [ + + [[package]] + name = "libc" +-version = "0.2.29" ++version = "0.2.31" + 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.24 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", +- "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (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.16 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -766,7 +777,7 @@ version = "0.2.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (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.16 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -778,7 +789,7 @@ version = "1.0.16" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (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)", + "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + ] +@@ -799,7 +810,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.51 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -829,7 +840,7 @@ name = "memchr" + version = "0.1.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -837,7 +848,7 @@ name = "memchr" + version = "1.0.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -846,7 +857,7 @@ version = "0.1.9" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -871,7 +882,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "cfg-if 0.1.2 (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.29 (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)", + ] +@@ -947,7 +958,7 @@ name = "num_cpus" + version = "1.6.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -967,7 +978,7 @@ dependencies = [ + "bitflags 0.9.1 (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.29 (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.17 (registry+https://github.com/rust-lang/crates.io-index)", + ] + +@@ -982,7 +993,7 @@ version = "0.9.17" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (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)", + "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + ] +@@ -1103,7 +1114,7 @@ name = "rand" + version = "0.3.15" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -1652,7 +1663,7 @@ dependencies = [ + "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.14 (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.29 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -1752,12 +1763,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + + [[package]] + name = "socket2" +-version = "0.2.2" ++version = "0.2.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "cfg-if 0.1.2 (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.29 (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)", + ] +@@ -1875,7 +1886,7 @@ name = "syntex_errors" + version = "0.52.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.29 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_pos 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -1897,7 +1908,7 @@ version = "0.52.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.29 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_errors 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -1912,7 +1923,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.29 (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)", + ] + +@@ -1943,7 +1954,7 @@ version = "0.3.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.29 (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)", + ] + +@@ -1978,7 +1989,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.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -2167,7 +2178,7 @@ name = "xattr" + version = "0.1.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ +- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] +@@ -2190,12 +2201,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + "checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" + "checksum ar 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b24e4eef8e3fa7e2ca75b157e6039cdf8d9d3a68213ddc19d0fd9d576b9717c9" + "checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" ++"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.12 (registry+https://github.com/rust-lang/crates.io-index)" = "afccc5772ba333abccdf60d55200fa3406f8c59dcf54d5f7998c9107d3799c7c" ++"checksum backtrace-sys 0.1.10 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)" = "" + "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.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" + "checksum clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2267a8fdd4dce6956ba6649e130f62fb279026e5e84b92aa939ac8f85ce3f9f0" + "checksum cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ebbb35d3dc9cd09497168f33de1acb79b265d350ab0ac34133b98f8509af1f" +@@ -2222,7 +2235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + "checksum futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4b63a4792d4f8f686defe3b39b92127fea6344de5d38202b2ee5a11bbbf29d6a" + "checksum gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)" = "120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a" + "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 globset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "feeb1b6840809ef5efcf7a4a990bc4e1b7ee3df8cf9e2379a75aeb2ba42ac9c3" +@@ -2238,8 +2251,8 @@ 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 languageserver-types 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d52e477b23bf52cd3ca0f9fc6c5d14be954eec97e3b9cdfbd962d911bd533caf" + "checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" +-"checksum libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "8a014d9226c2cc402676fbe9ea2e15dd5222cd1dd57f576b5b283178c944a264" +-"checksum libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "df18a822100352d9863b302faf6f8f25c0e77f0e60feb40e5dbe1238b7f13b1d" ++"checksum libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d1419b2939a0bc44b77feb34661583c7546b532b192feab36249ab584b86856c" ++"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.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8" + "checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b" +@@ -2297,7 +2310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + "checksum serde_ignored 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c10e798e4405d7dcec3658989e35ee6706f730a9ed7c1184d5ebd84317e82f46" + "checksum serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "48b04779552e92037212c3615370f6bd57a40ebba7f20e554ff9f55e41a69a7b" + "checksum shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5cc96481d54583947bfe88bf30c23d53f883c6cd0145368b69989d97b84ef8" +-"checksum socket2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4daf80fcf54186fac4fe049e0b39d36a5cfde69a11a06413e61e77f553cccf9a" ++"checksum socket2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9e76b159741052c7deaa9fd0b5ca6b5f79cecf525ed665abfe5002086c6b2791" + "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" + "checksum strings 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da75d8bf2c4d210d63dd09581a041b036001f9f6e03d9b151dbff810fb7ba26a" + "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" +diff --git a/src/Cargo.toml b/src/Cargo.toml +index 8754d5b2b6..f0ced265de 100644 +--- a/src/Cargo.toml ++++ b/src/Cargo.toml +@@ -39,6 +39,9 @@ members = [ + "tools/rls/test_data/omit_init_build", + ] + ++[replace] ++"backtrace:0.3.2" = { git = "https://github.com/nielx/backtrace-rs", branch = "haiku-0.3.2" } ++ + # Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit + # MSVC when running the compile-fail test suite when a should-fail test panics. + # But hey if this is removed and it gets past the bots, sounds good to me. +-- +2.16.4 + diff --git a/dev-lang/rust/rust-1.21.0.recipe b/dev-lang/rust/rust-1.21.0.recipe new file mode 100644 index 000000000..87a9fea83 --- /dev/null +++ b/dev-lang/rust/rust-1.21.0.recipe @@ -0,0 +1,212 @@ +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="https://www.rust-lang.org/" +COPYRIGHT="2017 The Rust Project Developers" +LICENSE="MIT" +REVISION="1" + +srcGitRev=$portVersion +srcGitRev2="c8a8767c56ad3d3f4eb45c87b95026936fb9aa35" +srcGitRev3="b4ff403041f17957f735ad750c3241a3a428b9b7" +srcGitRev4="da282f1bb7277b4d30fa1599ee29ad8eb4dd2a92" +srcGitRev5="4d1b322cff63c47e7ed649fae048e680cfeda077" +srcGitRev6="d9e7d2696e41983b6b5a0b4fac604b4e548a84d3" +cargoVersion="0.22.0" +srcGitRev8="a4322ccb289a43cc238d4536982f184a3eec9ba7" +srcGitRev9="266d429a48468371d2d90669f6a30dd659bb4bdb" +srcGitRev10="d09c9e8144ed32170b7596abb145ade8b097acaf" +srcGitRev11="86ff0b1413ef45aa05ccca968242ac1f09c12817" +srcGitRev12="6b9281d2b2f0ebb94838814b1e8ace2de4b7035b" +rlsVersion="0.121.0" +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/rust-lang-nursery/compiler-builtins/archive/$srcGitRev12.tar.gz" +SOURCE_FILENAME="rust-$srcGitRev.tar.gz" +CHECKSUM_SHA256="a0e674cce176a5c90804d394e57887b278acfcdbda4fe0f2ae5876531a94faa4" +CHECKSUM_SHA256_2="ac595c03dd5dcd3ad66eee76bec2e95770259e4aa4db5df875c2bbcf7781a441" +CHECKSUM_SHA256_3="dfcce5a555e0aff5f7ba7681968b77529c806c3109ede78eb1b45a0c4455db4b" +CHECKSUM_SHA256_4="623889a326754e93a4a7a8a3487699ea786f4ca9b118f7468c12f8b9966905e6" +CHECKSUM_SHA256_5="e40ca6485049911c319b717404181675e88c2d56d2d8d27395cc85b0e4f428fb" +CHECKSUM_SHA256_6="e5481733ae30cc985674b7494e48ba8717748af9265514dd8516ceceb32ae8f0" +CHECKSUM_SHA256_7="6740e2f8d035a5a5246a12e84a141d37ad4c2b826355aff497e6f1fcfb637aef" +CHECKSUM_SHA256_8="d3e255dfe63cabd342229a53605cd94ae6df912e4771f88a1a4de7af3a59d8f2" +CHECKSUM_SHA256_9="7e0fb24af053ac9415568b01442a5ab491a9ed5b841e9441808100d63175cb68" +CHECKSUM_SHA256_10="e2059881a339efff63e94d363b75bf34dfad2a0297bc46c568ba40dcc71f2d6f" +CHECKSUM_SHA256_11="fa74c46f239ebd1557dea184de3caf7d76c003c6de64aa7fc07c2c9d9f0543f3" +CHECKSUM_SHA256_12="82fa7ada1bdadbba9f780847dc4f9340f15e5f137d838c98ca7e30ec3dda6684" +SOURCE_DIR="rust-$srcGitRev" +PATCHES="rust-$portVersion.patchset" +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 + cmd:rls = $rlsVersion + " +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 == $cargoVersion + 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 == $portVersion + cmd:sed + cmd:tar + cmd:which + cmd:xargs + " + +BUILD() +{ + # With the rustbuild 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/libcompiler_builtins 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 $sourceDir3/rust-installer-$srcGitRev3 src/tools/rust-installer + cp -r $sourceDir4/hoedown-$srcGitRev4 src/rt/hoedown + cp -r $sourceDir5/libc-$srcGitRev5 src/liblibc + cp -r $sourceDir6/llvm-$srcGitRev6 src/llvm + cp -r $sourceDir7/cargo-$cargoVersion src/tools/cargo + cp -r $sourceDir8/nomicon-$srcGitRev8 src/doc/nomicon + cp -r $sourceDir9/reference-$srcGitRev9 src/doc/reference + cp -r $sourceDir10/book-$srcGitRev10 src/doc/book + cp -r $sourceDir11/rls-$srcGitRev11 src/tools/rls + cp -r $sourceDir12/compiler-builtins-$srcGitRev12 src/libcompiler_builtins + rm -rf src/libcompiler_builtins/compiler-rt + cp -r $sourceDir2/compiler-rt-$srcGitRev2 src/libcompiler_builtins/compiler-rt + + # write the build configuration + tr -d '\t' >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 + + [dist] + src-tarball = false +EOL + # Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5 + # GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes + # the available space even smaller. Disabling it will give us the space to + # compile Rust + export DISABLE_ASLR=1 + + # now build rust and cargo + ./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 $sourceDir/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-* + rm $developLibDir/rustlib/rust-installer-version + rm $developLibDir/rustlib/uninstall.sh +} + +TEST() +{ + ./x.py test +} diff --git a/dev-lang/rust/rust-1.21~dev.recipe b/dev-lang/rust/rust-1.21~dev.recipe deleted file mode 100644 index c984e5e7b..000000000 --- a/dev-lang/rust/rust-1.21~dev.recipe +++ /dev/null @@ -1,123 +0,0 @@ -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="2015, The Rust Project Developers" -REVISION="1" -ARCHITECTURES="!x86_gcc2 !x86 x86_64" -SECONDARY_ARCHITECTURES="!x86" - -SOURCE_URI="https://github.com/jessicah/rust/releases/download/1.21-dev-haiku/rustc-1.21.0-dev-x86_64-unknown-haiku.tar.xz" -SOURCE_URI_2="https://github.com/jessicah/rust/releases/download/1.21-dev-haiku/rust-std-1.21.0-dev-x86_64-unknown-haiku.tar.xz" -SOURCE_URI_3="https://github.com/jessicah/rust/releases/download/1.21-dev-haiku/cargo-0.22.0-dev-x86_64-unknown-haiku.tar.xz" - -CHECKSUM_SHA256="2c6135f322fb521067acc40f4f01728ecd012d684b1237c09a1b22674fe4579e" -CHECKSUM_SHA256_2="129646a32aeb1bf41bcd7d55962efcd5c11d54356ac00631b92e339811a41b6e" -CHECKSUM_SHA256_3="56a34202e477eca718026abcd73d09cfc061efdd3a33f912e8c1f1d2871711eb" - -SOURCE_DIR="rustc-1.21.0-dev-x86_64-unknown-haiku" - -PROVIDES=" - rust$secondaryArchSuffix = $portVersion compat >= 1.21 - cargo$secondaryArchSuffix = $portVersion compat >= 1.21 - cmd:rustc = $portVersion - cmd:rustdoc = $portVersion - cmd:rust_gdb = $portVersion - cmd:rust_lldb = $portVersion - cmd:cargo = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - rust_runtime$secondaryArchSuffix == $portVersion base - lib:libcrypto - lib:libcurl - lib:libgit2 - lib:libllvm_4.0 - lib:libssh2 - lib:libssl - " -PROVIDES_runtime=" - rust_runtime$secondaryArchSuffix = $portVersion - " -REQUIRES_runtime=" - haiku$secondaryArchSuffix - lib:libllvm_4.0 - " -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - " -BUILD_PREREQUIRES=" - cmd:grep - cmd:sed - cmd:tar - xz_utils$secondaryArchSuffix - " - -GLOBAL_WRITABLE_FILES="settings/bash_completion.d/cargo auto-merge" - -INSTALL() -{ - cd $sourceDir - ./install.sh --prefix=$prefix --sysconfdir=$sysconfDir --bindir=$binDir \ - --libdir=$libDir --mandir=$manDir --docdir=$developDocDir - cd $sourceDir2/rust-std-1.21.0-dev-x86_64-unknown-haiku - ./install.sh --prefix=$prefix --sysconfdir=$sysconfDir --bindir=$binDir \ - --libdir=$libDir --mandir=$manDir --docdir=$developDocDir - cd $sourceDir3/cargo-0.22.0-dev-x86_64-unknown-haiku - ./install.sh --prefix=$prefix --sysconfdir=$sysconfDir --bindir=$binDir \ - --libdir=$libDir --mandir=$manDir --docdir=$developDocDir - - # 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 - mkdir -p $developLibDir - mv $libDir/rustlib $developLibDir - cd $libDir - ln -s ../$relativeDevelopLibDir/rustlib rustlib - - # remove cruft left in share - rm -rf $prefix/share - - # clean out unneccesary files created by the rust installer - rm $developLibDir/rustlib/components - rm $developLibDir/rustlib/install.log - rm $developLibDir/rustlib/manifest-* - rm $developLibDir/rustlib/rust-installer-version - rm $developLibDir/rustlib/uninstall.sh - - # set up the runtime package - packageEntries runtime \ - $libDir/libarena-*.so \ - $libDir/libfmt_macros-*.so \ - $libDir/libgraphviz-*.so \ - $libDir/libproc_macro-*.so \ - $libDir/librustc_allocator-*.so \ - $libDir/librustc_back-*.so \ - $libDir/librustc_borrowck-*.so \ - $libDir/librustc_const_eval-*.so \ - $libDir/librustc_const_math-*.so \ - $libDir/librustc_data_structures-*.so \ - $libDir/librustc_driver-*.so \ - $libDir/librustc_errors-*.so \ - $libDir/librustc_incremental-*.so \ - $libDir/librustc_lint-*.so \ - $libDir/librustc_llvm-*.so \ - $libDir/librustc_metadata-*.so \ - $libDir/librustc_mir-*.so \ - $libDir/librustc_passes-*.so \ - $libDir/librustc_platform_intrinsics-*.so \ - $libDir/librustc_plugin-*.so \ - $libDir/librustc_privacy-*.so \ - $libDir/librustc_resolve-*.so \ - $libDir/librustc_save_analysis-*.so \ - $libDir/librustc_trans_utils-*.so \ - $libDir/librustc_trans-*.so \ - $libDir/librustc_typeck-*.so \ - $libDir/librustc-*.so \ - $libDir/libserialize-*.so \ - $libDir/libstd-*.so \ - $libDir/libsyntax_ext-*.so \ - $libDir/libsyntax_pos-*.so \ - $libDir/libsyntax-*.so \ - $libDir/libterm-*.so \ - $libDir/libtest-*.so -} diff --git a/dev-lang/rust_bin/rust_bin-1.21.0.recipe b/dev-lang/rust_bin/rust_bin-1.21.0.recipe new file mode 100644 index 000000000..ffbb51131 --- /dev/null +++ b/dev-lang/rust_bin/rust_bin-1.21.0.recipe @@ -0,0 +1,95 @@ +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="https://www.rust-lang.org/" +COPYRIGHT="2017 The Rust Project Developers" +LICENSE="MIT" +REVISION="1" + +case "$effectiveTargetArchitecture" in + x86) +SOURCE_URI="http://dl.rust-on-haiku.com/dist/$portVersion/rust-$portVersion-i686-unknown-haiku.tar.xz" +CHECKSUM_SHA256="465db013876ead01686c991f1fa63ef4a6687d3cabbcde81f5a756e367989cdf" +SOURCE_DIR="rust-1.21.0-i686-unknown-haiku" + ;; + x86_64) +SOURCE_URI="http://dl.rust-on-haiku.com/dist/$portVersion/rust-$portVersion-x86_64-unknown-haiku.tar.xz" +CHECKSUM_SHA256="cbb7f705398b76c5e2dd18119cdb9af2c042720449479b482a39309fb270ded8" +SOURCE_DIR="rust-$portVersion-x86_64-unknown-haiku" + ;; + *) +SOURCE_URI="http://dl.rust-on-haiku.com/dist/$portVersion/rustc-$portVersion-src.tar.xz" +CHECKSUM_SHA256="7741c2f3652813b7ecd0233305a5ca0de561fea2849049651a79521d2c437f0f" +SOURCE_DIR="rustc-$portVersion-src" + ;; +esac + +ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86" +DISABLE_SOURCE_PACKAGE=yes + +cargoVersion="0.22.0" +rlsVersion="0.121.0" + +PROVIDES=" + rust_bin$secondaryArchSuffix = $portVersion + cmd:rustc = $portVersion + cmd:rustdoc = $portVersion + cmd:rust_gdb = $portVersion + cmd:rust_lldb = $portVersion + cmd:cargo$secondaryArchSuffix = $cargoVersion + cmd:rls = $rlsVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libcurl$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libssh2$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " +CONFLICTS=" + rust$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " + +INSTALL() +{ + ./install.sh \ + --prefix=$prefix \ + --docdir=$developDocDir \ + --libdir=$libDir \ + --mandir=$manDir \ + --sysconfdir=$dataDir \ + --disable-ldconfig + + # 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-* + rm $developLibDir/rustlib/rust-installer-version + rm $developLibDir/rustlib/uninstall.sh +}