Created attachment 160671 [details] Patch to ease lang/rust-nightly porting on DragonFly On DragonFlyBSD, we were using our own port for Rust. Now we want to switch to use FreeBSD's lang/rust-nightly. I made some changes to make this happen in DragonFly (https://github.com/DragonFlyBSD/DeltaPorts/pull/19). jrmarino told me to send these patches upstream, and I also sent a pull request on github (https://github.com/freebsd/freebsd-ports/pull/34/commits). The same patch is appended.
A commit references this bug: Author: dumbbell Date: Sat Sep 12 14:49:46 UTC 2015 New revision: 396750 URL: https://svnweb.freebsd.org/changeset/ports/396750 Log: lang/rust and lang/rust-nightly: Build-conflict with themselves A newer version of Rust fails to build if an older version is installed because the build process picks libraries in %%LOCALBASE%%/lib before those from the build directory. In the pkg-plist of both ports, `x86_64-unknown-freebsd` is now a variable automatically set in the Makefile. This avoids the need for a separate port for DragonFlyBSD. [1] Still in the pkg-plist, RUST_VSN_HASH is automatically computed in the lang/rust's Makefile, like it was already done for lang/rust-nightly. lang/rust-nightly USES libedit. patch-mk_main.mk was copied from lang/rust so the correct library is picked (ie. the one from Ports, not the one from the base). This was already fixed in lang/rust. lang/rust includes bsd.port.options.mk and bsd.port.mk, instead of bsd.port.pre.mk and bsd.port.post.mk. This was already fixed in lang/rust-nightly. Both ports are now closer to each other. PR: 202869 [1] Submitted by: Michael Neumann <mneumann@ntecs.de> [1] Reviewed by: kwm Approved by: kwm Differential Revision: https://reviews.freebsd.org/D3234 Changes: head/lang/rust/Makefile head/lang/rust/pkg-plist head/lang/rust-nightly/Makefile head/lang/rust-nightly/files/patch-mk_main.mk head/lang/rust-nightly/pkg-plist