git: 930a1b8733bd - main - devel/ocaml-integers: New port

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=930a1b8733bdad4efd0646e64a4257c5ebc7c86a

commit 930a1b8733bdad4efd0646e64a4257c5ebc7c86a
Author:     Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2026-06-28 20:26:59 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2026-06-28 22:08:53 +0000

    devel/ocaml-integers: New port
    
    This OCaml library provides 8-, 16-, 32- and 64-bytes signed and
    unsigned integer types for OCaml. Additionally, platform dependent
    types are provided, such as size_t, int, llong, etc.
    
    WWW: https://github.com/yallop/ocaml-integers
---
 devel/Makefile                            |  1 +
 devel/ocaml-integers/Makefile             | 43 +++++++++++++++++++++++++++++++
 devel/ocaml-integers/distinfo             |  3 +++
 devel/ocaml-integers/files/patch-src_dune | 10 +++++++
 devel/ocaml-integers/pkg-descr            |  3 +++
 devel/ocaml-integers/pkg-plist            | 29 +++++++++++++++++++++
 6 files changed, 89 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 5b9f8d7de76c..dccd929c95a7 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1800,6 +1800,7 @@
     SUBDIR += ocaml-gen
     SUBDIR += ocaml-gmap
     SUBDIR += ocaml-hmap
+    SUBDIR += ocaml-integers
     SUBDIR += ocaml-ipaddr
     SUBDIR += ocaml-lacaml
     SUBDIR += ocaml-linol
diff --git a/devel/ocaml-integers/Makefile b/devel/ocaml-integers/Makefile
new file mode 100644
index 000000000000..534ed9d9ba58
--- /dev/null
+++ b/devel/ocaml-integers/Makefile
@@ -0,0 +1,43 @@
+PORTNAME=	integers
+DISTVERSION=	0.8.0
+CATEGORIES=	devel
+PKGNAMEPREFIX=	ocaml-
+
+MAINTAINER=	freebsd@dev.thsi.be
+COMMENT=	Integer types for OCaml
+WWW=		https://github.com/yallop/ocaml-integers
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE.md
+
+TEST_DEPENDS=	${SA_DIR}/ounit2/META:devel/ocaml-ounit
+
+USES=		ocaml:dune,ldconfig
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	yallop
+GH_PROJECT=	ocaml-${PORTNAME}
+
+DOCSDIR=	${OCAML_DOCSDIR}/${PORTNAME}
+PORTDOCS=	CHANGES.md LICENSE.md README.md
+
+OPTIONS_DEFINE=	DOCS
+
+SA_DIR=		${LOCALBASE}/${OCAML_SITELIBDIR}
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e "s/(lang dune 1.0)/(lang dune 3.0)/" \
+		-e "s/(name ${PORTNAME})/&\n(version ${DISTVERSION})/" \
+		${WRKSRC}/dune-project
+
+post-install:
+	cd ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${PORTNAME} && \
+		${STRIP_CMD} ${PORTNAME}.cmxs dll${PORTNAME}_stubs.so
+
+do-test:
+	cd ${TEST_WRKSRC} && \
+		${SETENVI} ${TEST_ENV} ${DUNE_ENV} \
+		${DUNE_CMD} build ${DUNE_ARGS} @runtest
+
+.include <bsd.port.mk>
diff --git a/devel/ocaml-integers/distinfo b/devel/ocaml-integers/distinfo
new file mode 100644
index 000000000000..d35750a9175f
--- /dev/null
+++ b/devel/ocaml-integers/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1781784411
+SHA256 (yallop-ocaml-integers-0.8.0_GH0.tar.gz) = 04a1a6d5cc1ecfd3f354a83caed27e59995bb26adec64d88193ccc36268929fa
+SIZE (yallop-ocaml-integers-0.8.0_GH0.tar.gz) = 14595
diff --git a/devel/ocaml-integers/files/patch-src_dune b/devel/ocaml-integers/files/patch-src_dune
new file mode 100644
index 000000000000..fb808c7ed8ac
--- /dev/null
+++ b/devel/ocaml-integers/files/patch-src_dune
@@ -0,0 +1,10 @@
+--- src/dune.orig	2026-05-18 08:27:16 UTC
++++ src/dune
+@@ -3,6 +3,5 @@
+  (public_name integers)
+  (wrapped false)
+  (install_c_headers ocaml_integers)
+- (c_names unsigned_stubs)
+- (libraries stdlib-shims)
++ (foreign_stubs (language c) (names unsigned_stubs))
+  (synopsis "Signed and unsigned integers of various sizes"))
diff --git a/devel/ocaml-integers/pkg-descr b/devel/ocaml-integers/pkg-descr
new file mode 100644
index 000000000000..f8defde47a41
--- /dev/null
+++ b/devel/ocaml-integers/pkg-descr
@@ -0,0 +1,3 @@
+This OCaml library provides 8-, 16-, 32- and 64-bytes signed and
+unsigned integer types for OCaml. Additionally, platform dependent
+types are provided, such as size_t, int, llong, etc.
diff --git a/devel/ocaml-integers/pkg-plist b/devel/ocaml-integers/pkg-plist
new file mode 100644
index 000000000000..c8f695cdd6a1
--- /dev/null
+++ b/devel/ocaml-integers/pkg-plist
@@ -0,0 +1,29 @@
+%%OCAML_SITELIBDIR%%/integers/META
+%%OCAML_SITELIBDIR%%/integers/dllintegers_stubs.so
+%%OCAML_SITELIBDIR%%/integers/dune-package
+%%OCAML_SITELIBDIR%%/integers/integers.a
+%%OCAML_SITELIBDIR%%/integers/integers.cma
+%%OCAML_SITELIBDIR%%/integers/integers.cmxa
+%%OCAML_SITELIBDIR%%/integers/integers.cmxs
+%%OCAML_SITELIBDIR%%/integers/libintegers_stubs.a
+%%OCAML_SITELIBDIR%%/integers/ocaml_integers.h
+%%OCAML_SITELIBDIR%%/integers/opam
+%%OCAML_SITELIBDIR%%/integers/signed.cmi
+%%OCAML_SITELIBDIR%%/integers/signed.cmt
+%%OCAML_SITELIBDIR%%/integers/signed.cmti
+%%OCAML_SITELIBDIR%%/integers/signed.cmx
+%%OCAML_SITELIBDIR%%/integers/signed.ml
+%%OCAML_SITELIBDIR%%/integers/signed.mli
+%%OCAML_SITELIBDIR%%/integers/top/install_integer_printers.ml
+%%OCAML_SITELIBDIR%%/integers/top/integers_top.cma
+%%OCAML_SITELIBDIR%%/integers/top/integers_top.cmi
+%%OCAML_SITELIBDIR%%/integers/top/integers_top.cmt
+%%OCAML_SITELIBDIR%%/integers/top/integers_top.ml
+%%OCAML_SITELIBDIR%%/integers/top/integers_top__Install_integer_printers.cmi
+%%OCAML_SITELIBDIR%%/integers/top/integers_top__Install_integer_printers.cmt
+%%OCAML_SITELIBDIR%%/integers/unsigned.cmi
+%%OCAML_SITELIBDIR%%/integers/unsigned.cmt
+%%OCAML_SITELIBDIR%%/integers/unsigned.cmti
+%%OCAML_SITELIBDIR%%/integers/unsigned.cmx
+%%OCAML_SITELIBDIR%%/integers/unsigned.ml
+%%OCAML_SITELIBDIR%%/integers/unsigned.mli