Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37620360
en ru br
ALT Linux repos
S:20230301-alt1

Group :: System/Libraries
RPM: libre2

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1

%define oldname re2
Name: libre2
Version: 20230301
Release: alt1
Summary: C++ fast alternative to backtracking RE engines
Group: System/Libraries
License: BSD-3-Clause
Url: http://github.com/google/re2/
# repack from git
Source0: %name-%version.tar
Provides: re2 = %EVR

BuildRequires(pre): rpm-macros-cmake
BuildRequires: gcc-c++ cmake ctest

%description
RE2 is a C++ library providing a fast, safe, thread-friendly alternative to
backtracking regular expression engines like those used in PCRE, Perl, and
Python.

Backtracking engines are typically full of features and convenient syntactic
sugar but can be forced into taking exponential amounts of time on even small
inputs.

In contrast, RE2 uses automata theory to guarantee that regular expression
searches run in time linear in the size of the input, at the expense of some
missing features (e.g back references and generalized assertions).

%package devel
Summary: C++ header files and library symbolic links for re2
Group: Development/Other
Requires: %name = %EVR
Provides: re2-devel = %EVR

%description devel
This package contains the C++ header files and symbolic links to the shared
libraries for %oldname. If you would like to develop programs using %oldname,
you will need to install %name-devel.

%prep
%setup

%build
%cmake \
 -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
 -DCMAKE_COLOR_MAKEFILE:BOOL=OFF \
 -DBUILD_SHARED_LIBS:BOOL=ON
%cmake_build

%install
%cmake_install

# Suppress the static library

find %buildroot -name '%name.a' -delete

%check
ctest --test-dir %_cmake__builddir --output-on-failure --force-new-ctest-process %_smp_mflags

%files
%doc LICENSE
%doc AUTHORS CONTRIBUTORS README
%_libdir/%name.so.*

%files devel
%_includedir/%oldname
%_libdir/%name.so
%_pkgconfigdir/%oldname.pc
%_libdir/cmake/%oldname

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin