Merge pull request !38 from ganchuantao/master
This commit is contained in:
openharmony_ci
2025-03-24 03:57:03 +00:00
committed by Gitee
8 changed files with 15 additions and 42 deletions
+1 -11
View File
@@ -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}"
+1 -1
View File
@@ -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."
}
+1 -3
View File
@@ -23,9 +23,7 @@
"rom": "",
"ram": "",
"deps": {
"components": [
"abseil-cpp"
],
"components": [],
"third_party": []
},
"build": {
+2 -2
View File
@@ -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
-5
View File
@@ -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<char, std::__h::char_traits<char>, std::__h::allocator<char>>*, re2::RE2 const&, std::__h::basic_string_view<char, std::__h::char_traits<char>>)";
"re2::RE2::RE2(std::__h::basic_string_view<char, std::__h::char_traits<char>>, 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<char, std::__h::char_traits<char>>, re2::RE2 const&, re2::RE2::Arg const* const*, int)";
"re2::RE2::FindAndConsumeN(std::__h::basic_string_view<char, std::__h::char_traits<char>>*, re2::RE2 const&, re2::RE2::Arg const* const*, int)";
};
local:
*;
Binary file not shown.
Binary file not shown.
+10 -20
View File
@@ -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 <eaglegai@163.com> - 20240201-1
- update to 20240201
* Tue Jan 23 2024 gaihuiying <eaglegai@163.com> - 20230901-2
- add '-Wl, --as-needed' for re2 to link dynamic library
* Wed Oct 18 2023 wulei <wu_lei@hoperun.com> - 20230901-1
- Update to 20230901
* Wed Dec 14 2022 zhouyihang <zhouyihang3@h-partners.com> - 20211101-3
- add some testcases for abnormal branches
* Mon Oct 24 2022 gaihuiying <eaglegai@163.com> - 20211101-2
- fix 64 to 32 bit clang conversion warning
* Sat Mar 19 2022 xihaochen <xihaochen@h-partners.com> - 20211101-1
* Thu Dec 16 2021 yanglu <yanglu72@huawei.com> - 20211101-1
- upgrade to 20211101
* Thu Dec 3 2020 Guoshuai Sun <sunguoshuai@huawei.com> - 20200801-1