svn commit: r458179 - head/lang/rust

Jean-Sébastien Pédron dumbbell at FreeBSD.org
Fri Jan 5 23:33:43 UTC 2018


Author: dumbbell
Date: Fri Jan  5 23:33:42 2018
New Revision: 458179
URL: https://svnweb.freebsd.org/changeset/ports/458179

Log:
  lang/rust: Skip `.cargo-checksum.json` update when it's missing
  
  Currently we need to update `.cargo-checksum.json` in several patched
  crates. But those crates are missing from the sources if they come from
  GitHub instead of a proper released source archive. This change makes
  `post-patch` and `do-configure` recipes fine in both cases.

Modified:
  head/lang/rust/Makefile

Modified: head/lang/rust/Makefile
==============================================================================
--- head/lang/rust/Makefile	Fri Jan  5 23:28:16 2018	(r458178)
+++ head/lang/rust/Makefile	Fri Jan  5 23:33:42 2018	(r458179)
@@ -172,6 +172,9 @@ post-patch:
 # 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/openssl" "${WRKSRC}/src/vendor/openssl-sys"; do \
+		if ! test -d "$$dir"; then \
+			continue; \
+		fi; \
 		cd "$$dir"; \
 		for file in $$(${FIND} * -name "*.orig"); do \
 			old_checksum=$$(${SHA256} -q "$$file"); \
@@ -186,6 +189,9 @@ post-patch:
 # 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; \
@@ -205,6 +211,9 @@ do-configure:
 # `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"); \


More information about the svn-ports-head mailing list