git: 22a683a337ef - main - security/heimdal*: Remove LLVM_DEFAULT build prerequisite

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=22a683a337efe7169b61de8c9ec63e2c0d561891

commit 22a683a337efe7169b61de8c9ec63e2c0d561891
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-11-24 15:34:20 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-11-24 17:22:01 +0000

    security/heimdal*: Remove LLVM_DEFAULT build prerequisite
    
    Adjust ./configure to set the correct CLANG_FORMAT value when
    clang-format is not found (when none of the llvm ports are installed).
    
    PR:             267814
    Submitted by:   Tatsuki Makino <tatsuki_makino@hotmail.com>
    MFH:            2022Q4
---
 security/heimdal-devel/Makefile                 |  7 ++---
 security/heimdal-devel/files/patch-configure.ac | 15 ++++++++--
 security/heimdal/Makefile                       |  6 +---
 security/heimdal/files/patch-configure          | 39 +++++++++++++++----------
 security/heimdal/files/patch-configure.ac       | 15 ++++++++--
 5 files changed, 51 insertions(+), 31 deletions(-)

diff --git a/security/heimdal-devel/Makefile b/security/heimdal-devel/Makefile
index 1e843f71f789..7953a8364e8c 100644
--- a/security/heimdal-devel/Makefile
+++ b/security/heimdal-devel/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	heimdal
 PORTVERSION=	${HEIMDAL_COMMIT_DATE}
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 PKGNAMESUFFIX=	-devel
 HASH=		8f9c2d115
@@ -23,10 +23,7 @@ USES=		autoreconf:build cpe gettext-runtime gssapi:bootstrap,heimdal \
 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} \
-		p5-JSON>0:converters/p5-JSON
+BUILD_DEPENDS=	p5-JSON>0:converters/p5-JSON
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	ac_cv_header_fnmatch_h=yes \
diff --git a/security/heimdal-devel/files/patch-configure.ac b/security/heimdal-devel/files/patch-configure.ac
index 048b6c83b622..b616d032b93a 100644
--- a/security/heimdal-devel/files/patch-configure.ac
+++ b/security/heimdal-devel/files/patch-configure.ac
@@ -1,6 +1,15 @@
---- configure.ac.orig	2019-06-07 06:21:39 UTC
-+++ configure.ac
-@@ -153,6 +153,7 @@ AC_ARG_ENABLE(kx509, 
+--- configure.ac.orig	2022-11-17 16:55:32.000000000 -0800
++++ configure.ac	2022-11-24 07:19:25.053801000 -0800
+@@ -19,7 +19,7 @@
+ AM_PROG_CC_C_O
+ AC_PROG_CPP
+ AM_PATH_PYTHON
+-AC_CHECK_PROG(CLANG_FORMAT, clang-format, [clang-format], [no])
++AC_CHECK_PROG(CLANG_FORMAT, clang-format, [clang-format], [])
+ test "$CLANG_FORMAT" = no && CLANG_FORMAT=true
+ 
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+@@ -177,6 +177,7 @@
  if test "$enable_kx509" != no ;then
  	AC_DEFINE([KX509], 1, [Define to enable kx509.])
  fi
diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile
index 45301c01b888..6508bf471ee0 100644
--- a/security/heimdal/Makefile
+++ b/security/heimdal/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	heimdal
 PORTVERSION=	7.8.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	security
 MASTER_SITES=	https://github.com/heimdal/heimdal/releases/download/${DISTNAME}/
 
@@ -18,10 +18,6 @@ USES=		cpe gettext-runtime gssapi:bootstrap,heimdal libtool pathfix \
 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}
-
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	ac_cv_header_fnmatch_h=yes \
 		ac_cv_header_db_h=no \
diff --git a/security/heimdal/files/patch-configure b/security/heimdal/files/patch-configure
index 4ac5681271fb..090c916d35c9 100644
--- a/security/heimdal/files/patch-configure
+++ b/security/heimdal/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig	2019-06-07 06:23:13 UTC
-+++ configure
-@@ -792,6 +792,8 @@ CAPNG_CFLAGS
+--- configure.orig	2022-11-15 10:58:55.000000000 -0800
++++ configure	2022-11-24 07:15:39.173234000 -0800
+@@ -819,6 +819,8 @@
  PKG_CONFIG
  PKINIT_FALSE
  PKINIT_TRUE
