Pass options to dependency

Eugene Grosbein eugen at
Mon Jun 5 13:11:30 UTC 2017

05.06.2017 18:51, Matthew Seaman пишет:
> On 05/06/2017 10:56, Eugene Grosbein wrote:
>> How can a port (its Makefile) pass a build option to BUILD_DEPENDS?
>> For example, devel/ragel has:
>> DOCS_USE=               TEX=latex:build
>> DOCS_BUILD_DEPENDS=     fig2dev:print/transfig
>> And "make -C /usr/ports/devel/ragel all-depends-list" shows HUGE
>> list of its dependencies completely unneded for a port that just
>> needs to use BUILD_DEPENDS=ragel:devel/ragel
>> The reason is that includes PORT_OPTIONS+=  DOCS
>> unless user option NOPORTDOCS is set.
>> Is it possible to specify something like OPTIONS_EXCLUDE=DOCS
>> for BUILD_DEPENDS entity?
> Generally what you would do is create a slave port of the dependency
> with the options settings you require.  Doing this to turn off the DOCS
> option would be unprecedented though.
> I believe the consensus nowadays is that DOCS should control installing
> documentation that takes little or no effort to generate.  If you need
> to install a huge dependency tree in order to generate documentation,
> then that should be controlled using a different option.  Whether to
> have that option default to either ON or OFF is at the discretion of the
> maintainer.
> So my advice here is open a PR to get devel/ragel modified, and in the
> mean time try and ignore all those unwanted dependencies while you work
> on your own port.

It would be more useful to have general way to build a dependency
with needed set of options or at least introduce NODEPDOCS
similar to NOPORTDOCS, wouldn't it?

Eugene Grosbein

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-ports mailing list