diff options
author | dumbbell <dumbbell@FreeBSD.org> | 2018-01-06 07:33:42 +0800 |
---|---|---|
committer | dumbbell <dumbbell@FreeBSD.org> | 2018-01-06 07:33:42 +0800 |
commit | a97de2570ebddb1206acc519a8dfa27ea1018709 (patch) | |
tree | 9b648b148887f667bacdba02aa0f0d783ec839a5 /lang/rust | |
parent | 94fa51c3169eccc2ced0b14f52dfe3c9f98b2a81 (diff) | |
download | freebsd-ports-gnome-a97de2570ebddb1206acc519a8dfa27ea1018709.tar.gz freebsd-ports-gnome-a97de2570ebddb1206acc519a8dfa27ea1018709.tar.zst freebsd-ports-gnome-a97de2570ebddb1206acc519a8dfa27ea1018709.zip |
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.
Diffstat (limited to 'lang/rust')
-rw-r--r-- | lang/rust/Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 51eaebdd1145..0d93d8b760ab 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -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"); \ |