git: 07bfccc126c0 - main - [NEW PORT] databases/libnusqlite3: SQLite3 extension with Unicode support

From: Michael Osipov <michaelo_at_FreeBSD.org>
Date: Tue, 08 Sep 2026 18:31:54 UTC
The branch main has been updated by michaelo:

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

commit 07bfccc126c06ff58d7b177e77dc8f9a0dd610f7
Author:     Michael Johnson <michaeljohnson@ahze.net>
AuthorDate: 2026-09-08 18:08:48 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-09-08 18:31:31 +0000

    [NEW PORT] databases/libnusqlite3: SQLite3 extension with Unicode support
    
    Co-authored-by: Michael Osipov <michaelo@FreeBSD.org>
    PR:             298195
---
 databases/Makefile               |  1 +
 databases/libnusqlite3/Makefile  | 31 +++++++++++++++++++++++++++++++
 databases/libnusqlite3/distinfo  |  3 +++
 databases/libnusqlite3/pkg-descr |  5 +++++
 4 files changed, 40 insertions(+)

diff --git a/databases/Makefile b/databases/Makefile
index fd400cf76be3..c57d6bb31d77 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -146,6 +146,7 @@
     SUBDIR += libmemcached
     SUBDIR += libmongocrypt
     SUBDIR += libmswstr
+    SUBDIR += libnusqlite3
     SUBDIR += libnvpair
     SUBDIR += libodbc++
     SUBDIR += libpbl
diff --git a/databases/libnusqlite3/Makefile b/databases/libnusqlite3/Makefile
new file mode 100644
index 000000000000..71f2ba2d6884
--- /dev/null
+++ b/databases/libnusqlite3/Makefile
@@ -0,0 +1,31 @@
+PORTNAME=	libnusqlite3
+DISTVERSION=	1.12
+CATEGORIES=	databases
+MASTER_SITES=	https://bitbucket.org/alekseyt/nunicode/get/${DISTVERSION}${EXTRACT_SUFX}?dummy=/
+DISTNAME=	nunicode-${DISTVERSION}
+
+MAINTAINER=	michaeljohnson@ahze.net
+COMMENT=	SQLite3 extension with Unicode collation, case mapping, and unaccent
+WWW=		https://bitbucket.org/alekseyt/nunicode
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${LOCALBASE}/include/sqlite3ext.h:databases/sqlite3
+
+USES=		cmake
+USE_LDCONFIG=	yes
+
+CMAKE_ARGS=	-DSQLITE3_INCLUDE_DIR=${LOCALBASE}/include
+CMAKE_ON=	NU_BUILD_SQLITE3_EXT
+ALL_TARGET=	nusqlite3
+
+WRKSRC=		${WRKDIR}/alekseyt-nunicode-5d3279b1399d
+
+PLIST_FILES=	lib/libnusqlite3.so
+
+do-install:
+	${INSTALL_LIB} ${BUILD_WRKSRC}/sqlite3/libnusqlite3.so \
+		${STAGEDIR}${PREFIX}/lib
+
+.include <bsd.port.mk>
diff --git a/databases/libnusqlite3/distinfo b/databases/libnusqlite3/distinfo
new file mode 100644
index 000000000000..c76e5178743f
--- /dev/null
+++ b/databases/libnusqlite3/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1788558999
+SHA256 (nunicode-1.12.tar.gz) = a7cbd18871ee928a5ad695973a79fd09a489f6543a5ee494e4016dd1fb95a44a
+SIZE (nunicode-1.12.tar.gz) = 1594157
diff --git a/databases/libnusqlite3/pkg-descr b/databases/libnusqlite3/pkg-descr
new file mode 100644
index 000000000000..db3ae046cd82
--- /dev/null
+++ b/databases/libnusqlite3/pkg-descr
@@ -0,0 +1,5 @@
+Loadable SQLite3 extension (libnusqlite3.so) built from the nunicode
+library. Registers Unicode-aware NU1700 and NU1700_NOCASE collations and
+overrides upper(), lower(), like() and adds unaccent() with full Unicode
+17.0 support. Used by applications such as Audiobookshelf for
+locale-correct sorting and searching.