From nobody Thu Jul 07 21:44:05 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C4F2F8D093C; Thu, 7 Jul 2022 21:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lf90P5XMSz3JWt; Thu, 7 Jul 2022 21:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657230245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5XwZpAcmR0/2BN5qKAnN7BtFUHlAHarMlKBsYEubFhA=; b=YNku5QHYyLHPiarc1ir/lnt7O4wNB4zU798iDKRJMoXJY3VGqUhGxQRRW4caTdzsxhfuKm FRyPDzAoR2T2UyPzj3qWk87htjNqIUHPMN4mDT1Be0VDrDU/TjAtGor2JYgRM4x0bWKEJk 4RDbvqPadOICldrxwZ6BGkPkr2dLqqH4fhqzIyxCC3wAze3UTBSvpc3atM1jVL5oAtdbHt CCuNCguf1zdT70SV1bCa/KqdOF1Apf8VjxeCSdw1hHW7TMJy80GizYdbZp0/886BxF8pYk E3VdrX4CGthJzDtaiQLR6m21VdTJrIdLKYoSMnOFGdEz1ImN6nPHRtWSYh4aXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lf90P4S9HzxRK; Thu, 7 Jul 2022 21:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 267Li5PS027736; Thu, 7 Jul 2022 21:44:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 267Li52M027735; Thu, 7 Jul 2022 21:44:05 GMT (envelope-from git) Date: Thu, 7 Jul 2022 21:44:05 GMT Message-Id: <202207072144.267Li52M027735@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 193d95a23eb3 - main - www/xapian-omega: Update to 1.4.20 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 193d95a23eb30df1266f91ac0c606b98a68bf62d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657230245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5XwZpAcmR0/2BN5qKAnN7BtFUHlAHarMlKBsYEubFhA=; b=gt7op+nvKkMd3q/OFaWAc7n5VBGpAUzxVR1vk61xw358pH54ufEt0cOFPyMkKIkIeXK908 FBBH/LdZeBzc4b/00eGFqWnD2EMmeQnbTWRyfjI9jlNtMscHgIWx72KjfqhXWuZ+ql5aF/ eI+2JKlxcrPDGbP7eftnA0aDdTlsofPHJJrWhmRgJdEFtM/kIDcCnMtvFsaScYe7mgBAN/ xT3ZgGoGhHbROzLRo63Ip76wobc8kFDMuWK+Rc+N1URME02xlxIZtjjMBoXTrndTpjh2Ux 8c9JjPSglf9EXgDzWU/jLJndMebnCrSI4iUnrkuPOhdh6E+a56CLJ5RhlnSmbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657230245; a=rsa-sha256; cv=none; b=fmag6w9lTi/uXC/lELr/vf9BN66M6JRS/VTcriMf7Lf01MJAtWDZUHJKayJGxrdILHxSk7 XZu3m9pOWIVtkigcb3t5NDdoUfZAFAKCcnTTVMly3jPn/TFAPE+hPbmbETwtJKG7PUMCG4 0SBihvWfw4jmOrHJdr89gbcqKHcJraqodNwAM46B54xFIFyyv+vnGpByaQnupqwGTBJIVp Vmk+wcyYvlUPmiJPxCrFYK7htbinDTyg/5Ukrbb/E6YuTUIfJaVdbCR6attNFm3o3zFVpX Dtoc/sfe9lxQce4/QEg0gQtLpTrMg2LMSPBc2soLeUrw+n7B8lHZbTauHvy9FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=193d95a23eb30df1266f91ac0c606b98a68bf62d commit 193d95a23eb30df1266f91ac0c606b98a68bf62d Author: Po-Chuan Hsieh AuthorDate: 2022-07-07 21:27:09 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-07-07 21:42:46 +0000 www/xapian-omega: Update to 1.4.20 Changes: https://trac.xapian.org/wiki/ReleaseOverview --- www/xapian-omega/Makefile | 3 +- www/xapian-omega/distinfo | 6 +- www/xapian-omega/files/patch-pcre2 | 434 ------------------------------------- 3 files changed, 4 insertions(+), 439 deletions(-) diff --git a/www/xapian-omega/Makefile b/www/xapian-omega/Makefile index bfa4518a1e56..01ae86e439f4 100644 --- a/www/xapian-omega/Makefile +++ b/www/xapian-omega/Makefile @@ -1,8 +1,7 @@ # Created by: Henrik Brix Andersen PORTNAME= xapian-omega -PORTVERSION= 1.4.19 -PORTREVISION= 1 +PORTVERSION= 1.4.20 CATEGORIES= www MASTER_SITES= https://oligarchy.co.uk/xapian/${PORTVERSION}/ \ LOCAL/sunpoet diff --git a/www/xapian-omega/distinfo b/www/xapian-omega/distinfo index 8ff474fe8ea0..3034f561b90e 100644 --- a/www/xapian-omega/distinfo +++ b/www/xapian-omega/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1642102173 -SHA256 (xapian-omega-1.4.19.tar.xz) = e4b2ef287e55df6754a1cb13b7677231bfda6df22567d28944046f6994d5cd8c -SIZE (xapian-omega-1.4.19.tar.xz) = 553680 +TIMESTAMP = 1657198955 +SHA256 (xapian-omega-1.4.20.tar.xz) = 09fd7d6c60b394fd00d84700649969a1fcc3aa2b88bb2c6ca220fdfa8d25881f +SIZE (xapian-omega-1.4.20.tar.xz) = 563324 diff --git a/www/xapian-omega/files/patch-pcre2 b/www/xapian-omega/files/patch-pcre2 deleted file mode 100644 index fcbcbe24212a..000000000000 --- a/www/xapian-omega/files/patch-pcre2 +++ /dev/null @@ -1,434 +0,0 @@ -Reference: https://git.xapian.org/?p=xapian;a=commit;h=fe7db763379cc5ac1649498d38446eb8fee32b56 - https://github.com/xapian/xapian/commit/fe7db763379cc5ac1649498d38446eb8fee32b56 - ---- Makefile.in.orig 2021-12-31 23:07:33 UTC -+++ Makefile.in -@@ -643,9 +643,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ - PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ --PCRE_CFLAGS = @PCRE_CFLAGS@ --PCRE_CONFIG = @PCRE_CONFIG@ --PCRE_LIBS = @PCRE_LIBS@ -+PCRE2_CFLAGS = @PCRE2_CFLAGS@ -+PCRE2_CONFIG = @PCRE2_CONFIG@ -+PCRE2_LIBS = @PCRE2_LIBS@ - PERL = @PERL@ - PKG_CONFIG = @PKG_CONFIG@ - RANLIB = @RANLIB@ -@@ -843,15 +843,15 @@ noinst_HEADERS = omega.h query.h cgiparam.h index_file - common/stringutils.h - AM_LDFLAGS = $(NO_UNDEFINED) $(MAGIC_LDFLAGS) - --# We want to compile transform.cc with PCRE_CFLAGS, but if this adds a -I for -+# We want to compile transform.cc with PCRE2_CFLAGS, but if this adds a -I for - # a directory with a different version of iconv, then we get problems (this - # has been reported on macOS). We solve this using a technique suggested by - # the automake manual: compile each of transform.cc and utf8convert.cc into - # its own convenience library so each only gets its own CPPFLAGS. - noinst_LTLIBRARIES = libtransform.la libutf8convert.la - libtransform_la_SOURCES = transform.cc --libtransform_la_CPPFLAGS = $(PCRE_CFLAGS) --libtransform_la_LIBADD = $(PCRE_LIBS) -+libtransform_la_CPPFLAGS = $(PCRE2_CFLAGS) -+libtransform_la_LIBADD = $(PCRE2_LIBS) - libutf8convert_la_SOURCES = utf8convert.cc - libutf8convert_la_CPPFLAGS = $(AM_CPPFLAGS) $(INCICONV) - libutf8convert_la_LIBADD = $(XAPIAN_LIBS) $(LTLIBICONV) ---- configure.orig 2021-12-31 23:07:31 UTC -+++ configure -@@ -638,10 +638,10 @@ LTLIBOBJS - LIBOBJS - AUTOM4TE - AM_CXXFLAGS --PCRE_LIBS --PCRE_CFLAGS -+PCRE2_LIBS -+PCRE2_CFLAGS - PKG_CONFIG --PCRE_CONFIG -+PCRE2_CONFIG - RST2HTML - HELP2MAN - PERL -@@ -828,7 +828,7 @@ XAPIAN_CONFIG - PERL - HELP2MAN - RST2HTML --PCRE_CONFIG -+PCRE2_CONFIG - PKG_CONFIG' - - -@@ -1502,7 +1502,8 @@ Some influential environment variables: - PERL Perl interpreter - HELP2MAN help2man man page generator - RST2HTML reST to HTML convertor -- PCRE_CONFIG Location of pcre-config -+ PCRE2_CONFIG -+ Location of pcre2-config - PKG_CONFIG Location of pkg-config - - Use these variables to override the choices made by `configure' or to help -@@ -18921,12 +18922,12 @@ fi - - pcre_runtime_installed() { - for sfx in '' 32 64 ; do -- set /usr/lib$sfx/libpcre*.so.* -- if test "/usr/lib$sfx/libpcre?.so.*" != "$1" ; then -+ set /usr/lib$sfx/libpcre2-*.so.* -+ if test "/usr/lib$sfx/libpcre2-*.so.*" != "$1" ; then - if test -r /etc/debian_version ; then -- pkg="libpcre3-dev" -+ pkg="libpcre2-dev" - else -- pkg="pcre-devel" -+ pkg="pcre2-devel" - fi - as_fn_set_status 0 - fi -@@ -18934,8 +18935,9 @@ pcre_runtime_installed() { - as_fn_set_status 1 - } - -+PCRE2_LIBS_FLAG=--libs8 - --if test -z "$PCRE_CONFIG" ; then -+if test -z "$PCRE2_CONFIG" ; then - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -@@ -19036,28 +19038,29 @@ else - fi - - if test -n "$PKG_CONFIG" ; then -- pcre_try="$PKG_CONFIG libpcre" -+ pcre_try="$PKG_CONFIG libpcre2-8" - if $pcre_try 2>/dev/null ; then -- PCRE_CONFIG=$pcre_try -+ PCRE2_CONFIG=$pcre_try -+ PCRE2_LIBS_FLAG=--libs - else - if pcre_runtime_installed ; then -- as_fn_error $? "'$pcre_try' failed, but the PCRE runtime library seems to be installed. If you've installed PCRE from a package, you probably need to install an extra package called something like $pkg in order to be able to build $PACKAGE_NAME." "$LINENO" 5 -+ as_fn_error $? "'$pcre_try' failed, but the PCRE2 runtime library seems to be installed. If you've installed PCRE2 from a package, you probably need to install an extra package called something like $pkg in order to be able to build $PACKAGE_NAME." "$LINENO" 5 - else -- as_fn_error $? "'$pcre_try' failed. If the PCRE library is installed, you need to add PCRE_CONFIG=/path/to/pcre-config to your configure command." "$LINENO" 5 -+ as_fn_error $? "'$pcre_try' failed. If the PCRE2 library is installed, you need to add PCRE2_CONFIG=/path/to/pcre2-config to your configure command." "$LINENO" 5 - fi - fi - else - if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}pcre-config", so it can be a program name with args. --set dummy ${ac_tool_prefix}pcre-config; ac_word=$2 -+ # Extract the first word of "${ac_tool_prefix}pcre2-config", so it can be a program name with args. -+set dummy ${ac_tool_prefix}pcre2-config; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_path_PCRE_CONFIG+:} false; then : -+if ${ac_cv_path_PCRE2_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 - else -- case $PCRE_CONFIG in -+ case $PCRE2_CONFIG in - [\\/]* | ?:[\\/]*) -- ac_cv_path_PCRE_CONFIG="$PCRE_CONFIG" # Let the user override the test with a path. -+ ac_cv_path_PCRE2_CONFIG="$PCRE2_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -@@ -19067,7 +19070,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_path_PCRE_CONFIG="$as_dir/$ac_word$ac_exec_ext" -+ ac_cv_path_PCRE2_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -19078,10 +19081,10 @@ IFS=$as_save_IFS - ;; - esac - fi --PCRE_CONFIG=$ac_cv_path_PCRE_CONFIG --if test -n "$PCRE_CONFIG"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCRE_CONFIG" >&5 --$as_echo "$PCRE_CONFIG" >&6; } -+PCRE2_CONFIG=$ac_cv_path_PCRE2_CONFIG -+if test -n "$PCRE2_CONFIG"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCRE2_CONFIG" >&5 -+$as_echo "$PCRE2_CONFIG" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -@@ -19089,18 +19092,18 @@ fi - - - fi --if test -z "$ac_cv_path_PCRE_CONFIG"; then -- ac_pt_PCRE_CONFIG=$PCRE_CONFIG -- # Extract the first word of "pcre-config", so it can be a program name with args. --set dummy pcre-config; ac_word=$2 -+if test -z "$ac_cv_path_PCRE2_CONFIG"; then -+ ac_pt_PCRE2_CONFIG=$PCRE2_CONFIG -+ # Extract the first word of "pcre2-config", so it can be a program name with args. -+set dummy pcre2-config; ac_word=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_path_ac_pt_PCRE_CONFIG+:} false; then : -+if ${ac_cv_path_ac_pt_PCRE2_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 - else -- case $ac_pt_PCRE_CONFIG in -+ case $ac_pt_PCRE2_CONFIG in - [\\/]* | ?:[\\/]*) -- ac_cv_path_ac_pt_PCRE_CONFIG="$ac_pt_PCRE_CONFIG" # Let the user override the test with a path. -+ ac_cv_path_ac_pt_PCRE2_CONFIG="$ac_pt_PCRE2_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -@@ -19110,7 +19113,7 @@ do - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_path_ac_pt_PCRE_CONFIG="$as_dir/$ac_word$ac_exec_ext" -+ ac_cv_path_ac_pt_PCRE2_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -@@ -19121,17 +19124,17 @@ IFS=$as_save_IFS - ;; - esac - fi --ac_pt_PCRE_CONFIG=$ac_cv_path_ac_pt_PCRE_CONFIG --if test -n "$ac_pt_PCRE_CONFIG"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PCRE_CONFIG" >&5 --$as_echo "$ac_pt_PCRE_CONFIG" >&6; } -+ac_pt_PCRE2_CONFIG=$ac_cv_path_ac_pt_PCRE2_CONFIG -+if test -n "$ac_pt_PCRE2_CONFIG"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PCRE2_CONFIG" >&5 -+$as_echo "$ac_pt_PCRE2_CONFIG" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } - fi - -- if test "x$ac_pt_PCRE_CONFIG" = x; then -- PCRE_CONFIG="" -+ if test "x$ac_pt_PCRE2_CONFIG" = x; then -+ PCRE2_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in - yes:) -@@ -19139,23 +19142,23 @@ yes:) - $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} - ac_tool_warned=yes ;; - esac -- PCRE_CONFIG=$ac_pt_PCRE_CONFIG -+ PCRE2_CONFIG=$ac_pt_PCRE2_CONFIG - fi - else -- PCRE_CONFIG="$ac_cv_path_PCRE_CONFIG" -+ PCRE2_CONFIG="$ac_cv_path_PCRE2_CONFIG" - fi - -- if test -z $PCRE_CONFIG ; then -+ if test -z $PCRE2_CONFIG ; then - if pcre_runtime_installed ; then -- as_fn_error $? "Can't find pcre-config, although the PCRE runtime library seems to be installed. If you've installed PCRE from a package, you probably need to install an extra package called something like $pkg in order to be able to build $PACKAGE_NAME." "$LINENO" 5 -+ as_fn_error $? "Can't find pcre2-config, although the PCRE2 runtime library seems to be installed. If you've installed PCRE2 from a package, you probably need to install an extra package called something like $pkg in order to be able to build $PACKAGE_NAME." "$LINENO" 5 - else -- as_fn_error $? "Can't find pcre-config. If the PCRE library is installed, you need to add PCRE_CONFIG=/path/to/pcre-config to your configure command." "$LINENO" 5 -+ as_fn_error $? "Can't find pcre2-config. If the PCRE2 library is installed, you need to add PCRE2_CONFIG=/path/to/pcre2-config to your configure command." "$LINENO" 5 - fi - fi - fi - fi --PCRE_CFLAGS=`$PCRE_CONFIG --cflags` --PCRE_LIBS=`$PCRE_CONFIG --libs` -+PCRE2_CFLAGS=`$PCRE2_CONFIG --cflags` -+PCRE2_LIBS=`$PCRE2_CONFIG $PCRE2_LIBS_FLAG` - - - ---- transform.cc.orig 2021-12-31 23:06:40 UTC -+++ transform.cc -@@ -1,7 +1,7 @@ - /** @file - * @brief Implement OmegaScript $transform function. - */ --/* Copyright (C) 2003,2009,2015 Olly Betts -+/* Copyright (C) 2003,2009,2015,2022 Olly Betts - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -@@ -22,32 +22,44 @@ - - #include "transform.h" - --#include -+#define PCRE2_CODE_UNIT_WIDTH 8 -+#include - -+#include - #include - #include - #include - - using namespace std; - --static map, pcre *> re_cache; -+static map, pcre2_code*> re_cache; -+static pcre2_match_data* md = NULL; - --static pcre * --get_re(const string & pattern, int options) -+static pcre2_code* -+get_re(const string& pattern, uint32_t options) - { -- pair re_key = make_pair(pattern, options); -+ pair re_key = make_pair(pattern, options); - auto re_it = re_cache.find(re_key); - if (re_it != re_cache.end()) { - return re_it->second; - } - -- const char *error; -- int erroffset; -- pcre * re = -- pcre_compile(pattern.c_str(), options, &error, &erroffset, NULL); -+ if (!md) { -+ // Create lazily - here is a good point as it's a single place we -+ // have to pass through before executing a regex. -+ md = pcre2_match_data_create(10, NULL); -+ } -+ -+ int error_code; -+ PCRE2_SIZE erroffset; -+ auto re = pcre2_compile(PCRE2_SPTR8(pattern.data()), pattern.size(), -+ options, &error_code, &erroffset, NULL); - if (!re) { - string m = "$transform failed to compile its regular expression: "; -- m += error; -+ // pcre2api(3) says that "a buffer size of 120 code units is ample". -+ unsigned char buf[120]; -+ pcre2_get_error_message(error_code, buf, sizeof(buf)); -+ m += reinterpret_cast(buf); - throw m; - } - re_cache.insert(make_pair(re_key, re)); -@@ -57,35 +69,34 @@ get_re(const string & pattern, int options) - void - omegascript_match(string & value, const vector & args) - { -- int offsets[30]; -- int options = 0; -+ uint32_t options = PCRE2_UTF; - if (args.size() > 2) { - const string &opts = args[2]; -- for (string::const_iterator i = opts.begin(); i != opts.end(); ++i) { -- switch (*i) { -+ for (char ch : opts) { -+ switch (ch) { - case 'i': -- options |= PCRE_CASELESS; -+ options |= PCRE2_CASELESS; - break; - case 'm': -- options |= PCRE_MULTILINE; -+ options |= PCRE2_MULTILINE; - break; - case 's': -- options |= PCRE_DOTALL; -+ options |= PCRE2_DOTALL; - break; - case 'x': -- options |= PCRE_EXTENDED; -+ options |= PCRE2_EXTENDED; - break; - default: { - string m = "Unknown $match option character: "; -- m += *i; -+ m += ch; - throw m; - } - } - } - } -- pcre * re = get_re(args[0], options); -- int matches = pcre_exec(re, NULL, args[1].data(), args[1].size(), -- 0, 0, offsets, 30); -+ pcre2_code* re = get_re(args[0], options); -+ int matches = pcre2_match(re, PCRE2_SPTR8(args[1].data()), args[1].size(), -+ 0, 0, md, NULL); - if (matches > 0) { - value += "true"; - } -@@ -94,42 +105,42 @@ omegascript_match(string & value, const vector - void - omegascript_transform(string & value, const vector & args) - { -- int offsets[30]; - bool replace_all = false; -- int options = 0; -+ uint32_t options = PCRE2_UTF; - if (args.size() > 3) { - const string & opts = args[3]; -- for (string::const_iterator i = opts.begin(); i != opts.end(); ++i) { -- switch (*i) { -+ for (char ch : opts) { -+ switch (ch) { - case 'g': - replace_all = true; - break; - case 'i': -- options |= PCRE_CASELESS; -+ options |= PCRE2_CASELESS; - break; - case 'm': -- options |= PCRE_MULTILINE; -+ options |= PCRE2_MULTILINE; - break; - case 's': -- options |= PCRE_DOTALL; -+ options |= PCRE2_DOTALL; - break; - case 'x': -- options |= PCRE_EXTENDED; -+ options |= PCRE2_EXTENDED; - break; - default: { - string m = "Unknown $transform option character: "; -- m += *i; -+ m += ch; - throw m; - } - } - } - } - -- pcre * re = get_re(args[0], options); -- size_t start = 0; -+ pcre2_code* re = get_re(args[0], options); -+ PCRE2_SIZE start = 0; - do { -- int matches = pcre_exec(re, NULL, args[2].data(), args[2].size(), -- int(start), 0, offsets, 30); -+ int matches = pcre2_match(re, -+ PCRE2_SPTR8(args[2].data()), args[2].size(), -+ start, 0, md, NULL); - if (matches <= 0) { - // (matches == PCRE_ERROR_NOMATCH) is OK, otherwise this is an - // error. FIXME: should we report this rather than ignoring it? -@@ -137,9 +148,9 @@ omegascript_transform(string & value, const vector