On Sat 23/01/2021 18:22, Jeremie Courreges-Anglas wrote:
> On Sat, Jan 23 2021, Stuart Henderson <s...@spacehopper.org> wrote:
> > On 2021/01/23 13:33, Jeremie Courreges-Anglas wrote:
> >> On Fri, Jan 22 2021, Bjorn Ketelaars <b...@openbsd.org> wrote:
> >> >
> >> > Don't think so. If we are building on a non-native arch we want to make
> >> > sure that lang/ocaml is added as BDEP and RDEP, independent how
> >> > MODOCAML_RUNDEP or MODOCAML_BUILDDEP are used in a Makefile.
> >> > [...]
> >> 
> >> An OCaml port probably needs lang/ocaml at build time on *all archs*,
> >> I don't see a reason to introduce a difference between native and
> >> non-native archs *at build time*, nor do I see a good reason to ignore
> >> what a port specifies.
> >
> > Agreed, variable build dependencies per-arch sounds like it's asking for
> > trouble.
> >
> >> |  # Assume that we want to automatically add ocaml to BUILD_DEPENDS
> >> | -# and RUN_DEPENDS unless the port specifically requests not to.
> >> | +# unless the port specifically requests not to.
> >> |  MODOCAML_BUILDDEP?=     Yes
> >> | +# Same for RUN_DEPENDS, but MODOCAML_RUN_DEPENDS can take three values:
> >> | +# Yes, No or if-not-native (translates to Yes if native-code is 
> >> unsupported)
> >> |  MODOCAML_RUNDEP?=       Yes
> >> |  
> >> |  .if ${NO_BUILD:L} == no && ${MODOCAML_BUILDDEP:L} == yes
> >> |  BUILD_DEPENDS+=         ${MODOCAML_BUILD_DEPENDS}
> >> |  .endif
> >
> > I'm not totally objecting to MODOCAML_BUILDDEP=no but I'm not sure
> > there's a use for it. I'd be tempted to leave it out for now. If we
> > do that and someone does comes up with a port that wants to disable
> > build dep's later, they could just change ocaml.port.mk at the same
> > time, no need to hack around it.
> >
> > Apart from anything else port-modules(5) is already hard to read and
> > I'd be happy to avoid adding more :)
> >
> > I think MODGO_BUILDDEP can be removed from go.port.mk too, nothing
> > uses it and I don't really see how it could..
> >
> > It's used quite a lot for python, and a bit for PHP though possibly
> > not enough - this discussion made me wonder if I should change that to
> > No by default for PHP. But those are quite different to the case of
> > go or ocaml.
> 
> By default I'd prefer to have all modules behave similarly, but I can
> understand how it doesn't make sense in some situations.
> 
> >> | +.if ${MODOCAML_RUNDEP:L} == if-not-native && ${MODOCAML_NATIVE} == No
> >> | +MODOCAML_RUNDEP =       Yes
> >> | +.endif
> >> |  .if ${MODOCAML_RUNDEP:L} == yes
> >> |  RUN_DEPENDS+=           ${MODOCAML_RUN_DEPENDS}
> >> |  .endif
> >> 
> >> This implements the three choice logic suggested by sthen, doesn't
> >> affect current defaults, and only cares about the runtime dep.
> >> I hope that "if-not-native" is an improvement over "nonative".
> >
> > love the "if-not-native" wording, that's perfect :)
> 
> Great.  Here's the latest, simpler diff.  No more MODOCAML_BUILDDEP, no
> more MODOCAML_*_DEPENDS either (after all, their content was obvious).
> 
> Bjorn, still ok?  Stuart, others?

Yes, still OK.

Reply via email to