aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2019-05-24 15:57:11 +0800
committertobik <tobik@FreeBSD.org>2019-05-24 15:57:11 +0800
commit00a5cdc098d21b87cb45f29dbdae0151d77742c3 (patch)
tree46a326bcb581fe93d994eb1ea49359a7af36fdfd /Mk
parentd13a572700aff9410d3d284584cfa74016b4364d (diff)
downloadfreebsd-ports-gnome-00a5cdc098d21b87cb45f29dbdae0151d77742c3.tar.gz
freebsd-ports-gnome-00a5cdc098d21b87cb45f29dbdae0151d77742c3.tar.zst
freebsd-ports-gnome-00a5cdc098d21b87cb45f29dbdae0151d77742c3.zip
Mk/Uses/cargo.mk: QoL improvement during makepatch
Cargo normalizes Cargo.toml when crates are published. It creates a Cargo.toml.orig to preserve the original. Rename them to not interfere with makepatch and avoid creating a bunch of useless and wrong files/patch-*Cargo.toml. Suggested by: mat
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/cargo.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index e465eee7a0dc..368abcaa8255 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -198,6 +198,10 @@ cargo-extract:
@${PRINTF} '{"package":"%s","files":{}}' \
$$(${SHA256} -q ${DISTDIR}/${CARGO_DIST_SUBDIR}/${_crate}.tar.gz) \
> ${CARGO_VENDOR_DIR}/${_crate}/.cargo-checksum.json
+ @if [ -r ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig ]; then \
+ ${MV} ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig \
+ ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig-cargo; \
+ fi
.endfor
_CARGO_GIT_PATCH_CARGOTOML=