Today I tried to rebuild a rust-based port on FreeBSD. It tried to build lang/rust from scratch even though it was already installed. The problem was that the latest binary package for rust was 1.86.0 and the latest version in the ports was 1.87.0. Digging in /usr/ports/Mk/Uses/cargo.mk there is:
CARGO_BUILDDEP?=··yes . if ${CARGO_BUILDDEP:tl} == "yes" BUILD_DEPENDS+=·${RUST_DEFAULT}>=1.87.0:lang/${RUST_DEFAULT} . elif ${CARGO_BUILDDEP:tl} == "any-version" BUILD_DEPENDS+=·${RUST_DEFAULT}>=0:lang/${RUST_DEFAULT} . endif
That’s the bit actually enforcing the build dependency. But as you can see, it’s easy to bypass this dependency with export CARGO_BUILDDEP=no
. Just ensure that you have rust installed either with rustup or from the packages.