git: 0a5aeaa12960 - main - devel/ocaml-trie: New port

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sun, 28 Jun 2026 22:09:36 UTC
The branch main has been updated by bofh:

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

commit 0a5aeaa1296091a5b3368b228c82959b6ba9e669
Author:     Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2026-06-28 21:15:26 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2026-06-28 22:08:55 +0000

    devel/ocaml-trie: New port
    
    This OCaml library implements a trie tree in OCaml. A trie is a
    datastructure used to implement a prefix search efficiently.
    
    WWW: https://github.com/kandu/trie
---
 devel/Makefile             |  1 +
 devel/ocaml-trie/Makefile  | 32 ++++++++++++++++++++++++++++++++
 devel/ocaml-trie/distinfo  |  3 +++
 devel/ocaml-trie/pkg-descr |  2 ++
 devel/ocaml-trie/pkg-plist | 13 +++++++++++++
 5 files changed, 51 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 31e6159699c2..09ef531e34cc 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1849,6 +1849,7 @@
     SUBDIR += ocaml-stdio
     SUBDIR += ocaml-topkg
     SUBDIR += ocaml-trace
+    SUBDIR += ocaml-trie
     SUBDIR += ocaml-uchar
     SUBDIR += ocaml-ulex
     SUBDIR += ocaml-uutf
diff --git a/devel/ocaml-trie/Makefile b/devel/ocaml-trie/Makefile
new file mode 100644
index 000000000000..7066ed2f59db
--- /dev/null
+++ b/devel/ocaml-trie/Makefile
@@ -0,0 +1,32 @@
+PORTNAME=	trie
+PORTVERSION=	1.0.0
+CATEGORIES=	devel
+PKGNAMEPREFIX=	ocaml-
+
+MAINTAINER=	freebsd@dev.thsi.be
+COMMENT=	Strict impure trie tree library for OCaml
+WWW=		https://github.com/kandu/trie
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		ocaml:dune
+USE_GITHUB=	yes
+GH_ACCOUNT=	kandu
+
+DOCSDIR=	${OCAML_DOCSDIR}/${PORTNAME}
+PORTDOCS=	LICENSE
+
+OPTIONS_DEFINE=	DOCS
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e "s/(lang dune 1.0)/(lang dune 2.5)/" \
+		-e "s/(name ${PORTNAME})/&\n (version ${PORTVERSION})/" \
+		${WRKSRC}/dune-project
+
+post-install:
+	@${STRIP_CMD} \
+		${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/trie/trie.cmxs
+
+.include <bsd.port.mk>
diff --git a/devel/ocaml-trie/distinfo b/devel/ocaml-trie/distinfo
new file mode 100644
index 000000000000..8c654f984d86
--- /dev/null
+++ b/devel/ocaml-trie/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1711115588
+SHA256 (kandu-trie-1.0.0_GH0.tar.gz) = c2f8054ea44216e6a3a961b28f7630e0e3dbfbd1b504ae741be230cbe32498ea
+SIZE (kandu-trie-1.0.0_GH0.tar.gz) = 2399
diff --git a/devel/ocaml-trie/pkg-descr b/devel/ocaml-trie/pkg-descr
new file mode 100644
index 000000000000..b67e43cf46bf
--- /dev/null
+++ b/devel/ocaml-trie/pkg-descr
@@ -0,0 +1,2 @@
+This OCaml library implements a trie tree in OCaml. A trie is a
+datastructure used to implement a prefix search efficiently.
diff --git a/devel/ocaml-trie/pkg-plist b/devel/ocaml-trie/pkg-plist
new file mode 100644
index 000000000000..1627b37ee609
--- /dev/null
+++ b/devel/ocaml-trie/pkg-plist
@@ -0,0 +1,13 @@
+%%OCAML_SITELIBDIR%%/trie/META
+%%OCAML_SITELIBDIR%%/trie/dune-package
+%%OCAML_SITELIBDIR%%/trie/opam
+%%OCAML_SITELIBDIR%%/trie/trie.a
+%%OCAML_SITELIBDIR%%/trie/trie.cma
+%%OCAML_SITELIBDIR%%/trie/trie.cmi
+%%OCAML_SITELIBDIR%%/trie/trie.cmt
+%%OCAML_SITELIBDIR%%/trie/trie.cmti
+%%OCAML_SITELIBDIR%%/trie/trie.cmx
+%%OCAML_SITELIBDIR%%/trie/trie.cmxa
+%%OCAML_SITELIBDIR%%/trie/trie.cmxs
+%%OCAML_SITELIBDIR%%/trie/trie.ml
+%%OCAML_SITELIBDIR%%/trie/trie.mli