2015-06-18 22:19:06 +02:00
|
|
|
#
|
|
|
|
# spec file for package pcre2
|
|
|
|
#
|
2021-04-08 18:31:43 +02:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2015-06-18 22:19:06 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-11 15:53:35 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-06-18 22:19:06 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-05-17 16:53:32 +02:00
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2015-06-18 22:19:06 +02:00
|
|
|
Name: pcre2
|
2021-11-21 11:56:11 +01:00
|
|
|
Version: 10.39
|
2015-06-18 22:19:06 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: A library for Perl-compatible regular expressions
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Libraries/C and C++
|
2020-05-17 16:53:32 +02:00
|
|
|
URL: https://www.pcre.org
|
2021-10-25 02:08:45 +02:00
|
|
|
Source0: https://github.com/PhilipHazel/pcre2/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
|
|
|
|
Source2: https://github.com/PhilipHazel/pcre2/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2.sig
|
2015-06-18 22:19:06 +02:00
|
|
|
Source3: %{name}.keyring
|
|
|
|
Source4: baselibs.conf
|
|
|
|
#PATCH-FIX-OPENSUSE tchvatal@suse.cz upstream thinks it is good idea to use rpath, taken from RH
|
|
|
|
Patch1: pcre2-10.10-multilib.patch
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: gcc-c++
|
2017-05-02 18:56:53 +02:00
|
|
|
BuildRequires: libbz2-devel
|
2018-07-23 12:27:36 +02:00
|
|
|
BuildRequires: libedit-devel
|
2015-06-18 22:19:06 +02:00
|
|
|
BuildRequires: libtool
|
2017-08-05 19:34:46 +02:00
|
|
|
BuildRequires: pkgconfig
|
2017-05-02 18:56:53 +02:00
|
|
|
BuildRequires: zlib-devel
|
2015-06-18 22:19:06 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
The PCRE2 library is a set of functions that implement regular
|
|
|
|
expression pattern matching using the same syntax and semantics
|
|
|
|
as Perl 5.
|
|
|
|
|
|
|
|
PCRE2 is a re-working of the original PCRE library to provide an entirely new
|
|
|
|
API.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: A library for Perl-compatible regular expressions
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: libpcre2-16-0 = %{version}
|
2015-06-18 23:08:20 +02:00
|
|
|
Requires: libpcre2-32-0 = %{version}
|
2015-06-18 22:19:06 +02:00
|
|
|
Requires: libpcre2-8-0 = %{version}
|
2021-05-30 18:19:49 +02:00
|
|
|
Requires: libpcre2-posix3 = %{version}
|
2015-06-18 22:19:06 +02:00
|
|
|
Requires: libstdc++-devel
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
The PCRE2 library is a set of functions that implement regular
|
|
|
|
expression pattern matching using the same syntax and semantics
|
|
|
|
as Perl 5.
|
|
|
|
|
|
|
|
PCRE2 is a re-working of the original PCRE library to provide an entirely new
|
|
|
|
API.
|
|
|
|
|
|
|
|
%package devel-static
|
|
|
|
Summary: A library for Perl-compatible regular expressions
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: pcre2-devel = %{version}
|
|
|
|
|
|
|
|
%description devel-static
|
|
|
|
The PCRE2 library is a set of functions that implement regular
|
|
|
|
expression pattern matching using the same syntax and semantics
|
|
|
|
as Perl 5.
|
|
|
|
|
|
|
|
PCRE2 is a re-working of the original PCRE library to provide an entirely new
|
|
|
|
API.
|
|
|
|
|
|
|
|
This package contains static versions of the PCRE2 libraries.
|
|
|
|
|
|
|
|
%package -n libpcre2-8-0
|
|
|
|
Summary: A library for Perl-compatible regular expressions
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libpcre2-8-0
|
|
|
|
The PCRE2 library is a set of functions that implement regular
|
|
|
|
expression pattern matching using the same syntax and semantics
|
|
|
|
as Perl 5.
|
|
|
|
|
|
|
|
PCRE2 is a re-working of the original PCRE library to provide an entirely new
|
|
|
|
API.
|
|
|
|
|
|
|
|
This PCRE2 library variant supports 8-bit and UTF-8 strings.
|
2015-06-18 23:08:20 +02:00
|
|
|
(See also libpcre2-16 and libpcre2-32)
|
2015-06-18 22:19:06 +02:00
|
|
|
|
|
|
|
%package -n libpcre2-16-0
|
|
|
|
Summary: A library for Perl-compatible regular expressions
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libpcre2-16-0
|
|
|
|
The PCRE2 library is a set of functions that implement regular
|
|
|
|
expression pattern matching using the same syntax and semantics
|
|
|
|
as Perl 5.
|
|
|
|
|
|
|
|
PCRE2 is a re-working of the original PCRE library to provide an entirely new
|
|
|
|
API.
|
|
|
|
|
|
|
|
libpcre2-16 supports 16-bit and UTF-16 strings.
|
|
|
|
|
2015-06-18 23:08:20 +02:00
|
|
|
%package -n libpcre2-32-0
|
|
|
|
Summary: A library for Perl-compatible regular expressions
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libpcre2-32-0
|
|
|
|
The PCRE2 library is a set of functions that implement regular
|
|
|
|
expression pattern matching using the same syntax and semantics
|
|
|
|
as Perl 5.
|
|
|
|
|
|
|
|
PCRE2 is a re-working of the original PCRE library to provide an entirely new
|
|
|
|
API.
|
|
|
|
|
|
|
|
libpcre2-32 supports 32-bit and UTF-32 strings.
|
|
|
|
|
2021-05-30 18:19:49 +02:00
|
|
|
%package -n libpcre2-posix3
|
2015-06-18 22:19:06 +02:00
|
|
|
Summary: A library for Perl-compatible regular expressions
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2021-05-30 18:19:49 +02:00
|
|
|
%description -n libpcre2-posix3
|
2015-06-18 22:19:06 +02:00
|
|
|
The PCRE2 library is a set of functions that implement regular
|
|
|
|
expression pattern matching using the same syntax and semantics
|
|
|
|
as Perl 5.
|
|
|
|
|
|
|
|
PCRE2 is a re-working of the original PCRE library to provide an entirely new
|
|
|
|
API.
|
|
|
|
|
|
|
|
pcre2-posix provides a POSIX-compatible API to the PCRE2 engine.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: A library for Perl-compatible regular expressions
|
|
|
|
Group: Documentation/HTML
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
The PCRE2 library is a set of functions that implement regular
|
|
|
|
expression pattern matching using the same syntax and semantics
|
|
|
|
as Perl 5.
|
|
|
|
|
|
|
|
PCRE2 is a re-working of the original PCRE library to provide an entirely new
|
|
|
|
API.
|
|
|
|
|
|
|
|
%package tools
|
|
|
|
Summary: A library for Perl-compatible regular expressions
|
|
|
|
Group: Productivity/Text/Utilities
|
|
|
|
Recommends: %{name}-doc
|
|
|
|
|
|
|
|
%description tools
|
|
|
|
The PCRE2 library is a set of functions that implement regular
|
|
|
|
expression pattern matching using the same syntax and semantics
|
|
|
|
as Perl 5.
|
|
|
|
|
|
|
|
PCRE2 is a re-working of the original PCRE library to provide an entirely new
|
|
|
|
API.
|
|
|
|
|
|
|
|
%prep
|
2021-04-15 16:24:36 +02:00
|
|
|
%autosetup -p1
|
2015-06-18 22:19:06 +02:00
|
|
|
|
|
|
|
%build
|
2019-04-25 02:26:26 +02:00
|
|
|
%define _lto_cflags %{nil}
|
2015-06-18 22:19:06 +02:00
|
|
|
# Available JIT archs see sljit/sljitConfig.h
|
|
|
|
autoreconf -fiv
|
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now"
|
|
|
|
%configure \
|
2019-11-27 16:07:24 +01:00
|
|
|
%ifarch %{ix86} x86_64 aarch64 %{arm} ppc ppc64 ppc64le mips sparc
|
2015-06-18 22:19:06 +02:00
|
|
|
--enable-jit \
|
2018-12-11 15:53:35 +01:00
|
|
|
--enable-jit-sealloc \
|
2015-06-18 22:19:06 +02:00
|
|
|
%endif
|
|
|
|
--enable-static \
|
|
|
|
--with-link-size=2 \
|
|
|
|
--with-match-limit=10000000 \
|
|
|
|
--enable-newline-is-lf \
|
|
|
|
--enable-pcre2-16 \
|
2015-06-18 23:08:20 +02:00
|
|
|
--enable-pcre2-32 \
|
2017-05-02 18:56:53 +02:00
|
|
|
--enable-pcre2grep-libz \
|
|
|
|
--enable-pcre2grep-libbz2 \
|
2017-05-02 19:28:47 +02:00
|
|
|
--enable-pcre2test-libedit \
|
2015-06-18 23:08:20 +02:00
|
|
|
--enable-unicode
|
2018-07-23 12:27:36 +02:00
|
|
|
|
|
|
|
%if 0%{?do_profiling}
|
2020-05-17 16:53:32 +02:00
|
|
|
%make_build CFLAGS="%{optflags} %{cflags_profile_generate}"
|
2018-07-23 12:27:36 +02:00
|
|
|
export LANG=POSIX
|
2019-01-23 19:36:12 +01:00
|
|
|
# do not run profiling in parallel for reproducible builds (boo#1040589 boo#1102408)
|
2020-05-17 16:53:32 +02:00
|
|
|
%make_build CFLAGS="%{optflags} %{cflags_profile_generate}" check
|
|
|
|
%make_build clean
|
|
|
|
%make_build CFLAGS="%{optflags} %{cflags_profile_feedback}"
|
2018-07-23 12:27:36 +02:00
|
|
|
%else
|
2020-05-17 16:53:32 +02:00
|
|
|
%make_build CFLAGS="%{optflags}"
|
2018-07-23 12:27:36 +02:00
|
|
|
%endif
|
2015-06-18 22:19:06 +02:00
|
|
|
|
|
|
|
%install
|
2018-02-18 11:24:57 +01:00
|
|
|
%make_install
|
2015-06-18 22:19:06 +02:00
|
|
|
mkdir -p %{buildroot}/%{_defaultdocdir}
|
|
|
|
mv %{buildroot}%{_datadir}/doc/pcre2 %{buildroot}/%{_defaultdocdir}/pcre2-doc
|
|
|
|
#empty dependecy_libs
|
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
|
|
|
|
|
|
%check
|
|
|
|
export LANG=POSIX
|
2020-05-17 16:53:32 +02:00
|
|
|
%make_build check -j1
|
2015-06-18 22:19:06 +02:00
|
|
|
|
|
|
|
%post -n libpcre2-8-0 -p /sbin/ldconfig
|
|
|
|
%postun -n libpcre2-8-0 -p /sbin/ldconfig
|
|
|
|
%post -n libpcre2-16-0 -p /sbin/ldconfig
|
|
|
|
%postun -n libpcre2-16-0 -p /sbin/ldconfig
|
2015-06-18 23:08:20 +02:00
|
|
|
%post -n libpcre2-32-0 -p /sbin/ldconfig
|
|
|
|
%postun -n libpcre2-32-0 -p /sbin/ldconfig
|
2021-05-30 18:19:49 +02:00
|
|
|
%post -n libpcre2-posix3 -p /sbin/ldconfig
|
|
|
|
%postun -n libpcre2-posix3 -p /sbin/ldconfig
|
2015-06-18 22:19:06 +02:00
|
|
|
|
|
|
|
%files -n libpcre2-8-0
|
2019-01-15 09:15:08 +01:00
|
|
|
%license COPYING LICENCE
|
|
|
|
%doc AUTHORS ChangeLog NEWS README
|
2015-06-18 22:19:06 +02:00
|
|
|
%{_libdir}/libpcre2-8.so.*
|
|
|
|
|
|
|
|
%files -n libpcre2-16-0
|
2020-05-17 16:53:32 +02:00
|
|
|
%license LICENCE
|
2015-06-18 22:19:06 +02:00
|
|
|
%{_libdir}/libpcre2-16.so.*
|
|
|
|
|
2015-06-18 23:08:20 +02:00
|
|
|
%files -n libpcre2-32-0
|
2020-05-17 16:53:32 +02:00
|
|
|
%license LICENCE
|
2015-06-18 23:08:20 +02:00
|
|
|
%{_libdir}/libpcre2-32.so.*
|
|
|
|
|
2021-05-30 18:19:49 +02:00
|
|
|
%files -n libpcre2-posix3
|
2020-05-17 16:53:32 +02:00
|
|
|
%license LICENCE
|
2015-06-18 22:19:06 +02:00
|
|
|
%{_libdir}/libpcre2-posix.so.*
|
|
|
|
|
|
|
|
%files tools
|
2020-05-17 16:53:32 +02:00
|
|
|
%license LICENCE
|
2015-06-18 22:19:06 +02:00
|
|
|
%{_bindir}/pcre2grep
|
|
|
|
%{_bindir}/pcre2test
|
2018-07-23 12:27:36 +02:00
|
|
|
%{_mandir}/man1/pcre2grep.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/pcre2test.1%{?ext_man}
|
2015-06-18 22:19:06 +02:00
|
|
|
|
|
|
|
%files doc
|
2020-05-17 16:53:32 +02:00
|
|
|
%license COPYING LICENCE
|
|
|
|
%doc AUTHORS ChangeLog NEWS README
|
2015-06-18 22:19:06 +02:00
|
|
|
%doc doc/html doc/*.txt
|
2017-02-07 17:53:03 +01:00
|
|
|
%doc %{_defaultdocdir}/pcre2-doc
|
2015-06-18 22:19:06 +02:00
|
|
|
|
|
|
|
%files devel
|
2020-05-17 16:53:32 +02:00
|
|
|
%license LICENCE
|
2015-06-18 22:19:06 +02:00
|
|
|
%{_bindir}/pcre2-config
|
2021-04-15 16:24:36 +02:00
|
|
|
%{_includedir}/*
|
|
|
|
%{_libdir}/*.so
|
2015-06-18 22:19:06 +02:00
|
|
|
%{_libdir}/pkgconfig/libpcre2-8.pc
|
|
|
|
%{_libdir}/pkgconfig/libpcre2-16.pc
|
2015-06-18 23:08:20 +02:00
|
|
|
%{_libdir}/pkgconfig/libpcre2-32.pc
|
2021-04-15 16:24:36 +02:00
|
|
|
%{_libdir}/pkgconfig/libpcre2-posix.pc
|
2018-07-23 12:27:36 +02:00
|
|
|
%{_mandir}/man1/pcre2-config.1%{?ext_man}
|
2018-02-18 11:24:57 +01:00
|
|
|
%{_mandir}/man3/*%{ext_man}
|
2015-06-18 22:19:06 +02:00
|
|
|
|
|
|
|
%files devel-static
|
|
|
|
%{_libdir}/*.a
|
|
|
|
|
|
|
|
%changelog
|