Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 May 2019 14:49:28 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r502472 - in head/devel: . libcdb libcdb/files
Message-ID:  <201905241449.x4OEnSIC025010@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Fri May 24 14:49:28 2019
New Revision: 502472
URL: https://svnweb.freebsd.org/changeset/ports/502472

Log:
  devel/libcdb: create port
  
  The NetBSD's constant database (cdb) library provides a space efficient
  key-value database based on perfect hashing, thus guaranteeing the O(1) lookup
  time. The database preserves the key order.
  
  WWW: https://github.com/rmind/libcdb
  
  While be used by npf port

Added:
  head/devel/libcdb/
  head/devel/libcdb/Makefile   (contents, props changed)
  head/devel/libcdb/distinfo   (contents, props changed)
  head/devel/libcdb/files/
  head/devel/libcdb/files/patch-Makefile   (contents, props changed)
  head/devel/libcdb/files/patch-bitops.h   (contents, props changed)
  head/devel/libcdb/files/patch-cdb__impl.h   (contents, props changed)
  head/devel/libcdb/files/patch-cdbr.c   (contents, props changed)
  head/devel/libcdb/files/patch-cdbw.c   (contents, props changed)
  head/devel/libcdb/files/patch-mi__vector__hash.c   (contents, props changed)
  head/devel/libcdb/pkg-descr   (contents, props changed)
  head/devel/libcdb/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile   (contents, props changed)

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Fri May 24 14:48:43 2019	(r502471)
+++ head/devel/Makefile	Fri May 24 14:49:28 2019	(r502472)
@@ -1118,6 +1118,7 @@
     SUBDIR += libburn
     SUBDIR += libcbor
     SUBDIR += libccid
+    SUBDIR += libcdb
     SUBDIR += libcfg
     SUBDIR += libcfu
     SUBDIR += libchipcard

Added: head/devel/libcdb/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libcdb/Makefile	Fri May 24 14:49:28 2019	(r502472)
@@ -0,0 +1,22 @@
+# $FreeBSD$
+
+PORTNAME=	libcdb
+PORTVERSION=	g2019052401
+CATEGORIES=	devel
+
+MAINTAINER=	swills@FreeBSD.org
+COMMENT=	Constant database library
+
+USES=		gmake libtool:build
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	rmind
+GH_PROJECT=	libcdb
+GH_TAGNAME=	1d3440d
+WRKSRC_SUBDIR=	src
+USE_LDCONFIG=	yes
+MAKE_ENV=	DESTDIR=${STAGEDIR}${PREFIX} \
+		INCDIR=${LOCALBASE}/include \
+		LIBDIR=${LOCALBASE}/lib
+
+.include <bsd.port.mk>

Added: head/devel/libcdb/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libcdb/distinfo	Fri May 24 14:49:28 2019	(r502472)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1558684530
+SHA256 (rmind-libcdb-g2019052401-1d3440d_GH0.tar.gz) = 0045b0a0a9c41bd5c8229c8385691a4ec31959943b86047f0ba759a2f0afe3a0
+SIZE (rmind-libcdb-g2019052401-1d3440d_GH0.tar.gz) = 15090

Added: head/devel/libcdb/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libcdb/files/patch-Makefile	Fri May 24 14:49:28 2019	(r502472)
@@ -0,0 +1,14 @@
+--- Makefile.orig	2018-06-11 23:57:47 UTC
++++ Makefile
+@@ -4,8 +4,11 @@
+ 
+ PROJ=		cdb
+ 
++UNAME:=		$(shell uname)
+ CFLAGS+=	-std=c11 -O2 -g -Wall -Wextra -Werror
++ifneq ($(UNAME), FreeBSD)
+ CFLAGS+=	-D_POSIX_C_SOURCE=200809L
++endif
+ CFLAGS+=	-D_GNU_SOURCE -D_DEFAULT_SOURCE
+ CFLAGS+=	-I. -Wno-unused-parameter -D__RCSID\(x\)=
+ 

