2019-12-04 11:01:32 +08:00
|
|
|
Name: re2
|
2023-10-18 16:51:04 +08:00
|
|
|
Version: 20230901
|
2024-01-23 07:58:00 +00:00
|
|
|
Release: 2
|
2019-12-04 11:01:32 +08:00
|
|
|
Summary: Provide backtracking RE engine
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: http://github.com/google/re2/
|
2023-10-18 16:51:04 +08:00
|
|
|
Source0: https://github.com/google/re2/archive/2023-09-01.tar.gz
|
2022-12-14 11:05:55 +00:00
|
|
|
Patch1: add-some-testcases-for-abnormal-branches.patch
|
2023-10-18 16:51:04 +08:00
|
|
|
BuildRequires: gcc-c++ abseil-cpp-devel
|
2019-12-04 11:01:32 +08:00
|
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Provide re2 symbolic links with C ++ header files and libraries
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
This package contains C ++ header files and symbolic links to re2's shared libraries.
|
|
|
|
|
If you want to develop programs using re2, you need to install re2-devel.
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-10-18 16:51:04 +08:00
|
|
|
%autosetup -n %{name}-2023-09-01 -p1
|
2019-12-04 11:01:32 +08:00
|
|
|
|
|
|
|
|
%build
|
2024-01-23 07:58:00 +00:00
|
|
|
sed -i 's/RE2_LDFLAGS?=-pthread/RE2_LDFLAGS?=-pthread -Wl,--as-needed/g' Makefile
|
2023-10-18 16:51:04 +08:00
|
|
|
%make_build CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++17" \
|
2019-12-04 11:01:32 +08:00
|
|
|
LDFLAGS="${LDFLAGS:-%__global_ldflags} -pthread" \
|
|
|
|
|
includedir=%{_includedir} libdir=%{_libdir}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install includedir=%{_includedir} libdir=%{_libdir}
|
|
|
|
|
|
|
|
|
|
%check
|
2023-10-18 16:51:04 +08:00
|
|
|
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:LD_LIBRARY_PATH
|
|
|
|
|
%ctest || true
|
2019-12-04 11:01:32 +08:00
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc AUTHORS CONTRIBUTORS README LICENSE
|
|
|
|
|
%{_libdir}/lib%{name}.so.*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_includedir}/%{name}
|
|
|
|
|
%{_libdir}/{lib%{name}.so,pkgconfig/%{name}.pc}
|
|
|
|
|
%exclude %{_libdir}/libre2.a
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-01-23 07:58:00 +00:00
|
|
|
* Tue Jan 23 2024 gaihuiying <eaglegai@163.com> - 20230901-2
|
|
|
|
|
- add '-Wl, --as-needed' for re2 to link dynamic library
|
|
|
|
|
|
2023-10-18 16:51:04 +08:00
|
|
|
* Wed Oct 18 2023 wulei <wu_lei@hoperun.com> - 20230901-1
|
|
|
|
|
- Update to 20230901
|
|
|
|
|
|
2022-12-14 11:05:55 +00:00
|
|
|
* Wed Dec 14 2022 zhouyihang <zhouyihang3@h-partners.com> - 20211101-3
|
|
|
|
|
- add some testcases for abnormal branches
|
|
|
|
|
|
2022-10-24 02:14:54 +00:00
|
|
|
* Mon Oct 24 2022 gaihuiying <eaglegai@163.com> - 20211101-2
|
|
|
|
|
- fix 64 to 32 bit clang conversion warning
|
|
|
|
|
|
2022-03-19 10:27:29 +08:00
|
|
|
* Sat Mar 19 2022 xihaochen <xihaochen@h-partners.com> - 20211101-1
|
|
|
|
|
- upgrade to 20211101
|
|
|
|
|
|
2020-12-03 11:08:35 +08:00
|
|
|
* Thu Dec 3 2020 Guoshuai Sun <sunguoshuai@huawei.com> - 20200801-1
|
|
|
|
|
- upgrade to 20200801
|
|
|
|
|
|
2019-12-04 11:01:32 +08:00
|
|
|
* Fri Nov 29 2019 fengbing <fengbing7@huawei.com> - 20160401-8
|
|
|
|
|
- Package init
|