git: 8d12f4457d5e - main - security/krb5: Flavorize

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Tue, 06 Dec 2022 22:02:20 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8d12f4457d5e81a4b573351e120a6369df38873b

commit 8d12f4457d5e81a4b573351e120a6369df38873b
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-12-06 19:58:39 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-12-06 22:00:55 +0000

    security/krb5: Flavorize
    
    Replace gssapi options (MIT, HEIMDAL_PORT, HEIMDAL_BASE) with flavors.
---
 MOVED                      |  1 +
 security/pam_krb5/Makefile | 27 ++++++++++++++++-----------
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/MOVED b/MOVED
index 282219db96dd..d2cc387e8177 100644
--- a/MOVED
+++ b/MOVED
@@ -17630,3 +17630,4 @@ net-mgmt/zabbix4-frontend||2022-12-05|Requires php74 which was EOL on 2022-11-28
 math/pecl-stats2||2022-12-05|Requires php74 which was EOL on 2022-11-28
 devel/pecl-jsmin||2022-12-05|Requires php74 which was EOL on 2022-11-28
 security/py-certbot-dns-cloudxns||2022-12-06|The CloudXNS DNS service is defunct and upstream removed plugin for it
+security/pam_krb5|security/pam_krb5@mit|2022-12-06|The pam_krb5 package is now the (default) mit flavor
diff --git a/security/pam_krb5/Makefile b/security/pam_krb5/Makefile
index 3423b6e20785..d442d44666a6 100644
--- a/security/pam_krb5/Makefile
+++ b/security/pam_krb5/Makefile
@@ -6,7 +6,7 @@ MASTER_SITES=		http://archives.eyrie.org/software/kerberos/ \
 DISTNAME=		pam-krb5-${PORTVERSION:S/.r/-rc/}
 
 MAINTAINER=		cy@FreeBSD.org
-COMMENT=		Pluggable Authentication Module for Kerberos 5
+COMMENT=		Pluggable Authentication Module for ${FLAVOR:U} Kerberos 5
 WWW=		https://www.eyrie.org/~eagle/software/pam-krb5/
 
 LICENSE=		BSD3CLAUSE GPLv1+
@@ -24,19 +24,24 @@ CONFIGURE_ARGS+=	--with-krb5="${GSSAPIBASEDIR}" \
 CONFIGURE_ENV=		PATH_KRB5_CONFIG="${KRB5CONFIG}"
 INSTALL_TARGET=		install-strip
 
-OPTIONS_SINGLE=		LINK
-OPTIONS_SINGLE_LINK=	MIT HEIMDAL_BASE HEIMDAL_PORT
-OPTIONS_DEFAULT=	MIT
+FLAVORS=		mit heimdal_base heimdal_port
+FLAVOR?=		${FLAVORS:[1]}
 
-MIT_DESC=		Link against MIT Kerberos
-HEIMDAL_PORT_DESC=	Link against Heimdal in ports Kerberos
-HEIMDAL_BASE_DESC=	Link against Heimdal in base Kerberos
+.for f in ${FLAVORS:Nmit}
+${f}_PKGNAMESUFFIX=	-${f}
+.endfor
 
-MIT_USES=		gssapi:mit
-HEIMDAL_PORT_USES=	gssapi:heimdal
-HEIMDAL_BASE_USES=	gssapi:base
+.if ${FLAVOR:U} == mit
+USES=		gssapi:mit
+.elif ${FLAVOR:U} == heimdal_port
+USES=		gssapi:heimdal
+.elif ${FLAVOR:U} == heimdal_base
+USES=		gssapi:base
+.endif
+
+.include <bsd.port.pre.mk>
 
 post-install:
 	cd ${WRKSRC} && ${MAKE_CMD} install-man DESTDIR=${STAGEDIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>