git: 1fbe8feadf59 - main - lang/rust: Documentation installation fix.

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Tue, 20 Jun 2023 10:29:20 UTC
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1fbe8feadf597e617d28e3d86fd7cf5cb3b0af77

commit 1fbe8feadf597e617d28e3d86fd7cf5cb3b0af77
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2023-06-20 10:26:46 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-06-20 10:29:14 +0000

    lang/rust: Documentation installation fix.
    
    Add the missing  _COMPONENTS for the documentation.
    
    Differential Revision:  https://reviews.freebsd.org/D40510
---
 lang/rust/Makefile | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index 0db68e50d2c8..0cac87ed77a5 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	rust
 PORTVERSION?=	1.70.0
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES=	lang
 MASTER_SITES=	https://static.rust-lang.org/dist/:src \
 		https://dev-static.rust-lang.org/dist/:src \
@@ -50,15 +50,14 @@ TMPDIR?=	${WRKDIR}
 
 OPTIONS_DEFINE=		DOCS GDB SOURCES WASM
 OPTIONS_DEFAULT=	SOURCES WASM
-.if !defined(NIGHTLY_DATE)
-OPTIONS_EXCLUDE=	DOCS # https://github.com/rust-lang/rust/issues/76526
-.endif
 
 GDB_DESC=	Install ports gdb (necessary for debugging rust programs)
 SOURCES_DESC=	Install source files
 WASM_DESC=	Build the WebAssembly target (wasm32-unknown-unknown)
 
-DOCS_VARS=		_RUST_BUILD_DOCS=true
+DOCS_VARS=		_RUST_BUILD_DOCS=true \
+			_COMPONENTS+="rust-docs-${_PACKAGE_VERS}-${_RUST_TARGET} rust-docs-json-${_PACKAGE_VERS}-${_RUST_TARGET}" \
+			_RUST_TOOLS+=rustdoc
 DOCS_VARS_OFF=		_RUST_BUILD_DOCS=false
 GDB_RUN_DEPENDS=	${LOCALBASE}/bin/gdb:devel/gdb
 SOURCES_VARS=		_COMPONENTS+=rust-src-${_PACKAGE_VERS} \
@@ -120,6 +119,10 @@ _COMPONENTS+=	rls-${_PACKAGE_VERS}-${_RUST_TARGET}
 _COMPONENTS+=	rustc-dev-${_PACKAGE_VERS}-${_RUST_TARGET}
 .endif
 
+.if ${PORT_OPTIONS:MWASM} && ${PORT_OPTIONS:MDOCS}
+_COMPONENTS+=	rust-docs-${_PACKAGE_VERS}-wasm32-unknown-unknown rust-docs-json-${_PACKAGE_VERS}-wasm32-unknown-unknown
+.endif
+
 # If the kernel does not return sane kern.proc.pathname values
 # for hardlinks then disable hardlinks in the build to avoid
 # intermittent "can't find crate for `std`" build failures,