replace pcre with pcre2
PATCH v2 1/1 replace pcre with pcre2
Since pcre is unmaintained, the usage of ocaml-pcre will be replaced with ocaml-pcre2. While other regular expession libraries for OCaml exists, they are not as feature complete as pcre2 is.
This is the minimal change to use ocaml-pcre2. To reduce the size of this patch, a separeate commit will be required to import pcre2-ocaml.git into bundles/pcre2.
---
Makefile | 15 +++++++-------
Makefile.config.in | 18 ++++++++---------
Makefile.libs | 18 ++++++++---------
bundles/{pcre => pcre2}/.gitignore | 0
bundles/{pcre => pcre2}/Makefile | 0
bundles/{pcre => pcre2}/bytes_compat.ml | 0
bundles/{pcre => pcre2}/pcre-ocaml/.gitignore | 0
bundles/{pcre => pcre2}/pcre-ocaml/CHANGES.md | 0
bundles/{pcre => pcre2}/pcre-ocaml/LICENSE.md | 0
bundles/{pcre => pcre2}/pcre-ocaml/Makefile | 0
bundles/{pcre => pcre2}/pcre-ocaml/README.md | 0
bundles/{pcre => pcre2}/pcre-ocaml/dune | 0
.../{pcre => pcre2}/pcre-ocaml/dune-project | 0
.../pcre-ocaml/examples/Makefile | 0
.../pcre-ocaml/examples/README.md | 0
.../pcre-ocaml/examples/cloc.ml | 0
.../pcre-ocaml/examples/count_hash.ml | 0
.../{pcre => pcre2}/pcre-ocaml/examples/dune | 0
.../pcre-ocaml/examples/pcregrep.ml | 0
.../pcre-ocaml/examples/subst.ml | 0
bundles/{pcre => pcre2}/pcre-ocaml/pcre.opam | 0
.../pcre-ocaml/pre-v7.3.0-CHANGES.txt | 0
.../{pcre => pcre2}/pcre-ocaml/src/.gitignore | 0
.../{pcre => pcre2}/pcre-ocaml/src/Makefile | 0
.../pcre-ocaml/src/config/Makefile | 0
.../pcre-ocaml/src/config/discover.ml | 0
.../pcre-ocaml/src/config/dune | 0
bundles/{pcre => pcre2}/pcre-ocaml/src/dune | 0
.../{pcre => pcre2}/pcre-ocaml/src/pcre.ml.in | 0
.../{pcre => pcre2}/pcre-ocaml/src/pcre.mli | 0
.../pcre-ocaml/src/pcre_stubs.c.in | 0
coccinelle.opam | 2 +-
configure.ac | 20 +++++++++----------
globals/regexp_pcre.ml | 10 +++++-----
install.txt | 16 +++++++--------
setup/fake-subst.sh | 6 +++---
36 files changed, 52 insertions(+), 53 deletions(-)
rename bundles/{pcre => pcre2}/.gitignore (100%)
rename bundles/{pcre => pcre2}/Makefile (100%)
rename bundles/{pcre => pcre2}/bytes_compat.ml (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/.gitignore (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/CHANGES.md (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/LICENSE.md (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/Makefile (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/README.md (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/dune (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/dune-project (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/examples/Makefile (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/examples/README.md (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/examples/cloc.ml (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/examples/count_hash.ml (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/examples/dune (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/examples/pcregrep.ml (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/examples/subst.ml (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/pcre.opam (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/pre-v7.3.0-CHANGES.txt (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/src/.gitignore (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/src/Makefile (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/src/config/Makefile (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/src/config/discover.ml (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/src/config/dune (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/src/dune (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/src/pcre.ml.in (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/src/pcre.mli (100%)
rename bundles/{pcre => pcre2}/pcre-ocaml/src/pcre_stubs.c.in (100%)Makefile +7 -8
@@ -101,7 +101,7 @@ PREFIX_spgen := tools/spgen/source/ CORE_LIBS := unix str ocamlcommon \ $(STDCOMPATDIR)/stdcompat \ $(patsubst %,bytes,$(BYTESDIR)) \ - $(patsubst %,pcre,$(filter %/pcre.cma,$(LNKLIBS))) + $(patsubst %,pcre2,$(filter %/pcre2.cma,$(LNKLIBS))) ifeq ($(OCAMLATLEAST50),no) CORE_LIBS += bigarray
@@ -121,7 +121,7 @@ LIBRARIES_spatch := $(LIBRARIES) LIBRARIES_spgen := $(CORE_LIBRARIES) -CORE_BUNDLES=stdcompat menhirLib pcre +CORE_BUNDLES=stdcompat menhirLib pcre2 ALL_BUNDLES=$(CORE_BUNDLES) parmap pyml
@@ -214,7 +214,7 @@ MENHIR_LIB := \ $(addsuffix /menhirLib$(LIBSUFFIX),$(filter %/menhirLib,$(MAKELIBS))) PARMAP_LIB := $(addsuffix /parmap$(LIBSUFFIX),$(filter %/parmap,$(MAKELIBS))) PYML_LIB := $(addsuffix /pyml$(LIBSUFFIX),$(filter %/pyml,$(MAKELIBS))) -PCRE_LIB := $(addsuffix /pcre$(LIBSUFFIX),$(filter %/pcre,$(MAKELIBS))) +PCRE_LIB := $(addsuffix /pcre2$(LIBSUFFIX),$(filter %/pcre2,$(MAKELIBS))) STDCOMPAT_LIB := $(STDCOMPATDIR)/stdcompat$(LIBSUFFIX) STDCOMPAT_USERS := parsing_c/type_annoter_c cocci parsing_cocci/check_meta \
@@ -319,8 +319,8 @@ install-spatch : spatch$(TOOLS_SUFFIX) $(INSTALL_PROGRAM) bundles/pyml/dllpyml_stubs.so \ $(DESTDIR)$(LIBDIR); \ fi - if test -f bundles/pcre/dllpcre_stubs.so; then \ - $(INSTALL_PROGRAM) bundles/pcre/dllpcre_stubs.so \ + if test -f bundles/pcre2/dllpcre_stubs.so; then \ + $(INSTALL_PROGRAM) bundles/pcre2/dllpcre_stubs.so \ $(DESTDIR)$(LIBDIR); \ fi $(INSTALL_PROGRAM) spatch$(TOOLS_SUFFIX) $(DESTDIR)$(BINDIR)/spatch
@@ -521,11 +521,10 @@ endif ifneq ($(PCRE_LIB),) ifeq ($(NATIVE),yes) $(PCRE_LIB): $(STDCOMPAT_LIB) - $(MAKE) -C bundles/pcre all - $(MAKE) -C bundles/pcre all.opt + $(MAKE) -C bundles/pcre2 all else $(PCRE_LIB): $(STDCOMPAT_LIB) - $(MAKE) -C bundles/pcre all + $(MAKE) -C bundles/pcre2 all endif endif
Makefile.config.in +9 -9
@@ -5,18 +5,18 @@ VERSION=@PACKAGE_VERSION@ # * for each library $1, add another entry in the same manner -MAKELIBS=@MAKE_dynlink@ @MAKE_menhirLib@ @MAKE_pyml@ @MAKE_pcre@ \ +MAKELIBS=@MAKE_dynlink@ @MAKE_menhirLib@ @MAKE_pyml@ @MAKE_pcre2@ \ @MAKE_parmap@ -LNKLIBS=@MODULES_dynlink@ @MODULES_menhirLib@ @MODULES_pcre@ @MODULES_pyml@ \ +LNKLIBS=@MODULES_dynlink@ @MODULES_menhirLib@ @MODULES_pcre2@ @MODULES_pyml@ \ @MODULES_parmap@ OPTLNKLIBS=@MODULESOPT_dynlink@ @MODULESOPT_menhirLib@ @MODULESOPT_pyml@ \ - @MODULESOPT_pcre@ @MODULESOPT_parmap@ -INCLIBS=@PATH_dynlink@ @PATH_menhirLib@ @PATH_pyml@ @PATH_pcre@ \ + @MODULESOPT_pcre2@ @MODULESOPT_parmap@ +INCLIBS=@PATH_dynlink@ @PATH_menhirLib@ @PATH_pyml@ @PATH_pcre2@ \ @PATH_parmap@ -FLAGSLIBS=@FLAGS_dynlink@ @FLAGS_menhirLib@ @FLAGS_pyml@ @FLAGS_pcre@ \ +FLAGSLIBS=@FLAGS_dynlink@ @FLAGS_menhirLib@ @FLAGS_pyml@ @FLAGS_pcre2@ \ @FLAGS_parmap@ OPTFLAGSLIBS=@OPTFLAGS_dynlink@ @OPTFLAGS_menhirLib@ @OPTFLAGS_pyml@ \ - @OPTFLAGS_pcre@ @OPTFLAGS_parmap@ + @OPTFLAGS_pcre2@ @OPTFLAGS_parmap@ # * end of library variables # system packages inc libs
@@ -106,7 +106,7 @@ METAINFO_DIR=@METAINFO_DIR@ # selected libraries FEATURE_menhirLib=@FEATURE_menhirLib@ -FEATURE_pcre=@FEATURE_pcre@ +FEATURE_pcre=@FEATURE_pcre2@ # Features FEATURE_PYTHON=@FEATURE_PYTHON@
@@ -114,7 +114,7 @@ FEATURE_OCAML=@FEATURE_OCAML@ NO_OCAMLFIND=@SUBSTITUTED_OCAMLFIND@ # Include paths -PCREDIR=@PATH_pcre@ +PCREDIR=@PATH_pcre2@ PARMAPDIR=@PATH_parmap@ PYMLDIR=@PATH_pyml@ MENHIRDIR=@PATH_menhirLib@
@@ -129,4 +129,4 @@ REGEXP_FILE=@REGEXP_FILE@ MENHIR_FLAGS=@DEFAULT_MENHIR_FLAGS@ -OCAMLATLEAST50=@OCAMLATLEAST50@ +OCAMLATLEAST50=@OCAMLATLEAST50@
Makefile.libs +9 -9
@@ -36,15 +36,15 @@ OPTFLAGS_pyml = $(CFLAGS_pyml:%=-ccopt %) -cclib -lpyml_stubs # pcre library # Note: see the comment of the pycaml library about the double appearance of the stubs library. -LOCAL_pcre = $(BYTESDIR:=/bytes.cma) $(PCREDIR)/pcre.cma -LOCALOPT_pcre = $(BYTESDIR:=/bytes.cmxa) $(PCREDIR)/pcre.cmxa -GLOBAL_pcre = $(BYTESDIR:=/bytes.cma) $(PCREDIR)/pcre.cma -GLOBALOPT_pcre = $(BYTESDIR:=/bytes.cmxa) $(PCREDIR)/pcre.cmxa -FLAGS_pcre = \ - $(PCRE_LIBS:%=-ccopt %) -cclib -L$(PCREDIR) -dllib -lpcre_stubs \ - -cclib -lpcre_stubs -OPTFLAGS_pcre = \ - $(PCRE_LIBS:%=-ccopt %) -cclib -L$(PCREDIR) -cclib -lpcre_stubs +LOCAL_pcre2 = $(BYTESDIR:=/bytes.cma) $(PCREDIR)/pcre2.cma +LOCALOPT_pcre2 = $(BYTESDIR:=/bytes.cmxa) $(PCREDIR)/pcre2.cmxa +GLOBAL_pcre2 = $(BYTESDIR:=/bytes.cma) $(PCREDIR)/pcre2.cma +GLOBALOPT_pcre2 = $(BYTESDIR:=/bytes.cmxa) $(PCREDIR)/pcre2.cmxa +FLAGS_pcre2 = \ + $(PCRE_LIBS:%=-ccopt %) -cclib -L$(PCREDIR) -dllib -lpcre2_stubs \ + -cclib -lpcre2_stubs +OPTFLAGS_pcre2 = \ + $(PCRE_LIBS:%=-ccopt %) -cclib -L$(PCREDIR) -cclib -lpcre2_stubs # dynlink library LOCAL_dynlink =
bundles/pcre2/.gitignore renamed from bundles/pcre/.gitignore +0 -0
bundles/pcre2/Makefile renamed from bundles/pcre/Makefile +0 -0
bundles/pcre2/bytes_compat.ml renamed from bundles/pcre/bytes_compat.ml +0 -0
bundles/pcre2/pcre-ocaml/.gitignore renamed from bundles/pcre/pcre-ocaml/.gitignore +0 -0
bundles/pcre2/pcre-ocaml/CHANGES.md renamed from bundles/pcre/pcre-ocaml/CHANGES.md +0 -0
bundles/pcre2/pcre-ocaml/LICENSE.md renamed from bundles/pcre/pcre-ocaml/LICENSE.md +0 -0
bundles/pcre2/pcre-ocaml/Makefile renamed from bundles/pcre/pcre-ocaml/Makefile +0 -0
bundles/pcre2/pcre-ocaml/README.md renamed from bundles/pcre/pcre-ocaml/README.md +0 -0
bundles/pcre2/pcre-ocaml/dune renamed from bundles/pcre/pcre-ocaml/dune +0 -0
bundles/pcre2/pcre-ocaml/dune-project renamed from bundles/pcre/pcre-ocaml/dune-project +0 -0
bundles/pcre2/pcre-ocaml/examples/Makefile renamed from bundles/pcre/pcre-ocaml/examples/Makefile +0 -0
bundles/pcre2/pcre-ocaml/examples/README.md renamed from bundles/pcre/pcre-ocaml/examples/README.md +0 -0
bundles/pcre2/pcre-ocaml/examples/cloc.ml renamed from bundles/pcre/pcre-ocaml/examples/cloc.ml +0 -0
bundles/pcre2/pcre-ocaml/examples/count_hash.ml renamed from bundles/pcre/pcre-ocaml/examples/count_hash.ml +0 -0
bundles/pcre2/pcre-ocaml/examples/dune renamed from bundles/pcre/pcre-ocaml/examples/dune +0 -0
bundles/pcre2/pcre-ocaml/examples/pcregrep.ml renamed from bundles/pcre/pcre-ocaml/examples/pcregrep.ml +0 -0
bundles/pcre2/pcre-ocaml/examples/subst.ml renamed from bundles/pcre/pcre-ocaml/examples/subst.ml +0 -0
bundles/pcre2/pcre-ocaml/pcre.opam renamed from bundles/pcre/pcre-ocaml/pcre.opam +0 -0
bundles/pcre2/pcre-ocaml/pre-v7.3.0-CHANGES.txt renamed from bundles/pcre/pcre-ocaml/pre-v7.3.0-CHANGES.txt +0 -0
bundles/pcre2/pcre-ocaml/src/.gitignore renamed from bundles/pcre/pcre-ocaml/src/.gitignore +0 -0
bundles/pcre2/pcre-ocaml/src/Makefile renamed from bundles/pcre/pcre-ocaml/src/Makefile +0 -0
bundles/pcre2/pcre-ocaml/src/config/Makefile renamed from bundles/pcre/pcre-ocaml/src/config/Makefile +0 -0
bundles/pcre2/pcre-ocaml/src/config/discover.ml renamed from bundles/pcre/pcre-ocaml/src/config/discover.ml +0 -0
bundles/pcre2/pcre-ocaml/src/config/dune renamed from bundles/pcre/pcre-ocaml/src/config/dune +0 -0
bundles/pcre2/pcre-ocaml/src/dune renamed from bundles/pcre/pcre-ocaml/src/dune +0 -0
bundles/pcre2/pcre-ocaml/src/pcre.ml.in renamed from bundles/pcre/pcre-ocaml/src/pcre.ml.in +0 -0
bundles/pcre2/pcre-ocaml/src/pcre.mli renamed from bundles/pcre/pcre-ocaml/src/pcre.mli +0 -0
bundles/pcre2/pcre-ocaml/src/pcre_stubs.c.in renamed from bundles/pcre/pcre-ocaml/src/pcre_stubs.c.in +0 -0
coccinelle.opam +1 -1
@@ -18,7 +18,7 @@ depends: [ "ocaml" "menhir" "ocamlfind" - "pcre" + "pcre2" "stdcompat" "pyml" { >= "20171117" } "conf-pkg-config"
configure.ac +10 -10
@@ -145,7 +145,7 @@ dnl add a line for each package that is dnl configured via AC_CHECK_COCCI_EXTPKG dnl or AC_REQ_COCCI_EXTPKG AC_COCCI_INIT_PKG_EMPTY([dynlink]) -AC_COCCI_INIT_PKG_EMPTY([pcre]) +AC_COCCI_INIT_PKG_EMPTY([pcre2]) AC_COCCI_INIT_PKG_EMPTY([bytes]) dnl for recent versions of pcre on old OCaml AC_COCCI_INIT_PKG_EMPTY([pyml]) AC_COCCI_INIT_PKG_EMPTY([stdcompat])
@@ -369,18 +369,18 @@ dnl OCAML_PKG_pcre: if "local" use str package AC_ARG_ENABLE([pcre-syntax], AS_HELP_STRING([--enable-pcre-syntax], [enable pcre regular expression syntax (default: auto)])) AS_IF([test "x$enable_pcre_syntax" != "xno"], [dnl - PKG_CHECK_MODULES([PCRE], [libpcre],[AC_SUBST([HAVE_PCRE],[yes])],[AC_SUBST([HAVE_PCRE],[no])]) + PKG_CHECK_MODULES([PCRE], [libpcre2-8],[AC_SUBST([HAVE_PCRE],[yes])],[AC_SUBST([HAVE_PCRE],[no])]) AS_IF([test -z "$enable_pcre_syntax" -a "x$HAVE_PCRE" != xyes], [dnl AC_SUBST([enable_pcre_syntax], [no]) ], [dnl AS_IF([test "x$enable_pcre" = "xno"], [AC_SUBST([enable_pcre], [local])]) - AC_CHECK_COCCI_EXTPKG([pcre]) dnl will set $enable_pcre to 'yes', 'no', or 'local' + AC_CHECK_COCCI_EXTPKG([pcre2]) dnl will set $enable_pcre to 'yes', 'no', or 'local' AS_IF([test "x$enable_pcre" = "xyes"], [dnl AC_MSG_CHECKING([if pcre depends on bytes]) - AS_IF([test "x`$OCAMLFIND query -r -format '%p' pcre 2>/dev/null | grep bytes`" = "xbytes"], + AS_IF([test "x`$OCAMLFIND query -r -format '%p' pcre2 2>/dev/null | grep bytes`" = "xbytes"], [dnl AC_MSG_RESULT([yes]) AC_MSG_CHECKING([if bytes is an actual module])
@@ -407,14 +407,14 @@ AS_IF([test "x$enable_pcre_syntax" != xno], AC_MSG_NOTICE([support for pcre syntax is enabled]) ], [dnl - AC_MSG_ERROR([the pcre feature is enabled but the pkg-config libpcre library is not found]) + AC_MSG_ERROR([the pcre feature is enabled but the pkg-config libpcre2-8 library is not found]) ]) AC_SUBST([REGEXP_MODULE], [Regexp_pcre]) AC_SUBST([REGEXP_FILE], [regexp_pcre.ml]) ], [dnl - AC_COCCI_INIT_PKG_EMPTY([pcre]) + AC_COCCI_INIT_PKG_EMPTY([pcre2]) AC_SUBST([REGEXP_MODULE], [Regexp_str]) AC_SUBST([REGEXP_FILE], [regexp_str.ml]) ])
@@ -571,7 +571,7 @@ AS_IF([test "$MAKE_stdcompat"], AS_IF([test "$MAKE_parmap"], AC_CONFIG_SUBDIRS(bundles/parmap)) -AS_IF([test "$MAKE_pcre"], +AS_IF([test "$MAKE_pcre2"], [AS_IF([test "x$OCAMLATLEAST4030" = xno ], [AC_SUBST([CAMLnoreturn_start], []) AC_SUBST([CAMLnoreturn_end], [])],
@@ -595,8 +595,8 @@ AS_IF([test "$MAKE_pcre"], AC_SUBST([noalloc], [[[@@noalloc]]]) AC_SUBST([untagged], [[[@untagged]]])]) AC_CONFIG_FILES([ - bundles/pcre/pcre-ocaml/src/pcre.ml - bundles/pcre/pcre-ocaml/src/pcre_stubs.c + bundles/pcre2/pcre2-ocaml/src/pcre2.ml + bundles/pcre2/pcre2-ocaml/src/pcre2_stubs.c ])]) dnl
@@ -634,7 +634,7 @@ python scripting: $enable_python (overridable with --enable-python) pcre regexes: $enable_pcre_syntax (overridable with --enable-pcre-syntax) pcre module: $enable_pcre (for local package use --disable-pcre) -pcre library: $HAVE_PCRE (requires the libpcre-ocaml-dev package) +pcre library: $HAVE_PCRE (requires the libpcre2-ocaml-dev package) optimized spatch: $enable_opt (overridable with --disable-opt)
globals/regexp_pcre.ml +5 -5
@@ -5,7 +5,7 @@ *) type regexp = - Pcre of int (* Pcre.regexp *) + Pcre2 of int (* Pcre2.regexp *) | Str of Str.regexp (* A table is used because PCRE regular expressions are not comparable.
@@ -26,16 +26,16 @@ let regexp string = begin let c = !pcre_ctr in pcre_ctr := !pcre_ctr + 1; - Hashtbl.add pcre_table c (Pcre.regexp string); - Pcre c + Hashtbl.add pcre_table c (Pcre2.regexp string); + Pcre2 c end else Str (Str.regexp string) let string_match regexp string = match regexp with - Pcre regexp -> + Pcre2 regexp -> let regexp = Hashtbl.find pcre_table regexp in - Pcre.pmatch ~rex:regexp string + Pcre2.pmatch ~rex:regexp string | Str regexp -> try ignore(Str.search_forward regexp string 0);
install.txt +8 -8
@@ -30,13 +30,13 @@ On Debian/Ubuntu, install the following packages: If you do not install libparmap-ocaml-dev, then you will automatically use the bundle instead. However, if you used opam to switch to a different version of OCaml, you must uninstall libparmap-ocaml-dev. - - libpcre-ocaml-dev (optional, for PCRE support, bundled) - If you do not install libpcre-ocaml-dev, then you will automatically use the + - libpcre2-ocaml-dev (optional, for PCRE support, bundled) + If you do not install libpcre2-ocaml-dev, then you will automatically use the bundle instead. However, in order for the bundle to work, you also need: - - libpcre3-dev (optional, not bundled) + - libpcre2-dev (optional, not bundled) Additionally, if you used opam to switch to a different version of OCaml and - want PCRE support, then make sure you have libpcre-ocaml-dev uninstalled and - libpcre3-dev installed, otherwise Coccinelle will not compile. + want PCRE support, then make sure you have libpcre2-ocaml-dev uninstalled and + libpcre2-dev installed, otherwise Coccinelle will not compile. On Fedora, install the following packages: - automake
@@ -47,16 +47,16 @@ On Fedora, install the following packages: - ocaml-findlib-devel - ocaml-ocamldoc - ocaml-menhir (optional, bundled) - - ocaml-pcre-devel (optional, bundled) + - ocaml-pcre2-devel (optional, bundled) Note: if you used opam to switch to a different version of OCaml, installing - ocaml-pcre-devel will make compilation impossible. Additionally, PCRE + ocaml-pcre2-devel will make compilation impossible. Additionally, PCRE support and OCaml scripting will be impossible. If you want Python scripting: Coccinelle is not compatible with Python 3.13, which is the default on Fedora as of 2024-12-19. Consider switching to Python 3.12, for example. On Arch Linux, install the following packages: -$ pacman -Syu pkg-config ocaml ocaml-findlib autoconf automake pcre make +$ pacman -Syu pkg-config ocaml ocaml-findlib autoconf automake pcre2 make as well as the C compiler of your choice. Note: if you used opam to switch to a different version of OCaml, OCaml scripting will be impossible.
setup/fake-subst.sh +3 -3
@@ -19,7 +19,7 @@ set -e # the next lines in the file. # the replies file assumes that the -# libpcre and python libraries are installed, and +# libpcre2 and python libraries are installed, and # that none of the optional ocaml libraries are # installed.
@@ -102,9 +102,9 @@ pythonlibs() { echo "-L${prefix}/lib -lpython${version}" } -# succeeds only if "/usr/include/pcre.h" exists +# succeeds only if "/usr/include/pcre2.h" exists checkpcre() { - test -f /usr/include/pcre.h + test -f /usr/include/pcre2.h } # iterate through pattern-response pairs
base-commit: cca22217d1b4316224e80a18d0b08dd351234497
Quoted 2 lines
Since pcre is unmaintained, the usage of ocaml-pcre will be replaced with ocaml-pcre2.
I find it interesting how the software support evolved for such a programming interface in the meantime.
Quoted 2 lines
While other regular expession libraries for OCaml
exists, they are not as feature complete as pcre2 is.
I find this information not so helpful here.
Quoted 3 lines
This is the minimal change to use ocaml-pcre2. To reduce the size of this patch, a separeate commit will be required to import pcre2-ocaml.git into bundles/pcre2.
Would you like to avoid typos for a better change description?
Regards,
Markus