git: 5cb56fb0db23 - main - devel/genht: New port: Simple generic hash table implementation in C

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Mon, 18 Jul 2022 07:01:00 UTC
The branch main has been updated by eduardo:

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

commit 5cb56fb0db2319dc56d72143729390b5e9977b63
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-07-18 06:57:56 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-07-18 07:00:24 +0000

    devel/genht: New port: Simple generic hash table implementation in C
    
     - submiter becomes maintainer
    
    genht is a simple generic hash table implementation in C.
    Uses open addressing scheme with space doubling.
    Type generics is achieved by ugly name prefixing macros.
    
    WWW: http://www.repo.hu/projects/genht/
    
    PR:             265261
---
 devel/Makefile                       |  1 +
 devel/genht/Makefile                 | 28 ++++++++++++++++++++++++++++
 devel/genht/distinfo                 |  3 +++
 devel/genht/files/patch-src_Makefile | 11 +++++++++++
 devel/genht/pkg-descr                |  5 +++++
 devel/genht/pkg-plist                | 17 +++++++++++++++++
 6 files changed, 65 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 90750a0c477e..c31ba5007a4e 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -759,6 +759,7 @@
     SUBDIR += gearmand
     SUBDIR += generate
     SUBDIR += gengetopt
+    SUBDIR += genht
     SUBDIR += genie
     SUBDIR += genromfs
     SUBDIR += getoptions
diff --git a/devel/genht/Makefile b/devel/genht/Makefile
new file mode 100644
index 000000000000..3da3305f954e
--- /dev/null
+++ b/devel/genht/Makefile
@@ -0,0 +1,28 @@
+PORTNAME=	genht
+DISTVERSION=	1.1.3
+CATEGORIES=	devel
+MASTER_SITES=	http://www.repo.hu/projects/genht/releases/
+
+MAINTAINER=	fuz@fuz.su
+COMMENT=	Simple generic hash table implementation in C
+
+LICENSE=	PD
+
+USES=		tar:bz2
+USE_LDCONFIG=	yes
+
+MAKE_ARGS+=	GENHT_CFLAGS='${CFLAGS}' \
+		GENHT_LDFLAGS='${STRIP} ${LDFLAGS}' \
+		PREFIX=${PREFIX}
+
+PORTEXAMPLES=	Makefile example.c examplev.c
+
+OPTIONS_DEFINE=	EXAMPLES
+
+post-install-EXAMPLES-on:
+	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+.for f in ${PORTEXAMPLES}
+	${INSTALL_DATA} ${WRKSRC}/doc/$f ${STAGEDIR}${EXAMPLESDIR}
+.endfor
+
+.include <bsd.port.mk>
diff --git a/devel/genht/distinfo b/devel/genht/distinfo
new file mode 100644
index 000000000000..897f4e537d96
--- /dev/null
+++ b/devel/genht/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1658043005
+SHA256 (genht-1.1.3.tar.bz2) = 9861a35c30b5d0023c5f50fa8bb44c3e1df15c232de155888faa492f71f3b1cc
+SIZE (genht-1.1.3.tar.bz2) = 10936
diff --git a/devel/genht/files/patch-src_Makefile b/devel/genht/files/patch-src_Makefile
new file mode 100644
index 000000000000..2e3e0fc32ba1
--- /dev/null
+++ b/devel/genht/files/patch-src_Makefile
@@ -0,0 +1,11 @@
+--- src/Makefile.orig	2022-07-17 07:03:04 UTC
++++ src/Makefile
+@@ -35,7 +35,7 @@ mainsi: mainsi.o htsi.o
+ 	$(CC) -o $@ mainsi.o htsi.o $(LDFLAGS)
+ 
+ $(LIBSO): $(OBJS)
+-	$(CC) $(LDFLAGS) -shared -dynamic -rdynamic -o $@ $(OBJS)
++	$(CC) $(LDFLAGS) -shared -dynamic -rdynamic -Wl,-soname,$(LIBSO1) -o $@ $(OBJS)
+ 
+ $(LIBA): $(OBJS)
+ 	ar rvu $@ $(OBJS)
diff --git a/devel/genht/pkg-descr b/devel/genht/pkg-descr
new file mode 100644
index 000000000000..de25a2f368a2
--- /dev/null
+++ b/devel/genht/pkg-descr
@@ -0,0 +1,5 @@
+genht is a simple generic hash table implementation in C.
+Uses open addressing scheme with space doubling.
+Type generics is achieved by ugly name prefixing macros.
+
+WWW: http://www.repo.hu/projects/genht/
diff --git a/devel/genht/pkg-plist b/devel/genht/pkg-plist
new file mode 100644
index 000000000000..1da49ed62206
--- /dev/null
+++ b/devel/genht/pkg-plist
@@ -0,0 +1,17 @@
+include/genht/hash.h
+include/genht/ht.c
+include/genht/ht.h
+include/genht/ht_inlines.h
+include/genht/ht_utils.h
+include/genht/htip.h
+include/genht/htpi.h
+include/genht/htpp.h
+include/genht/htsi.h
+include/genht/htsp.h
+include/genht/htss.h
+include/genht/siphash24.h
+include/genht/version.h
+lib/libgenht.a
+lib/libgenht.so
+lib/libgenht.so.1
+lib/libgenht.so.1.1.3