git: 04b1405ac5a5 - main - devel/ocaml-cfg: update the port to version 2.2.0

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Tue, 05 Apr 2022 09:49:51 UTC
The branch main has been updated by danfe:

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

commit 04b1405ac5a56b2b3f8c1726a1deef2cec5abc2b
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-04-05 09:48:24 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-04-05 09:48:24 +0000

    devel/ocaml-cfg: update the port to version 2.2.0
    
    This version is compatible with OCaml 4.06+ and allows to build
    dependent `devel/aifad' port with minimal patching.  While here,
    change the COMMENT to match upstream and flatten `pkg-plist'.
---
 devel/aifad/Makefile      |  3 +++
 devel/aifad/distinfo      |  5 +++++
 devel/ocaml-cfg/Makefile  | 30 ++++++++++------------------
 devel/ocaml-cfg/distinfo  |  5 +++--
 devel/ocaml-cfg/pkg-plist | 50 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 71 insertions(+), 22 deletions(-)

diff --git a/devel/aifad/Makefile b/devel/aifad/Makefile
index 03172b2e6b26..b53619d5e5f7 100644
--- a/devel/aifad/Makefile
+++ b/devel/aifad/Makefile
@@ -5,6 +5,9 @@ PORTVERSION=	2.0.8
 DISTVERSIONPREFIX=	v
 CATEGORIES=	devel
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES=	6c94276f361614b4c447.diff:-p1 e08856647724737ca15e.diff:-p1
+
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Machine learning system
 
diff --git a/devel/aifad/distinfo b/devel/aifad/distinfo
index 95cba975796d..b21284d899b5 100644
--- a/devel/aifad/distinfo
+++ b/devel/aifad/distinfo
@@ -1,2 +1,7 @@
+TIMESTAMP = 1451341539
 SHA256 (mmottl-aifad-v2.0.8_GH0.tar.gz) = 05fad5062601ec99c5d40a0202ba818f77309a12c1469d23acddf2353d255c7c
 SIZE (mmottl-aifad-v2.0.8_GH0.tar.gz) = 105438
+SHA256 (6c94276f361614b4c447.diff) = c67d06224c70906b7e4305a9e7cf830eaf0422626962dd7d1792441d23f514bb
+SIZE (6c94276f361614b4c447.diff) = 2056
+SHA256 (e08856647724737ca15e.diff) = 216dad3a8411882ef7bd34706dfbd9ad47978e1fdddc1790f9389d1d08607121
+SIZE (e08856647724737ca15e.diff) = 476
diff --git a/devel/ocaml-cfg/Makefile b/devel/ocaml-cfg/Makefile
index bcc6b99f4f72..ce47e79b02af 100644
--- a/devel/ocaml-cfg/Makefile
+++ b/devel/ocaml-cfg/Makefile
@@ -1,43 +1,33 @@
 # Created by: Stanislav Sedov <ssedov@mbsd.msk.ru>
 
 PORTNAME=	cfg
-PORTVERSION=	2.0.4
-DISTVERSIONPREFIX=	v
+PORTVERSION=	2.2.0
 CATEGORIES=	devel
 PKGNAMEPREFIX=	ocaml-
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	Library for manipulation of context-free grammars
+COMMENT=	Library for manipulating context-free grammars
 
 LICENSE=	LGPL21+
-LICENSE_FILE=	${WRKSRC}/COPYING.txt
+LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-BUILD_DEPENDS=	menhir:devel/menhir
-BUILD_DEPENDS+=	ocamlbuild:devel/ocaml-ocamlbuild
+BUILD_DEPENDS=	dune:devel/ocaml-dune
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	mmottl
-
 USE_OCAML=	yes
-USE_OCAML_FINDLIB=yes
-USE_OCAMLFIND_PLIST=yes
-USE_OCAML_WASH=	yes
-
-HAS_CONFIGURE=	yes
-CONFIGURE_ARGS=	--prefix ${PREFIX} --disable-docs --disable-examples
-MAKE_JOBS_UNSAFE=yes
 
 DOCSDIR=	${OCAML_DOCSDIR}/${PORTNAME}
 EXAMPLESDIR=	${OCAML_EXAMPLESDIR}/${PORTNAME}
 
