Any way to add USES clause depending on two options without including bsd.port.options.mk?

Jan Beich jbeich at vfemail.net
Fri Jun 24 15:14:08 UTC 2016


Yuri <yuri at rawbw.com> writes:

> I have two port options: GUI NLS.
>
> I would like to have USES=gettext only when both GUI and NLS are "on".
>
> If it was only one option, say NLS, NLS_USES=gettext would work.
>
> But what about the two options case? Is there any magic to do this
> without .include <bsd.port.options.mk> ?

Depends on the port but here're some ideas:

- Move to a common option via _IMPLIES (e.g. GPL3 in multimedia/ffmpeg)

- Nest or create custom option helpers e.g.,

    OPTIONS_DEFINE=	GUI NLS
    GUI_VARS=	NLS_USES=gettext
    
    # pkg-plist
    %%GUI%%%%NLS%%share/locale/foo/LC_MESSAGES/bar.mo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 602 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20160624/7d72c4ad/attachment.sig>


More information about the freebsd-ports mailing list