mirror of
https://abf.rosa.ru/djam/pcre2.git
synced 2025-02-23 19:12:55 +00:00
190 lines
5.4 KiB
RPMSpec
190 lines
5.4 KiB
RPMSpec
%define major 0
|
|
%define posixmajor 3
|
|
%define libname8 %mklibname pcre2-8_ %{major}
|
|
%define libname16 %mklibname pcre2-16_ %{major}
|
|
%define libname32 %mklibname pcre2-32_ %{major}
|
|
%define libnameposix %mklibname pcre2posix %{posixmajor}
|
|
%define devname %mklibname %{name} -d
|
|
%define sdevname %mklibname %{name} -d -s
|
|
|
|
Summary: Perl-compatible regular expression library
|
|
Name: pcre2
|
|
Version: 10.45
|
|
Release: 1
|
|
License: BSD
|
|
Group: System/Libraries
|
|
URL: https://pcre2project.github.io/pcre2
|
|
Source0: https://github.com/PhilipHazel/pcre2/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
|
|
# Do no set RPATH if libdir is not /usr/lib
|
|
Patch0: pcre2-10.10-Fix-multilib.patch
|
|
# CVE-2022-1586 CVE-2022-1587
|
|
Patch1: pcre2_jit_compile.c.diff
|
|
Patch2: pcre2_jit_test.c.diff
|
|
Patch3: CVE-2022-41409.patch
|
|
BuildRequires: readline-devel
|
|
BuildRequires: bzip2
|
|
|
|
%description
|
|
PCRE2 is a re-working of the original PCRE (Perl-compatible regular
|
|
expression) library to provide an entirely new API.
|
|
|
|
PCRE2 is written in C, and it has its own API. There are three sets of
|
|
functions, one for the 8-bit library, which processes strings of bytes, one
|
|
for the 16-bit library, which processes strings of 16-bit values, and one for
|
|
the 32-bit library, which processes strings of 32-bit values. There are no C++
|
|
wrappers.
|
|
|
|
The distribution does contain a set of C wrapper functions for the 8-bit
|
|
library that are based on the POSIX regular expression API (see the pcre2posix
|
|
man page). These can be found in a library called libpcre2posix. Note that
|
|
this just provides a POSIX calling interface to PCRE2; the regular expressions
|
|
themselves still follow Perl syntax and semantics. The POSIX API is
|
|
restricted, and does not give full access to all of PCRE2's facilities.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libname8}
|
|
Summary: Perl-compatible regular expression library
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname8}
|
|
PCRE2 is a re-working of the original PCRE (Perl-compatible regular
|
|
expression) library to provide an entirely new API.
|
|
|
|
%files -n %{libname8}
|
|
%{_libdir}/libpcre2-8.so.%{major}*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libname16}
|
|
Summary: Perl-compatible regular expression library
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname16}
|
|
PCRE2 is a re-working of the original PCRE (Perl-compatible regular
|
|
expression) library to provide an entirely new API.
|
|
|
|
%files -n %{libname16}
|
|
%{_libdir}/libpcre2-16.so.%{major}*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libname32}
|
|
Summary: Perl-compatible regular expression library
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname32}
|
|
PCRE2 is a re-working of the original PCRE (Perl-compatible regular
|
|
expression) library to provide an entirely new API.
|
|
|
|
%files -n %{libname32}
|
|
%{_libdir}/libpcre2-32.so.%{major}*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libnameposix}
|
|
Summary: Perl-compatible regular expression library
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libnameposix}
|
|
This package contains the shared library libpcre2-posix.
|
|
|
|
%files -n %{libnameposix}
|
|
%{_libdir}/libpcre2-posix.so.%{posixmajor}*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Development files for %{name}
|
|
Group: Development/C
|
|
Requires: %{libname8} = %{EVRD}
|
|
Requires: %{libname16} = %{EVRD}
|
|
Requires: %{libname32} = %{EVRD}
|
|
Requires: %{libnameposix} = %{EVRD}
|
|
Provides: %{name}-devel = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
Development files (headers, libraries for dynamic linking, documentation)
|
|
for %{name}. The header file for the POSIX-style functions is called
|
|
pcre2posix.h.
|
|
|
|
%files -n %{devname}
|
|
%{_libdir}/*.so
|
|
%{_libdir}/pkgconfig/*
|
|
%{_includedir}/*.h
|
|
%{_mandir}/man1/pcre2-config.*
|
|
%{_mandir}/man3/*
|
|
%{_bindir}/pcre2-config
|
|
|
|
#----------------------------------------------------------------------------
|
|
%package -n %{sdevname}
|
|
Summary: %{name} development files (static library)
|
|
Group: Development/Other
|
|
Requires: %{devname} = %{EVRD}
|
|
Provides: %{name}-static-devel = %{EVRD}
|
|
|
|
%description -n %{sdevname}
|
|
%{name} development files (static library).
|
|
|
|
%files -n %{sdevname}
|
|
%{_libdir}/*.a
|
|
|
|
#------------------------------------------------------------------
|
|
%package tools
|
|
Summary: Auxiliary utilities for %{name}
|
|
Group: Development/Tools
|
|
|
|
%description tools
|
|
Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
|
|
|
|
%files tools
|
|
%{_bindir}/pcre2grep
|
|
%{_bindir}/pcre2test
|
|
%{_mandir}/man1/pcre2grep.*
|
|
%{_mandir}/man1/pcre2test.*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
# Because of multilib patch
|
|
libtoolize --copy --force
|
|
autoreconf -vif
|
|
|
|
%configure \
|
|
%ifnarch %{e2k} %{riscv}
|
|
--enable-jit \
|
|
--enable-pcre2grep-jit \
|
|
%endif
|
|
--disable-bsr-anycrlf \
|
|
--disable-coverage \
|
|
--disable-ebcdic \
|
|
--disable-never-backslash-C \
|
|
--enable-newline-is-lf \
|
|
--enable-pcre2-8 \
|
|
--enable-pcre2-16 \
|
|
--enable-pcre2-32 \
|
|
--disable-pcre2test-libedit \
|
|
--enable-pcre2test-libreadline \
|
|
--disable-pcre2grep-libbz2 \
|
|
--disable-pcre2grep-libz \
|
|
--disable-rebuild-chartables \
|
|
--enable-shared \
|
|
--enable-stack-for-recursion \
|
|
--enable-static \
|
|
--enable-unicode \
|
|
--disable-valgrind
|
|
%make
|
|
|
|
%install
|
|
%makeinstall_std
|
|
# These are handled by %%doc in %%files
|
|
rm -rf %{buildroot}%{_docdir}/pcre2
|
|
|
|
%check
|
|
make check VERBOSE=yes
|
|
|
|
|
|
# CVE-2016-3191 CVE-2017-8399 CVE-2017-8786
|