Files
Lexi Winter ce9c325a2e krb5: Build pkgconfig files with libraries
For various reasons, trying to build 32-bit compatibility PCFILES
outside of a directory which is not a library doesn't work. Add a
new krb5/Makefile.pc with the build rule for .pc.in.pc, and use
this to build each pc file along with the library it's associated
with.

This means we automatically get 32-bit pcfiles in /usr/lib32, and
is arguably more correct anyway since if we don't build a library
for some reason, we also won't build its pcfiles.

Reviewed by:	des
Differential Revision:	https://reviews.freebsd.org/D51986
2025-08-18 19:57:59 +01:00

25 lines
757 B
PkgConfig

# Copyright (c) 2025 Lexi Winter.
#
# SPDX-License-Identifier: BSD-2-Clause OR ISC
.SUFFIXES: .pc .pc.in
.pc.in.pc:
@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
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}