-PORTDOCS=	*
-PORTEXAMPLES=	*
-
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
-post-install-DOCS-on:
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	cd ${WRKSRC} && ${INSTALL_DATA} AUTHORS.txt CHANGES.txt README.md ${STAGEDIR}${DOCSDIR}
+do-build:
+	cd ${BUILD_WRKSRC} && dune build --verbose
+
+do-install:
+	cd ${INSTALL_WRKSRC} && dune install --destdir=${STAGEDIR} \
+		--prefix=${PREFIX} --libdir=${OCAML_SITELIBDIR}
 
 post-install-EXAMPLES-on:
 	@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
diff --git a/devel/ocaml-cfg/distinfo b/devel/ocaml-cfg/distinfo
index ed2b3f128712..3166704a6f89 100644
--- a/devel/ocaml-cfg/distinfo
+++ b/devel/ocaml-cfg/distinfo
@@ -1,2 +1,3 @@
-SHA256 (mmottl-cfg-v2.0.4_GH0.tar.gz) = 13778fd8a827a3c9491e092a9daea073ef7f59c043a23bdcdc05b85253405595
-SIZE (mmottl-cfg-v2.0.4_GH0.tar.gz) = 61660
+TIMESTAMP = 1534699827
+SHA256 (mmottl-cfg-2.2.0_GH0.tar.gz) = 72c0f3734c1eb99ae11a88db3332bee8e6b17160e74e92f1f0931b3ae7ef00fd
+SIZE (mmottl-cfg-2.2.0_GH0.tar.gz) = 19189
diff --git a/devel/ocaml-cfg/pkg-plist b/devel/ocaml-cfg/pkg-plist
new file mode 100644
index 000000000000..5dcbad885070
--- /dev/null
+++ b/devel/ocaml-cfg/pkg-plist
@@ -0,0 +1,50 @@
+%%OCAML_SITELIBDIR%%/cfg/META
+%%OCAML_SITELIBDIR%%/cfg/bnf_lexer.ml
+%%OCAML_SITELIBDIR%%/cfg/bnf_parser.ml
+%%OCAML_SITELIBDIR%%/cfg/bnf_parser.mli
+%%OCAML_SITELIBDIR%%/cfg/bnf_pp.ml
+%%OCAML_SITELIBDIR%%/cfg/bnf_pp.mli
+%%OCAML_SITELIBDIR%%/cfg/bnf_spec.ml
+%%OCAML_SITELIBDIR%%/cfg/bnf_spec.mli
+%%OCAML_SITELIBDIR%%/cfg/cfg.a
+%%OCAML_SITELIBDIR%%/cfg/cfg.cma
+%%OCAML_SITELIBDIR%%/cfg/cfg.cmi
+%%OCAML_SITELIBDIR%%/cfg/cfg.cmt
+%%OCAML_SITELIBDIR%%/cfg/cfg.cmx
+%%OCAML_SITELIBDIR%%/cfg/cfg.cmxa
+%%OCAML_SITELIBDIR%%/cfg/cfg.cmxs
+%%OCAML_SITELIBDIR%%/cfg/cfg.ml
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_lexer.cmi
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_lexer.cmt
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_lexer.cmx
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_parser.cmi
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_parser.cmt
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_parser.cmti
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_parser.cmx
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_pp.cmi
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_pp.cmt
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_pp.cmti
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_pp.cmx
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_spec.cmi
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_spec.cmt
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_spec.cmti
+%%OCAML_SITELIBDIR%%/cfg/cfg__Bnf_spec.cmx
+%%OCAML_SITELIBDIR%%/cfg/cfg__Cfg_impl.cmi
+%%OCAML_SITELIBDIR%%/cfg/cfg__Cfg_impl.cmt
+%%OCAML_SITELIBDIR%%/cfg/cfg__Cfg_impl.cmti
+%%OCAML_SITELIBDIR%%/cfg/cfg__Cfg_impl.cmx
+%%OCAML_SITELIBDIR%%/cfg/cfg__Cfg_intf.cmi
+%%OCAML_SITELIBDIR%%/cfg/cfg__Cfg_intf.cmt
+%%OCAML_SITELIBDIR%%/cfg/cfg__Cfg_intf.cmx
+%%OCAML_SITELIBDIR%%/cfg/cfg_impl.ml
+%%OCAML_SITELIBDIR%%/cfg/cfg_impl.mli
+%%OCAML_SITELIBDIR%%/cfg/cfg_intf.ml
+%%OCAML_SITELIBDIR%%/cfg/dune-package
+%%OCAML_SITELIBDIR%%/cfg/opam
+%%PORTDOCS%%%%DOCSDIR%%/CHANGES.md
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE.md
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bnf.ml
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dune
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test.bnf