git: cd66237c7655 - main - devel/klib: New port: Standalone and lightweight C library

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Mon, 05 Jun 2023 15:24:05 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cd66237c76553835394d95501abc1dbdef795f90

commit cd66237c76553835394d95501abc1dbdef795f90
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-06-05 15:18:01 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-06-05 15:24:03 +0000

    devel/klib: New port: Standalone and lightweight C library
---
 devel/Makefile       |  1 +
 devel/klib/Makefile  | 26 ++++++++++++++++++++++++++
 devel/klib/distinfo  |  3 +++
 devel/klib/pkg-descr | 10 ++++++++++
 devel/klib/pkg-plist | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 86 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 5b8e8b1733ed..9dc1aaa081a9 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1105,6 +1105,7 @@
     SUBDIR += kio-extras
     SUBDIR += kirigami-gallery
     SUBDIR += kiwix-lib
+    SUBDIR += klib
     SUBDIR += kms-cmake-utils
     SUBDIR += kodi-platform
     SUBDIR += kokkos
diff --git a/devel/klib/Makefile b/devel/klib/Makefile
new file mode 100644
index 000000000000..c6559419d987
--- /dev/null
+++ b/devel/klib/Makefile
@@ -0,0 +1,26 @@
+PORTNAME=	klib
+DISTVERSION=	g20210616
+CATEGORIES=	devel
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Standalone and lightweight C library
+WWW=		http://attractivechaos.github.io/klib
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
+
+TEST_DEPENDS=	check>0:devel/check
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	attractivechaos
+GH_TAGNAME=	9a063b3
+
+NO_BUILD=	yes
+NO_ARCH=	yes
+
+do-install:
+	@${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}
+	${INSTALL_DATA} ${WRKSRC}/*.h ${WRKSRC}/*.c ${STAGEDIR}${PREFIX}/include/${PORTNAME}
+	cd ${WRKSRC} && ${COPYTREE_SHARE} cpp ${STAGEDIR}${PREFIX}/include/${PORTNAME}
+
+.include <bsd.port.mk>
diff --git a/devel/klib/distinfo b/devel/klib/distinfo
new file mode 100644
index 000000000000..6aa67c8ac6f1
--- /dev/null
+++ b/devel/klib/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1685921173
+SHA256 (attractivechaos-klib-g20210616-9a063b3_GH0.tar.gz) = c9fb11aa40955626e6c78b6895f590bae3fd7f3350c1f3b17db89bbb9beb0e73
+SIZE (attractivechaos-klib-g20210616-9a063b3_GH0.tar.gz) = 124373
diff --git a/devel/klib/pkg-descr b/devel/klib/pkg-descr
new file mode 100644
index 000000000000..75418d6b7819
--- /dev/null
+++ b/devel/klib/pkg-descr
@@ -0,0 +1,10 @@
+Klib is a standalone and lightweight C library distributed under MIT/X11
+license. Most components are independent of external libraries, except the
+standard C library, and independent of each other. To use a component of
+this library, you only need to copy a couple of files to your source code
+tree without worrying about library dependencies.
+
+Klib strives for efficiency and a small memory footprint. Some components,
+such as hash table, B-tree, vector and sorting algorithms, are among the most
+efficient implementations of similar algorithms or data structures in all
+programming languages, in terms of both speed and memory use.
diff --git a/devel/klib/pkg-plist b/devel/klib/pkg-plist
new file mode 100644
index 000000000000..ec523be83bc2
--- /dev/null
+++ b/devel/klib/pkg-plist
@@ -0,0 +1,46 @@
+include/klib/bgzf.c
+include/klib/bgzf.h
+include/klib/cpp/kavl.hpp
+include/klib/cpp/khash.hpp
+include/klib/cpp/khashl.hpp
+include/klib/kalloc.c
+include/klib/kalloc.h
+include/klib/kavl-lite.h
+include/klib/kavl.h
+include/klib/kbit.h
+include/klib/kbtree.h
+include/klib/kdq.h
+include/klib/keigen.c
+include/klib/keigen.h
+include/klib/ketopt.h
+include/klib/kexpr.c
+include/klib/kexpr.h
+include/klib/kgraph.h
+include/klib/khash.h
+include/klib/khashl.h
+include/klib/khmm.c
+include/klib/khmm.h
+include/klib/klist.h
+include/klib/kmath.c
+include/klib/kmath.h
+include/klib/knetfile.c
+include/klib/knetfile.h
+include/klib/knhx.c
+include/klib/knhx.h
+include/klib/kopen.c
+include/klib/krmq.h
+include/klib/krng.h
+include/klib/ksa.c
+include/klib/kseq.h
+include/klib/kson.c
+include/klib/kson.h
+include/klib/ksort.h
+include/klib/kstring.c
+include/klib/kstring.h
+include/klib/ksw.c
+include/klib/ksw.h
+include/klib/kthread.c
+include/klib/kthread.h
+include/klib/kurl.c
+include/klib/kurl.h
+include/klib/kvec.h