pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/rust lang/rust: Various fixes.
details: https://anonhg.NetBSD.org/pkgsrc/rev/0fe12983a312
branches: trunk
changeset: 386861:0fe12983a312
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Wed Oct 31 15:53:17 2018 +0000
description:
lang/rust: Various fixes.
SunOS now needs -D_POSIX_PTHREAD_SEMANTICS and a patch to the rand module
to work around getrandom() system call failures.
Add -j argument to x.py for the number of make jobs.
diffstat:
lang/rust/Makefile | 11 +++++++++--
lang/rust/distinfo | 3 ++-
lang/rust/patches/patch-src_vendor_rand_src_rngs_os.rs | 15 +++++++++++++++
3 files changed, 26 insertions(+), 3 deletions(-)
diffs (74 lines):
diff -r 1d82ea8dd2fb -r 0fe12983a312 lang/rust/Makefile
--- a/lang/rust/Makefile Wed Oct 31 14:56:40 2018 +0000
+++ b/lang/rust/Makefile Wed Oct 31 15:53:17 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.63 2018/10/29 22:24:11 he Exp $
+# $NetBSD: Makefile,v 1.64 2018/10/31 15:53:17 jperkin Exp $
DISTNAME= rustc-1.30.0-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -90,6 +90,8 @@
# cargo defaults to using the number of available CPUs
MAKE_ENV+= CARGO_BUILD_JOBS=${MAKE_JOBS:U1}
+CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS
+
UNLIMIT_RESOURCES+= cputime
PYTHON_VERSIONS_ACCEPTED= 27
@@ -269,8 +271,13 @@
cat ${WRKSRC}/src/vendor/libc/.cargo-checksum.json | \
${SED} -e 's/9c6af198a2f80da827054784faf70bc404673d9568fb45664b4f73c46245fdbd/c3851969a854d6ccaa8a94369f1288025149d1ebdc74b36f224423f35b18f7a7/' > \
${WRKSRC}/src/vendor/libc/.cargo-checksum.json.patched
+ cat ${WRKSRC}/src/vendor/rand/.cargo-checksum.json | \
+ ${SED} -e 's/cb94a0b54e47022b2e9b58b45e0196785c61d083760333276226da435cc040d9/bcb195562cf830c9e2078757e6d0976f86ede59816ff305e21a2764a4a4cf43e/' > \
+ ${WRKSRC}/src/vendor/rand/.cargo-checksum.json.patched
${CP} -f ${WRKSRC}/src/vendor/libc/.cargo-checksum.json.patched \
${WRKSRC}/src/vendor/libc/.cargo-checksum.json
+ ${CP} -f ${WRKSRC}/src/vendor/rand/.cargo-checksum.json.patched \
+ ${WRKSRC}/src/vendor/rand/.cargo-checksum.json
.if ${OPSYS} == "NetBSD"
SDIR=${WRKDIR}/scripts; \
${MKDIR} $${SDIR}; \
@@ -302,7 +309,7 @@
do-build:
cd ${WRKSRC} \
&& env ${MAKE_ENV} \
- ${PYTHONBIN} ./x.py -v dist
+ ${PYTHONBIN} ./x.py -v dist -j ${MAKE_JOBS:U1}
do-install:
cd ${WRKSRC} \
diff -r 1d82ea8dd2fb -r 0fe12983a312 lang/rust/distinfo
--- a/lang/rust/distinfo Wed Oct 31 14:56:40 2018 +0000
+++ b/lang/rust/distinfo Wed Oct 31 15:53:17 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.43 2018/10/29 22:24:11 he Exp $
+$NetBSD: distinfo,v 1.44 2018/10/31 15:53:17 jperkin Exp $
SHA1 (rust-1.29.1-i686-unknown-netbsd.tar.gz) = f4f8cbd0a2581546680328765bf5d7d351cf0643
RMD160 (rust-1.29.1-i686-unknown-netbsd.tar.gz) = a590d8dfed10220e8013796cd66c5c9eed51bf37
@@ -110,3 +110,4 @@
SHA1 (patch-src_llvm_include_llvm_Analysis_ConstantFolding.h) = 861089ea7ec8985b9b9fce53ffadfa3e9eed4a72
SHA1 (patch-src_tools_cargo_src_cargo_core_profiles.rs) = 17e19ccaf29e5d2e6a42c5e59837169ebbc7c58e
SHA1 (patch-src_tools_cargo_tests_testsuite_build.rs) = 10c0f9cc2f2c4fdc651fc123ef5d84cadf93feb5
+SHA1 (patch-src_vendor_rand_src_rngs_os.rs) = 318c9e0ed77f83bb34f5512638545ff16844e8fd
diff -r 1d82ea8dd2fb -r 0fe12983a312 lang/rust/patches/patch-src_vendor_rand_src_rngs_os.rs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/rust/patches/patch-src_vendor_rand_src_rngs_os.rs Wed Oct 31 15:53:17 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_vendor_rand_src_rngs_os.rs,v 1.1 2018/10/31 15:53:18 jperkin Exp $
+
+Explicitly disable getrandom support on SunOS, the test fails.
+https://github.com/rust-random/rand/issues/637
+
+--- src/vendor/rand/src/rngs/os.rs.orig 2018-10-24 21:38:28.000000000 +0000
++++ src/vendor/rand/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