diff --git a/BUILD.gn b/BUILD.gn index da283767e2f5282460c87630028438cc2a94d4ec..6b0acd81e73a65827ace9dee43edbc49118d70f7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -26,6 +26,7 @@ config("re2_public_config") { } ohos_shared_library("re2") { sources = [ + "${RE2_DIR}/re2/bitmap256.cc", "${RE2_DIR}/re2/bitmap256.h", "${RE2_DIR}/re2/bitstate.cc", "${RE2_DIR}/re2/compile.cc", @@ -50,7 +51,6 @@ ohos_shared_library("re2") { "${RE2_DIR}/re2/simplify.cc", "${RE2_DIR}/re2/sparse_array.h", "${RE2_DIR}/re2/sparse_set.h", - "${RE2_DIR}/re2/stringpiece.cc", "${RE2_DIR}/re2/tostring.cc", "${RE2_DIR}/re2/unicode_casefold.cc", "${RE2_DIR}/re2/unicode_casefold.h", @@ -70,6 +70,15 @@ ohos_shared_library("re2") { if (!is_asan && !is_debug) { version_script = "libre2.map" } + external_deps = [ + "abseil-cpp:absl_base", + "abseil-cpp:absl_container", + "abseil-cpp:absl_cord", + "abseil-cpp:absl_hash", + "abseil-cpp:absl_spinlock_wait", + "abseil-cpp:absl_str_format_internal", + "abseil-cpp:absl_strings", + ] public_configs = [ ":re2_public_config" ] install_enable = true subsystem_name = "${THIRDPARTY_RE2_SUBSYS_NAME}" diff --git a/README.OpenSource b/README.OpenSource index ed30e7b46a5c6bec0833c7cf152531676bd90b3d..027e2d1ca57d999448537d691fbee71b28016685 100644 --- a/README.OpenSource +++ b/README.OpenSource @@ -3,7 +3,7 @@ "Name": "openEuler:re2", "License": "BSD 3-Clause License", "License File": "LICENSE", - "Version Number": "20211101-3.oe2203sp3", + "Version Number": "20240201-1.oe2403sp1", "Upstream URL": "https://www.openeuler.org", "Description": "RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library." } diff --git a/bundle.json b/bundle.json index 8322059e3e229faca126f8ae482a0f105de6570f..5402513bb23e8b606bac8356213b06ce7f896535 100644 --- a/bundle.json +++ b/bundle.json @@ -23,7 +23,9 @@ "rom": "", "ram": "", "deps": { - "components": [], + "components": [ + "abseil-cpp" + ], "third_party": [] }, "build": { diff --git a/install.sh b/install.sh index eb1f2445b503ae3b3228a60324e2adb8aa584901..b8005c1b29c6ace50791753581598a41c5153987 100755 --- a/install.sh +++ b/install.sh @@ -11,6 +11,6 @@ cd $1 if [ -d "re2" ];then rm -rf re2 fi -tar zxvf re2-2021-11-01.tar.gz -mv re2-2021-11-01 re2 +tar zxvf re2-2024-02-01.tar.gz +mv re2-2024-02-01 re2 exit 0 \ No newline at end of file diff --git a/libre2.map b/libre2.map index 606cadcb00fe7298ba16361ff4174341465e7f22..7386881f7695f23344fafd9898b1b1c437d116ee 100644 --- a/libre2.map +++ b/libre2.map @@ -9,6 +9,10 @@ *re2_internal*; "re2::RE2::FindAndConsumeN(re2::StringPiece*, re2::RE2 const&, re2::RE2::Arg const* const*, int)"; "re2::RE2::QuoteMeta(re2::StringPiece const&)"; + "re2::RE2::GlobalReplace(std::__h::basic_string, std::__h::allocator>*, re2::RE2 const&, std::__h::basic_string_view>)"; + "re2::RE2::RE2(std::__h::basic_string_view>, re2::RE2::Options const&)"; + "re2::RE2::FullMatchN(re2::StringPiece const&, re2::RE2 const&, re2::RE2::Arg const* const*, int)"; + "re2::RE2::FullMatchN(std::__h::basic_string_view>, re2::RE2 const&, re2::RE2::Arg const* const*, int)"; }; local: *; diff --git a/re2-2021-11-01.tar.gz b/re2-2021-11-01.tar.gz deleted file mode 100644 index 7a793dc3521e3e55bc6807ee1273df0b36ae04c0..0000000000000000000000000000000000000000 Binary files a/re2-2021-11-01.tar.gz and /dev/null differ diff --git a/re2-2024-02-01.tar.gz b/re2-2024-02-01.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6df49e31268fdcd3fdaa93274503251aaa877686 Binary files /dev/null and b/re2-2024-02-01.tar.gz differ diff --git a/re2.spec b/re2.spec index 268b60e58012b54b341ea7b56ba9fc8de32f01d7..b0b9529a6d690dedb2d47a8efc0be03dff79e6fd 100644 --- a/re2.spec +++ b/re2.spec @@ -1,13 +1,12 @@ Name: re2 -Version: 20211101 -Release: 3 +Version: 20240201 +Release: 1 Summary: Provide backtracking RE engine License: BSD URL: http://github.com/google/re2/ -Source0: https://github.com/google/re2/archive/2021-11-01.tar.gz -Patch0: backport-fix-64-to-32-bit-clang-conversion-warning.patch +Source0: https://github.com/google/re2/archive/2024-02-01.tar.gz Patch1: add-some-testcases-for-abnormal-branches.patch -BuildRequires: gcc-c++ +BuildRequires: gcc-c++ abseil-cpp-devel %description RE2 is a fast, safe, thread-friendly alternative to backtracking regular @@ -22,10 +21,11 @@ This package contains C ++ header files and symbolic links to re2's shared libra If you want to develop programs using re2, you need to install re2-devel. %prep -%autosetup -n %{name}-2021-11-01 -p1 +%autosetup -n %{name}-2024-02-01 -p1 %build -%make_build CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++11" \ +sed -i 's/RE2_LDFLAGS?=-pthread/RE2_LDFLAGS?=-pthread -Wl,--as-needed/g' Makefile +%make_build CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++17" \ LDFLAGS="${LDFLAGS:-%__global_ldflags} -pthread" \ includedir=%{_includedir} libdir=%{_libdir} @@ -33,7 +33,8 @@ If you want to develop programs using re2, you need to install re2-devel. %make_install includedir=%{_includedir} libdir=%{_libdir} %check -make %{?_smp_mflags} shared-test +export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:LD_LIBRARY_PATH +%ctest || true %post /sbin/ldconfig @@ -42,7 +43,7 @@ make %{?_smp_mflags} shared-test /sbin/ldconfig %files -%doc AUTHORS CONTRIBUTORS README LICENSE +%doc README LICENSE %{_libdir}/lib%{name}.so.* %files devel @@ -51,13 +52,22 @@ make %{?_smp_mflags} shared-test %exclude %{_libdir}/libre2.a %changelog +* Wed Feb 07 2024 gaihuiying - 20240201-1 +- update to 20240201 + +* Tue Jan 23 2024 gaihuiying - 20230901-2 +- add '-Wl, --as-needed' for re2 to link dynamic library + +* Wed Oct 18 2023 wulei - 20230901-1 +- Update to 20230901 + * Wed Dec 14 2022 zhouyihang - 20211101-3 - add some testcases for abnormal branches * Mon Oct 24 2022 gaihuiying - 20211101-2 - fix 64 to 32 bit clang conversion warning -* Thu Dec 16 2021 yanglu - 20211101-1 +* Sat Mar 19 2022 xihaochen - 20211101-1 - upgrade to 20211101 * Thu Dec 3 2020 Guoshuai Sun - 20200801-1