[med-svn] [Git][med-team/plast][master] 5 commits: Drop d/p/use_debian_packaged_pcre.patch
Nilesh Patra (@nilesh)
gitlab at salsa.debian.org
Mon Jan 24 18:16:13 GMT 2022
Nilesh Patra pushed to branch master at Debian Med / plast
Commits:
53a572d4 by Nilesh Patra at 2022-01-24T23:36:42+05:30
Drop d/p/use_debian_packaged_pcre.patch
- - - - -
960a9557 by Nilesh Patra at 2022-01-24T23:38:07+05:30
Add pcre.patch to build with pcre2 (Closes: #999991)
- - - - -
c8d0bacc by Nilesh Patra at 2022-01-24T23:38:15+05:30
d/control: B-D on libpcre2-dev instead of libpcre3-dev
- - - - -
0b9d88cf by Nilesh Patra at 2022-01-24T23:44:41+05:30
Dep3
- - - - -
a0c99913 by Nilesh Patra at 2022-01-24T23:45:35+05:30
Interim changelog entry
- - - - -
5 changed files:
- debian/changelog
- debian/control
- + debian/patches/pcre.patch
- debian/patches/series
- − debian/patches/use_debian_packaged_pcre.patch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+plast (2.3.2+dfsg-8) UNRELEASED; urgency=medium
+
+ * Team Upload.
+ * Drop d/p/use_debian_packaged_pcre.patch
+ * Add pcre.patch to build with pcre2 (Closes: #999991)
+ * d/control: B-D on libpcre2-dev instead of libpcre3-dev
+
+ -- Nilesh Patra <nilesh at debian.org> Mon, 24 Jan 2022 23:44:55 +0530
+
plast (2.3.2+dfsg-7) unstable; urgency=medium
* Team upload.
=====================================
debian/control
=====================================
@@ -5,7 +5,7 @@ Section: science
Priority: optional
Build-Depends: debhelper-compat (= 13),
cmake,
- libpcre3-dev,
+ libpcre2-dev,
default-jdk,
libsimde-dev
Standards-Version: 4.5.1
=====================================
debian/patches/pcre.patch
=====================================
@@ -0,0 +1,96 @@
+Description: Port code to pcre2
+Author: Nilesh Patra <nilesh at debian.org>
+Forwarded: https://github.com/PLAST-software/plast-library/issues/10
+Last-Update: Jan 24, 2022
+--- a/src/alignment/filter/impl/AlignmentFilterOperator.cpp
++++ b/src/alignment/filter/impl/AlignmentFilterOperator.cpp
+@@ -156,19 +156,16 @@
+ ** REMARKS :
+ *********************************************************************/
+ AlignmentFilterRegexOperator::AlignmentFilterRegexOperator (const std::vector<std::string>& args)
+- : AlignmentFilterUnaryOperator<std::string>(args), _reg(0), _regExtra(0)
++ : AlignmentFilterUnaryOperator<std::string>(args), _reg(0)
+ {
+- const char* pcreErrorStr = 0;
+- int pcreErrorOffset = 0;
++ int pcreErrorStr = 0;
++ PCRE2_SIZE pcreErrorOffset = 0;
+
+ /** We compile the regexp. */
+- _reg = pcre_compile (_value.c_str(), 0, &pcreErrorStr, &pcreErrorOffset, NULL);
++ _reg = pcre2_compile ((PCRE2_SPTR)_value.c_str(), PCRE2_ZERO_TERMINATED, 0, &pcreErrorStr, &pcreErrorOffset, NULL);
+
+- /** We optimize the regex. */
+- if (_reg != 0) { _regExtra = pcre_study (_reg, 0, &pcreErrorStr); }
+-
+- DEBUG (("AlignmentFilterRegexOperator::AlignmentFilterRegexOperator _value='%s' _reg=%p _regExtra=%p\n",
+- _value.c_str(), _reg, _regExtra
++ DEBUG (("AlignmentFilterRegexOperator::AlignmentFilterRegexOperator _value='%s' _reg=%p\n",
++ _value.c_str(), _reg
+ ));
+ }
+
+@@ -182,8 +179,7 @@
+ *********************************************************************/
+ AlignmentFilterRegexOperator::~AlignmentFilterRegexOperator ()
+ {
+- if (_reg) { pcre_free (_reg); }
+- if (_regExtra) { pcre_free (_regExtra); }
++ if (_reg) { pcre2_code_free (_reg); }
+
+ DEBUG (("AlignmentFilterRegexOperator::~AlignmentFilterRegexOperator\n"));
+ }
+--- a/src/alignment/filter/impl/AlignmentFilterOperator.hpp
++++ b/src/alignment/filter/impl/AlignmentFilterOperator.hpp
+@@ -28,7 +28,8 @@
+ #include <alignment/filter/api/IAlignmentFilter.hpp>
+ #include <designpattern/impl/Property.hpp>
+ #include <stdarg.h>
+-#include <pcre/pcre.h>
++#define PCRE2_CODE_UNIT_WIDTH 8
++#include <pcre2.h>
+
+ /********************************************************************************/
+ namespace alignment {
+@@ -196,14 +197,12 @@
+ /** */
+ AlignmentFilterRegexOperator (const std::vector<std::string>& args);
+
+- AlignmentFilterRegexOperator () : AlignmentFilterUnaryOperator<std::string>(), _reg(0), _regExtra(0) {}
++ AlignmentFilterRegexOperator () : AlignmentFilterUnaryOperator<std::string>(), _reg(0) {}
+
+ ~AlignmentFilterRegexOperator ();
+
+ protected:
+- pcre* _reg;
+- pcre_extra* _regExtra;
+-
++ pcre2_code *_reg;
+ };
+
+ /********************************************************************************/
+@@ -248,10 +247,11 @@
+ bool isOk (const core::Alignment& a) const { \
+ if (_reg==0) { return false; } \
+ std::string tmp(regexp); /* Not optimal but we may call with const char* or std::string. */ \
++ pcre2_match_data *match_data = pcre2_match_data_create_from_pattern(_reg, NULL); \
+ switch(_operator) \
+ { \
+- case HOLD: return pcre_exec (_reg, _regExtra, tmp.c_str(), tmp.size(), 0, 0, NULL, 0) >= 0; \
+- case NO_HOLD: return pcre_exec (_reg, _regExtra, tmp.c_str(), tmp.size(), 0, 0, NULL, 0) < 0; \
++ case HOLD: return pcre2_match (_reg, (PCRE2_SPTR)tmp.c_str(), tmp.size(), 0, 0, match_data, NULL) >= 0; \
++ case NO_HOLD: return pcre2_match (_reg, (PCRE2_SPTR)tmp.c_str(), tmp.size(), 0, 0, match_data, NULL) < 0; \
+ default: return false; \
+ } \
+ } \
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,7 +46,7 @@
+ include_directories (${PROJECT_BINARY_DIR}/include ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
+ add_library (PlastLibrary SHARED ${PlastLibraryFiles} )
+ add_executable (plast ${PlastCmdFiles})
+-target_link_libraries (plast pthread)
++target_link_libraries (plast pthread -lpcre2-8)
+
+ ################################################################################
+ # OS specific stuffs
=====================================
debian/patches/series
=====================================
@@ -1,5 +1,5 @@
-use_debian_packaged_pcre.patch
adapt_auto_test_script.sh
no_msse3.patch
reproducible.patch
simde.patch
+pcre.patch
=====================================
debian/patches/use_debian_packaged_pcre.patch deleted
=====================================
@@ -1,26 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 09 Feb 2016 10:20:36 +0100
-Description: Use Debian packaged pcre lib instead of internal code copy
-
---- a/src/alignment/filter/impl/AlignmentFilterOperator.hpp
-+++ b/src/alignment/filter/impl/AlignmentFilterOperator.hpp
-@@ -28,7 +28,7 @@
- #include <alignment/filter/api/IAlignmentFilter.hpp>
- #include <designpattern/impl/Property.hpp>
- #include <stdarg.h>
--#include <pcre/pcre.h>
-+#include <pcre.h>
-
- /********************************************************************************/
- namespace alignment {
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -44,7 +44,7 @@ add_definitions (-O3 -funroll-loop
- include_directories (${PROJECT_BINARY_DIR}/include ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
- add_library (PlastLibrary SHARED ${PlastLibraryFiles} )
- add_executable (plast ${PlastCmdFiles})
--target_link_libraries (plast pthread)
-+target_link_libraries (plast pthread pcre)
-
- ################################################################################
- # OS specific stuffs
View it on GitLab: https://salsa.debian.org/med-team/plast/-/compare/6100467a418b032b7e588a0060c76c9775cae9aa...a0c9991372044cd5557f55e6bfbbf65532aeee48
--
View it on GitLab: https://salsa.debian.org/med-team/plast/-/compare/6100467a418b032b7e588a0060c76c9775cae9aa...a0c9991372044cd5557f55e6bfbbf65532aeee48
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220124/70fa3fef/attachment-0001.htm>
More information about the debian-med-commit
mailing list