pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/security/mit-krb5



Module Name:    pkgsrc
Committed By:   gdt
Date:           Thu May  1 11:32:44 UTC 2025

Modified Files:
        pkgsrc/security/mit-krb5: Makefile

Log Message:
security/mit-krb5:  Adjust compiler requirements and force gnu99

Compiler requirements were specified incorrectly (likely unchanged
since before compiler requirements were improved to handle langugage
family members).  By code reading and experimentation, determine that
C++ is not used and that the C requirement is C99.

Upstream doesn't set --std, and thus has UB; a compiler might default
to some more recent C variant that doesn't allow something in the
existing code, and gcc15 defaults to C23.

Further strdup(3) is used, and Linux hides that (despite it being in
POSIX 2001), somehow making it available if in gnu99 mode.

Therefore, force --std=gnu99.  This replaces a previous gcc15
workround.

As discussed on tech-pkg@.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 pkgsrc/security/mit-krb5/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/mit-krb5/Makefile
diff -u pkgsrc/security/mit-krb5/Makefile:1.122 pkgsrc/security/mit-krb5/Makefile:1.123
--- pkgsrc/security/mit-krb5/Makefile:1.122     Tue Apr 29 12:51:48 2025
+++ pkgsrc/security/mit-krb5/Makefile   Thu May  1 11:32:44 2025
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.122 2025/04/29 12:51:48 tnn Exp $
+# $NetBSD: Makefile,v 1.123 2025/05/01 11:32:44 gdt Exp $
 
 BRANCHNAME=    1.21
 DISTNAME=      krb5-${BRANCHNAME}.3
 PKGNAME=       mit-${DISTNAME}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    security
 # It is not clear how stable this URL scheme is.
 MASTER_SITES=  http://web.mit.edu/kerberos/dist/krb5/${BRANCHNAME}/
@@ -34,7 +34,15 @@ BUILD_TARGET=        generate-files-mac all
 CONFLICTS+=    heimdal-[0-9]*
 CONFLICTS+=    kth-krb4-[0-9]*
 
-USE_LANGUAGES=         c c++
+USE_LANGUAGES=         c
+# Upstream does not document the language variant.  It appears to be
+# c99, and configure checks for that.  The code uses strdup(3):
+# https://pubs.opengroup.org/onlinepubs/9799919799/functions/strdup.html
+# and that's hidden by default on Linux, with gnu99 making it visible.
+USE_CC_FEATURES+=      gnu99
+# Further, the build fails in c23 mode, 
+FORCE_C_STD=           gnu99
+
 USE_LIBTOOL=           yes
 GNU_CONFIGURE=         yes
 USE_TOOLS+=            autoconf bison gzip m4 msgfmt perl
@@ -82,11 +90,6 @@ INSTALLATION_DIRS=   bin include/gssapi in
 
 .include "../../mk/compiler.mk"
 
-.if !empty(CC_VERSION:Mgcc-15)
-# mit-krb5 is not C23 compliant & needs too many patches to make it compile.
-CFLAGS+=               -std=gnu17 # reduced from gnu23
-.endif
-
 .include "options.mk"
 
 pre-configure:



Home | Main Index | Thread Index | Old Index