@@ -9,8 +9,17 @@
  OPENLDAP_MODULE_FALSE
  OPENLDAP_MODULE_TRUE
  LIB_openldap
-@@ -15041,9 +15043,15 @@ if test "$enable_kx509" != no ;then
- $as_echo "#define KX509 1" >>confdefs.h
+@@ -14915,7 +14917,7 @@
+   done
+ IFS=$as_save_IFS
+ 
+-  test -z "$ac_cv_prog_CLANG_FORMAT" && ac_cv_prog_CLANG_FORMAT="no"
++  test -z "$ac_cv_prog_CLANG_FORMAT" && ac_cv_prog_CLANG_FORMAT=""
+ fi
+ fi
+ CLANG_FORMAT=$ac_cv_prog_CLANG_FORMAT
+@@ -16561,9 +16563,15 @@
+ printf "%s\n" "#define KX509 1" >>confdefs.h
  
  fi
 + if test "$enable_kx509" != no; then
@@ -26,7 +35,7 @@
  if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  	if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-@@ -16103,7 +16111,7 @@ case "$host" in
+@@ -17649,7 +17657,7 @@
      ;;
  *-*-freebsd*)
  	native_pthread_support=yes
@@ -35,18 +44,18 @@
  	;;
  *-*-openbsd*)
  	native_pthread_support=yes
-@@ -16339,7 +16347,7 @@ if ${ac_cv_funclib_db_create+:} false; then :
-   $as_echo_n "(cached) " >&6
- else
+@@ -17907,7 +17915,7 @@
+   printf %s "(cached) " >&6
+ else $as_nop
  
 -if eval "test \"\$ac_cv_func_db_create\" != yes" ; then
 +if eval "test \"\$ac_cv_func_db_create\" = yes" ; then
  	ac_save_LIBS="$LIBS"
- 	for ac_lib in "" $dbheader db-5 db5 db4 db3 db; do
+ 	for ac_lib in "" $dbheader db-6 db-5 db4 db3 db; do
  		case "$ac_lib" in
-@@ -16912,6 +16920,9 @@ esac
+@@ -18448,6 +18456,9 @@
  
- $as_echo "#define HAVE_NDBM 1" >>confdefs.h
+ printf "%s\n" "#define HAVE_NDBM 1" >>confdefs.h
        have_ndbm=yes
 +      if test "$db_type" = "unknown"; then
 +      db_type=ndbm
@@ -54,7 +63,7 @@
      else
  
        $as_unset ac_cv_func_dbm_firstkey
-@@ -28663,7 +28674,7 @@ fi
+@@ -30678,7 +30689,7 @@
  
  krb_cv_compile_et="no"
  krb_cv_com_err_need_r=""
@@ -62,8 +71,8 @@
 +krb_cv_compile_et_cross=yes
  if test "${COMPILE_ET}" != "no"; then
  
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compile_et has the features we need" >&5
-@@ -29176,6 +29187,10 @@ Usually this means the macro was only invoked conditio
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compile_et has the features we need" >&5
+@@ -31185,6 +31196,10 @@
  fi
  if test -z "${PKINIT_TRUE}" && test -z "${PKINIT_FALSE}"; then
    as_fn_error $? "conditional \"PKINIT\" was never defined.
diff --git a/security/heimdal/files/patch-configure.ac b/security/heimdal/files/patch-configure.ac
index 048b6c83b622..82506f13f45d 100644
--- a/security/heimdal/files/patch-configure.ac
+++ b/security/heimdal/files/patch-configure.ac
@@ -1,6 +1,15 @@
---- configure.ac.orig	2019-06-07 06:21:39 UTC
-+++ configure.ac
-@@ -153,6 +153,7 @@ AC_ARG_ENABLE(kx509, 
+--- configure.ac.orig	2022-11-15 10:56:25.000000000 -0800
++++ configure.ac	2022-11-24 07:17:10.904587000 -0800
+@@ -19,7 +19,7 @@
+ AM_PROG_CC_C_O
+ AC_PROG_CPP
+ AM_PATH_PYTHON
+-AC_CHECK_PROG(CLANG_FORMAT, clang-format, [clang-format], [no])
++AC_CHECK_PROG(CLANG_FORMAT, clang-format, [clang-format], [])
+ 
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+ 
+@@ -155,6 +155,7 @@
  if test "$enable_kx509" != no ;then
  	AC_DEFINE([KX509], 1, [Define to enable kx509.])
  fi