Added: head/devel/libcdb/files/patch-bitops.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libcdb/files/patch-bitops.h	Fri May 24 14:49:28 2019	(r502472)
@@ -0,0 +1,17 @@
+--- bitops.h.orig	2018-06-11 23:57:47 UTC
++++ bitops.h
+@@ -36,12 +36,14 @@
+ #else
+ #include <stdint.h>
+ 
++#ifndef __GNUC_PREREQ__
+ #ifdef __GNUC__
+ #define	__GNUC_PREREQ__(x, y)						\
+ 	((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) ||			\
+ 	 (__GNUC__ > (x)))
+ #else
+ #define	__GNUC_PREREQ__(x, y)	0
++#endif
+ #endif
+ 
+ #ifndef __unused

Added: head/devel/libcdb/files/patch-cdb__impl.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libcdb/files/patch-cdb__impl.h	Fri May 24 14:49:28 2019	(r502472)
@@ -0,0 +1,21 @@
+--- cdb_impl.h.orig	2018-06-11 23:57:47 UTC
++++ cdb_impl.h
+@@ -5,7 +5,7 @@
+ #ifndef	_CDB_IMPL_H
+ #define	_CDB_IMPL_H
+ 
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ 
+ #define	__predict_false(exp)	__builtin_expect((exp) != 0, 0)
+ 
+@@ -27,6 +27,9 @@ le32enc(void *buf, uint32_t u)
+ 	p[2] = (u >> 16) & 0xff;
+ 	p[3] = (u >> 24) & 0xff;
+ }
++#endif
++
++#if !defined(__NetBSD__)
+ 
+ void	 mi_vector_hash(const void * __restrict, size_t, uint32_t, uint32_t[3]);
+ 

Added: head/devel/libcdb/files/patch-cdbr.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libcdb/files/patch-cdbr.c	Fri May 24 14:49:28 2019	(r502472)
@@ -0,0 +1,11 @@
+--- cdbr.c.orig	2019-05-24 08:03:40 UTC
++++ cdbr.c
+@@ -52,7 +52,7 @@ __RCSID("$NetBSD: cdbr.c,v 1.1 2013/12/11 01:24:08 joe
+ #endif
+ #endif
+ #if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) || defined(__FreeBSD__)
+ #include <sys/endian.h>
+ #else
+ #include <endian.h>

Added: head/devel/libcdb/files/patch-cdbw.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libcdb/files/patch-cdbw.c	Fri May 24 14:49:28 2019	(r502472)
@@ -0,0 +1,11 @@
+--- cdbw.c.orig	2019-05-24 08:14:32 UTC
++++ cdbw.c
+@@ -43,7 +43,7 @@ __RCSID("$NetBSD: cdbw.c,v 1.5 2012/07/21 22:49:37 joe
+ #endif
+ 
+ #if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) || defined(__FreeBSD__)
+ #include <sys/endian.h>
+ #else
+ #include <endian.h>

Added: head/devel/libcdb/files/patch-mi__vector__hash.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libcdb/files/patch-mi__vector__hash.c	Fri May 24 14:49:28 2019	(r502472)
@@ -0,0 +1,11 @@
+--- mi_vector_hash.c.orig	2019-05-24 08:15:13 UTC
++++ mi_vector_hash.c
+@@ -46,7 +46,7 @@
+ __RCSID("$NetBSD: mi_vector_hash.c,v 1.1 2013/12/11 01:24:08 joerg Exp $");
+ 
+ #if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) || defined(__FreeBSD__)
+ #include <sys/endian.h>
+ #else
+ #include <endian.h>

Added: head/devel/libcdb/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libcdb/pkg-descr	Fri May 24 14:49:28 2019	(r502472)
@@ -0,0 +1,5 @@
+The NetBSD's constant database (cdb) library provides a space efficient
+key-value database based on perfect hashing, thus guaranteeing the O(1) lookup
+time. The database preserves the key order.
+
+WWW: https://github.com/rmind/libcdb

Added: head/devel/libcdb/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libcdb/pkg-plist	Fri May 24 14:49:28 2019	(r502472)
@@ -0,0 +1,6 @@
+include/cdbr.h
+include/cdbw.h
+lib/libcdb.a
+lib/libcdb.so
+lib/libcdb.so.1
+lib/libcdb.so.1.0.0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905241449.x4OEnSIC025010>