Re: a few observations with 15-prerelease as of early this week

From: Marcin Cieslak <saper_at_saper.info>
Date: Sun, 31 Aug 2025 19:50:45 UTC
On Sun, 31 Aug 2025, Lexi Winter wrote:

> Herbert:
>> Yes, it's broken. The problematic part:
>>
>> GSSAPI_MIT_VARS_OFF=    KRB5CONF=${HEIMDAL_HOME}/bin/krb5-config
>>
>> and on main HEIMDAL_HOME is empty.
>>
>> Maybe we need an OSVERSION check fpr this line?
>
> you can't use OSVERSION to check for this because the user can build
> 15.0 with Heimdal instead of MIT Kerberos.  instead, check for the
> existence of /usr/libdata/pkgconfig/mit-krb5.pc; for example, from
> www/squid:
>
> .if exists(/usr/libdata/pkgconfig/mit-krb5.pc)
> GSSAPI_BASE_CONFIGURE_ON+=      --with-mit-krb5=${GSSAPIBASEDIR}
> .else
> GSSAPI_BASE_CONFIGURE_ON+=      --with-heimdal-krb5=${GSSAPIBASEDIR}
> .endif

I think Mk/Uses/gssapi.mk does this check for us already and sets
KRB5CONFIG as well as GSSAPICPPFLAGS GSSAPILIBS GSSAPILDFLAGS accordingly.

So probably there is no need to set GSSAPI_MIT_VARS or GSSAPI_MIT_VARS_OFF
just do

post-patch:
 	@${REINPLACE_CMD} -e 's|%%KRB5CONF%%|${KRB5CONFIG}|g' ${WRKSRC}/Makefile.PL

It should be simpler and still compatible with older FreeBSD versions.