Port OPTIONS advice

Mathieu Arnold mat at freebsd.org
Fri May 22 08:30:13 UTC 2020


On Wed, May 20, 2020 at 07:25:00PM +0200, SirDice wrote:
> What's a good way to deal with this sort of architecture dependent option?

If the feature is architecture dependant but also needs to be disabled
on architectures where it does not work, a naive way that I can see to
do it is probably to do something like this:

OPTIONS_DEFINE=	JIT
OPTIONS_EXCLUDE_aarch64=  JIT
OPTIONS_EXCLUDE_armv6=	JIT

But you have to do it for all architectures, so it may not be the best
way, a way that would be a bit more convoluted, but still readable would
be:

OPTIONS_DEFINE=	JIT
OPTIONS_EXCLUDE=  ${ARCH:Ni386:Namd64:C/.+/JIT/}

What it does is take ARCH, remove i386 and amd64 from it, and there is
still something, replace it with JIT.

-- 
Mathieu Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20200522/6b08f6aa/attachment.sig>


More information about the freebsd-ports mailing list