summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog22
-rw-r--r--debian/control7
-rw-r--r--debian/copyright58
-rw-r--r--debian/patches/pcre2.patch438
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/source.lintian-overrides4
-rw-r--r--debian/source/lintian-overrides7
-rw-r--r--debian/watch9
9 files changed, 519 insertions, 29 deletions
diff --git a/debian/changelog b/debian/changelog
index f98f0f6..430415a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,25 @@
+parser (3.4.6-4) unstable; urgency=medium
+
+ * QA upload.
+ * debian/patches/pcre2.patch: New; port to PCRE2 (Closes: #1000006).
+ * debian/control (Build-Depends): Replace libpcre3-dev with
+ libpcre2-dev. Remove apache2-dev version constraint, satisfiable even
+ in jessie.
+ (Rules-Requires-Root): Set to "no".
+ (Standards-Version): Bump to 4.6.2; no changes needed.
+ * rules: Drop --with autoreconf; it's the default.
+ * debian/watch: Upgrade to version 4.
+ * debian/source.lintian-overrides: Rename as...
+ * debian/source/lintian-overrides: ...and add
+ license-problem-convert-utf-code (false positive). Rename
+ debian-watch-may-check-gpg-signature to
+ debian-watch-does-not-check-openpgp-signature.
+ * debian/copyright: Update copyright years, add more holders. Add
+ University of Illinois license. Fix superfluous and redundant
+ patterns; remove tabs in license text.
+
+ -- Yavor Doganov <yavor@gnu.org> Tue, 12 Dec 2023 10:26:45 +0200
+
parser (3.4.6-3) unstable; urgency=medium
* QA upload.
diff --git a/debian/control b/debian/control
index 094a1c3..0eddb57 100644
--- a/debian/control
+++ b/debian/control
@@ -3,9 +3,10 @@ Section: web
Priority: optional
Maintainer: Debian QA Group <packages@qa.debian.org>
Build-Depends: debhelper-compat (= 13), libltdl-dev, libgc-dev,
- libpcre3-dev, libxml2-dev, libxslt1-dev, dh-apache2,
- apache2-dev (>= 2.4.2-1~)
-Standards-Version: 4.6.0
+ libpcre2-dev, libxml2-dev, libxslt1-dev, dh-apache2,
+ apache2-dev
+Rules-Requires-Root: no
+Standards-Version: 4.6.2
Homepage: http://www.parser.ru/en/
Vcs-Git: https://salsa.debian.org/debian/parser.git
Vcs-Browser: https://salsa.debian.org/debian/parser
diff --git a/debian/copyright b/debian/copyright
index cde3b1d..ff1352c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -7,7 +7,7 @@ Files: *
Copyright: 2001-2013, ArtLebedev Group (http://www.artlebedev.com)
License: GPL-2+
-Files: install-sh src/lib/ltdl/install-sh
+Files: install-sh src/lib/ltdl/config/install-sh
Copyright: 1991, the Massachusetts Institute of Technology
License: other
Permission to use, copy, modify, distribute, and sell this software
@@ -20,7 +20,7 @@ License: other
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
-Files: src/lib/cord/*.c src/lib/cord/include/*.h src/lib/cord/include/private/cord_pos.h
+Files: src/lib/cord/*.c src/lib/cord/include/*.h
Copyright: 1993-1994, Xerox Corporation
License: other-1
@@ -41,7 +41,7 @@ License: other
requested, but not required, that you share extensions to this module
with us so that we can incorporate them into new versions.
-Files: src/lib/ltdl/ltdl.[hc]
+Files: src/lib/ltdl/ltdl.*
Copyright: 1998-2000, Free Software Foundation, Inc.
License: LGPL-2+
This library is free software; you can redistribute it and/or
@@ -53,7 +53,7 @@ License: LGPL-2+
General Public License (GPL) can be found at
/usr/share/common-licenses/LGPL-2.
-Files: src/lib/md5/*.[hc]
+Files: src/lib/md5/pa_*
Copyright: 2001-2005, ArtLebedev Group (http://www.artlebedev.com)
1991-1992, RSA Data Security, Inc.
1996-1999, The Apache Group
@@ -121,7 +121,7 @@ License: other
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Files: src/lib/sdbm/*.[hcC] src/lib/sdbm/apr-include/*.h
+Files: src/lib/sdbm/*.h src/lib/sdbm/*.c src/lib/sdbm/*.C
Copyright: 2000-2002, The Apache Software Foundation
License: other
The Apache Software License, Version 1.1
@@ -197,12 +197,12 @@ License: other
.
===========================================================================
.
- THE Q PUBLIC LICENSE
- version 1.0
+ THE Q PUBLIC LICENSE
+ version 1.0
.
- Copyright (C) 1999 Troll Tech AS, Norway.
- Everyone is permitted to copy and
- distribute this license document.
+ Copyright (C) 1999 Troll Tech AS, Norway.
+ Everyone is permitted to copy and
+ distribute this license document.
.
The intent of this license is to establish freedom to share and
change the software regulated by this license under the open source
@@ -216,7 +216,7 @@ License: other
based on the Software, and development of free software which uses
the Software.
.
- Granted Rights
+ Granted Rights
.
1. You are granted the non-exclusive rights set forth in this license
provided you agree to and comply with any and all conditions in
@@ -285,7 +285,7 @@ License: other
initial developer of the Software requests a copy of the
items, then you must supply one.
.
- Limitations of Liability
+ Limitations of Liability
.
In no event shall the initial developers or copyright holders be
liable for any damages whatsoever, including - but not restricted to
@@ -295,7 +295,7 @@ License: other
law, if any, provides otherwise.
.
.
- No Warranty
+ No Warranty
.
The Software and this license document are provided AS IS with NO
WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN,
@@ -315,8 +315,38 @@ License: GPL-3
Public License (GPL) version 3 can be found at
/usr/share/common-licenses/GPL-3.
+Files: src/lib/punycode/pa_convert_utf.*
+Copyright: 2001-2004 Unicode, Inc.
+License: University-of-Illinois-Open-Source-License
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ “Software”), to deal with the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+ .
+ Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+ Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+ Neither the names of <Name of Development Group, Name of Institution>,
+ nor the names of its contributors may be used to endorse or promote
+ products derived from this Software without specific prior written
+ permission. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+ SOFTWARE.
+
Files: debian/*
-Copyright: 2009-2013, Sergey B Kirpichev <skirpichev@gmail.com>
+Copyright: 2009-2021, Sergey B Kirpichev <skirpichev@gmail.com>
+ 2021, Boyuan Yang <byang@debian.org>
+ 2023, Yavor Doganov <yavor@gnu.org>
License: GPL-2+
License: GPL-2+
diff --git a/debian/patches/pcre2.patch b/debian/patches/pcre2.patch
new file mode 100644
index 0000000..07e485f
--- /dev/null
+++ b/debian/patches/pcre2.patch
@@ -0,0 +1,438 @@
+Description: Port to PCRE2.
+Bug-Debian: https://bugs.debian.org/1000006
+Origin: upstream
+Forwarded: not-needed
+Last-Update: 2023-12-12
+---
+
+--- parser.orig/configure.ac
++++ parser/configure.ac
+@@ -181,29 +181,49 @@
+ AC_ARG_WITH(pcre,[ --with-pcre=DIR DIR is the directory where
+ PCRE library is installed],[
+ PCRE=$withval
+- PCRE_INCLUDES="-I$PCRE/include"
+- PCRE_LIBS="$PCRE/lib/libpcre.la"
+-
+- if test -f $PCRE/include/pcre.h -a -f $PCRE_LIBS; then
+- PCRE_OK="yes"
+- else
+- PCRE_LIBS="-L$PCRE/lib -lpcre"
+- fi
+
+ if test "$PCRE" = "yes"; then
+ PCRE=""
+- PCRE_LIBS="-lpcre"
+- PCRE_INCLUDES=""
+ AC_MSG_WARN([--with-pcre value was not specified, hoping linker would find it])
++ else
++ PCRE_INCLUDES="-I$PCRE/include"
++
++ if test -f $PCRE/include/pcre.h -a -f $PCRE/lib/libpcre.la; then
++ PCRE_OK="yes"
++ PCRE_LIBS="$PCRE/lib/libpcre.la"
++ else
++ if test -f $PCRE/include/pcre2.h -a -f $PCRE/lib/libpcre2-8.la; then
++ PCRE_OK="yes"
++ PCRE_LIBS="$PCRE/lib/libpcre2-8.la"
++ AC_DEFINE(HAVE_PCRE2,,PCRE2 is available)
++ else
++ PCRE_LIBS="-L$PCRE/lib"
++ fi
++ fi
+ fi
+ ],[
+- PCRE_LIBS="-lpcre"
+- PCRE_INCLUDES=""
+ AC_MSG_WARN([--with-pcre was not specified, hoping linker would find it])
+ ])
+
+ if test -z "$PCRE_OK"; then
+- AC_MSG_CHECKING(for prce)
++ AC_MSG_CHECKING(for pcre2)
++ SAVE_LIBS=$LIBS
++ LIBS="$LIBS $PCRE_LIBS $PCRE_INCLUDES -lpcre2-8"
++ AC_TRY_LINK([ #define PCRE2_CODE_UNIT_WIDTH 8
++#include <pcre2.h> ],[ void *v=pcre2_general_context_create(0,0,0); ],
++ AC_MSG_RESULT(yes)
++ PCRE_LIBS="$PCRE_LIBS -lpcre2-8"
++ AC_DEFINE(HAVE_PCRE2,,PCRE2 is available)
++ PCRE_OK="yes"
++ ,
++ AC_MSG_RESULT(no)
++ )
++ LIBS=$SAVE_LIBS
++fi
++
++if test -z "$PCRE_OK"; then
++ AC_MSG_CHECKING(for pcre)
++ PCRE_LIBS="$PCRE_LIBS -lpcre"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $PCRE_LIBS $PCRE_INCLUDES"
+ AC_TRY_LINK([ #include <pcre.h> ],[ const char *v=pcre_version(); ],
+--- parser.orig/src/include/pa_charset.h
++++ parser/src/include/pa_charset.h
+@@ -16,7 +16,11 @@
+ #include "pa_hash.h"
+ #include "pa_array.h"
+
+-#include "pcre.h"
++#ifdef HAVE_PCRE2
++#include <pcre2.h>
++#else
++#include <pcre.h>
++#endif
+ // we are using some pcre_internal.h stuff as well
+ #include "../lib/pcre/pa_pcre_internal.h"
+
+--- parser.orig/src/include/pa_config_includes.h
++++ parser/src/include/pa_config_includes.h
+@@ -165,6 +165,10 @@
+ # endif
+ #endif
+
++#ifdef HAVE_PCRE2
++#define PCRE2_CODE_UNIT_WIDTH 8
++#endif
++
+ // math function replacements
+
+ #ifdef __cplusplus
+--- parser.orig/src/lib/pcre/pa_pcre_internal.h
++++ parser/src/lib/pcre/pa_pcre_internal.h
+@@ -1,6 +1,8 @@
+ /* Some internal stuff from PCRE library */
+ /* Author: Sergey B Kirpichev <skirpichev@gmail.com> */
+
++#include "pa_config_includes.h"
++
+ /* Bit definitions for entries in the pcre_ctypes table. */
+
+ #define ctype_space 0x01
+@@ -51,3 +53,41 @@
+ extern int pa_pcre_valid_utf(unsigned char *string, int length, int *erroroffset);
+ #endif
+
++#ifdef HAVE_PCRE2
++#define PCRE_UTF8_ERR0 0
++#define PCRE_UTF8_ERR6 PCRE2_ERROR_UTF8_ERR6
++#define PCRE_UTF8_ERR7 PCRE2_ERROR_UTF8_ERR7
++#define PCRE_UTF8_ERR8 PCRE2_ERROR_UTF8_ERR8
++#define PCRE_UTF8_ERR9 PCRE2_ERROR_UTF8_ERR9
++#define PCRE_UTF8_ERR10 PCRE2_ERROR_UTF8_ERR10
++#define PCRE_UTF8_ERR11 PCRE2_ERROR_UTF8_ERR11
++#define PCRE_UTF8_ERR12 PCRE2_ERROR_UTF8_ERR12
++#define PCRE_UTF8_ERR13 PCRE2_ERROR_UTF8_ERR13
++#define PCRE_UTF8_ERR14 PCRE2_ERROR_UTF8_ERR14
++#define PCRE_UTF8_ERR15 PCRE2_ERROR_UTF8_ERR15
++#define PCRE_UTF8_ERR16 PCRE2_ERROR_UTF8_ERR16
++#define PCRE_UTF8_ERR17 PCRE2_ERROR_UTF8_ERR17
++#define PCRE_UTF8_ERR18 PCRE2_ERROR_UTF8_ERR18
++#define PCRE_UTF8_ERR19 PCRE2_ERROR_UTF8_ERR19
++#define PCRE_UTF8_ERR20 PCRE2_ERROR_UTF8_ERR20
++#define PCRE_UTF8_ERR21 PCRE2_ERROR_UTF8_ERR21
++
++#define PCRE_ERROR_BADUTF8_OFFSET PCRE2_ERROR_BADUTFOFFSET
++
++#define PCRE_UTF8 PCRE2_UTF
++#define PCRE_UCP PCRE2_UCP
++#define PCRE_EXTENDED PCRE2_EXTENDED
++#define PCRE_ERROR_NOMATCH PCRE2_ERROR_NOMATCH
++
++#define PCRE_INFO_SIZE PCRE2_INFO_SIZE
++
++#define PCRE_CASELESS PCRE2_CASELESS
++#define PCRE_DOTALL PCRE2_DOTALL
++#define PCRE_MULTILINE PCRE2_MULTILINE
++#define PCRE_UNGREEDY PCRE2_UNGREEDY
++#define PCRE_DOLLAR_ENDONLY PCRE2_DOLLAR_ENDONLY
++#define PCRE_EXTRA 0
++
++#define pcre_fullinfo(fcode, fextra, type, result) pcre2_pattern_info(fcode, type, result)
++
++#endif
+--- parser.orig/src/lib/pcre/pa_pcre_valid_utf8.c
++++ parser/src/lib/pcre/pa_pcre_valid_utf8.c
+@@ -41,9 +41,13 @@
+ /* This module contains an internal function for validating UTF-8 character
+ strings. */
+
+-#include "pcre.h"
+ #include "pa_pcre_internal.h"
+
++#ifdef HAVE_PCRE2
++#include <pcre2.h>
++#else
++#include <pcre.h>
++#endif
+
+ /*************************************************
+ * Validate a UTF-8 string *
+--- parser.orig/src/main/pa_common.C
++++ parser/src/main/pa_common.C
+@@ -12,7 +12,6 @@
+ #include "pa_charsets.h"
+ #include "pa_http.h"
+ #include "pa_request_charsets.h"
+-#include "pcre.h"
+ #include "pa_request.h"
+
+ #include "pa_idna.h"
+--- parser.orig/src/main/pa_globals.C
++++ parser/src/main/pa_globals.C
+@@ -26,7 +26,7 @@
+ #include "pa_cache_managers.h"
+
+ #include "ltdl.h"
+-#include "pcre.h"
++#include "pa_vregex.h"
+
+ volatile const char * IDENT_PA_GLOBALS_C="$Id: pa_globals.C,v 1.212 2021/01/16 15:47:05 moko Exp $" IDENT_PA_GLOBALS_H IDENT_PA_SAPI_H;
+
+@@ -177,6 +177,19 @@
+
+ #endif // XML
+
++#ifdef HAVE_PCRE2
++pcre2_general_context* VRegex::fgen_ctxt;
++
++static void* pa_pcre_malloc(size_t size, void *ptr){
++ return pa_malloc(size);
++}
++
++static void pa_pcre_free(void *ptr, void *tag){
++ pa_free(ptr);
++}
++#endif
++
++
+ void pa_CORD_oom_fn(void) {
+ pa_fail_alloc("expand string", 0);
+ }
+@@ -207,8 +220,12 @@
+ #endif
+
+ // pcre
++#ifdef HAVE_PCRE2
++ VRegex::fgen_ctxt=pcre2_general_context_create(pa_pcre_malloc, pa_pcre_free, NULL);
++#else
+ pcre_malloc=pa_malloc;
+ pcre_free=pa_free;
++#endif
+
+ // cord
+ CORD_oom_fn=pa_CORD_oom_fn;
+--- parser.orig/src/types/pa_vregex.C
++++ parser/src/types/pa_vregex.C
+@@ -16,16 +16,16 @@
+ #define REGEX_PATTERN_NAME "pattern"
+ #define REGEX_OPTIONS_NAME "options"
+
+-
+ const char* get_pcre_exec_error_text(int exec_result){
+- switch(exec_result){
+- case PCRE_ERROR_BADUTF8:
+- case PCRE_ERROR_BADUTF8_OFFSET:
+- return "UTF-8 validation failed during pcre_exec (%d).";
+- break;
+- default:
+- return "execution error (%d)";
+- }
++ if(exec_result == PCRE_ERROR_BADUTF8_OFFSET ||
++#ifdef HAVE_PCRE2
++ exec_result <= PCRE2_ERROR_UTF8_ERR1 /* -3 */ && exec_result >= PCRE2_ERROR_UTF8_ERR21 /* -21 */
++#else
++ exec_result == PCRE_ERROR_BADUTF8
++#endif
++ )
++ return "UTF-8 validation failed during pcre_exec (%d).";
++ return "execution error (%d)";
+ }
+
+
+@@ -100,20 +100,39 @@
+
+ void VRegex::compile(){
+ const char* err_ptr;
+- int err_offset;
+ int options=foptions[0];
+
+ // @todo (for UTF-8): check string & pattern and use PCRE_NO_UTF8_CHECK option
+ if(fcharset->isUTF8())
+ options |= (PCRE_UTF8 | PCRE_UCP);
+
++#ifdef HAVE_PCRE2
++ int err;
++ size_t err_offset;
++ PCRE2_UCHAR buffer[120];
++
++ if(!fcmp_ctxt)
++ fcmp_ctxt=pcre2_compile_context_create(fgen_ctxt);
++
++ pcre2_set_character_tables(fcmp_ctxt, fcharset->pcre_tables);
++
++ fcode=pcre2_compile((PCRE2_SPTR)fpattern, PCRE2_ZERO_TERMINATED, options,
++ &err, &err_offset,
++ fcmp_ctxt);
++
++ if(!fcode){
++ pcre2_get_error_message(err, buffer, sizeof(buffer));
++ err_ptr=(const char*)buffer;
++ }
++#else
++ int err_offset;
+ fcode=pcre_compile(fpattern, options,
+ &err_ptr, &err_offset,
+ fcharset->pcre_tables);
+-
++#endif
+ if(!fcode){
+ throw Exception(PCRE_EXCEPTION_TYPE,
+- new String(fpattern+err_offset, String::L_TAINTED),
++ new String(fpattern + (fpattern[err_offset] ? err_offset : 0), String::L_TAINTED),
+ "regular expression syntax error - %s", err_ptr);
+ }
+
+@@ -139,10 +158,16 @@
+
+
+ size_t VRegex::get_study_size(){
++#ifdef HAVE_PCRE2
++ return 0;
++#else
+ return full_info(PCRE_INFO_STUDYSIZE);
++#endif
+ }
+
++
+ void VRegex::study(){
++#ifndef HAVE_PCRE2
+ if(fstudied)
+ return;
+
+@@ -156,20 +181,42 @@
+ }
+
+ fstudied=true;
++#endif
+ }
+
+
+ int VRegex::exec(const char* string, size_t string_len, int* ovector, int ovector_size, int prestart){
++#ifdef HAVE_PCRE2
++ if(!fmatch_ctxt)
++ fmatch_ctxt=pcre2_match_context_create(fgen_ctxt);
++
++ if(!fmatch_data)
++ fmatch_data=pcre2_match_data_create_from_pattern(fcode, fgen_ctxt);
++
++ int result=pcre2_match(fcode,
++ (PCRE2_SPTR)string, string_len, prestart,
++ prestart>0 ? PCRE2_NO_UTF_CHECK : 0, fmatch_data, fmatch_ctxt);
++#else
+ int result=pcre_exec(fcode, fextra,
+ string, string_len, prestart,
+ prestart>0 ? PCRE_NO_UTF8_CHECK : 0, ovector, ovector_size);
+-
++#endif
++
+ if(result<0 && result!=PCRE_ERROR_NOMATCH){
+ throw Exception(PCRE_EXCEPTION_TYPE,
+ new String(fpattern, String::L_TAINTED),
+ get_pcre_exec_error_text(result), result);
+ }
+
++#ifdef HAVE_PCRE2
++ if(result>0){
++ result=min(result, ovector_size/3);
++ size_t* groups=pcre2_get_ovector_pointer(fmatch_data);
++ for(int i=0; i<result*2; i++){
++ ovector[i]=groups[i];
++ }
++ }
++#endif
+ return result;
+ }
+
+--- parser.orig/src/types/pa_vregex.h
++++ parser/src/types/pa_vregex.h
+@@ -16,7 +16,6 @@
+ #include "pa_common.h"
+ #include "pa_vstateless_object.h"
+ #include "pa_charset.h"
+-#include "pcre.h"
+
+ // defines
+
+@@ -57,31 +56,54 @@
+
+ public: // usage
+
++#ifdef HAVE_PCRE2
++ static pcre2_general_context* fgen_ctxt;
++#endif
++
+ VRegex():
+ fcharset(0),
+ fpattern(0),
+ foptions_cstr(0),
+ fcode(0),
++#ifdef HAVE_PCRE2
++ fcmp_ctxt(0),
++ fmatch_ctxt(0),
++ fmatch_data(0)
++#else
+ fextra(0),
+ fstudied(false)
++#endif
+ {
+ foptions[0]=0;
+ foptions[1]=0;
+ }
+
+ VRegex(Charset& acharset, const String* aregex, const String* aoptions):
++#ifdef HAVE_PCRE2
++ fcmp_ctxt(0),
++ fmatch_ctxt(0),
++ fmatch_data(0)
++#else
+ fextra(0),
+ fstudied(false)
++#endif
+ {
+ set(acharset, aregex, aoptions);
+ compile();
+ }
+
+ ~VRegex(){
++#ifdef HAVE_PCRE2
++ pcre2_match_data_free(fmatch_data);
++ pcre2_match_context_free(fmatch_ctxt);
++ pcre2_compile_context_free(fcmp_ctxt);
++ pcre2_code_free(fcode);
++#else
+ if(fextra)
+ pcre_free(fextra);
+ if(fcode)
+ pcre_free(fcode);
++#endif
+ }
+
+ void set(Charset& acharset, const String* aregex, const String* aoptions);
+@@ -124,9 +146,16 @@
+ const char* foptions_cstr;
+ int foptions[2];
+
++#ifdef HAVE_PCRE2
++ pcre2_code* fcode;
++ pcre2_compile_context* fcmp_ctxt;
++ pcre2_match_context* fmatch_ctxt;
++ pcre2_match_data* fmatch_data;
++#else
+ pcre* fcode;
+ pcre_extra* fextra;
+ bool fstudied;
++#endif
+ };
+
+
diff --git a/debian/patches/series b/debian/patches/series
index 47ff2eb..118dd0c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
103_auto_p.patch
+pcre2.patch
diff --git a/debian/rules b/debian/rules
index a94b684..0bc5cc1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND=-D_LARGEFILE64_SOURCE
%:
- dh $@ --with autoreconf --with apache2
+ dh $@ --with apache2
override_dh_auto_configure:
dh_auto_configure -- \
diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides
deleted file mode 100644
index 472cfdb..0000000
--- a/debian/source.lintian-overrides
+++ /dev/null
@@ -1,4 +0,0 @@
-# There is no gpg signature (and most likely newer be)
-parser: debian-watch-may-check-gpg-signature
-# the entire rfc is not included, only the code points
-parser: license-problem-non-free-RFC
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..a45e26b
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,7 @@
+# There is no gpg signature (and most likely newer be)
+parser: debian-watch-does-not-check-openpgp-signature
+# the entire rfc is not included, only the code points
+parser: license-problem-non-free-RFC
+# False positive; the file is under the University of Illinois Open
+# Source License.
+parser: license-problem-convert-utf-code
diff --git a/debian/watch b/debian/watch
index 726e129..a96307f 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,7 +1,2 @@
-# See uscan(1) for format
-
-# Compulsory line, this is a version 3 file
-version=3
-
-# <Webpage URL> <string match>
-https://www.parser.ru/en/download/src/ .*/parser-([0-9.]+)\.tar\.gz
+version=4
+https://www.parser.ru/en/download/src/ .*/parser-@ANY_VERSION@@ARCHIVE_EXT@