On Thu, Aug 17, 2023 at 10:52:00AM -0600, Ashlen wrote: > On Thu, 17 Aug 2023 08:36 +0200, Theo Buehler wrote: > > > Side note: I noticed MODCARGO_INSTALL_TARGET_PATH is undocumented > > > in cargo-module(5), along with MODCARGO_WANTLIB. Should they be > > > included in that man page? > > > > I have added a blurb for MODCARGO_INSTALL_TARGET_PATH after sending my > > previous mail. If you want to take a stab for MODCARGO_WANTLIB, that > > would be nice. > > Sure, I've attached a diff that adds it to the list. Should some > of these be documented at some point as well? > > > grep -E '^MODCARGO(_[[:upper:]]+){1,}.*=' > /usr/ports/devel/cargo/cargo.port.mk \ > | cut -f 1 -d ' ' \ > | sort -u \ > | while read -r cargo_var; do > grep -q "${cargo_var}" /usr/src/share/man/man5/cargo-module.5 \ > || echo "${cargo_var}" > done > > MODCARGO_BUILD > MODCARGO_BUILDDEP > MODCARGO_BUILD_ARGS > MODCARGO_BUILD_DEPENDS > MODCARGO_BUILD_TARGET > MODCARGO_CARGO_BIN > MODCARGO_CARGO_RUN > MODCARGO_CARGO_UPDATE > MODCARGO_CRATES_BUILDDEP > MODCARGO_CRATES_KEEP > MODCARGO_ENV > MODCARGO_INSTALL_ARGS > MODCARGO_MASTER_SITESN > MODCARGO_NO_DEFAULT_FEATURES > MODCARGO_TARGET_DIR > MODCARGO_TEST > MODCARGO_TEST_ARGS > MODCARGO_TEST_TARGET
Most (but not all) of these should probably be documented. For example, MODCARGO_MASTER_SITESN will likely go away soon. If I wanted to document them, I would grep the ports tree and see which ones are used most. Then send small diffs to document a group of those that belongs together. > +.It MODCARGO_WANTLIB > +Needed Rust libraries, for use with WANTLIB. I don't think it hurts to be a bit more explicit here. The reason is that using an explicit entry for c++abi means that WANTLIB are wrong for sparc64. So I'd do something like this. Index: cargo-module.5 =================================================================== RCS file: /cvs/src/share/man/man5/cargo-module.5,v retrieving revision 1.5 diff -u -p -r1.5 cargo-module.5 --- cargo-module.5 17 Aug 2023 05:43:09 -0000 1.5 +++ cargo-module.5 17 Aug 2023 18:18:46 -0000 @@ -106,6 +106,15 @@ Needs to be set for some virtual manifes Name of the local directory for vendoring crates. Defaults to .Pa ${WRKSRC}/modcargo-crates . +.It MODCARGO_WANTLIB +Architecture-specific +.Ev WANTLIB +entries required by all Rust code. +Should be used instead of explicit entries for +.Dq c , +.Dq pthread , +and +.Dq c++abi . .El .Pp This module adds three