Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2018 23:33:42 +0000 (UTC)
From:      =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= <dumbbell@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458179 - head/lang/rust
Message-ID:  <201801052333.w05NXgiJ049474@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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"); \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801052333.w05NXgiJ049474>