(Maintainer timeout)
ocaml is currently a RDEP for all ports that are build with it. This is
unnecessary for a couple of them, i.e. net/unison. I would like to
propose the addition of MODOCAML_RUNDEP and MODOCAML_BUILDDEP, which are
modelled on python.port.mk.
Default behaviour is not changed. Setting MODOCAML_RUNDEP=No in a
Makefile excludes ocaml as RDEP.
OK?
Index: ocaml.port.mk
===================================================================
RCS file: /cvs/ports/lang/ocaml/ocaml.port.mk,v
retrieving revision 1.32
diff -u -p -r1.32 ocaml.port.mk
--- ocaml.port.mk 3 Dec 2017 11:10:10 -0000 1.32
+++ ocaml.port.mk 13 Jan 2021 10:37:47 -0000
@@ -33,8 +33,21 @@ MODOCAML_OCAMLDOC?=ocamldoc
PKG_ARGS+=-Ddynlink=0
.endif
-RUN_DEPENDS += lang/ocaml
-BUILD_DEPENDS += lang/ocaml
+MODOCAML_RUN_DEPENDS= lang/ocaml
+MODOCAML_BUILD_DEPENDS= lang/ocaml
+
+# Assume that we want to automatically add ocaml to BUILD_DEPENDS
+# and RUN_DEPENDS unless the port specifically requests not to.
+MODOCAML_BUILDDEP?= Yes
+MODOCAML_RUNDEP?= Yes
+
+.if ${NO_BUILD:L} == no && ${MODOCAML_BUILDDEP:L} == yes
+BUILD_DEPENDS+= ${MODOCAML_BUILD_DEPENDS}
+.endif
+.if ${MODOCAML_RUNDEP:L} == yes
+RUN_DEPENDS+= ${MODOCAML_RUN_DEPENDS}
+.endif
+
MAKE_ENV += OCAMLFIND_DESTDIR=${DESTDIR}${TRUEPREFIX}/lib/ocaml \
OCAMLFIND_COMMANDS="ocamldoc=${MODOCAML_OCAMLDOC}"