pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/rust rust: Fix another instance of the rand crate...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8b9c0dd1b13b
branches:  trunk
changeset: 392908:8b9c0dd1b13b
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Mar 07 20:19:11 2019 +0000

description:
rust: Fix another instance of the rand crate for SunOS.

While here convert some tabs->spaces that broke the test suite.

diffstat:

 lang/rust/Makefile                                                 |   5 ++-
 lang/rust/distinfo                                                 |   9 +++--
 lang/rust/patches/patch-src_librustc__llvm_build.rs                |  16 +++++-----
 lang/rust/patches/patch-src_libunwind_build.rs                     |   4 +-
 lang/rust/patches/patch-src_tools_cargo_src_cargo_core_profiles.rs |   8 ++--
 lang/rust/patches/patch-vendor_rand-0.5.5_src_rngs_os.rs           |  15 +++++++++
 6 files changed, 38 insertions(+), 19 deletions(-)

diffs (144 lines):

diff -r 82fb9ea92c81 -r 8b9c0dd1b13b lang/rust/Makefile
--- a/lang/rust/Makefile        Thu Mar 07 18:45:44 2019 +0000
+++ b/lang/rust/Makefile        Thu Mar 07 20:19:11 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.88 2019/03/04 15:37:54 he Exp $
+# $NetBSD: Makefile,v 1.89 2019/03/07 20:19:11 jperkin Exp $
 
 DISTNAME=      rustc-1.33.0-src
 PKGNAME=       ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -297,6 +297,9 @@
                ${TOOLS_BASH} ./install.sh --prefix=${RUST_BOOTSTRAP_PATH};     \
        fi
 # patch(1) in NetBSD does not handle .cargo-checksum.json like long width file.
+       ${CP} ${WRKSRC}/vendor/rand-0.5.5/.cargo-checksum.json \
+               ${WRKSRC}/vendor/rand-0.5.5/.cargo-checksum.json.orig
+       ${SED} -e 's/cb94a0b54e47022b2e9b58b45e0196785c61d083760333276226da435cc040d9/bcb195562cf830c9e2078757e6d0976f86ede59816ff305e21a2764a4a4cf43e/' 
${WRKSRC}/vendor/rand-0.5.5/.cargo-checksum.json.orig > ${WRKSRC}/vendor/rand-0.5.5/.cargo-checksum.json
        ${CP} ${WRKSRC}/vendor/rand/.cargo-checksum.json \
              ${WRKSRC}/vendor/rand/.cargo-checksum.json.orig
        ${SED} -e 's/1e732c2e3b4bd1561f11e0979bf9d20669a96eae7afe0deff9dfbb980ee47bf1/55abd8100db14a076dedbf84ce0f2db08158e1bd33ff1d4978bd3c4ad978f281/' 
${WRKSRC}/vendor/rand/.cargo-checksum.json.orig > ${WRKSRC}/vendor/rand/.cargo-checksum.json
diff -r 82fb9ea92c81 -r 8b9c0dd1b13b lang/rust/distinfo
--- a/lang/rust/distinfo        Thu Mar 07 18:45:44 2019 +0000
+++ b/lang/rust/distinfo        Thu Mar 07 20:19:11 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.67 2019/03/06 21:39:17 he Exp $
+$NetBSD: distinfo,v 1.68 2019/03/07 20:19:11 jperkin Exp $
 
 SHA1 (rust-1.32.0-i686-apple-darwin.tar.gz) = 53b4b0c4a05a4fb3fa5f601151df166dd488f911
 RMD160 (rust-1.32.0-i686-apple-darwin.tar.gz) = 91949e77519a8a1b0330d69faf06817a6d8ba856
@@ -108,16 +108,16 @@
 SHA1 (patch-src_bootstrap_bootstrap.py) = 5b886b95857bf019c2e37cb380e6905cb444b756
 SHA1 (patch-src_bootstrap_builder.rs) = 7e23348dc5555fdb3833a7f8734cfe687c6e533c
 SHA1 (patch-src_bootstrap_lib.rs) = bc23743f1b9c4ad3d7557b4fdf8a55976ca7f417
