No idea why, but cargo's API from which cargo-module(5) fetches crates ships tarballs which seem to always have both Cargo.toml *and* Cargo.toml.orig.
This blows up `make update-patches' by adding as many new patches as there are crates. This is because PATCHORIG defaults to ".orig"; defaulint it to e.g. ".modcrate.orig" in cargo.port.mk feels wrong, so let's remove the shipped original files. By using `${PATCHORIG}' instead of hard-coding ".orig" I leave the files should porters user other PATCHORIG values and therefore avoid the conflict in the first place. I know this is raceu since `make PATCHORIG=.foo.orig extract && make patch && make update-patches' will still trip over that, but our framework can't cope with everything and I simply find using `${PATCHORIG}' in cargo.port.mk both cleaner and more obvious. Feedback? Objections? OK? Index: cargo.port.mk =================================================================== RCS file: /cvs/ports/devel/cargo/cargo.port.mk,v retrieving revision 1.22 diff -u -p -r1.22 cargo.port.mk --- cargo.port.mk 27 Apr 2021 06:51:10 -0000 1.22 +++ cargo.port.mk 28 Jul 2021 18:29:55 -0000 @@ -59,6 +59,8 @@ DISTFILES += ${_MODCARGO_DIST_SUBDIR}${_ MODCARGO_post-extract = \ ${ECHO_MSG} "[modcargo] moving crates to ${MODCARGO_VENDOR_DIR}" ; \ mkdir ${MODCARGO_VENDOR_DIR} ; +MODCARGO_post-extract += \ + rm -f -- ${WRKDIR}/*/Cargo.toml${PATCHORIG} ; .for _cratename _cratever in ${MODCARGO_CRATES} MODCARGO_post-extract += \ mv ${WRKDIR}/${_cratename}-${_cratever} ${MODCARGO_VENDOR_DIR}/${_cratename}-${_cratever} ;