diff --git a/BUILD.gn b/BUILD.gn index 4562ae20655596b3e51e6afab6dcddfde40f26e9..da283767e2f5282460c87630028438cc2a94d4ec 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -26,7 +26,6 @@ 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", @@ -51,6 +50,7 @@ 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,16 +70,6 @@ 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_raw_logging_internal", - "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 027e2d1ca57d999448537d691fbee71b28016685..ed30e7b46a5c6bec0833c7cf152531676bd90b3d 100644 --- a/README.OpenSource +++ b/README.OpenSource @@ -3,7 +3,7 @@ "Name": "openEuler:re2", "License": "BSD 3-Clause License", "License File": "LICENSE", - "Version Number": "20240201-1.oe2403sp1", + "Version Number": "20211101-3.oe2203sp3", "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 5402513bb23e8b606bac8356213b06ce7f896535..8322059e3e229faca126f8ae482a0f105de6570f 100644 --- a/bundle.json +++ b/bundle.json @@ -23,9 +23,7 @@ "rom": "", "ram": "", "deps": { - "components": [ - "abseil-cpp" - ], + "components": [], "third_party": [] }, "build": { diff --git a/install.sh b/install.sh index b8005c1b29c6ace50791753581598a41c5153987..eb1f2445b503ae3b3228a60324e2adb8aa584901 100755 --- a/install.sh +++ b/install.sh @@ -11,6 +11,6 @@ cd $1 if [ -d "re2" ];then rm -rf re2 fi -tar zxvf re2-2024-02-01.tar.gz -mv re2-2024-02-01 re2 +tar zxvf re2-2021-11-01.tar.gz +mv re2-2021-11-01 re2 exit 0 \ No newline at end of file diff --git a/libre2.map b/libre2.map index b6b767661a043a6374f43028716e9941fed23c07..606cadcb00fe7298ba16361ff4174341465e7f22 100644 --- a/libre2.map +++ b/libre2.map @@ -9,11 +9,6 @@ *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)"; - "re2::RE2::FindAndConsumeN(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 new file mode 100644 index 0000000000000000000000000000000000000000..7a793dc3521e3e55bc6807ee1273df0b36ae04c0 Binary files /dev/null and b/re2-2021-11-01.tar.gz differ diff --git a/re2-2024-02-01.tar.gz b/re2-2024-02-01.tar.gz deleted file mode 100644 index 6df49e31268fdcd3fdaa93274503251aaa877686..0000000000000000000000000000000000000000 Binary files a/re2-2024-02-01.tar.gz and /dev/null differ diff --git a/re2.spec b/re2.spec index b0b9529a6d690dedb2d47a8efc0be03dff79e6fd..268b60e58012b54b341ea7b56ba9fc8de32f01d7 100644 --- a/re2.spec +++ b/re2.spec @@ -1,12 +1,13 @@ Name: re2 -Version: 20240201 -Release: 1 +Version: 20211101 +Release: 3 Summary: Provide backtracking RE engine License: BSD URL: http://github.com/google/re2/ -Source0: https://github.com/google/re2/archive/2024-02-01.tar.gz +Source0: https://github.com/google/re2/archive/2021-11-01.tar.gz +Patch0: backport-fix-64-to-32-bit-clang-conversion-warning.patch Patch1: add-some-testcases-for-abnormal-branches.patch -BuildRequires: gcc-c++ abseil-cpp-devel +BuildRequires: gcc-c++ %description RE2 is a fast, safe, thread-friendly alternative to backtracking regular @@ -21,11 +22,10 @@ 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}-2024-02-01 -p1 +%autosetup -n %{name}-2021-11-01 -p1 %build -sed -i 's/RE2_LDFLAGS?=-pthread/RE2_LDFLAGS?=-pthread -Wl,--as-needed/g' Makefile -%make_build CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++17" \ +%make_build CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++11" \ LDFLAGS="${LDFLAGS:-%__global_ldflags} -pthread" \ includedir=%{_includedir} libdir=%{_libdir} @@ -33,8 +33,7 @@ sed -i 's/RE2_LDFLAGS?=-pthread/RE2_LDFLAGS?=-pthread -Wl,--as-needed/g' Makefil %make_install includedir=%{_includedir} libdir=%{_libdir} %check -export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:LD_LIBRARY_PATH -%ctest || true +make %{?_smp_mflags} shared-test %post /sbin/ldconfig @@ -43,7 +42,7 @@ export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:LD_LIBRARY_PATH /sbin/ldconfig %files -%doc README LICENSE +%doc AUTHORS CONTRIBUTORS README LICENSE %{_libdir}/lib%{name}.so.* %files devel @@ -52,22 +51,13 @@ export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:LD_LIBRARY_PATH %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 -* Sat Mar 19 2022 xihaochen - 20211101-1 +* Thu Dec 16 2021 yanglu - 20211101-1 - upgrade to 20211101 * Thu Dec 3 2020 Guoshuai Sun - 20200801-1