aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorriggs <riggs@FreeBSD.org>2016-07-03 03:06:34 +0800
committerriggs <riggs@FreeBSD.org>2016-07-03 03:06:34 +0800
commitce80a27d61c0f58416da003c5adbf1f1806aec49 (patch)
tree7f16220ad7210aef9e6fd4260fcc4fa9c5577abc /lang
parent69171e13dc95feedf8859063ec1a13d2184309dd (diff)
downloadfreebsd-ports-gnome-ce80a27d61c0f58416da003c5adbf1f1806aec49.tar.gz
freebsd-ports-gnome-ce80a27d61c0f58416da003c5adbf1f1806aec49.tar.zst
freebsd-ports-gnome-ce80a27d61c0f58416da003c5adbf1f1806aec49.zip
Add DOCS OPTION for html docs, bump PORTREVISION
PR: 210613 Reported by: beyert@cs.ucr.edu Reviewed by: riggs, marino, jbeich Differential Revision: https://reviews.freebsd.org/D7050
Diffstat (limited to 'lang')
-rw-r--r--lang/rust/Makefile26
-rw-r--r--lang/rust/pkg-plist5
2 files changed, 25 insertions, 6 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index f6c8051d2d98..b89eee98e5ee 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -3,6 +3,7 @@
PORTNAME= rust
PORTVERSION?= 1.9.0
+PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= http://static.rust-lang.org/dist/:src \
http://static.rust-lang.org/stage0-snapshots/:bootstrap \
@@ -60,19 +61,22 @@ PLIST_SUB+= RUST_TARGET=${RUST_TARGET}
USES= compiler gmake libedit python:2,build
HAS_CONFIGURE= yes
-CONFIGURE_ARGS= --disable-valgrind --disable-docs \
+CONFIGURE_ARGS= --disable-valgrind \
${CHOSEN_COMPILER_TYPE:Mclang:C/.+/--enable-&/} \
--mandir=${MANPREFIX}/man \
--release-channel=${RUST_CHANNEL}
+PORTDOCS= *
+
.if defined(BATCH) || defined(PACKAGE_BUILDING)
MAKE_ARGS+= VERBOSE=1
.endif
-OPTIONS_DEFINE= GDB LLNEXTGEN PORT_LLVM
+OPTIONS_DEFINE= DOCS GDB LLNEXTGEN PORT_LLVM
GDB_DESC= Install ports gdb (necessary for debugging rust programs)
LLNEXTGEN_DESC= Build with grammar verification
+DOCS_CONFIGURE_ENABLE= docs
GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb
LLNEXTGEN_BUILD_DEPENDS= LLnextgen:devel/llnextgen
@@ -141,6 +145,16 @@ pre-install:
${STAGEDIR}${PREFIX}/lib/rustlib/rust-installer-version \
${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh
+pre-install-DOCS-on:
+ @for f in manifest-rust-docs; do \
+ if test -f ${STAGEDIR}${PREFIX}/lib/rustlib/$$f; then \
+ ${SED} -E -e 's,^(dir|file:),${STAGEDIR},' \
+ < ${STAGEDIR}${PREFIX}/lib/rustlib/$$f \
+ | ${XARGS} ${RM}; \
+ fi; \
+ done
+ @${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-rust-docs
+
post-install:
@for f in manifest-rustc manifest-rust-std-${RUST_TARGET}; do \
${REINPLACE_CMD} -e 's|${STAGEDIR}||' \
@@ -156,4 +170,12 @@ post-install:
${STAGEDIR}${PREFIX}/lib/*.so \
${STAGEDIR}${PREFIX}/lib/rustlib/*/lib/*.so
+post-install-DOCS-on:
+ @for f in manifest-rust-docs; do \
+ ${REINPLACE_CMD} -e 's|${STAGEDIR}||' \
+ ${STAGEDIR}${PREFIX}/lib/rustlib/$$f; \
+ ${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/$$f.bak; \
+ done
+ @${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/rust/html/extra
+
.include <bsd.port.mk>
diff --git a/lang/rust/pkg-plist b/lang/rust/pkg-plist
index b8fd8b97c353..1a9f8e3c6495 100644
--- a/lang/rust/pkg-plist
+++ b/lang/rust/pkg-plist
@@ -39,6 +39,7 @@ lib/rustlib/components
lib/rustlib/etc/debugger_pretty_printers_common.py
lib/rustlib/etc/gdb_load_rust_pretty_printers.py
lib/rustlib/etc/gdb_rust_pretty_printing.py
+%%PORTDOCS%%lib/rustlib/manifest-rust-docs
lib/rustlib/manifest-rust-std-%%RUST_TARGET%%
lib/rustlib/manifest-rustc
lib/rustlib/rust-installer-version
@@ -93,7 +94,3 @@ lib/rustlib/%%RUST_TARGET%%/lib/libtest-%%RUST_VSN_HASH%%.rlib
lib/rustlib/%%RUST_TARGET%%/lib/libtest-%%RUST_VSN_HASH%%.so
man/man1/rustc.1.gz
man/man1/rustdoc.1.gz
-%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
-%%PORTDOCS%%%%DOCSDIR%%/LICENSE-APACHE
-%%PORTDOCS%%%%DOCSDIR%%/LICENSE-MIT
-%%PORTDOCS%%%%DOCSDIR%%/README.md