On Wed, Jan 20 2021, Bjorn Ketelaars <[email protected]> wrote:
> (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.

As far as I know, programs written in OCaml should run without the OCaml
runtime installed on ${OCAML_NATIVE_ARCHS}, currently i386 and amd64.
Except for OCaml programs that make direct use of the OCaml runtime, of
course... But the rundep is still needed on non-native archs.

> 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?

Your diff makes sense I think, but you can't just use it to
disable the run-dep in net/unison: you'd break unison installs on
non-native archs.

> 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}"
>  
>

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to