Starting with Rust 1.19.0, we should build Cargo at the same time as Rust. To do that, there is the extended = true flag in config.toml. Therefore this patch merges the old devel/cargo port into lang/rust. The devel/port is removed and ports depending on it now depends on lang/rust.
We also get rid of the Cargo registry snapshot: by setting vendor = true in config.toml, the build process uses the crates provided in the source archives, instead of fresh copies fetched from crates.io. This makes the maintenance of this port lighter and reduces the amount of distfiles.
Now that we use the bundled crates, we discovered two issues which this patch also fixes:
- The ino-64 patches were not used: they were applied to the bundled crates, not to the copies in the Cargo registry. There was a compilation failure in x86_64.rs because it was using the type ::u32 which doesn't exist; the correct syntax is u32.
- Some users hit an build failure because Cargo verifies file checksums using a file called .cargo-checksum.json in all crates. Because we automatically patch files such as config.rpath or the ino-64 patch was applied, this led to verification failures. Now the port patches those .cargo-checksum.json files. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221088.