svn commit: r487977 - in head/lang/rust: . files
Tobias Kortkamp
tobik at FreeBSD.org
Fri Dec 21 10:37:10 UTC 2018
Author: tobik
Date: Fri Dec 21 10:37:09 2018
New Revision: 487977
URL: https://svnweb.freebsd.org/changeset/ports/487977
Log:
lang/rust: Update to 1.31.1
- Simplify .cargo-checksum.json handling [1]. Similar to USES=cargo
we disable vendor checksum checking by clearing the list of files
in all .cargo-checksum.json, so that cargo does not complain when
we patch something. The overall distfile is already checked by
us which should be enough.
- Add an overridable CARGO_VENDOR_DIR variable to set the crate
vendor directory which has moved location in nightly
- Add upstream openssl-sys patch to fix build with LibreSSL 2.9.0 [2]
Changes: https://blog.rust-lang.org/2018/12/20/Rust-1.31.1.html
Submitted by: mikael.urankar at gmail.com [1], ml at vishwin.info [2]
Differential Revision: https://reviews.freebsd.org/D18610
Deleted:
head/lang/rust/files/patch-src_vendor_openssl-sys_.cargo-checksum.json
Modified:
head/lang/rust/Makefile
head/lang/rust/distinfo
head/lang/rust/files/patch-src_vendor_openssl-sys_build_main.rs
Modified: head/lang/rust/Makefile
==============================================================================
--- head/lang/rust/Makefile Fri Dec 21 10:31:30 2018 (r487976)
+++ head/lang/rust/Makefile Fri Dec 21 10:37:09 2018 (r487977)
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= rust
-PORTVERSION?= 1.31.0
+PORTVERSION?= 1.31.1
PORTREVISION?= 0
CATEGORIES= lang
MASTER_SITES= http://static.rust-lang.org/dist/:src \
@@ -51,6 +51,8 @@ RUST_STD_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOT
CARGO_BOOTSTRAP_VERSION?= 0.31.0
CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz
+CARGO_VENDOR_DIR?= ${WRKSRC}/src/vendor
+
RUST_CHANNEL= ${PKGNAMESUFFIX:Ustable:S/^-//}
# Rust's target arch string is different from *BSD arch strings
@@ -98,11 +100,8 @@ X_PY_ENV= HOME="${WRKDIR}" \
OPENSSL_DIR="${OPENSSLBASE}"
X_PY_CMD= ${PYTHON_CMD} ${WRKSRC}/x.py
-CRATES_PATCHED_BY_FBSD10_FIX?= src/vendor/libssh2-sys \
- src/vendor/lzma-sys
+RUST_STD_DIR= ${RUST_STD_BOOTSTRAP:T:R:R}
-RUST_STD_DIR= ${RUST_STD_BOOTSTRAP:T:R:R}
-
post-extract:
@${MKDIR} \
${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}} \
@@ -129,35 +128,10 @@ post-patch:
@${REINPLACE_CMD} -e \
's|^cargo:.*|cargo: ${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}|' \
${WRKSRC}/src/stage0.txt
-# After patching crates, we need to update their corresponding
-# `.cargo-checksum.json` to reflect the new checksums verified by Cargo.
- @for dir in "${WRKSRC}/src/vendor/libc" \
- "${WRKSRC}/src/vendor/libgit2-sys" \
- "${WRKSRC}/src/vendor/openssl"; do \
- if ! test -d "$$dir"; then \
- continue; \
- fi; \
- cd "$$dir"; \
- for file in $$(${FIND} * -name "*.orig"); do \
- old_checksum=$$(${SHA256} -q "$$file"); \
- new_checksum=$$(${SHA256} -q "$${file%%.orig}"); \
- regex="$$regex -e s|\"$${file%%.orig}\":\"$$old_checksum\"|\"$${file%%.orig}\":\"$$new_checksum\"|"; \
- done; \
- if test "$$regex"; then \
- ${REINPLACE_CMD} -E $$regex .cargo-checksum.json; \
- fi; \
- done
-# We make a backup of a few files before the FreeBSD 10 autotools
-# fix is applied. We'll need them in `do-configure` to update the
-# `.cargo-checksum.json` files.
- @for crate in ${CRATES_PATCHED_BY_FBSD10_FIX}; do \
- if ! test -d "${WRKSRC}/$$crate"; then \
- continue; \
- fi; \
- for file in $$(${FIND} "${WRKSRC}/$$crate" -name "config.rpath"); do \
- ${CP} "$$file" "$$file.orig"; \
- done; \
- done
+# Disable vendor checksums
+ @${REINPLACE_CMD} -e \
+ 's/"files":{[^}]*}/"files":{}/' \
+ ${CARGO_VENDOR_DIR}/*/.cargo-checksum.json
.if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE)
CCACHE_VALUE= "${CCACHE_WRAPPER_PATH:C,/libexec/ccache$,,}/bin/ccache"
@@ -165,14 +139,12 @@ CCACHE_VALUE= "${CCACHE_WRAPPER_PATH:C,/libexec/ccache
CCACHE_VALUE= false
.endif
-.if !target(pre-configure)
pre-configure:
@for file in \
- ${WRKSRC}/src/vendor/backtrace-sys/src/libbacktrace/configure \
- ${WRKSRC}/src/vendor/backtrace-sys/src/libbacktrace/config/libtool.m4; do \
+ ${CARGO_VENDOR_DIR}/backtrace-sys/src/libbacktrace/configure \
+ ${CARGO_VENDOR_DIR}/backtrace-sys/src/libbacktrace/config/libtool.m4; do \
mv "$$file" "$$file.dont-fix"; \
done
-.endif
do-configure:
${SED} -E \
@@ -185,32 +157,13 @@ do-configure:
-e 's,%CCACHE%,${CCACHE_VALUE},' \
< ${FILESDIR}/config.toml \
> ${WRKSRC}/config.toml
-# The FreeBSD 10 autotools fix may modify some files just before
-# `do-configure`. Like after `extra-path-ino64`, we need to update
-# `.cargo-checksum.json`.
- @for crate in ${CRATES_PATCHED_BY_FBSD10_FIX}; do \
- if ! test -d "${WRKSRC}/$$crate"; then \
- continue; \
- fi; \
- cd "${WRKSRC}/$$crate"; \
- for file in $$(${FIND} * -name "*.orig"); do \
- old_checksum=$$(${SHA256} -q "$$file"); \
- new_checksum=$$(${SHA256} -q "$${file%%.orig}"); \
- regex="$$regex -e s|\"$${file%%.orig}\":\"$$old_checksum\"|\"$${file%%.orig}\":\"$$new_checksum\"|"; \
- done; \
- if test "$$regex"; then \
- ${REINPLACE_CMD} -E $$regex .cargo-checksum.json; \
- fi; \
- done
-.if !target(post-configure)
post-configure:
@for file in \
- ${WRKSRC}/src/vendor/backtrace-sys/src/libbacktrace/configure \
- ${WRKSRC}/src/vendor/backtrace-sys/src/libbacktrace/config/libtool.m4; do \
+ ${CARGO_VENDOR_DIR}/backtrace-sys/src/libbacktrace/configure \
+ ${CARGO_VENDOR_DIR}/backtrace-sys/src/libbacktrace/config/libtool.m4; do \
mv "$$file.dont-fix" "$$file"; \
done
-.endif
post-configure-DOCS-on:
${REINPLACE_CMD} -e 's,%DOCS%,true,' ${WRKSRC}/config.toml
Modified: head/lang/rust/distinfo
==============================================================================
--- head/lang/rust/distinfo Fri Dec 21 10:31:30 2018 (r487976)
+++ head/lang/rust/distinfo Fri Dec 21 10:37:09 2018 (r487977)
@@ -1,6 +1,6 @@
-TIMESTAMP = 1543972935
-SHA256 (rust/rustc-1.31.0-src.tar.xz) = 9581c5673937f8b1c3c21060ef7c1fcd3e5574a0fc0b27e1888cb37c4b2ec393
-SIZE (rust/rustc-1.31.0-src.tar.xz) = 96914112
+TIMESTAMP = 1545210622
+SHA256 (rust/rustc-1.31.1-src.tar.xz) = b38f6a1b5e12619f242e44ea494d177c72fd1f80160386b2e69b69446685fcfa
+SIZE (rust/rustc-1.31.1-src.tar.xz) = 96915864
SHA256 (rust/2018-10-25/rustc-1.30.0-x86_64-unknown-freebsd.tar.gz) = 68a74949e34118406673cf8cc0098b011907c840890e0640aa3b145ce91c521d
SIZE (rust/2018-10-25/rustc-1.30.0-x86_64-unknown-freebsd.tar.gz) = 68231553
SHA256 (rust/2018-10-25/rust-std-1.30.0-x86_64-unknown-freebsd.tar.gz) = 4040fe677524e2ead69a2fcab4c16acaad3d4c4f1210ae36f400f82463bdfbc7
Modified: head/lang/rust/files/patch-src_vendor_openssl-sys_build_main.rs
==============================================================================
--- head/lang/rust/files/patch-src_vendor_openssl-sys_build_main.rs Fri Dec 21 10:31:30 2018 (r487976)
+++ head/lang/rust/files/patch-src_vendor_openssl-sys_build_main.rs Fri Dec 21 10:37:09 2018 (r487977)
@@ -1,6 +1,7 @@
https://github.com/sfackler/rust-openssl/commit/9fd7584a8416
+https://github.com/sfackler/rust-openssl/commit/e75793e8962d
---- src/vendor/openssl-sys/build/main.rs.orig 2018-12-03 20:08:24 UTC
+--- src/vendor/openssl-sys/build/main.rs.orig 2018-12-05 01:24:32 UTC
+++ src/vendor/openssl-sys/build/main.rs
@@ -1,9 +1,9 @@
extern crate cc;
@@ -45,11 +46,21 @@ https://github.com/sfackler/rust-openssl/commit/9fd758
use std::process::{self, Command};
use super::env;
-@@ -500,6 +503,7 @@ See rust-openssl README for more information:
+@@ -500,6 +503,8 @@ See rust-openssl README for more information:
(7, _) => ('7', 'x'),
(8, 0) => ('8', '0'),
(8, 1) => ('8', '1'),
+ (8, _) => ('8', 'x'),
++ (9, 0) => ('9', '0'),
_ => version_error(),
};
+@@ -540,7 +545,7 @@ fn version_error() -> ! {
+ "
+
+ This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
+-through 2.8.1, but a different version of OpenSSL was found. The build is now aborting
++through 2.9.0, but a different version of OpenSSL was found. The build is now aborting
+ due to this version mismatch.
+
+ "
More information about the svn-ports-all
mailing list