pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/rust



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Wed Oct 31 15:53:18 UTC 2018

Modified Files:
        pkgsrc/lang/rust: Makefile distinfo
Added Files:
        pkgsrc/lang/rust/patches: patch-src_vendor_rand_src_rngs_os.rs

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 pkgsrc/lang/rust/Makefile
cvs rdiff -u -r1.43 -r1.44 pkgsrc/lang/rust/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/rust/patches/patch-src_vendor_rand_src_rngs_os.rs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/rust/Makefile
diff -u pkgsrc/lang/rust/Makefile:1.63 pkgsrc/lang/rust/Makefile:1.64
--- pkgsrc/lang/rust/Makefile:1.63      Mon Oct 29 22:24:11 2018
+++ pkgsrc/lang/rust/Makefile   Wed Oct 31 15:53:17 2018
@@ -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 @@ CONFIGURE_ARGS+=      --enable-vendor
 # 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 @@ post-extract:
        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 @@ pre-build: pre-build-fix
 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} \

Index: pkgsrc/lang/rust/distinfo
diff -u pkgsrc/lang/rust/distinfo:1.43 pkgsrc/lang/rust/distinfo:1.44
--- pkgsrc/lang/rust/distinfo:1.43      Mon Oct 29 22:24:11 2018
+++ pkgsrc/lang/rust/distinfo   Wed Oct 31 15:53:17 2018
@@ -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-c_Data
 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

Added files:

Index: pkgsrc/lang/rust/patches/patch-src_vendor_rand_src_rngs_os.rs
diff -u /dev/null pkgsrc/lang/rust/patches/patch-src_vendor_rand_src_rngs_os.rs:1.1
--- /dev/null   Wed Oct 31 15:53:18 2018
+++ pkgsrc/lang/rust/patches/patch-src_vendor_rand_src_rngs_os.rs       Wed Oct 31 15:53:18 2018
@@ -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