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

Mathieu Arnold mat at FreeBSD.org
Sat Jun 25 19:01:46 UTC 2016



+--On 24 juin 2016 05:59:23 +0200 Jan Beich <jbeich at vfemail.net> wrote:
| 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

This is a bad idea, it depends on an implementation detail.

Please don't do it.

-- 
Mathieu Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 949 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20160625/4d67cc51/attachment.sig>


More information about the freebsd-ports mailing list