USES=cargo breaks with crates like "utf-8-0.7.4", thinking the package name is "utf" instead of "utf-8".
Created attachment 195948 [details] cargo.mk.diff Try with this patch applied.
Looks good. For reference, here's the port I'm making, complete with ugly workaround: https://github.com/Freaky/ports/tree/master/www/gutenberg With your patch I can revert the workaround, and still fetch and build. Also tested fine with textproc/ripgrep and sysutils/fd.
A commit references this bug: Author: tobik Date: Tue Aug 7 19:55:32 UTC 2018 New revision: 476623 URL: https://svnweb.freebsd.org/changeset/ports/476623 Log: Mk/Uses/cargo.mk: Fix crate name and version split (take 2) cargo.mk is still too eager in splitting a crate's name and version in two when the name contains a dash followed by a number. For example with utf-8-0.7.4 the wrong URL ends up being used in MASTER_SITES .../utf/8-0.7.4/download/... instead of .../utf-8/0.7.4/download/... PR: 230413 Reported by: Thomas Hurst <tom@hur.st> Changes: head/Mk/Uses/cargo.mk
(In reply to Thomas Hurst from comment #2) The patch doesn't seem to break existing ports, so committed the fix. Thanks for the report!