From: semarie Date: Mon, 1 Jan 2024 14:16:59 +0000 (+0000) Subject: update devel/cargo and lang/rust ports-module documentation X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=eca194ed996f60999919399225431de3f129795e;p=openbsd update devel/cargo and lang/rust ports-module documentation with help and ok tb@ --- diff --git a/share/man/man5/cargo-module.5 b/share/man/man5/cargo-module.5 index c015074063e..fb2787eed06 100644 --- a/share/man/man5/cargo-module.5 +++ b/share/man/man5/cargo-module.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cargo-module.5,v 1.7 2023/08/18 08:22:29 tb Exp $ +.\" $OpenBSD: cargo-module.5,v 1.8 2024/01/01 14:16:59 semarie Exp $ .\" .\" Copyright (c) 2008 Marc Espie .\" Copyright (c) 2017 Daniel Jakots @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: August 18 2023 $ +.Dd $Mdocdate: January 1 2024 $ .Dt CARGO-MODULE 5 .Os .Sh NAME @@ -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 network source. 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 diff --git a/share/man/man5/port-modules.5 b/share/man/man5/port-modules.5 index cba4da4c1c2..2d6a46c514a 100644 --- a/share/man/man5/port-modules.5 +++ b/share/man/man5/port-modules.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: port-modules.5,v 1.266 2023/09/14 03:53:26 bentley Exp $ +.\" $OpenBSD: port-modules.5,v 1.267 2024/01/01 14:16:59 semarie Exp $ .\" .\" Copyright (c) 2008 Marc Espie .\" @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: September 14 2023 $ +.Dd $Mdocdate: January 1 2024 $ .Dt PORT-MODULES 5 .Os .Sh NAME @@ -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 ,