git: 9d4980893f8e - 2022Q4 - security/heimdal: Fix build

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 17 Nov 2022 04:27:47 UTC
The branch 2022Q4 has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9d4980893f8e09acd8e8d828ac5d0db21493f6a8

commit 9d4980893f8e09acd8e8d828ac5d0db21493f6a8
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-11-17 01:34:53 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-11-17 04:27:36 +0000

    security/heimdal: Fix build
    
    Three problems were discovered when building under poudriere or in
    a clean jail.
    
    1. Python is now a prerequisite.
    
    2. liblockfile is now needed.
    
    3. clang-format is needed for asn1_compile. Unfortunately the base llvm
       does not install clang-format so we need install $LLVM_DEFAULT to get
       this file.
    
    PR:             267814
    Reported by:    many
    Fixes:          83f79ba0e0ca
    
    (cherry picked from commit a5523d807d01b1ed31614f346db2b348d7046420)
---
 security/heimdal/Makefile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile
index f4d38c3ec0d4..14956859a0b2 100644
--- a/security/heimdal/Makefile
+++ b/security/heimdal/Makefile
@@ -13,10 +13,16 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 CONFLICTS=	krb5 krb5-*
 
 USES=		cpe gettext-runtime gssapi:bootstrap,heimdal libtool pathfix \
-		pkgconfig readline makeinfo ssl
+		pkgconfig python readline makeinfo ssl
 CPE_VENDOR=	${PORTNAME}_project
 USE_LDCONFIG=	${GSSAPILIBDIR}
 
+# Needs clang-format which is only provided by the port.
+# Else asm1_fails resulting in a command not found error.
+BUILD_DEPENDS=	clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT}
+
+LIB_DEPENDS=	liblockfile.so:devel/liblockfile
+
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	ac_cv_header_fnmatch_h=yes \
 		ac_cv_header_db_h=no \
@@ -39,7 +45,8 @@ CONFIGURE_ARGS=	--with-berkeley-db \
 		--enable-pthread-support \
 		--with-readline="${LOCALBASE}" \
 		--with-hdbdir="/var/${PORTNAME}" \
-		--sysconfdir="${PREFIX}/etc"
+		--sysconfdir="${PREFIX}/etc" \
+		CLANG_FORMAT="${LOCALBASE}/bin/clang-format${LLVM_DEFAULT}"
 # XXX --with-readline picks up libreadline even if found in /usr/lib.
 MAKE_ENV=	INSTALL_CATPAGES=no
 INSTALL_TARGET=	install-strip