aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahlon <mahlon@martini.nu>2025-06-10 09:09:52 +0000
committerHiroki Tagato <tagattie@FreeBSD.org>2025-06-10 09:12:28 +0000
commit64e0030050704a0f9a8ba4f8280210e77e2cb1ad (patch)
tree4e12f19b41c307507961ffaf902ea5bd348406e6
parent246d7c3de4cfbd2668129581935f8c49f9d96e56 (diff)
databases/kuzu: add port: Embeddable, scalable, extremely fast graph database
Kuzu is an embedded graph database built for query speed and scalability. It is optimized for handling complex analytical workloads on very large databases and provides a set of retrieval features, such as a full text search and vector indices. WWW: https://kuzudb.com/ PR: 285388 Reported by: mahlon@martini.nu (new maintainer) Reviewed by: Pat Maddox <pat@patmaddox.com>, linimon
-rw-r--r--databases/Makefile1
-rw-r--r--databases/kuzu/Makefile26
-rw-r--r--databases/kuzu/distinfo3
-rw-r--r--databases/kuzu/files/patch-src_CMakeLists.txt14
-rw-r--r--databases/kuzu/files/patch-src_storage_buffer__manager_vm__region.cpp13
-rw-r--r--databases/kuzu/files/patch-third__party_roaring__bitmap_roaring.c10
-rw-r--r--databases/kuzu/pkg-descr4
-rw-r--r--databases/kuzu/pkg-plist7
8 files changed, 78 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 284ae449cbd3..4d743a11cc28 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -112,6 +112,7 @@
SUBDIR += kdb
SUBDIR += kexi
SUBDIR += keydb
+ SUBDIR += kuzu
SUBDIR += kyotocabinet
SUBDIR += kyototycoon
SUBDIR += ldb25
diff --git a/databases/kuzu/Makefile b/databases/kuzu/Makefile
new file mode 100644
index 000000000000..af9d4b460626
--- /dev/null
+++ b/databases/kuzu/Makefile
@@ -0,0 +1,26 @@
+PORTNAME= kuzu
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.10.0
+CATEGORIES= databases
+
+MAINTAINER= mahlon@martini.nu
+COMMENT= Embeddable, scalable, extremely fast graph database
+WWW= https://kuzudb.com/
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= cmake ninja:build python:3.9+,build
+USE_LDCONFIG= yes
+
+USE_GITHUB= yes
+GH_ACCOUNT= kuzudb
+
+PLIST_SUB= VERSION=${DISTVERSION}
+
+post-install:
+ ${MV} ${STAGEDIR}${PREFIX}/lib/libkuzu.so ${STAGEDIR}${PREFIX}/lib/libkuzu.so.${DISTVERSION}
+ ${RLN} libkuzu.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib/libkuzu.so
+ ${RLN} libkuzu.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib/libkuzu.so.0
+
+.include <bsd.port.mk>
diff --git a/databases/kuzu/distinfo b/databases/kuzu/distinfo
new file mode 100644
index 000000000000..17e9eed47e1c
--- /dev/null
+++ b/databases/kuzu/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1746742558
+SHA256 (kuzudb-kuzu-v0.10.0_GH0.tar.gz) = df185b2688ccbfebfddf11520532caf2965300fd91c0c2b9d096da59c925228f
+SIZE (kuzudb-kuzu-v0.10.0_GH0.tar.gz) = 153460387
diff --git a/databases/kuzu/files/patch-src_CMakeLists.txt b/databases/kuzu/files/patch-src_CMakeLists.txt
new file mode 100644
index 000000000000..0b5c38205021
--- /dev/null
+++ b/databases/kuzu/files/patch-src_CMakeLists.txt
@@ -0,0 +1,14 @@
+--- src/CMakeLists.txt.orig 2025-03-13 22:28:45 UTC
++++ src/CMakeLists.txt
+@@ -30,11 +30,6 @@ endif()
+ if(NOT WIN32)
+ set(KUZU_LIBRARIES dl ${KUZU_LIBRARIES})
+ endif()
+-# Seems to be needed for clang on linux only
+-# for compiling std::atomic<T>::compare_exchange_weak
+-if ((NOT APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT __WASM__ AND NOT __SINGLE_THREADED__)
+- set(KUZU_LIBRARIES atomic ${KUZU_LIBRARIES})
+-endif()
+ if (ENABLE_BACKTRACES)
+ set(KUZU_LIBRARIES ${KUZU_LIBRARIES} cpptrace::cpptrace)
+ endif()
diff --git a/databases/kuzu/files/patch-src_storage_buffer__manager_vm__region.cpp b/databases/kuzu/files/patch-src_storage_buffer__manager_vm__region.cpp
new file mode 100644
index 000000000000..28589f14d0bc
--- /dev/null
+++ b/databases/kuzu/files/patch-src_storage_buffer__manager_vm__region.cpp
@@ -0,0 +1,13 @@
+--- src/storage/buffer_manager/vm_region.cpp.orig 2025-02-24 14:26:02 UTC
++++ src/storage/buffer_manager/vm_region.cpp
+@@ -14,6 +14,10 @@
+
+ #include "common/exception/buffer_manager.h"
+
++#ifndef MAP_NORESERVE
++#define MAP_NORESERVE 0
++#endif
++
+ using namespace kuzu::common;
+
+ namespace kuzu {
diff --git a/databases/kuzu/files/patch-third__party_roaring__bitmap_roaring.c b/databases/kuzu/files/patch-third__party_roaring__bitmap_roaring.c
new file mode 100644
index 000000000000..9ec38acf61af
--- /dev/null
+++ b/databases/kuzu/files/patch-third__party_roaring__bitmap_roaring.c
@@ -0,0 +1,10 @@
+--- third_party/roaring_bitmap/roaring.c.orig 2025-03-13 23:38:46 UTC
++++ third_party/roaring_bitmap/roaring.c
+@@ -55,6 +55,7 @@
+ */
+
+ #include "roaring.h"
++#include <sys/endian.h>
+
+ /* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */
+ #ifdef DMALLOC
diff --git a/databases/kuzu/pkg-descr b/databases/kuzu/pkg-descr
new file mode 100644
index 000000000000..0c354306f64a
--- /dev/null
+++ b/databases/kuzu/pkg-descr
@@ -0,0 +1,4 @@
+Kuzu is an embedded graph database built for query speed and scalability.
+It is optimized for handling complex analytical workloads on very large
+databases and provides a set of retrieval features, such as a full text
+search and vector indices.
diff --git a/databases/kuzu/pkg-plist b/databases/kuzu/pkg-plist
new file mode 100644
index 000000000000..7f83c4fd6ff9
--- /dev/null
+++ b/databases/kuzu/pkg-plist
@@ -0,0 +1,7 @@
+bin/kuzu
+include/kuzu.h
+include/kuzu.hpp
+lib/libkuzu.a
+lib/libkuzu.so
+lib/libkuzu.so.0
+lib/libkuzu.so.%%VERSION%%