git: df31bca0e5bf - main - textproc/ocaml-yojson: New port: JSON library for OCaml

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 26 May 2024 22:39:32 UTC
The branch main has been updated by yuri:

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

commit df31bca0e5bf063ed60335c7d9cd24736ead4e08
Author:     Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2024-05-26 22:36:25 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-05-26 22:38:30 +0000

    textproc/ocaml-yojson: New port: JSON library for OCaml
    
    PR:             279334
---
 textproc/Makefile               |  1 +
 textproc/ocaml-yojson/Makefile  | 35 +++++++++++++++++++++++++
 textproc/ocaml-yojson/distinfo  |  3 +++
 textproc/ocaml-yojson/pkg-descr |  2 ++
 textproc/ocaml-yojson/pkg-plist | 58 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 99 insertions(+)

diff --git a/textproc/Makefile b/textproc/Makefile
index 94339494944b..581a7e9a5149 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -522,6 +522,7 @@
     SUBDIR += ocaml-csv
     SUBDIR += ocaml-expat
     SUBDIR += ocaml-text
+    SUBDIR += ocaml-yojson
     SUBDIR += odt2txt
     SUBDIR += openfts
     SUBDIR += openjade
diff --git a/textproc/ocaml-yojson/Makefile b/textproc/ocaml-yojson/Makefile
new file mode 100644
index 000000000000..b4a10470d145
--- /dev/null
+++ b/textproc/ocaml-yojson/Makefile
@@ -0,0 +1,35 @@
+PORTNAME=	yojson
+PORTVERSION=	2.1.2
+CATEGORIES=	textproc
+PKGNAMEPREFIX=	ocaml-
+
+MAINTAINER=	freebsd@dev.thsi.be
+COMMENT=	JSON library for OCaml
+WWW=		https://github.com/ocaml-community/yojson
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE.md
+
+BUILD_DEPENDS=	cppo:devel/ocaml-cppo \
+		${SA_DIR}/seq/META:devel/ocaml-seq
+RUN_DEPENDS=	${SA_DIR}/seq/META:devel/ocaml-seq
+
+USES=		ocaml:dune
+USE_GITHUB=	yes
+GH_ACCOUNT=	ocaml-community
+USE_OCAML=	yes
+DUNE_INSTALL_TARGETS=	${OCAML_PACKAGES}
+
+DOCSDIR=	${OCAML_DOCSDIR}/${PORTNAME}
+PORTDOCS=	CHANGES.md LICENSE.md README.md odoc-pages/index.mld
+
+OPTIONS_DEFINE=		DOCS
+
+SA_DIR=		${LOCALBASE}/${OCAML_SITELIBDIR}
+
+post-install:
+	@${STRIP_CMD} \
+		${STAGEDIR}${PREFIX}/bin/ydump \
+		${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${PORTNAME}/${PORTNAME}.cmxs
+
+.include <bsd.port.mk>
diff --git a/textproc/ocaml-yojson/distinfo b/textproc/ocaml-yojson/distinfo
new file mode 100644
index 000000000000..34f832199784
--- /dev/null
+++ b/textproc/ocaml-yojson/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1716287417
+SHA256 (ocaml-community-yojson-2.1.2_GH0.tar.gz) = fd84f8a6cf5bdae6c6b235be8d40d1788c1427291e02bf0e6a4d5cfad7f881bf
+SIZE (ocaml-community-yojson-2.1.2_GH0.tar.gz) = 49324
diff --git a/textproc/ocaml-yojson/pkg-descr b/textproc/ocaml-yojson/pkg-descr
new file mode 100644
index 000000000000..46a6b6f58700
--- /dev/null
+++ b/textproc/ocaml-yojson/pkg-descr
@@ -0,0 +1,2 @@
+The Yojson library provides several types for working with the
+JavaScript Object Notation with Objective-Caml.
diff --git a/textproc/ocaml-yojson/pkg-plist b/textproc/ocaml-yojson/pkg-plist
new file mode 100644
index 000000000000..48cc9961154b
--- /dev/null
+++ b/textproc/ocaml-yojson/pkg-plist
@@ -0,0 +1,58 @@
+bin/ydump
+%%OCAML_SITELIBDIR%%/yojson/META
+%%OCAML_SITELIBDIR%%/yojson/basic.ml
+%%OCAML_SITELIBDIR%%/yojson/basic.mli
+%%OCAML_SITELIBDIR%%/yojson/codec.ml
+%%OCAML_SITELIBDIR%%/yojson/codec.mli
+%%OCAML_SITELIBDIR%%/yojson/common.ml
+%%OCAML_SITELIBDIR%%/yojson/common.mli
+%%OCAML_SITELIBDIR%%/yojson/dune-package
+%%OCAML_SITELIBDIR%%/yojson/lexer_utils.ml
+%%OCAML_SITELIBDIR%%/yojson/opam
+%%OCAML_SITELIBDIR%%/yojson/raw.ml
+%%OCAML_SITELIBDIR%%/yojson/raw.mli
+%%OCAML_SITELIBDIR%%/yojson/safe.ml
+%%OCAML_SITELIBDIR%%/yojson/safe.mli
+%%OCAML_SITELIBDIR%%/yojson/t.ml
+%%OCAML_SITELIBDIR%%/yojson/t.mli
+%%OCAML_SITELIBDIR%%/yojson/yojson.a
+%%OCAML_SITELIBDIR%%/yojson/yojson.cma
+%%OCAML_SITELIBDIR%%/yojson/yojson.cmi
+%%OCAML_SITELIBDIR%%/yojson/yojson.cmt
+%%OCAML_SITELIBDIR%%/yojson/yojson.cmti
+%%OCAML_SITELIBDIR%%/yojson/yojson.cmx
+%%OCAML_SITELIBDIR%%/yojson/yojson.cmxa
+%%OCAML_SITELIBDIR%%/yojson/yojson.cmxs
+%%OCAML_SITELIBDIR%%/yojson/yojson.ml
+%%OCAML_SITELIBDIR%%/yojson/yojson.mli
+%%OCAML_SITELIBDIR%%/yojson/yojson__.cmi
+%%OCAML_SITELIBDIR%%/yojson/yojson__.cmt
+%%OCAML_SITELIBDIR%%/yojson/yojson__.cmx
+%%OCAML_SITELIBDIR%%/yojson/yojson__.ml
+%%OCAML_SITELIBDIR%%/yojson/yojson__Basic.cmi
+%%OCAML_SITELIBDIR%%/yojson/yojson__Basic.cmt
+%%OCAML_SITELIBDIR%%/yojson/yojson__Basic.cmti
+%%OCAML_SITELIBDIR%%/yojson/yojson__Basic.cmx
+%%OCAML_SITELIBDIR%%/yojson/yojson__Codec.cmi
+%%OCAML_SITELIBDIR%%/yojson/yojson__Codec.cmt
+%%OCAML_SITELIBDIR%%/yojson/yojson__Codec.cmti
+%%OCAML_SITELIBDIR%%/yojson/yojson__Codec.cmx
+%%OCAML_SITELIBDIR%%/yojson/yojson__Common.cmi
+%%OCAML_SITELIBDIR%%/yojson/yojson__Common.cmt
+%%OCAML_SITELIBDIR%%/yojson/yojson__Common.cmti
+%%OCAML_SITELIBDIR%%/yojson/yojson__Common.cmx
+%%OCAML_SITELIBDIR%%/yojson/yojson__Lexer_utils.cmi
+%%OCAML_SITELIBDIR%%/yojson/yojson__Lexer_utils.cmt
+%%OCAML_SITELIBDIR%%/yojson/yojson__Lexer_utils.cmx
+%%OCAML_SITELIBDIR%%/yojson/yojson__Raw.cmi
+%%OCAML_SITELIBDIR%%/yojson/yojson__Raw.cmt
+%%OCAML_SITELIBDIR%%/yojson/yojson__Raw.cmti
+%%OCAML_SITELIBDIR%%/yojson/yojson__Raw.cmx
+%%OCAML_SITELIBDIR%%/yojson/yojson__Safe.cmi
+%%OCAML_SITELIBDIR%%/yojson/yojson__Safe.cmt
+%%OCAML_SITELIBDIR%%/yojson/yojson__Safe.cmti
+%%OCAML_SITELIBDIR%%/yojson/yojson__Safe.cmx
+%%OCAML_SITELIBDIR%%/yojson/yojson__T.cmi
+%%OCAML_SITELIBDIR%%/yojson/yojson__T.cmt
+%%OCAML_SITELIBDIR%%/yojson/yojson__T.cmti
+%%OCAML_SITELIBDIR%%/yojson/yojson__T.cmx