Sunday, December 31, 2023

Re: lang/rust: roadmap for using SYSTEM_VERSION

Hi,

With the hint from espie@, it is possible to have a proper inclusion of
lang/rust module from devel/cargo module. So it is possible to have a
more simple usage of devel/cargo.

I would introduce a new lang/rust module (with just SYSTEM_VERSION-rust,
BUILD_DEPENDS+=lang/rust, and MODRUST_WANTLIB definition)

And keep the devel/cargo module to:
- use lang/rust MODULE
- reexport MODCARGO_WANTLIB=${MODRUST_WANTLIB}

So there is basically no changes in usage of devel/cargo module, and all
rust ports using lang/rust module will gain SYSTEM_VERSION-rust.


Regarding the diffs.

arch-defines.mk could be like the following:

Index: infrastructure/mk/arch-defines.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/arch-defines.mk,v
retrieving revision 1.100
diff -u -p -r1.100 arch-defines.mk
--- infrastructure/mk/arch-defines.mk 20 Nov 2023 19:20:32 -0000 1.100
+++ infrastructure/mk/arch-defines.mk 1 Jan 2024 06:19:53 -0000
@@ -105,6 +105,10 @@ _SYSTEM_VERSION-clang = 2
_SYSTEM_VERSION-go = ${_MODGO_SYSTEM_VERSION}
.endif

+# defined in rust.port.mk; added to version for all rust arches so that
+# rust-compiled packages can be updated easily for a new rust compiler/stdlib
+_SYSTEM_VERSION-rust ?= 0
+
# @version = ${_SYSTEM_VERSION} + ${_SYSTEM_VERSION-${MACHINE_ARCH}}
_PKG_ARGS_VERSION += -V ${_SYSTEM_VERSION} -V ${_SYSTEM_VERSION-${MACHINE_ARCH}}
.if ${ARCH} != ${MACHINE_ARCH}




