git: f59bb61e1eb4 - main - lib: hook libder up to the build

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Wed, 01 Jan 2025 21:11:35 UTC
The branch main has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=f59bb61e1eb4d1e4fc3c60cc14779d0668267cb2

commit f59bb61e1eb4d1e4fc3c60cc14779d0668267cb2
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2025-01-01 21:10:27 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2025-01-01 21:11:06 +0000

    lib: hook libder up to the build
    
    libder will be used in upcoming ECC support in the pkg(7) bootstrap to
    read DER-encoded keys and signatures.
    
    Differential Revision:  https://reviews.freebsd.org/D48116
---
 lib/Makefile             |  1 +
 lib/libder/Makefile      | 13 +++++++++++++
 share/mk/src.libnames.mk |  4 ++++
 3 files changed, 18 insertions(+)

diff --git a/lib/Makefile b/lib/Makefile
index af0079978075..1f69b4208738 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -15,6 +15,7 @@ SUBDIR_BOOTSTRAP= \
 	libc++ \
 	libc++experimental \
 	libcxxrt \
+	libder \
 	libdiff \
 	libelf \
 	libssp \
diff --git a/lib/libder/Makefile b/lib/libder/Makefile
new file mode 100644
index 000000000000..bdd2225f0ff3
--- /dev/null
+++ b/lib/libder/Makefile
@@ -0,0 +1,13 @@
+
+LIB=	der
+INTERNALLIB=
+
+.PATH:	${SRCTOP}/contrib/libder/libder
+SRCS+=	libder.c \
+	libder_error.c \
+	libder_obj.c \
+	libder_read.c \
+	libder_type.c \
+	libder_write.c
+
+.include <bsd.lib.mk>
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index 786ad9a6f9a5..f693e3ae7c16 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -44,6 +44,7 @@ _INTERNALLIBS=	\
 		bsnmptools \
 		c_nossp_pic \
 		cron \
+		der \
 		diff \
 		elftc \
 		fdt \
@@ -614,6 +615,9 @@ LIBTELNET?=	${LIBTELNETDIR}/libtelnet${PIE_SUFFIX}.a
 LIBCRONDIR=	${_LIB_OBJTOP}/usr.sbin/cron/lib
 LIBCRON?=	${LIBCRONDIR}/libcron${PIE_SUFFIX}.a
 
+LIBDERDIR=	${_LIB_OBJTOP}/lib/libder
+LIBDER?=	${LIBDERDIR}/libder${PIE_SUFFIX}.a
+
 LIBNTPDIR=	${_LIB_OBJTOP}/usr.sbin/ntp/libntp
 LIBNTP?=	${LIBNTPDIR}/libntp${PIE_SUFFIX}.a