-SHA1 (patch-src_librustc__llvm_build.rs) = 9b0b9e82192bc8615cb816052087ffab73df3c9a
+SHA1 (patch-src_librustc__llvm_build.rs) = 1884a79d174f8635b384acfac8898a20ebfd6376
 SHA1 (patch-src_libstd_build.rs) = 2334879e4b730014de08bb2dfff1a643292a630e
 SHA1 (patch-src_libstd_sys_unix_thread.rs) = 2554f1a42afaa0ddce5053860f4dabecdf6c527a
 SHA1 (patch-src_libsyntax__pos_span__encoding.rs) = c891cffab8ae47b13b3b391ddd1a6c62ee2b38f3
-SHA1 (patch-src_libunwind_build.rs) = 74e2101f0cd78ca68b0a9d14355e20dcaea66100
+SHA1 (patch-src_libunwind_build.rs) = c0a0aa9749705be07afe8eaaa0c7d70affa46566
 SHA1 (patch-src_llvm_CMakeLists.txt) = ffdf4337fdc84d8314c97c4e492e6b84244a99d1
 SHA1 (patch-src_llvm_cmake_modules_AddLLVM.cmake) = f0620ac62ecfb1d62d2dfa61b4c063d21c29b8f5
 SHA1 (patch-src_llvm_include_llvm-c_DataTypes.h) = 432693204912e79059ee31e815ad1e24f3236374
 SHA1 (patch-src_llvm_include_llvm_Analysis_ConstantFolding.h) = 861089ea7ec8985b9b9fce53ffadfa3e9eed4a72
-SHA1 (patch-src_tools_cargo_src_cargo_core_profiles.rs) = 379f60b809d5af3569541828c7e485da805ad9cc
+SHA1 (patch-src_tools_cargo_src_cargo_core_profiles.rs) = 3aac5d54a6fe96b9559552e67e497488142d4e80
 SHA1 (patch-src_tools_cargo_tests_testsuite_build.rs) = e9185994af936e0a4f000a03f94e272f95de6280
 SHA1 (patch-src_tools_rls_src_cmd.rs) = 754bfb8806e209cb0ef01690b48bf4b145017ab9
 SHA1 (patch-src_tools_rls_src_server_io.rs) = 74b90c1aeb70b0c3a20709145d6568ddf4647877
@@ -125,4 +125,5 @@
 SHA1 (patch-src_tools_tidy_src_features.rs) = 229be34bb91ce50ceeb69bee3833bba77600afda
 SHA1 (patch-vendor_backtrace-sys_src_libbacktrace_configure) = 90e54f66edce65ebe23fbf2480deb193ca926733
 SHA1 (patch-vendor_libc_src_unix_solaris_mod.rs) = 1fd66c000eeae9b61e5e05c46604c574d2b2106c
+SHA1 (patch-vendor_rand-0.5.5_src_rngs_os.rs) = b9579d3f1e30ad2cd2353cb02efc0afa1d5dfa1c
 SHA1 (patch-vendor_rand_src_rngs_os.rs) = 7a1c6d91d9418e1f8e378c4baca33045cc768f2d
diff -r 82fb9ea92c81 -r 8b9c0dd1b13b lang/rust/patches/patch-src_librustc__llvm_build.rs
--- a/lang/rust/patches/patch-src_librustc__llvm_build.rs       Thu Mar 07 18:45:44 2019 +0000
+++ b/lang/rust/patches/patch-src_librustc__llvm_build.rs       Thu Mar 07 20:19:11 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_librustc__llvm_build.rs,v 1.2 2019/03/03 09:16:21 he Exp $
+$NetBSD: patch-src_librustc__llvm_build.rs,v 1.3 2019/03/07 20:19:11 jperkin Exp $
 
 fix build on NetBSD HEAD-llvm. XXX there is probably a better way to do this.
 