It means that, by default, it will add a `-V 0' to _PKG_ARGS_VERSION,
which is a nop.

In lang/rust module, the variable would be defined to something else (1,
2, 3...). So a port using the lang/rust module will have `-V N' instead
of the default `-V 0'.


The full rust.port.mk diff is:

Index: lang/rust/rust.port.mk
===================================================================
RCS file: lang/rust/rust.port.mk
diff -N lang/rust/rust.port.mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/rust/rust.port.mk 1 Jan 2024 06:19:30 -0000
@@ -0,0 +1,29 @@
+# increment after rust compiler update to trigger updates of
+# all compiled rust packages (see arch-defines.mk)
+_SYSTEM_VERSION-rust = 1
+
+CATEGORIES += lang/rust
+
+# WANTLIB for Rust compiled code
+# it should be kept in sync with lang/rust code
+# - c/pthread : all syscalls
+# - c++abi / libgcc.a : unwind
+MODRUST_WANTLIB += c pthread
+
+.if "${MACHINE_ARCH}" != "sparc64"
+MODRUST_WANTLIB += c++abi
+.else
+# libgcc.a is static
+MODRUST_WANTLIB +=
+.endif
+
+CHECK_LIB_DEPENDS_ARGS += -S MODRUST_WANTLIB="${MODRUST_WANTLIB}"
+
+MODRUST_BUILDDEP ?= Yes
+.if ${MODRUST_BUILDDEP:L} == "yes"
+BUILD_DEPENDS += lang/rust
+.endif
+
+# Location of rustc/rustdoc binaries
+MODRUST_RUSTC_BIN = ${LOCALBASE}/bin/rustc
+MODRUST_RUSTDOC_BIN = ${LOCALBASE}/bin/rustdoc



And regarding devel/cargo module, it could just use lang/rust module,
and re-export the MODRUST_WANTLIB definition under MODCARGO_WANTLIB
name to keep to compat. (The diff includes also few cleanup).

Index: devel/cargo/cargo.port.mk
===================================================================
RCS file: /cvs/ports/devel/cargo/cargo.port.mk,v
retrieving revision 1.41
diff -u -p -r1.41 cargo.port.mk
--- devel/cargo/cargo.port.mk 6 Nov 2023 20:44:36 -0000 1.41
+++ devel/cargo/cargo.port.mk 1 Jan 2024 06:20:26 -0000
@@ -1,4 +1,4 @@
-CATEGORIES += lang/rust
+MODULES += lang/rust

# List of static dependencies. The format is cratename-version.
# MODCARGO_CRATES will be downloaded from SITES_CRATESIO.
@@ -24,20 +24,8 @@ MODCARGO_VENDOR_DIR ?= ${WRKSRC}/modcarg
MODCARGO_CARGOTOML ?= ${WRKSRC}/Cargo.toml

# WANTLIB for Rust compiled code
-# it should be kept in sync with lang/rust code
-# - c/pthread : all syscalls
-# - c++abi / libgcc.a : unwind
-MODCARGO_WANTLIB = c pthread
-
-.if "${MARCHINE_ARCH}" != "sparc64"
-MODCARGO_WANTLIB += c++abi
-.else
-# libgcc.a is static
-MODCARGO_WANTLIB +=
-.endif
-
+MODCARGO_WANTLIB = ${MODRUST_WANTLIB}
CHECK_LIB_DEPENDS_ARGS += -S MODCARGO_WANTLIB="${MODCARGO_WANTLIB}"
-CHECK_LIB_DEPENDS_ARGS += -F c++abi

# Define SITES_CRATESIO for crates.io
SITES.cargo = https://crates.io/api/v1/crates/
@@ -274,16 +262,9 @@ MODCARGO_configure += ;
.endif

# Build dependencies.
-MODCARGO_BUILD_DEPENDS = lang/rust
-
# devel/cargo-generate-vendor is mandatory for hooks.
BUILD_DEPENDS += devel/cargo-generate-vendor

-MODCARGO_BUILDDEP ?= Yes
-.if ${MODCARGO_BUILDDEP:L} == "yes"
-BUILD_DEPENDS += ${MODCARGO_BUILD_DEPENDS}
-.endif
-
# Location of cargo binary (default to devel/cargo binary)
MODCARGO_CARGO_BIN ?= ${LOCALBASE}/bin/cargo

@@ -305,8 +286,8 @@ MODCARGO_ENV += \
CARGO_BUILD_JOBS=${MAKE_JOBS} \
CARGO_TARGET_DIR=${MODCARGO_TARGET_DIR} \
RUST_BACKTRACE=full \
- RUSTC=${LOCALBASE}/bin/rustc \
- RUSTDOC=${LOCALBASE}/bin/rustdoc \
+ RUSTC=${MODRUST_RUSTC_BIN} \
+ RUSTDOC=${MODRUST_RUSTDOC_BIN} \
RUSTFLAGS="${MODCARGO_RUSTFLAGS}"

# Helper to shorten cargo calls.



The downside of the approch is the transition needs to be more in
one-time, as there is no more "old way" and "new way": both can't
coexist. As soon devel/cargo is modified to use lang/rust module, things
are bumped so there are expected to be right which, after review, isn't
the case at all.

The current status of rust ports is that on 78 ports, 33 ports has wrong
WANTLIB (not using MODCARGO_WANTLIB and hardcoding c++abi).

In a first time, I will correct that (by abusing a typo in the current
devel/cargo module which made MODCARGO_WANTLIB is "c pthread c++abi" in
all cases even on sparc64). And once the tree would be more clean,
add the lang/rust module and modify devel/cargo to use it.

I add below a full diff I have for now. I will see with some MAINTAINER
before changing ports.

Any comments ?
--
Sebastien Marie


? ports.diff
Index: databases/influxdb/Makefile
===================================================================
RCS file: /cvs/ports/databases/influxdb/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- databases/influxdb/Makefile 3 Dec 2023 16:57:35 -0000 1.29
+++ databases/influxdb/Makefile 1 Jan 2024 06:12:01 -0000
@@ -17,22 +17,25 @@ PERMIT_PACKAGE = Yes
MODULES = lang/go \
devel/cargo

-BUILD_DEPENDS = ${MODCARGO_BUILD_DEPENDS} \
- textproc/xmlto \
+BUILD_DEPENDS = textproc/xmlto \
textproc/asciidoc

#some dists have -w
FIX_CLEANUP_PERMISSIONS = Yes
-WANTLIB += c c++abi pthread
+WANTLIB += ${MODCARGO_WANTLIB}

COMPILER = base-clang ports-gcc
MODCARGO_BUILD = No
MODCARGO_INSTALL = No
MODCARGO_CARGOTOML = ${WRKDIR}/go/pkg/mod/github.com/influxdata/flux@v0.194.3/libflux/Cargo.toml
MODCARGO_TARGET_DIR = ${WRKDIR}/go/pkg/mod/github.com/influxdata/flux@v0.194.3/libflux/target
+
+.if ${MACHINE_ARCH} != "sparc64"
# needed to make sure unwind* symbols are found
MODCARGO_RUSTFLAGS +=-C link-arg=-lc++abi
CGO_LDFLAGS=-lc++abi
+.endif
+
MAKE_ENV += ${MODCARGO_ENV} CGO_LDFLAGS=${CGO_LDFLAGS}
MAKE_ENV += PKG_CONFIG=${WRKSRC}/scripts/pkg-config.sh
.include "crates.inc"
Index: devel/cargo/cargo.port.mk
===================================================================
RCS file: /cvs/ports/devel/cargo/cargo.port.mk,v
retrieving revision 1.41
diff -u -p -r1.41 cargo.port.mk
--- devel/cargo/cargo.port.mk 6 Nov 2023 20:44:36 -0000 1.41
+++ devel/cargo/cargo.port.mk 1 Jan 2024 06:12:01 -0000
@@ -1,4 +1,4 @@
-CATEGORIES += lang/rust
+MODULES += lang/rust

# List of static dependencies. The format is cratename-version.
# MODCARGO_CRATES will be downloaded from SITES_CRATESIO.
@@ -24,20 +24,8 @@ MODCARGO_VENDOR_DIR ?= ${WRKSRC}/modcarg
MODCARGO_CARGOTOML ?= ${WRKSRC}/Cargo.toml

# WANTLIB for Rust compiled code
-# it should be kept in sync with lang/rust code
-# - c/pthread : all syscalls
-# - c++abi / libgcc.a : unwind
-MODCARGO_WANTLIB = c pthread
-
-.if "${MARCHINE_ARCH}" != "sparc64"
-MODCARGO_WANTLIB += c++abi
-.else
-# libgcc.a is static
-MODCARGO_WANTLIB +=
-.endif
-
+MODCARGO_WANTLIB = ${MODRUST_WANTLIB}
CHECK_LIB_DEPENDS_ARGS += -S MODCARGO_WANTLIB="${MODCARGO_WANTLIB}"
-CHECK_LIB_DEPENDS_ARGS += -F c++abi

# Define SITES_CRATESIO for crates.io
SITES.cargo = https://crates.io/api/v1/crates/
@@ -274,16 +262,9 @@ MODCARGO_configure += ;
.endif

# Build dependencies.
-MODCARGO_BUILD_DEPENDS = lang/rust
-
# devel/cargo-generate-vendor is mandatory for hooks.
BUILD_DEPENDS += devel/cargo-generate-vendor

-MODCARGO_BUILDDEP ?= Yes
-.if ${MODCARGO_BUILDDEP:L} == "yes"
-BUILD_DEPENDS += ${MODCARGO_BUILD_DEPENDS}
-.endif
-
# Location of cargo binary (default to devel/cargo binary)
MODCARGO_CARGO_BIN ?= ${LOCALBASE}/bin/cargo

@@ -305,8 +286,8 @@ MODCARGO_ENV += \
CARGO_BUILD_JOBS=${MAKE_JOBS} \
CARGO_TARGET_DIR=${MODCARGO_TARGET_DIR} \
RUST_BACKTRACE=full \
- RUSTC=${LOCALBASE}/bin/rustc \
- RUSTDOC=${LOCALBASE}/bin/rustdoc \
+ RUSTC=${MODRUST_RUSTC_BIN} \
+ RUSTDOC=${MODRUST_RUSTDOC_BIN} \
RUSTFLAGS="${MODCARGO_RUSTFLAGS}"

# Helper to shorten cargo calls.
Index: devel/cargo-audit/Makefile
===================================================================
RCS file: /cvs/ports/devel/cargo-audit/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- devel/cargo-audit/Makefile 21 Sep 2023 09:49:49 -0000 1.8
+++ devel/cargo-audit/Makefile 1 Jan 2024 06:12:01 -0000
@@ -17,7 +17,7 @@ HOMEPAGE = https://github.com/RustSec/r
# Apache 2/MIT
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi crypto git2 m pthread ssh2 ssl
+WANTLIB += ${MODCARGO_WANTLIB} crypto git2 m ssh2 ssl

LIB_DEPENDS = devel/libgit2/libgit2 \
security/libssh2
Index: devel/cbindgen/Makefile
===================================================================
RCS file: /cvs/ports/devel/cbindgen/Makefile,v
retrieving revision 1.46
diff -u -p -r1.46 Makefile
--- devel/cbindgen/Makefile 14 Sep 2023 11:42:28 -0000 1.46
+++ devel/cbindgen/Makefile 1 Jan 2024 06:12:01 -0000
@@ -15,7 +15,7 @@ MODULES = devel/cargo

CONFIGURE_STYLE = cargo

-WANTLIB += c c++abi pthread
+WANTLIB += ${MODCARGO_WANTLIB}

TEST_ENV = CC=${CC} CXX=${CXX}

Index: devel/elfcat/Makefile
===================================================================
RCS file: /cvs/ports/devel/elfcat/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- devel/elfcat/Makefile 1 Mar 2023 12:06:26 -0000 1.6
+++ devel/elfcat/Makefile 1 Jan 2024 06:12:01 -0000
@@ -10,9 +10,9 @@ CATEGORIES = devel
# zlib
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi m pthread
+WANTLIB += ${MODCARGO_WANTLIB} m

-MODULES = devel/cargo
+MODULES = devel/cargo

CONFIGURE_STYLE = cargo

Index: devel/sccache/Makefile
===================================================================
RCS file: /cvs/ports/devel/sccache/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- devel/sccache/Makefile 17 Dec 2023 06:06:10 -0000 1.4
+++ devel/sccache/Makefile 1 Jan 2024 06:12:01 -0000
@@ -19,8 +19,7 @@ PERMIT_PACKAGE = Yes
WANTLIB += crypto m ssl zstd ${MODCARGO_WANTLIB}

MODULES = devel/cargo
-BUILD_DEPENDS = lang/rust \
- security/rust-ring
+BUILD_DEPENDS = security/rust-ring

SEPARATE_BUILD = Yes

Index: devel/snare/Makefile
===================================================================
RCS file: /cvs/ports/devel/snare/Makefile,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile
--- devel/snare/Makefile 21 Sep 2023 09:50:06 -0000 1.15
+++ devel/snare/Makefile 1 Jan 2024 06:12:01 -0000
@@ -14,7 +14,7 @@ MAINTAINER = Laurence Tratt <
# Apache-2.0/MIT
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi m pthread
+WANTLIB += ${MODCARGO_WANTLIB} m

DISTFILES += ${DISTNAME}${EXTRACT_SUFX}
MODULES = devel/cargo
Index: devel/spidermonkey115/Makefile
===================================================================
RCS file: /cvs/ports/devel/spidermonkey115/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- devel/spidermonkey115/Makefile 20 Dec 2023 13:58:42 -0000 1.3
+++ devel/spidermonkey115/Makefile 1 Jan 2024 06:12:01 -0000
@@ -30,9 +30,10 @@ EXTRACT_SUFX = .tar.xz
PERMIT_PACKAGE= Yes

WANTLIB += curses ffi icudata icui18n icuuc m nspr4 plc4 plds4 z
-WANTLIB += ${COMPILER_LIBCXX}
+WANTLIB += ${COMPILER_LIBCXX} ${MODRUST_WANTLIB}

-MODULES = lang/python
+MODULES = lang/python \
+ lang/rust

MODPY_RUNDEP = No

@@ -47,8 +48,7 @@ LIB_DEPENDS = devel/libffi \

DEBUG_PACKAGES = ${BUILD_PACKAGES}

-BUILD_DEPENDS = devel/cbindgen \
- lang/rust
+BUILD_DEPENDS = devel/cbindgen

SEPARATE_BUILD = Yes
WRKDIST = ${WRKDIR}/firefox-${V}
Index: games/0ad/base/Makefile
===================================================================
RCS file: /cvs/ports/games/0ad/base/Makefile,v
retrieving revision 1.47
diff -u -p -r1.47 Makefile
--- games/0ad/base/Makefile 16 Nov 2023 21:54:16 -0000 1.47
+++ games/0ad/base/Makefile 1 Jan 2024 06:12:01 -0000
@@ -10,13 +10,12 @@ USE_NOBTCFI = Yes
SO_VERSION = 0.0
SHARED_LIBS += mozjs78-ps-release ${SO_VERSION}

-WANTLIB += ${COMPILER_LIBCXX} SDL2 X11 boost_filesystem
-WANTLIB += boost_system c crypto curl enet execinfo fmt freetype gloox iconv
+WANTLIB += ${MODRUST_WANTLIB} ${COMPILER_LIBCXX} SDL2 X11 boost_filesystem
+WANTLIB += boost_system crypto curl enet execinfo fmt freetype gloox iconv
WANTLIB += icudata icui18n icuuc idn m miniupnpc ogg openal
WANTLIB += png sodium ssl vorbis vorbisfile xml2 z

BUILD_DEPENDS = archivers/zip \
- lang/rust,-main \
shells/bash
LIB_DEPENDS = audio/libvorbis \
audio/openal \
@@ -34,7 +33,8 @@ LIB_DEPENDS = audio/libvorbis \
textproc/libxml
RUN_DEPENDS = devel/desktop-file-utils \
games/0ad/data=${V}
-MODULES = lang/python
+MODULES = lang/python \
+ lang/rust

# gnu++17
COMPILER = base-clang ports-gcc
Index: infrastructure/mk/arch-defines.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/arch-defines.mk,v
retrieving revision 1.100
diff -u -p -r1.100 arch-defines.mk
--- infrastructure/mk/arch-defines.mk 20 Nov 2023 19:20:32 -0000 1.100
+++ infrastructure/mk/arch-defines.mk 1 Jan 2024 06:12:02 -0000
@@ -105,6 +105,10 @@ _SYSTEM_VERSION-clang = 2
_SYSTEM_VERSION-go = ${_MODGO_SYSTEM_VERSION}
.endif

+# defined in rust.port.mk; added to version for all rust arches so that
+# rust-compiled packages can be updated easily for a new rust compiler/stdlib
+_SYSTEM_VERSION-rust ?= 0
+
# @version = ${_SYSTEM_VERSION} + ${_SYSTEM_VERSION-${MACHINE_ARCH}}
_PKG_ARGS_VERSION += -V ${_SYSTEM_VERSION} -V ${_SYSTEM_VERSION-${MACHINE_ARCH}}
.if ${ARCH} != ${MACHINE_ARCH}
Index: lang/ruby/3.2/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/3.2/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- lang/ruby/3.2/Makefile 27 Dec 2023 20:06:42 -0000 1.7
+++ lang/ruby/3.2/Makefile 1 Jan 2024 06:12:02 -0000
@@ -15,7 +15,7 @@ FLAVOR?=

.if ${MACHINE_ARCH:Mamd64} || ${MACHINE_ARCH:Maarch64}
# Support YJIT JIT compiler on arches Ruby supports
-BUILD_DEPENDS += lang/rust
+MODULES += lang/rust
WANTLIB-main += c++abi
MAKE_ENV += LIBRUBY_DLDFLAGS="-lc++abi"
.endif
Index: lang/ruby/3.3/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/3.3/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- lang/ruby/3.3/Makefile 27 Dec 2023 20:04:59 -0000 1.1.1.1
+++ lang/ruby/3.3/Makefile 1 Jan 2024 06:12:02 -0000
@@ -16,7 +16,7 @@ FLAVOR?=

.if ${MACHINE_ARCH:Mamd64} || ${MACHINE_ARCH:Maarch64}
# Support YJIT JIT compiler on arches Ruby supports
-BUILD_DEPENDS += lang/rust
+MODULES += lang/rust
WANTLIB-main += c++abi
MAKE_ENV += LIBRUBY_DLDFLAGS="-lc++abi"
.endif
Index: lang/rust/rust.port.mk
===================================================================
RCS file: lang/rust/rust.port.mk
diff -N lang/rust/rust.port.mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/rust/rust.port.mk 1 Jan 2024 06:12:02 -0000
@@ -0,0 +1,29 @@
+# increment after rust compiler update to trigger updates of
+# all compiled rust packages (see arch-defines.mk)
+_SYSTEM_VERSION-rust = 1
+
+CATEGORIES += lang/rust
+
+# WANTLIB for Rust compiled code
+# it should be kept in sync with lang/rust code
+# - c/pthread : all syscalls
+# - c++abi / libgcc.a : unwind
+MODRUST_WANTLIB += c pthread
+
+.if "${MACHINE_ARCH}" != "sparc64"
+MODRUST_WANTLIB += c++abi
+.else
+# libgcc.a is static
+MODRUST_WANTLIB +=
+.endif
+
+CHECK_LIB_DEPENDS_ARGS += -S MODRUST_WANTLIB="${MODRUST_WANTLIB}"
+
+MODRUST_BUILDDEP ?= Yes
+.if ${MODRUST_BUILDDEP:L} == "yes"
+BUILD_DEPENDS += lang/rust
+.endif
+
+# Location of rustc/rustdoc binaries
+MODRUST_RUSTC_BIN = ${LOCALBASE}/bin/rustc
+MODRUST_RUSTDOC_BIN = ${LOCALBASE}/bin/rustdoc
Index: mail/meli/Makefile
===================================================================
RCS file: /cvs/ports/mail/meli/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- mail/meli/Makefile 3 Nov 2023 11:30:32 -0000 1.13
+++ mail/meli/Makefile 1 Jan 2024 06:12:02 -0000
@@ -30,7 +30,7 @@ LIB_DEPENDS = devel/pcre2 \
net/curl \
databases/sqlite3

-WANTLIB += c c++abi crypto curl m pcre2-8 pthread sqlite3 ssl
+WANTLIB += ${MODCARGO_WANTLIB} crypto curl m pcre2-8 sqlite3 ssl
PORTHOME = ${WRKDIR}

post-install:
Index: mail/stalwart/cli/Makefile
===================================================================
RCS file: /cvs/ports/mail/stalwart/cli/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- mail/stalwart/cli/Makefile 4 Sep 2023 14:01:49 -0000 1.7
+++ mail/stalwart/cli/Makefile 1 Jan 2024 06:12:02 -0000
@@ -6,6 +6,6 @@ REVISION = 1

.include "crates.inc"

-WANTLIB += c c++abi m pthread
+WANTLIB += ${MODCARGO_WANTLIB} m

.include <bsd.port.mk>
Index: mail/stalwart/imap/Makefile
===================================================================
RCS file: /cvs/ports/mail/stalwart/imap/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- mail/stalwart/imap/Makefile 4 Sep 2023 14:01:51 -0000 1.7
+++ mail/stalwart/imap/Makefile 1 Jan 2024 06:12:02 -0000
@@ -13,7 +13,7 @@ MODCARGO_CRATES += jmap-client 0.2.0 # A
MODCARGO_CRATES += mail-parser 0.7.0 # Apache-2.0 OR MIT
MODCARGO_CRATES += reqwest 0.11.11 # MIT/Apache-2.0

-WANTLIB += c c++abi pthread
+WANTLIB += ${MODCARGO_WANTLIB}

post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/stalwart/imap
Index: mail/stalwart/jmap/Makefile
===================================================================
RCS file: /cvs/ports/mail/stalwart/jmap/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- mail/stalwart/jmap/Makefile 6 Dec 2023 09:48:55 -0000 1.10
+++ mail/stalwart/jmap/Makefile 1 Jan 2024 06:12:02 -0000
@@ -29,7 +29,7 @@ MAKE_ENV += DEP_BZIP2_INCLUDE=${LOCALBAS
LIB_DEPENDS += archivers/zstd \
archivers/bzip2

-WANTLIB += ${COMPILER_LIBCXX} bz2 c m zstd
+WANTLIB += ${MODCARGO_WANTLIB} ${COMPILER_LIBCXX} bz2 m zstd

post-install:
mv ${PREFIX}/bin/export ${PREFIX}/bin/stalwart-export
Index: mail/stalwart/smtp/Makefile
===================================================================
RCS file: /cvs/ports/mail/stalwart/smtp/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- mail/stalwart/smtp/Makefile 4 Sep 2023 14:01:54 -0000 1.4
+++ mail/stalwart/smtp/Makefile 1 Jan 2024 06:12:02 -0000
@@ -22,7 +22,7 @@ MODCARGO_CRATES_KEEP += libsqlite3-sys
BUILD_DEPENDS = devel/protobuf
LIB_DEPENDS = archivers/zstd \
archivers/bzip2
-WANTLIB += bz2 c c++abi m pthread zstd
+WANTLIB += ${MOCARGO_WANTLIB} bz2 m zstd

post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/stalwart/smtp
Index: net/bore/Makefile
===================================================================
RCS file: /cvs/ports/net/bore/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- net/bore/Makefile 27 Sep 2023 14:18:01 -0000 1.8
+++ net/bore/Makefile 1 Jan 2024 06:12:02 -0000
@@ -10,7 +10,7 @@ MAINTAINER = Delan Azabani <delan@azaba
PERMIT_PACKAGE = Yes

# uses pledge(2)
-WANTLIB += c c++abi pthread
+WANTLIB += ${MODCARGO_WANTLIB}

SITES = https://bitbucket.org/delan/nonymous/get/

Index: net/dog/Makefile
===================================================================
RCS file: /cvs/ports/net/dog/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- net/dog/Makefile 27 Sep 2023 14:18:05 -0000 1.10
+++ net/dog/Makefile 1 Jan 2024 06:12:02 -0000
@@ -10,7 +10,7 @@ CATEGORIES = net
# EUPL
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi crypto pthread ssl
+WANTLIB += ${MODCARGO_WANTLIB} crypto ssl

MODULES = devel/cargo

Index: net/routinator/Makefile
===================================================================
RCS file: /cvs/ports/net/routinator/Makefile,v
retrieving revision 1.43
diff -u -p -r1.43 Makefile
--- net/routinator/Makefile 22 Sep 2023 10:21:48 -0000 1.43
+++ net/routinator/Makefile 1 Jan 2024 06:12:02 -0000
@@ -27,7 +27,7 @@ CATEGORIES = net
PERMIT_PACKAGE = Yes
PERMIT_DISTFILES = includes bundled ARIN TAL which requires agreement with https://www.arin.net/resources/manage/rpki/rpa.pdf

-WANTLIB += c c++abi m pthread
+WANTLIB += ${MODCARGO_WANTLIB} m

MODULES = devel/cargo

Index: net/synapse/Makefile
===================================================================
RCS file: /cvs/ports/net/synapse/Makefile,v
retrieving revision 1.68
diff -u -p -r1.68 Makefile
--- net/synapse/Makefile 13 Dec 2023 08:06:50 -0000 1.68
+++ net/synapse/Makefile 1 Jan 2024 06:12:02 -0000
@@ -17,7 +17,7 @@ PERMIT_PACKAGE = Yes
MODULES = devel/cargo \
lang/python

-WANTLIB += ${COMPILER_LIBCXX}
+WANTLIB += ${MODCARGO_WANTLIB}

MODPY_PYBUILD = poetry-core

Index: security/clamav/Makefile
===================================================================
RCS file: /cvs/ports/security/clamav/Makefile,v
retrieving revision 1.166
diff -u -p -r1.166 Makefile
--- security/clamav/Makefile 26 Oct 2023 06:40:00 -0000 1.166
+++ security/clamav/Makefile 1 Jan 2024 06:12:02 -0000
@@ -21,7 +21,6 @@ WANTLIB += mspack pcre2-8 ssl util xml2

COMPILER= base-clang ports-gcc

-BUILD_DEPENDS= lang/rust
LIB_DEPENDS= archivers/bzip2 \
archivers/libmspack \
devel/json-c \
@@ -33,7 +32,8 @@ TEST_DEPENDS= security/clamav

SITES= https://www.clamav.net/downloads/production/

-MODULES= devel/cmake
+MODULES= devel/cmake \
+ lang/rust
CONFIGURE_ARGS= -DCLAMAV_USER=_clamav \
-DCLAMAV_GROUP=_clamav \
-DENABLE_EXTERNAL_MSPACK=ON \
Index: security/py-cryptography/Makefile
===================================================================
RCS file: /cvs/ports/security/py-cryptography/Makefile,v
retrieving revision 1.78
diff -u -p -r1.78 Makefile
--- security/py-cryptography/Makefile 30 Nov 2023 13:43:59 -0000 1.78
+++ security/py-cryptography/Makefile 1 Jan 2024 06:12:03 -0000
@@ -14,7 +14,7 @@ HOMEPAGE= https://cryptography.io/
# dual: BSD or Apache 2
PERMIT_PACKAGE= Yes

-WANTLIB= ${MODPY_WANTLIB} c crypto c++abi pthread ssl
+WANTLIB= ${MODPY_WANTLIB} ${MODCARGO_WANTLIB} crypto ssl

FLAVORS= python3
FLAVOR= python3
Index: security/rbw/Makefile
===================================================================
RCS file: /cvs/ports/security/rbw/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- security/rbw/Makefile 23 Dec 2023 18:18:33 -0000 1.20
+++ security/rbw/Makefile 1 Jan 2024 06:12:03 -0000
@@ -15,7 +15,7 @@ SITES = https://git.tozt.net/rbw/snapsh
# MIT X11
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi crypto m pthread ssl
+WANTLIB += ${MODCARGO_WANTLIB} crypto m ssl

DISTFILES += ${DISTNAME}${EXTRACT_SUFX}

Index: security/sn0int/Makefile
===================================================================
RCS file: /cvs/ports/security/sn0int/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- security/sn0int/Makefile 4 Sep 2023 13:02:47 -0000 1.22
+++ security/sn0int/Makefile 1 Jan 2024 06:12:03 -0000
@@ -17,7 +17,7 @@ PERMIT_PACKAGE = Yes

# uses pledge()
LIB_DEPENDS = databases/sqlite3 security/libsodium ${MODLUA_LIB_DEPENDS}
-WANTLIB += c c++abi m pthread sqlite3 sodium ${MODLUA_WANTLIB}
+WANTLIB += m sqlite3 sodium ${MODLUA_WANTLIB} ${MODCARGO_WANTLIB}

MODLUA_VERSION = 5.2
MODLUA_SA = Yes
Index: security/suricata/Makefile
===================================================================
RCS file: /cvs/ports/security/suricata/Makefile,v
retrieving revision 1.63
diff -u -p -r1.63 Makefile
--- security/suricata/Makefile 17 Dec 2023 15:29:06 -0000 1.63
+++ security/suricata/Makefile 1 Jan 2024 06:12:03 -0000
@@ -21,15 +21,15 @@ PERMIT_PACKAGE= Yes
SITES = https://www.openinfosecfoundation.org/download/

# uses pledge()
-WANTLIB += ${COMPILER_LIBCXX} c elf iconv jansson lz4 m magic maxminddb
+WANTLIB += ${MODRUST_WANTLIB} ${COMPILER_LIBCXX} elf iconv jansson lz4 m magic maxminddb
WANTLIB += net pcap pcre2-8 yaml-0 z

-MODULES = lang/python
+MODULES = lang/python \
+ lang/rust

BUILD_DEPENDS = devel/py-setuptools${MODPY_FLAVOR} \
textproc/py-sphinx${MODPY_FLAVOR} \
- textproc/py-yaml${MODPY_FLAVOR} \
- lang/rust
+ textproc/py-yaml${MODPY_FLAVOR}

RUN_DEPENDS = textproc/py-yaml${MODPY_FLAVOR}

Index: sysutils/bat/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/bat/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- sysutils/bat/Makefile 13 Nov 2023 07:33:55 -0000 1.20
+++ sysutils/bat/Makefile 1 Jan 2024 06:12:03 -0000
@@ -13,7 +13,7 @@ MODULES = devel/cargo
# for riscv64 and powerpc64, please keep: cc >= 1.0.73 and libc >= 0.2.113
MODCARGO_CRATES_UPDATE = cc

-WANTLIB += c c++abi git2 m onig pthread
+WANTLIB += ${MODCARGO_WANTLIB} git2 m onig

CONFIGURE_STYLE = cargo
SEPARATE_BUILD = Yes
Index: sysutils/broot/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/broot/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- sysutils/broot/Makefile 9 Dec 2023 16:16:33 -0000 1.17
+++ sysutils/broot/Makefile 1 Jan 2024 06:12:03 -0000
@@ -11,7 +11,7 @@ HOMEPAGE = https://dystroy.org/broot/
# MIT
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi m onig pthread z
+WANTLIB += ${MODCARGO_WANTLIB} m onig z

MODULES = devel/cargo
MODCARGO_CRATES_KEEP += libgit2-sys
Index: sysutils/fclones/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/fclones/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- sysutils/fclones/Makefile 13 Nov 2023 18:54:44 -0000 1.1.1.1
+++ sysutils/fclones/Makefile 1 Jan 2024 06:12:03 -0000
@@ -9,7 +9,7 @@ MAINTAINER = Frederic Cambus <fcambus@o
# MIT
PERMIT_PACKAGE = Yes

-WANTLIB += ${MODCARGO_WANTLIB} m pthread
+WANTLIB += ${MODCARGO_WANTLIB} m

MODULES = devel/cargo

Index: textproc/amber/Makefile
===================================================================
RCS file: /cvs/ports/textproc/amber/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- textproc/amber/Makefile 30 Jan 2023 13:28:40 -0000 1.5
+++ textproc/amber/Makefile 1 Jan 2024 06:12:03 -0000
@@ -11,7 +11,7 @@ MAINTAINER = Edd Barrett <edd@openbsd.o
# MIT
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi pthread
+WANTLIB += ${MODCARGO_WANTLIB}

MODULES = devel/cargo
CONFIGURE_STYLE = cargo
Index: textproc/jless/Makefile
===================================================================
RCS file: /cvs/ports/textproc/jless/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- textproc/jless/Makefile 18 Sep 2023 23:13:30 -0000 1.9
+++ textproc/jless/Makefile 1 Jan 2024 06:12:03 -0000
@@ -10,7 +10,7 @@ CATEGORIES = textproc
# BSD
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi pthread xcb
+WANTLIB += ${MODCARGO_WANTLIB} xcb

HOMEPAGE = https://jless.io/

Index: textproc/mdbook/Makefile
===================================================================
RCS file: /cvs/ports/textproc/mdbook/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- textproc/mdbook/Makefile 30 Jan 2023 13:28:40 -0000 1.13
+++ textproc/mdbook/Makefile 1 Jan 2024 06:12:03 -0000
@@ -12,7 +12,7 @@ MAINTAINER = Edd Barrett <edd@openbsd.o
# MPL-2.0 + dependencies below.
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi m pthread
+WANTLIB += ${MODCARGO_WANTLIB} m

MODULES = devel/cargo

Index: www/castor/Makefile
===================================================================
RCS file: /cvs/ports/www/castor/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- www/castor/Makefile 27 Sep 2023 19:13:01 -0000 1.14
+++ www/castor/Makefile 1 Jan 2024 06:12:03 -0000
@@ -13,7 +13,7 @@ HOMEPAGE= https://git.sr.ht/~julienxx/c
# MIT
PERMIT_PACKAGE= Yes

-WANTLIB += c c++abi crypto gdk-3 glib-2.0 gobject-2.0 gtk-3 pthread
+WANTLIB += ${MODCARGO_WANTLIB} crypto gdk-3 glib-2.0 gobject-2.0 gtk-3
WANTLIB += ssl

SITES= https://git.sr.ht/~julienxx/
Index: www/geckodriver/Makefile
===================================================================
RCS file: /cvs/ports/www/geckodriver/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- www/geckodriver/Makefile 30 Jan 2023 13:28:40 -0000 1.13
+++ www/geckodriver/Makefile 1 Jan 2024 06:12:03 -0000
@@ -18,6 +18,6 @@ SEPARATE_BUILD = Yes
.include "modules.inc"

LIB_DEPENDS += archivers/bzip2
-WANTLIB += c c++abi m pthread bz2
+WANTLIB += ${MODCARGO_WANTLIB} m bz2

.include <bsd.port.mk>
Index: www/mozilla/mozilla.port.mk
===================================================================
RCS file: /cvs/ports/www/mozilla/mozilla.port.mk,v
retrieving revision 1.171
diff -u -p -r1.171 mozilla.port.mk
--- www/mozilla/mozilla.port.mk 19 Dec 2023 14:23:43 -0000 1.171
+++ www/mozilla/mozilla.port.mk 1 Jan 2024 06:12:03 -0000
@@ -112,7 +112,7 @@ MODMOZ_BUILD_DEPENDS += devel/nasm
.endif

# 53 needs rust
-MODMOZ_BUILD_DEPENDS += lang/rust
+MODULES += lang/rust
#1670807
MODMOZ_BUILD_DEPENDS += devel/m4

@@ -120,7 +120,7 @@ MODMOZ_WANTLIB += X11 X11-xcb Xcomposite
atk-1.0 c cairo fontconfig freetype gdk_pixbuf-2.0 \
gio-2.0 glib-2.0 gobject-2.0 harfbuzz intl m \
pango-1.0 pangocairo-1.0 sndio z xcb xcb-shm
-MODMOZ_WANTLIB += ${COMPILER_LIBCXX}
+MODMOZ_WANTLIB += ${COMPILER_LIBCXX} ${MODRUST_WANTLIB}

WANTLIB += ${MODMOZ_WANTLIB}
BUILD_DEPENDS +=${MODMOZ_BUILD_DEPENDS}
Index: www/newsboat/Makefile
===================================================================
RCS file: /cvs/ports/www/newsboat/Makefile,v
retrieving revision 1.41
diff -u -p -r1.41 Makefile
--- www/newsboat/Makefile 27 Sep 2023 19:13:04 -0000 1.41
+++ www/newsboat/Makefile 1 Jan 2024 06:12:03 -0000
@@ -12,7 +12,7 @@ MAINTAINER = Frederic Cambus <fcambus@op
# MIT
PERMIT_PACKAGE = Yes

-WANTLIB += ${COMPILER_LIBCXX} c crypto curl curses iconv intl
+WANTLIB += ${COMPILER_LIBCXX} ${MODCARGO_WANTLIB} crypto curl curses iconv intl
WANTLIB += json-c m sqlite3 ssl stfl xml2

SITES = https://www.newsboat.org/releases/$V/
Index: www/nextcloud_notify_push/Makefile
===================================================================
RCS file: /cvs/ports/www/nextcloud_notify_push/Makefile,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile
--- www/nextcloud_notify_push/Makefile 16 Dec 2023 10:14:35 -0000 1.27
+++ www/nextcloud_notify_push/Makefile 1 Jan 2024 06:12:03 -0000
@@ -27,7 +27,7 @@ MODULES = devel/cargo
.include "crates.inc"

MODCARGO_CRATES_KEEP += libsqlite3-sys
-WANTLIB += c c++abi m pthread
+WANTLIB += ${MODCARGO_WANTLIB} m

CONFIGURE_STYLE = cargo
SEPARATE_BUILD = Yes
Index: www/py-adblock/Makefile
===================================================================
RCS file: /cvs/ports/www/py-adblock/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- www/py-adblock/Makefile 22 Dec 2023 14:19:27 -0000 1.26
+++ www/py-adblock/Makefile 1 Jan 2024 06:12:03 -0000
@@ -18,7 +18,7 @@ CATEGORIES = www
# MIT
PERMIT_PACKAGE =Yes

-WANTLIB += c c++abi pthread
+WANTLIB += ${MODCARGO_WANTLIB}

MODULES = devel/cargo \
lang/python
Index: x11/alacritty/Makefile
===================================================================
RCS file: /cvs/ports/x11/alacritty/Makefile,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile
--- x11/alacritty/Makefile 3 Nov 2023 12:55:05 -0000 1.16
+++ x11/alacritty/Makefile 1 Jan 2024 06:12:03 -0000
@@ -12,7 +12,7 @@ HOMEPAGE = https://alacritty.org/
# Apache 2.0
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi fontconfig freetype m pthread util
+WANTLIB += ${MODCARGO_WANTLIB} fontconfig freetype m util
# xcb is dlopen()'d
WANTLIB += xcb

Index: x11/gnome/librsvg/Makefile
===================================================================
RCS file: /cvs/ports/x11/gnome/librsvg/Makefile,v
retrieving revision 1.216
diff -u -p -r1.216 Makefile
--- x11/gnome/librsvg/Makefile 16 Dec 2023 12:38:06 -0000 1.216
+++ x11/gnome/librsvg/Makefile 1 Jan 2024 06:12:03 -0000
@@ -27,12 +27,11 @@ MODCARGO_BUILD= No
MODCARGO_INSTALL= No
MODCARGO_TEST= No
MODPY_RUNDEP= No
-BUILD_DEPENDS= lang/rust \
- textproc/py-docutils${MODPY_FLAVOR}
+BUILD_DEPENDS= textproc/py-docutils${MODPY_FLAVOR}
PKG_ARGS= -Dold=0 -Dstable=1
MAKE_ENV += ${MODCARGO_ENV}
MAKE_FLAGS += V=1
-WANTLIB += ${COMPILER_LIBCXX} Xau Xdmcp cairo-gobject jpeg
+WANTLIB += ${MODCARGO_WANTLIB} ${COMPILER_LIBCXX} Xau Xdmcp cairo-gobject jpeg
.else
### old
REVISION= 5
Index: x11/gnome/tour/Makefile
===================================================================
RCS file: /cvs/ports/x11/gnome/tour/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- x11/gnome/tour/Makefile 8 Nov 2023 18:49:09 -0000 1.14
+++ x11/gnome/tour/Makefile 1 Jan 2024 06:12:03 -0000
@@ -13,15 +13,14 @@ DISTFILES= ${GNOME_PROJECT}-${GNOME_VER
# gnome-tour source code results in effective GPLv3+ for the resulting binary
PERMIT_PACKAGE= Yes

-WANTLIB += adwaita-1 c c++abi gio-2.0 glib-2.0 gobject-2.0 gtk-4
-WANTLIB += intl m pthread
+WANTLIB += ${MODRUST_WANTLIB} adwaita-1 gio-2.0 glib-2.0 gobject-2.0 gtk-4
+WANTLIB += intl m

MODULES= devel/meson \
+ lang/rust \
x11/gnome

MODGNOME_TOOLS= desktop-file-utils gtk-update-icon-cache
-
-BUILD_DEPENDS= lang/rust

LIB_DEPENDS= x11/gnome/libadwaita

Index: x11/xcolor/Makefile
===================================================================
RCS file: /cvs/ports/x11/xcolor/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- x11/xcolor/Makefile 30 Jan 2023 13:28:40 -0000 1.13
+++ x11/xcolor/Makefile 1 Jan 2024 06:12:03 -0000
@@ -16,7 +16,7 @@ MAINTAINER = Laurence Tratt <laurie@trat
# MIT
PERMIT_PACKAGE = Yes

-WANTLIB += c c++abi m pthread xcb xcb-shape X11 X11-xcb Xcursor
+WANTLIB += ${MODCARGO_WANTLIB} m xcb xcb-shape X11 X11-xcb Xcursor

MODULES = devel/cargo \
lang/python

Index: share/man/man5/cargo-module.5
===================================================================
RCS file: /cvs/src/share/man/man5/cargo-module.5,v
retrieving revision 1.7
diff -u -p -r1.7 cargo-module.5
--- share/man/man5/cargo-module.5 18 Aug 2023 08:22:29 -0000 1.7
+++ share/man/man5/cargo-module.5 1 Jan 2024 06:12:13 -0000
@@ -40,6 +40,7 @@ tree.
.Pp
Automates download and compilation of dependencies of a Rust project using
.Xr cargo 1 .
+.Pp
During
.Cm fetch ,
static dependencies ("crates") listed in
@@ -48,6 +49,7 @@ are downloaded using
.Ev MODCARGO_DIST_SUBDIR
as
.Ev DIST_SUBDIR .
+.Pp
During
.Cm post-extract ,
crates defined in
@@ -55,10 +57,12 @@ crates defined in
are moved to the
.Ev MODCARGO_VENDOR_DIR
directory.
+.Pp
During
.Cm post-patch ,
crate-metadata are generated using
.Pa devel/cargo-generate-vendor .
+.Pp
With
.Ev CONFIGURE_STYLE
set to
@@ -69,20 +73,19 @@ instead of the standard crates-io networ
Finally, any crates listed in
.Ev MODCARGO_CRATES_UPDATE
are updated.
+.Pp
.Ev MODCARGO_RUSTFLAGS
can be used to pass custom flags to all
.Xr rustc 1
invocations.
.Pp
-.Pa lang/rust ,
-.Pa devel/cargo
+.Pa lang/rust
+is added to
+.Ev MODULES ,
and
.Pa devel/cargo-generate-vendor
-are added to
+is added to
.Ev BUILD_DEPENDS .
-By default
-.Ev MASTER_SITES9
-is used to download the crates.
.Pp
This module defines:
.Bl -tag -width MODCARGO_INSTALL_TARGET_PATH
@@ -110,11 +113,9 @@ Defaults to
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 .
+It is a copy of
+.Ev MODRUST_WANTLIB
+provided for simplicity.
.El
.Pp
This module adds three
Index: share/man/man5/port-modules.5
===================================================================
RCS file: /cvs/src/share/man/man5/port-modules.5,v
retrieving revision 1.266
diff -u -p -r1.266 port-modules.5
--- share/man/man5/port-modules.5 14 Sep 2023 03:53:26 -0000 1.266
+++ share/man/man5/port-modules.5 1 Jan 2024 06:12:13 -0000
@@ -978,6 +978,20 @@ See
.It lang/ruby
See
.Xr ruby-module 5 .
+.It lang/rust
+Ports using Rust must use this module so a rebuild can be triggered via
+.Ev SYSTEM_VERSION-rust
+on updates of the lang/rust port or changes to the Rust standard library.
+Sets
+.Ev MODRUST_WANTLIB
+as appropriate for the architecture so it can be added to
+.Ev WANTLIB .
+It adds lang/rust to the
+.Ev BUILD_DEPENDS
+unless
+.Ev MODRUST_BUILDDEP
+is set to anything but
+.Dq yes .
.It lang/tcl
Sets
.Ev MODTCL_VERSION ,

No comments:

Post a Comment