ocaml-pcre needs an update for ocaml 4.13. Below is an update to the
latest version. The build system switches to dune as well.
The only direct consumer, devel/coccinelle, built fine with this update
and the coccinelle tests seem to run well after the update of pcre.
ok?
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/ocaml-pcre/Makefile,v
retrieving revision 1.19
diff -u -p -u -r1.19 Makefile
--- Makefile 10 Dec 2021 04:10:59 -0000 1.19
+++ Makefile 19 Dec 2021 17:23:23 -0000
@@ -3,29 +3,34 @@
COMMENT = OCaml Perl-compatible regexp library
CATEGORIES = devel textproc
-V = 7.2.3
+V = 7.5.0
NAME = ocaml-pcre
-DISTNAME = pcre-ocaml-$V
-PKGNAME = ${NAME}-$V
-MASTER_SITES = https://github.com/mmottl/pcre-ocaml/releases/download/v${V}/
+DISTNAME = pcre-$V
+PKGNAME = ocaml-${DISTNAME}
+MASTER_SITES = https://github.com/mmottl/pcre-ocaml/releases/download/${V}/
+EXTRACT_SUFX = .tbz
HOMEPAGE = https://github.com/mmottl/pcre-ocaml
-REVISION = 5
# GPLv2+
PERMIT_PACKAGE = Yes
MODULES = lang/ocaml
-BUILD_DEPENDS = sysutils/findlib devel/ocaml-ocamlbuild
+BUILD_DEPENDS = sysutils/findlib \
+ devel/dune \
+ devel/dune,-configurator \
+ devel/ocaml-ocamlbuild
+
LIB_DEPENDS = devel/pcre
-WANTLIB = pcre
-CONFIGURE_STYLE = oasis
+WANTLIB = pcre
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${NAME}
- @cp -R ${WRKDIST}/examples/* ${PREFIX}/share/examples/${NAME}/
+ cp -R ${WRKDIST}/examples/* ${PREFIX}/share/examples/${NAME}/
${INSTALL_DATA} ${FILESDIR}/README ${PREFIX}/share/examples/${NAME}/
- @chmod -R u=rwX,go=rX ${PREFIX}/share/examples/${NAME}/*
+ chmod -R u=rwX,go=rX ${PREFIX}/share/examples/${NAME}/*
+ mv ${PREFIX}/doc/pcre ${PREFIX}/share/doc/${NAME}
+ rm -rf ${PREFIX}/doc
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/ocaml-pcre/distinfo,v
retrieving revision 1.5
diff -u -p -u -r1.5 distinfo
--- distinfo 1 Nov 2016 22:02:59 -0000 1.5
+++ distinfo 19 Dec 2021 17:23:23 -0000
@@ -1,2 +1,2 @@
-SHA256 (pcre-ocaml-7.2.3.tar.gz) = YzlpTb63BsUJcYDtHXmy2uaBvxVaR4CnkJr0mw5vRmY=
-SIZE (pcre-ocaml-7.2.3.tar.gz) = 88307
+SHA256 (pcre-7.5.0.tbz) = ZxFC9AtthhccvAZyU/qt+QMBkWHVdIi9D7bFRWwsvRo=
+SIZE (pcre-7.5.0.tbz) = 41158
Index: patches/patch-Makefile
===================================================================
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile 19 Dec 2021 17:23:23 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -1,7 +1,10 @@
+ .PHONY: all clean doc
+
+ all:
+- dune build @install
++ dune build
++
++install:
++ dune install
+
+ clean:
+ dune clean
Index: patches/patch-_oasis
===================================================================
RCS file: patches/patch-_oasis
diff -N patches/patch-_oasis
--- patches/patch-_oasis 1 Nov 2016 22:02:59 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- _oasis.orig Sat Sep 24 19:34:30 2016
-+++ _oasis Sat Sep 24 19:34:39 2016
-@@ -32,7 +32,7 @@
- BuildDepends: bytes
- CCOpt: -g -O2 -fPIC -DPIC
- if flag(strict) && ccomp_type(cc)
-- CCOpt+: -Wall -pedantic -Wextra -Wunused -Wno-long-long
-Wno-keyword-macro
-+ CCOpt+: -Wall -pedantic -Wextra -Wunused -Wno-long-long
-
-
- # Examples
Index: patches/patch-myocamlbuild_ml
===================================================================
RCS file: patches/patch-myocamlbuild_ml
diff -N patches/patch-myocamlbuild_ml
--- patches/patch-myocamlbuild_ml 1 Nov 2016 22:02:59 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- myocamlbuild.ml.orig Wed Jul 6 11:01:23 2016
-+++ myocamlbuild.ml Wed Jul 6 11:01:34 2016
-@@ -648,8 +648,6 @@
- A "-Wunused";
- A "-ccopt";
- A "-Wno-long-long";
-- A "-ccopt";
-- A "-Wno-keyword-macro"
- ])
- ])
- ];
Index: patches/patch-setup_ml
===================================================================
RCS file: patches/patch-setup_ml
diff -N patches/patch-setup_ml
--- patches/patch-setup_ml 1 Nov 2016 22:02:59 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
---- setup.ml.orig Sat Sep 24 19:27:20 2016
-+++ setup.ml Sat Sep 24 19:27:38 2016
-@@ -6786,7 +6786,6 @@
- "-Wextra";
- "-Wunused";
- "-Wno-long-long";
-- "-Wno-keyword-macro"
- ])
- ];
- bs_cclib = [(OASISExpr.EBool true, [])];
Index: pkg/PFRAG.dynlink-native
===================================================================
RCS file: /cvs/ports/devel/ocaml-pcre/pkg/PFRAG.dynlink-native,v
retrieving revision 1.1
diff -u -p -u -r1.1 PFRAG.dynlink-native
--- pkg/PFRAG.dynlink-native 18 Aug 2012 22:22:42 -0000 1.1
+++ pkg/PFRAG.dynlink-native 19 Dec 2021 17:23:23 -0000
@@ -1,2 +1,2 @@
@comment $OpenBSD: PFRAG.dynlink-native,v 1.1 2012/08/18 22:22:42 avsm Exp $
-@bin lib/ocaml/pcre/pcre.cmxs
+lib/ocaml/pcre/pcre.cmxs
Index: pkg/PFRAG.native
===================================================================
RCS file: /cvs/ports/devel/ocaml-pcre/pkg/PFRAG.native,v
retrieving revision 1.3
diff -u -p -u -r1.3 PFRAG.native
--- pkg/PFRAG.native 30 Aug 2015 16:02:58 -0000 1.3
+++ pkg/PFRAG.native 19 Dec 2021 17:23:23 -0000
@@ -3,4 +3,3 @@
lib/ocaml/pcre/pcre.a
lib/ocaml/pcre/pcre.cmx
lib/ocaml/pcre/pcre.cmxa
-lib/ocaml/pcre/pcre_compat.cmx
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/ocaml-pcre/pkg/PLIST,v
retrieving revision 1.5
diff -u -p -u -r1.5 PLIST
--- pkg/PLIST 29 Mar 2016 11:27:00 -0000 1.5
+++ pkg/PLIST 19 Dec 2021 17:23:23 -0000
@@ -2,42 +2,27 @@
%%native%%
lib/ocaml/pcre/
lib/ocaml/pcre/META
+lib/ocaml/pcre/dune-package
lib/ocaml/pcre/libpcre_stubs.a
-lib/ocaml/pcre/pcre.annot
+lib/ocaml/pcre/opam
lib/ocaml/pcre/pcre.cma
lib/ocaml/pcre/pcre.cmi
lib/ocaml/pcre/pcre.cmt
lib/ocaml/pcre/pcre.cmti
+lib/ocaml/pcre/pcre.ml
lib/ocaml/pcre/pcre.mli
lib/ocaml/stublibs/dllpcre_stubs.so
-@comment lib/ocaml/stublibs/dllpcre_stubs.so.owner
share/doc/ocaml-pcre/
-share/doc/ocaml-pcre/api/
-share/doc/ocaml-pcre/api/Pcre.html
-share/doc/ocaml-pcre/api/index.html
-share/doc/ocaml-pcre/api/index_attributes.html
-share/doc/ocaml-pcre/api/index_class_types.html
-share/doc/ocaml-pcre/api/index_classes.html
-share/doc/ocaml-pcre/api/index_exceptions.html
-share/doc/ocaml-pcre/api/index_extensions.html
-share/doc/ocaml-pcre/api/index_methods.html
-share/doc/ocaml-pcre/api/index_module_types.html
-share/doc/ocaml-pcre/api/index_modules.html
-share/doc/ocaml-pcre/api/index_types.html
-share/doc/ocaml-pcre/api/index_values.html
-share/doc/ocaml-pcre/api/style.css
-share/doc/ocaml-pcre/api/type_Pcre.html
+share/doc/ocaml-pcre/CHANGES.md
+share/doc/ocaml-pcre/LICENSE.md
+share/doc/ocaml-pcre/README.md
share/examples/ocaml-pcre/
+share/examples/ocaml-pcre/Makefile
share/examples/ocaml-pcre/README
-share/examples/ocaml-pcre/cloc/
-share/examples/ocaml-pcre/cloc/README.md
-share/examples/ocaml-pcre/cloc/cloc.ml
-share/examples/ocaml-pcre/count_hash/
-share/examples/ocaml-pcre/count_hash/README.md
-share/examples/ocaml-pcre/count_hash/count_hash.ml
-share/examples/ocaml-pcre/pcregrep/
-share/examples/ocaml-pcre/pcregrep/README.md
-share/examples/ocaml-pcre/pcregrep/pcregrep.ml
-share/examples/ocaml-pcre/subst/
-share/examples/ocaml-pcre/subst/README.md
-share/examples/ocaml-pcre/subst/subst.ml
+share/examples/ocaml-pcre/README.md
+share/examples/ocaml-pcre/cloc.ml
+share/examples/ocaml-pcre/count_hash.ml
+share/examples/ocaml-pcre/dfa_restart.ml
+share/examples/ocaml-pcre/dune
+share/examples/ocaml-pcre/pcregrep.ml
+share/examples/ocaml-pcre/subst.ml