Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 2026 22:09:32 +0000
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Cc:        Benjamin Jacobs <freebsd@dev.thsi.be>
Subject:   git: 88543ecbaf67 - main - devel/ocaml-lwt_log: New port
Message-ID:  <6a419b9c.39b25.496c7089@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=88543ecbaf67a0daefbf6fe6f459e3f4c87b4e46

commit 88543ecbaf67a0daefbf6fe6f459e3f4c87b4e46
Author:     Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2026-06-28 20:49:58 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2026-06-28 22:08:54 +0000

    devel/ocaml-lwt_log: New port
    
    Lwt_log is a logging library for OCaml applications using the Lwt
    threading library.
    
    WWW: https://github.com/ocsigen/lwt_log
---
 devel/Makefile                                     |  1 +
 devel/ocaml-lwt_log/Makefile                       | 37 ++++++++++++++++++++++
 devel/ocaml-lwt_log/distinfo                       |  3 ++
 .../files/patch-src_unix_lwt__daemon.ml            | 26 +++++++++++++++
 devel/ocaml-lwt_log/pkg-descr                      |  2 ++
 devel/ocaml-lwt_log/pkg-plist                      | 35 ++++++++++++++++++++
 6 files changed, 104 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index be45a56baa51..b136c6ff6a37 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1808,6 +1808,7 @@
     SUBDIR += ocaml-logs
     SUBDIR += ocaml-lsp
     SUBDIR += ocaml-lwt
+    SUBDIR += ocaml-lwt_log
     SUBDIR += ocaml-magic
     SUBDIR += ocaml-mtime
     SUBDIR += ocaml-ocamlbuild
diff --git a/devel/ocaml-lwt_log/Makefile b/devel/ocaml-lwt_log/Makefile
new file mode 100644
index 000000000000..dde1f24f1be0
--- /dev/null
+++ b/devel/ocaml-lwt_log/Makefile
@@ -0,0 +1,37 @@
+PORTNAME=	lwt_log
+DISTVERSION=	1.1.2
+CATEGORIES=	devel
+PKGNAMEPREFIX=	ocaml-
+
+MAINTAINER=	freebsd@dev.thsi.be
+COMMENT=	Asynchronous logging library for OCaml
+WWW=		https://github.com/ocsigen/lwt_log
+
+LICENSE=	LGPL21+ # with a special exception to clause 6
+# TODO BSD3CLAUSE
+
+BUILD_DEPENDS=	${SA_DIR}/lwt/META:devel/ocaml-lwt
+RUN_DEPENDS=	${SA_DIR}/lwt/META:devel/ocaml-lwt
+
+USES=		ocaml:dune
+USE_GITHUB=	yes
+GH_ACCOUNT=	ocsigen
+
+DOCSDIR=	${OCAML_DOCSDIR}/${PORTNAME}
+PORTDOCS=	CHANGES README.md
+
+OPTIONS_DEFINE=	DOCS
+
+SA_DIR=		${LOCALBASE}/${OCAML_SITELIBDIR}
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e "s/(name ${PORTNAME})/&\n(version ${PORTVERSION})/" \
+		${WRKSRC}/dune-project
+
+post-install:
+	@${STRIP_CMD} \
+		${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${PORTNAME}/core/lwt_log_core.cmxs \
+		${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${PORTNAME}/lwt_log.cmxs
+
+.include <bsd.port.mk>
diff --git a/devel/ocaml-lwt_log/distinfo b/devel/ocaml-lwt_log/distinfo
new file mode 100644
index 000000000000..06318585bbe8
--- /dev/null
+++ b/devel/ocaml-lwt_log/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1710583959
+SHA256 (ocsigen-lwt_log-1.1.2_GH0.tar.gz) = b30259bcca04279bd5e300216a7dd4749b11699c208c127d90e6394e180ef401
+SIZE (ocsigen-lwt_log-1.1.2_GH0.tar.gz) = 24567
diff --git a/devel/ocaml-lwt_log/files/patch-src_unix_lwt__daemon.ml b/devel/ocaml-lwt_log/files/patch-src_unix_lwt__daemon.ml
new file mode 100644
index 000000000000..cee7e7503f39
--- /dev/null
+++ b/devel/ocaml-lwt_log/files/patch-src_unix_lwt__daemon.ml
@@ -0,0 +1,26 @@
+--- src/unix/lwt_daemon.ml.orig	2022-08-29 14:58:15 UTC
++++ src/unix/lwt_daemon.ml
+@@ -19,15 +19,6 @@
+  * 02111-1307, USA.
+  *)
+
+-(* [Lwt_sequence] is deprecated – we don't want users outside Lwt using it.
+-   However, it is still used internally by Lwt. So, briefly disable warning 3
+-   ("deprecated"), and create a local, non-deprecated alias for
+-   [Lwt_sequence] that can be referred to by the rest of the code in this
+-   module without triggering any more warnings. *)
+-[@@@ocaml.warning "-3"]
+-module Lwt_sequence = Lwt_sequence
+-[@@@ocaml.warning "+3"]
+-
+ open Lwt.Infix
+
+ let rec copy ic logger =
+@@ -61,7 +52,7 @@ let daemonize ?(syslog=true) ?(stdin=`Dev_null) ?(stdo
+   (* Exit the parent, and continue in the child: *)
+   if Lwt_unix.fork () > 0 then begin
+     (* Do not run exit hooks in the parent. *)
+-    Lwt_sequence.iter_node_l Lwt_sequence.remove Lwt_main.exit_hooks [@ocaml.warning "-3"];
++    Lwt_main.Exit_hooks.remove_all ();
+     exit 0
+   end;
diff --git a/devel/ocaml-lwt_log/pkg-descr b/devel/ocaml-lwt_log/pkg-descr
new file mode 100644
index 000000000000..6edea00e6b88
--- /dev/null
+++ b/devel/ocaml-lwt_log/pkg-descr
@@ -0,0 +1,2 @@
+Lwt_log is a logging library for OCaml applications using the Lwt
+threading library.
diff --git a/devel/ocaml-lwt_log/pkg-plist b/devel/ocaml-lwt_log/pkg-plist
new file mode 100644
index 000000000000..862de827a43f
--- /dev/null
+++ b/devel/ocaml-lwt_log/pkg-plist
@@ -0,0 +1,35 @@
+%%OCAML_SITELIBDIR%%/lwt_log/META
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_core.a
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_core.cma
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_core.cmi
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_core.cmt
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_core.cmti
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_core.cmx
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_core.cmxa
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_core.cmxs
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_core.ml
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_core.mli
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_rules.cmi
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_rules.cmt
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_rules.cmti
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_rules.cmx
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_rules.ml
+%%OCAML_SITELIBDIR%%/lwt_log/core/lwt_log_rules.mli
+%%OCAML_SITELIBDIR%%/lwt_log/dune-package
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_daemon.cmi
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_daemon.cmt
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_daemon.cmti
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_daemon.cmx
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_daemon.ml
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_daemon.mli
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_log.a
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_log.cma
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_log.cmi
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_log.cmt
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_log.cmti
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_log.cmx
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_log.cmxa
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_log.cmxs
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_log.ml
+%%OCAML_SITELIBDIR%%/lwt_log/lwt_log.mli
+%%OCAML_SITELIBDIR%%/lwt_log/opam


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a419b9c.39b25.496c7089>