On 2026-01-13 19:58, Christian Ullrich wrote:
* Tijl Coosemans wrote:

On Mon, 12 Jan 2026 19:44:41 +0000 Christian Ullrich wrote:
I'm trying to give www/mod_auth_gssapi support for MIT Kerberos in base
on FreeBSD 15+. That part is actually easy, but what I cannot figure out
is how to treat earlier versions.

What I would like to do is either not offer the option at all or, if
that is not possible, IGNORE if the GSSAPI_BASE option is set and the
system does not have MIT Kerberos in base (OSVERSION < 1500054).
To exclude entire major versions you can use:

OPTIONS_EXCLUDE_FreeBSD_13=     GSSAPI_BASE
OPTIONS_EXCLUDE_FreeBSD_14=     GSSAPI_BASE
This works, but the error is too cryptic. It just says none of the
OPTIONS_SINGLE options was selected when really the selected one is gone.

Yes, it is exactly what I stated as my primary goal above (not offer the
option), but I realize now what I really wanted was to offer _no_
options, falling back to just USES=gssapi:mit,flags as before.

For more complicated cases you can set IGNORE like this:

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGSSAPI_BASE} && ${OPSYS} == FreeBSD && ${OSVERSION} < 
1500054
IGNORE=         Needs MIT Kerberos in base
.endif
Much nicer, although it lets the user select the inapplicable option
first and refuses to work only after that. Too bad.

Thank you!

..expanded variant of this approach.
https://github.com/diizzyy/ports-overlay/blob/main/ftp/curl/Makefile#L44

Best regards,
Daniel


Reply via email to