@@ -10,14 +10,14 @@
      } else if target.contains("netbsd") && llvm_static_stdcpp.is_some() {
 -        // NetBSD uses a separate library when relocation is required
 -        "stdc++_pic"
-+      // NetBSD uses a separate library when relocation is required
-+      if env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
-+          "c++_pic"
-+      } else {
-+          "stdc++_pic"
-+      }
++        // NetBSD uses a separate library when relocation is required
++        if env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
++            "c++_pic"
++        } else {
++            "stdc++_pic"
++        }
 +    } else if env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
-+      "c++"
++        "c++"
      } else if llvm_use_libcxx.is_some() {
          "c++"
      } else {
diff -r 82fb9ea92c81 -r 8b9c0dd1b13b lang/rust/patches/patch-src_libunwind_build.rs
--- a/lang/rust/patches/patch-src_libunwind_build.rs    Thu Mar 07 18:45:44 2019 +0000
+++ b/lang/rust/patches/patch-src_libunwind_build.rs    Thu Mar 07 20:19:11 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_libunwind_build.rs,v 1.1 2019/01/05 23:29:40 tnn Exp $
+$NetBSD: patch-src_libunwind_build.rs,v 1.2 2019/03/07 20:19:11 jperkin Exp $
 
 fix build on NetBSD HEAD-llvm. XXX there is probably a better way to do this.
 
@@ -9,7 +9,7 @@
          println!("cargo:rustc-link-lib=unwind");
      } else if target.contains("netbsd") {
 -        println!("cargo:rustc-link-lib=gcc_s");
-+      if !env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
++        if !env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
 +            println!("cargo:rustc-link-lib=gcc_s");
 +        }
      } else if target.contains("openbsd") {
diff -r 82fb9ea92c81 -r 8b9c0dd1b13b lang/rust/patches/patch-src_tools_cargo_src_cargo_core_profiles.rs
--- a/lang/rust/patches/patch-src_tools_cargo_src_cargo_core_profiles.rs        Thu Mar 07 18:45:44 2019 +0000
+++ b/lang/rust/patches/patch-src_tools_cargo_src_cargo_core_profiles.rs        Thu Mar 07 20:19:11 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_tools_cargo_src_cargo_core_profiles.rs,v 1.2 2018/11/27 15:45:23 adam Exp $
+$NetBSD: patch-src_tools_cargo_src_cargo_core_profiles.rs,v 1.3 2019/03/07 20:19:11 jperkin Exp $
 
 Turn off incremental builds for sparc64, ref.
 https://sources.debian.org/patches/cargo/0.29.0-1/2007_sparc64_disable_incremental_build.patch/
@@ -9,9 +9,9 @@
              debuginfo: Some(2),
              debug_assertions: true,
              overflow_checks: true,
-+          #[cfg(target_arch = "sparc64")]
-+          incremental: false,
-+          #[cfg(not(target_arch = "sparc64"))]
++            #[cfg(target_arch = "sparc64")]
++            incremental: false,
++            #[cfg(not(target_arch = "sparc64"))]
              incremental: true,
              ..Profile::default()
          }
diff -r 82fb9ea92c81 -r 8b9c0dd1b13b lang/rust/patches/patch-vendor_rand-0.5.5_src_rngs_os.rs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/rust/patches/patch-vendor_rand-0.5.5_src_rngs_os.rs  Thu Mar 07 20:19:11 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-vendor_rand-0.5.5_src_rngs_os.rs,v 1.1 2019/03/07 20:19:11 jperkin Exp $
+
+Explicitly disable getrandom support on SunOS, the test fails.
+https://github.com/rust-random/rand/issues/637
+
+--- vendor/rand-0.5.5/src/rngs/os.rs.orig      2019-02-28 10:22:24.000000000 +0000
++++ vendor/rand-0.5.5/src/rngs/os.rs
+@@ -675,6 +675,7 @@ mod imp {
+     }
+ 
+     fn getrandom(buf: &mut [u8], blocking: bool) -> libc::c_long {
++        return -1;
+         extern "C" {
+             fn syscall(number: libc::c_long, ...) -> libc::c_long;
+         }



Home | Main Index | Thread Index | Old Index