diff -Nru gpt-1.1/debian/changelog gpt-1.1/debian/changelog --- gpt-1.1/debian/changelog 2021-01-06 01:38:01.000000000 +0000 +++ gpt-1.1/debian/changelog 2024-01-06 18:48:18.000000000 +0000 @@ -1,3 +1,10 @@ +gpt (1.1-8) unstable; urgency=medium + + * Port to PCRE2 (Closes: #1000126); Thanks Yavor Doganov + * debian/copyright: Fix superfluous-file-pattern + + -- Marcelo Jorge Vieira Sat, 06 Jan 2024 15:48:18 -0300 + gpt (1.1-7) unstable; urgency=medium * Revert "Fixed no-symbols-control-file" diff -Nru gpt-1.1/debian/control gpt-1.1/debian/control --- gpt-1.1/debian/control 2021-01-01 23:42:21.000000000 +0000 +++ gpt-1.1/debian/control 2024-01-06 18:18:19.000000000 +0000 @@ -2,7 +2,7 @@ Section: devel Priority: optional Maintainer: Marcelo Jorge Vieira -Build-Depends: debhelper-compat (= 13), antlr, libantlr-dev, libpcre3-dev, locales +Build-Depends: debhelper-compat (= 13), antlr, libantlr-dev, libpcre2-dev, locales Standards-Version: 4.5.1 Homepage: https://github.com/thiago-silva/gpt Vcs-Git: https://salsa.debian.org/debian/gpt.git @@ -21,7 +21,7 @@ Section: libdevel Architecture: any Multi-Arch: same -Depends: ${misc:Depends}, libgportugol0 (= ${binary:Version}), antlr, libantlr-dev, libpcre3-dev +Depends: ${misc:Depends}, libgportugol0 (= ${binary:Version}), antlr, libantlr-dev, libpcre2-dev Description: Development files for the G-Portugol library G-Portugol is a Portuguese structured programming language, based on the popular, freeform, pseudocode known as portugol. The compiler features diff -Nru gpt-1.1/debian/copyright gpt-1.1/debian/copyright --- gpt-1.1/debian/copyright 2021-01-01 23:34:44.000000000 +0000 +++ gpt-1.1/debian/copyright 2024-01-06 18:47:15.000000000 +0000 @@ -7,7 +7,6 @@ License: GPL-2 Files: - src/modules/parser/UnicodeCharScanner.cpp src/modules/parser/UnicodeCharScanner.hpp src/modules/parser/MismatchedUnicodeCharException.hpp src/modules/parser/MismatchedUnicodeCharException.cpp diff -Nru gpt-1.1/debian/patches/pcre2.patch gpt-1.1/debian/patches/pcre2.patch --- gpt-1.1/debian/patches/pcre2.patch 1970-01-01 00:00:00.000000000 +0000 +++ gpt-1.1/debian/patches/pcre2.patch 2024-01-06 18:16:34.000000000 +0000 @@ -0,0 +1,91 @@ +Description: Port to PCRE2. +Bug-Debian: https://bugs.debian.org/1000126 +Author: Yavor Doganov +Forwarded: no +Last-Update: 2024-01-02 +--- + +--- gpt.orig/configure.ac ++++ gpt/configure.ac +@@ -109,10 +109,10 @@ + + # AC_MSG_CHECKING(for pcre) + +-AC_CHECK_PROG(has_pcre, pcre-config, yes) ++AC_CHECK_PROG(has_pcre, pcre2-config, yes) + + if test "x$has_pcre" = "xyes"; then +- PCRE_CONFIG="pcre-config" ++ PCRE_CONFIG="pcre2-config" + else + AC_MSG_ERROR( + [ +@@ -123,8 +123,8 @@ + + #pcrecpp + +-PCRE_INC=`${PCRE_CONFIG} --cglags` +-PCRE_LIB="-L`${PCRE_CONFIG} --prefix`/lib -lpcrecpp" ++PCRE_INC=`${PCRE_CONFIG} --cflags` ++PCRE_LIB=`${PCRE_CONFIG} --libs8` + AC_SUBST(PCRE_INC) + AC_SUBST(PCRE_LIB) + +--- gpt.orig/src/modules/interpreter/InterpreterDBG.cpp ++++ gpt/src/modules/interpreter/InterpreterDBG.cpp +@@ -33,7 +33,8 @@ + #include + #endif + +-#include ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include + #include + + #ifndef WIN32 +@@ -403,15 +404,40 @@ + void InterpreterDBG::processBreakpointCMD(string& bpcommand) { + //cerr << "process breakpoint " << bpcommand << endl; + +- string cmd; +- string file; +- int line; +- pcrecpp::RE re("breakpoint cmd=(add|remove).*file=\"([^\"]*)\".*line=(\\d+)"); +- if(!re.FullMatch(bpcommand, &cmd, &file, &line)) { ++ pcre2_code *re; ++ pcre2_match_data *md; ++ PCRE2_UCHAR *str; ++ PCRE2_SPTR pat, subj; ++ PCRE2_SIZE offset; ++ int line, rc; ++ ++ pat = reinterpret_cast("breakpoint cmd=(add|remove).*file=\"([^\"]*)\".*line=(\\d+)"); ++ subj = reinterpret_cast(bpcommand.c_str()); ++ re = pcre2_compile(pat, PCRE2_ZERO_TERMINATED, 0, &rc, &offset, nullptr); ++ if(offset != 0) { ++ return; ++ } ++ ++ md = pcre2_match_data_create_from_pattern(re, nullptr); ++ rc = pcre2_match(re, subj, bpcommand.length(), 0, 0, md, nullptr); ++ pcre2_code_free(re); ++ if(rc != 4) { + //cerr << PACKAGE << ": comando invalido (2): \"" << cmd << "\"" << endl; ++ pcre2_match_data_free(md); + return; + } + ++ pcre2_substring_get_bynumber(md, 1, &str, &offset); ++ string cmd(reinterpret_cast(str)); ++ pcre2_substring_free(str); ++ pcre2_substring_get_bynumber(md, 2, &str, &offset); ++ string file(reinterpret_cast(str)); ++ pcre2_substring_free(str); ++ pcre2_substring_get_bynumber(md, 3, &str, &offset); ++ line = atoi((const char *)str); ++ pcre2_substring_free(str); ++ pcre2_match_data_free(md); ++ + //cerr << PACKAGE << ": capturado:" << cmd << ":" << file << ":" << line << endl; + + if(cmd == "add") { diff -Nru gpt-1.1/debian/patches/series gpt-1.1/debian/patches/series --- gpt-1.1/debian/patches/series 2017-01-23 22:32:55.000000000 +0000 +++ gpt-1.1/debian/patches/series 2024-01-06 18:16:51.000000000 +0000 @@ -1 +1,2 @@ gcc-4.7.patch +pcre2.patch