Port OPTIONS advice
Martin Neubauer
m.ne at gmx.net
Wed May 20 17:45:24 UTC 2020
How about something like:
----------------------------
OPTIONS_DEFINE_amd64= JIT
OPTIONS_DEFINE_i386= JIT
JIT_CONFIGURE_ENABLE= jit
----------------------------
On 20/05/2020 19:25, SirDice wrote:
> Hi,
>
> Some time ago I took over maintainership of fs-uae. Port itself is doing
> great but I wanted to enable the JIT option to experiment with (it builds
> but crashes the application; that's an entirely different issue though). To
> enable it I had added this:
>
> OPTIONS_DEFINE_i386= JIT
> OPTIONS_DEFINE_amd64= JIT
>
> Because the option is only available for i386/amd64 I wanted the port
> option to only show up on x86. Unfortunately the brain-dead ./configure
> script simply assumes --with-jit on all architectures. As these OPTIONS
> were only available on x86, any other ARCH never passes --without-jit to
> ./configure and thus it fails to build.
>
> The quick solution was to use OPTIONS_DEFINE= JIT and make the port option
> available everywhere. However, if you try to enable it you will run into
> build failures on Powerpc or ARM for example.
>
> I could do this:
> -----------------------------
> OPTIONS_DEFINE_i386= JIT
> OPTIONS_DEFINE_amd64= JIT
>
> .include <bsd.port.pre.mk>
>
> # JIT is not supported on non-x86
> .if ${ARCH} != amd64 && ${ARCH} != i386
> CONFIGURE_ARGS+= --without-jit
> .endif
> ----------------------------
>
> Or do something like this:
> ----------------------------
> OPTIONS_DEFINE= JIT
>
> .include <bsd.port.pre.mk>
>
> .if ${PORT_OPTIONS:MJIT}
> ONLY_FOR_ARCHS= i386 amd64
> .endif
>
> ----------------------------
>
> The JIT OPTION is off by default in all cases. But I would like to only
> have it appear on supported architectures or have some sort of sanity check
> so it doesn't get enabled on unsupported architectures. As I need to update
> the port (new version came out) I would like to fix this OPTION issue too.
>
> What's a good way to deal with this sort of architecture dependent option?
>
> Thanks for your time,
>
> Remko C.
> _______________________________________________
> freebsd-ports at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"
>
--
Any environmental problem can be solved by a good Ice Age.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20200520/301455e6/attachment.sig>
More information about the freebsd-ports
mailing list