diff --git a/net/kerberos5/Portfile b/net/kerberos5/Portfile index 642f6f801bc..4f4d993d38f 100644 --- a/net/kerberos5/Portfile +++ b/net/kerberos5/Portfile @@ -44,6 +44,7 @@ worksrcdir ${worksrcdir}/src patchfiles patch-util__verto__Makefile.in-use-nonzero-compat-version.diff \ patch-config__shlib.conf-do-not-pass-dylib-file-ldflags.diff \ patch-lib_rpc_Makefile.in-explicitly-link-krb5support.diff \ + autoconf-2.73.patch \ no-Werror.patch \ udppktinfo.c.patch diff --git a/net/kerberos5/files/autoconf-2.73.patch b/net/kerberos5/files/autoconf-2.73.patch new file mode 100644 index 00000000000..ee283ebe8dc --- /dev/null +++ b/net/kerberos5/files/autoconf-2.73.patch @@ -0,0 +1,74 @@ +Make configure.ac work with autoconf 2.73 + +autoreconf requires "AC_INIT" to appear in configure.ac. Prior to autoconf 2.73, +our indirect invocation via K5_AC_INIT() was sufficient, but now the regular +expression match checks for word boundaries. Get rid of K5_AC_INIT(), moving the +version extraction code from aclocal.m4 to a new file version.m4. In the moved +versioning code, use m4_fatal() to simplify error handling. + +Fixes: + +autoreconf: error: configure.ac: AC_INIT not found; not an autoconf script? + +https://krbdev.mit.edu/rt/Ticket/Display.html?id=9202 +https://github.com/krb5/krb5/commit/b7290e0cab5b7e39cd4aa7c098beb18a886d4a1d +--- aclocal.m4 ++++ aclocal.m4 +@@ -16,30 +16,6 @@ ac_config_fragdir=$ac_reltopdir/config + AC_CONFIG_AUX_DIR(K5_TOPDIR/config) + ])dnl + dnl +-dnl Version info. +-dnl +-pushdef([x],esyscmd([sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p' < ]K5_TOPDIR/patchlevel.h)) +-define([PL_KRB5_MAJOR_RELEASE],regexp(x,[KRB5_MAJOR_RELEASE=\(.*\)],[\1])) +-ifelse(PL_KRB5_MAJOR_RELEASE,,[errprint([Can't determine KRB5_MAJOR_RELEASE value from patchlevel.h. +-]) m4exit(1) dnl sometimes that does not work? +-builtin(m4exit,1)]) +-define([PL_KRB5_MINOR_RELEASE],regexp(x,[KRB5_MINOR_RELEASE=\(.*\)],[\1])) +-ifelse(PL_KRB5_MINOR_RELEASE,,[errprint([Can't determine KRB5_MINOR_RELEASE value from patchlevel.h. +-]) m4exit(1) dnl sometimes that does not work? +-builtin(m4exit,1)]) +-define([PL_KRB5_PATCHLEVEL],regexp(x,[KRB5_PATCHLEVEL=\(.*\)],[\1])) +-ifelse(PL_KRB5_PATCHLEVEL,,[errprint([Can't determine KRB5_PATCHLEVEL value from patchlevel.h. +-]) m4exit(1) dnl sometimes that does not work? +-builtin(m4exit,1)]) +-define([PL_KRB5_RELTAIL],regexp(x,[KRB5_RELTAIL="\(.*\)"],[\1])) +-dnl RELTAIL is allowed to not be defined. +-popdef([x]) +-define([K5_VERSION],PL_KRB5_MAJOR_RELEASE.PL_KRB5_MINOR_RELEASE[]ifelse(PL_KRB5_PATCHLEVEL,0,,.PL_KRB5_PATCHLEVEL)ifelse(PL_KRB5_RELTAIL,,,-PL_KRB5_RELTAIL)) +-define([K5_BUGADDR],krb5-bugs@mit.edu) +-define([K5_AC_INIT],[AC_INIT(Kerberos 5, K5_VERSION, K5_BUGADDR, krb5) +-AC_CONFIG_SRCDIR($1) +-build_dynobj=no]) +-dnl + dnl drop in standard rules for all configure files -- CONFIG_RULES + dnl + AC_DEFUN(CONFIG_RULES,[dnl +--- configure.ac ++++ configure.ac +@@ -1,4 +1,6 @@ +-K5_AC_INIT([aclocal.m4]) ++m4_include([version.m4]) ++AC_INIT(Kerberos 5, K5_VERSION, K5_BUGADDR, krb5) ++AC_CONFIG_SRCDIR([aclocal.m4]) + + # If $runstatedir isn't set by autoconf (<2.70), set it manually. + if test x"$runstatedir" = x; then +--- /dev/null ++++ version.m4 +@@ -0,0 +1,14 @@ ++define([K5_TOPDIR],[.])dnl ++dnl ++pushdef([x],esyscmd([sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p' < ]K5_TOPDIR/patchlevel.h)) ++define([PL_KRB5_MAJOR_RELEASE],regexp(x,[KRB5_MAJOR_RELEASE=\(.*\)],[\1])) ++ifelse(PL_KRB5_MAJOR_RELEASE,,[m4_fatal([Can't determine KRB5_MAJOR_RELEASE value from patchlevel.h.])]) ++define([PL_KRB5_MINOR_RELEASE],regexp(x,[KRB5_MINOR_RELEASE=\(.*\)],[\1])) ++ifelse(PL_KRB5_MINOR_RELEASE,,[m4_fatal([Can't determine KRB5_MINOR_RELEASE value from patchlevel.h.])]) ++define([PL_KRB5_PATCHLEVEL],regexp(x,[KRB5_PATCHLEVEL=\(.*\)],[\1])) ++ifelse(PL_KRB5_PATCHLEVEL,,[m4_fatal([Can't determine KRB5_PATCHLEVEL value from patchlevel.h.])]) ++define([PL_KRB5_RELTAIL],regexp(x,[KRB5_RELTAIL="\(.*\)"],[\1])) ++dnl RELTAIL is allowed to not be defined. ++popdef([x]) ++m4_define([K5_VERSION],PL_KRB5_MAJOR_RELEASE.PL_KRB5_MINOR_RELEASE[]ifelse(PL_KRB5_PATCHLEVEL,0,,.PL_KRB5_PATCHLEVEL)ifelse(PL_KRB5_RELTAIL,,,-PL_KRB5_RELTAIL)) ++m4_define([K5_BUGADDR],krb5-bugs@mit.edu) diff --git a/net/kerberos5/files/no-Werror.patch b/net/kerberos5/files/no-Werror.patch index 2ef5d110295..8742bb412e1 100644 --- a/net/kerberos5/files/no-Werror.patch +++ b/net/kerberos5/files/no-Werror.patch @@ -1,6 +1,6 @@ ---- aclocal.m4.orig 2026-01-30 10:18:10 -+++ aclocal.m4 2026-03-15 02:31:20 -@@ -475,10 +475,6 @@ +--- aclocal.m4 ++++ aclocal.m4 +@@ -451,10 +451,6 @@ dnl get reported as errors? AC_DEFUN(CHECK_CC_WARNING_TEST_FLAGS,[dnl cflags_warning_test_flags= @@ -11,7 +11,7 @@ ])dnl dnl AC_DEFUN(TRY_WARN_CC_FLAG,[dnl -@@ -548,7 +544,7 @@ +@@ -524,7 +520,7 @@ TRY_WARN_CC_FLAG(-Wno-format-zero-length) # Other flags here may not be supported on some versions of # gcc that people want to use. @@ -20,7 +20,7 @@ TRY_WARN_CC_FLAG(-W$flag) done # old-style-definition? generates many, many warnings -@@ -565,10 +561,7 @@ +@@ -541,10 +537,7 @@ # We're currently targeting C89+, not C99, so disallow some # constructs. for flag in declaration-after-statement ; do @@ -31,7 +31,7 @@ done # We require function declarations now. # -@@ -577,10 +570,6 @@ +@@ -553,10 +546,6 @@ # version doesn't cause implicitly declared functions to be # flagged as errors. If neither works, -Wall implies # -Wimplicit-function-declaration so don't bother.