On Mon, 12 Jan 2026 19:44:41 +0000 Christian Ullrich wrote:
> Hello,
> 
> 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).
> 
> I tried wrapping the entire OPTIONS block in
> 
>       .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1500054
> 
> , but that needs <bsd.port.options.mk> for OSVERSION, and that in turn 
> must come _after_ the OPTIONS block. Using <bsd.port.pre.mk> instead 
> does not work either; it breaks make config (or in my case, poudriere 
> options), the options just aren't set anymore.
> 
> I also tried
> 
>       .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1500054
>       GSSAPI_BASE_IGNORE=     Needs MIT Kerberos in base
>       .endif
> 
> , and that has the same problem: If it is after <bsd.port.options.mk> it 
> does not work, and if it is before, I don't have OPSYS and/or OSVERSION.
> 
> Is there a way to do this, or perhaps a much better solution I have not 
> thought of, and should I even spend more time working on it with 14.3 
> going out of support in five months?
> 
> Thanks for any help.

To exclude entire major versions you can use:

OPTIONS_EXCLUDE_FreeBSD_13=     GSSAPI_BASE
OPTIONS_EXCLUDE_FreeBSD_14=     GSSAPI_BASE

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

Reply via email to