git: 0c13e9c3c464 - main - krb5: Install pkgconfig data
Date: Mon, 11 Aug 2025 12:09:20 UTC
The branch main has been updated by ivy:
URL: https://cgit.FreeBSD.org/src/commit/?id=0c13e9c3c4647d16d3490ff1a6d7c33b39c28260
commit 0c13e9c3c4647d16d3490ff1a6d7c33b39c28260
Author: Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2025-08-11 12:00:48 +0000
Commit: Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2025-08-11 12:08:49 +0000
krb5: Install pkgconfig data
Users of MIT Kerberos expect the MIT pkgconfig files to be installed,
and won't work without them. For example, this breaks anything that
links against libcurl (ftp/curl) when curl is built with base GSSAPI.
Reviewed by: ngie, des, cy
Differential Revision: https://reviews.freebsd.org/D51842
---
krb5/Makefile | 2 +-
krb5/Makefile.inc | 2 ++
krb5/libdata/Makefile | 44 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/krb5/Makefile b/krb5/Makefile
index c49601990c4a..e9bbcae106c1 100644
--- a/krb5/Makefile
+++ b/krb5/Makefile
@@ -1,7 +1,7 @@
SUBDIR= util .WAIT \
include .WAIT \
lib .WAIT\
- plugins libexec usr.bin usr.sbin
+ plugins libdata libexec usr.bin usr.sbin
# SUBDIR_PARALLEL=
.include <bsd.subdir.mk>
diff --git a/krb5/Makefile.inc b/krb5/Makefile.inc
index 8529ee90a2e0..5d302962208c 100644
--- a/krb5/Makefile.inc
+++ b/krb5/Makefile.inc
@@ -9,6 +9,8 @@
.include <src.opts.mk>
+KRB5_VERSION= 1.22-final
+
# MIT KRB5 uses KRB5_DIR. Heimdal uses KRB5DIR.
KRB5_SRCTOP= ${SRCTOP}/krb5
KRB5_DIR= ${SRCTOP}/crypto/krb5/src
diff --git a/krb5/libdata/Makefile b/krb5/libdata/Makefile
new file mode 100644
index 000000000000..c9a2e8e9259f
--- /dev/null
+++ b/krb5/libdata/Makefile
@@ -0,0 +1,44 @@
+# Copyright (c) 2025 Lexi Winter.
+#
+# SPDX-License-Identifier: BSD-2-Clause OR ISC
+
+.include "../Makefile.inc"
+
+.PATH: ${KRB5_DIR}/build-tools
+
+PACKAGE=kerberos-lib
+
+PCFILES=gssrpc.pc \
+ kadm-client.pc \
+ kadm-server.pc \
+ kdb.pc \
+ krb5.pc \
+ krb5-gssapi.pc \
+ mit-krb5.pc \
+ mit-krb5-gssapi.pc
+
+CLEANFILES+= ${PCFILES}
+
+.SUFFIXES: .pc .pc.in
+
+.pc.in.pc:
+ sed -e 's,@prefix@,/usr,g ; \
+ s,@exec_prefix@,$${prefix},g ; \
+ s,@libdir@,${LIBDIR},g ; \
+ s,@includedir@,${INCLUDEDIR},g ; \
+ s,@KRB5_VERSION@,${KRB5_VERSION},g ; \
+ s,@KDB5_DB_LIB@,,g ; \
+ s,@DEFCCNAME@,FILE:/tmp/krb5cc_%{uid},g ; \
+ s,@DEFKTNAME@,FILE:/etc/krb5.keytab,g ; \
+ s,@DEFCKTNAME@,FILE:/var/krb5/user/%{euid}/client.keytab,g ; \
+ s,@COM_ERR_LIB@,-lcom_err,g ;' \
+ ${.IMPSRC} > ${.TARGET}
+
+all: ${PCFILES}
+ @if ! grep -q "^PACKAGE_VERSION='${KRB5_VERSION}'$$" ${KRB5_DIR}/configure; then \
+ echo "KRB5_VERSION ${KRB5_VERSION} does not match the source:"; \
+ grep "^PACKAGE_VERSION=" ${KRB5_DIR}/configure; \
+ exit 1; \
+ fi >&2
+
+.include <bsd.lib.mk>