Import
This commit is contained in:
parent
6f61c820f8
commit
14b395d948
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/pcre2-10.10.tar.bz2
|
39
pcre2-10.10-Fix-multilib.patch
Normal file
39
pcre2-10.10-Fix-multilib.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 8b6b10229201e5b148979a24e06c640dbbcfbad9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Fri, 20 Feb 2015 14:34:26 +0100
|
||||
Subject: [PATCH] Fix multilib
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Do not set RPATH nor add explicit -L path to compiler.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
|
||||
diff --git a/pcre2-config.in b/pcre2-config.in
|
||||
index 932160e..dbef5e5 100644
|
||||
--- a/pcre2-config.in
|
||||
+++ b/pcre2-config.in
|
||||
@@ -28,19 +28,7 @@ if test $# -eq 0; then
|
||||
fi
|
||||
|
||||
libR=
|
||||
-case `uname -s` in
|
||||
- *SunOS*)
|
||||
- libR=" -R@libdir@"
|
||||
- ;;
|
||||
- *BSD*)
|
||||
- libR=" -Wl,-R@libdir@"
|
||||
- ;;
|
||||
-esac
|
||||
-
|
||||
libS=
|
||||
-if test @libdir@ != /usr/lib ; then
|
||||
- libS=-L@libdir@
|
||||
-fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--
|
||||
2.1.0
|
||||
|
153
pcre2.spec
Normal file
153
pcre2.spec
Normal file
@ -0,0 +1,153 @@
|
||||
# This is stable release:
|
||||
#%%global rcversion RC1
|
||||
Name: pcre2
|
||||
Version: 10.10
|
||||
Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist}
|
||||
%global myversion %{version}%{?rcversion:-%rcversion}
|
||||
Summary: Perl-compatible regular expression library
|
||||
Group: System Environment/Libraries
|
||||
# The library: BSD
|
||||
# pcre2test (linked to GNU readline): BSD (linked to GPLv3+)
|
||||
# autotools: GPLv3+ with exception
|
||||
License: BSD
|
||||
URL: http://www.pcre.org/
|
||||
Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{?rcversion:Testing/}%{name}-%{myversion}.tar.bz2
|
||||
# Do no set RPATH if libdir is not /usr/lib
|
||||
Patch0: pcre2-10.10-Fix-multilib.patch
|
||||
# New libtool to get rid of RPATH and to use distribution autotools
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: glibc-headers
|
||||
BuildRequires: libtool
|
||||
BuildRequires: readline-devel
|
||||
|
||||
%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 devel
|
||||
Summary: Development files for %{name}
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: glibc-headers
|
||||
|
||||
%description devel
|
||||
Development files (headers, libraries for dynamic linking, documentation)
|
||||
for %{name}. The header file for the POSIX-style functions is called
|
||||
pcre2posix.h.
|
||||
|
||||
%package static
|
||||
Summary: Static library for %{name}
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-devel%{_isa} = %{version}-%{release}
|
||||
|
||||
%description static
|
||||
Library for static linking for %{name}.
|
||||
|
||||
%package tools
|
||||
Summary: Auxiliary utilities for %{name}
|
||||
# pcre2test (linked to GNU readline): BSD (linked to GPLv3+)
|
||||
License: BSD and GPLv3+
|
||||
Group: Development/Tools
|
||||
Requires: %{name}%{_isa} = %{version}-%{release}
|
||||
|
||||
%description tools
|
||||
Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{myversion}
|
||||
%patch0 -p1
|
||||
# Because of multilib patch
|
||||
libtoolize --copy --force && autoreconf -vif
|
||||
|
||||
%build
|
||||
# There is a strict-aliasing problem on PPC64, bug #881232
|
||||
%ifarch ppc64
|
||||
%global optflags %{optflags} -fno-strict-aliasing
|
||||
%endif
|
||||
%configure \
|
||||
%ifarch s390 s390x sparc64 sparcv9
|
||||
--disable-jit \
|
||||
--disable-pcre2grep-jit \
|
||||
%else
|
||||
--enable-jit \
|
||||
--enable-pcre2grep-jit \
|
||||
%endif
|
||||
--disable-bsr-anycrlf \
|
||||
--disable-coverage \
|
||||
--disable-ebcdic \
|
||||
--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 %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
# Get rid of unneeded *.la files
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
# These are handled by %%doc in %%files
|
||||
rm -rf $RPM_BUILD_ROOT%{_docdir}/pcre2
|
||||
|
||||
%check
|
||||
make %{?_smp_mflags} check VERBOSE=yes
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%{_libdir}/*.so.*
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING LICENCE
|
||||
%doc AUTHORS ChangeLog NEWS README
|
||||
|
||||
%files devel
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/*
|
||||
%{_includedir}/*.h
|
||||
%{_mandir}/man1/pcre2-config.*
|
||||
%{_mandir}/man3/*
|
||||
%{_bindir}/pcre2-config
|
||||
%doc doc/*.txt doc/html
|
||||
%doc HACKING
|
||||
|
||||
%files static
|
||||
%{_libdir}/*.a
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING LICENCE
|
||||
|
||||
%files tools
|
||||
%{_bindir}/pcre2grep
|
||||
%{_bindir}/pcre2test
|
||||
%{_mandir}/man1/pcre2grep.*
|
||||
%{_mandir}/man1/pcre2test.*
|
||||
|
||||
%changelog
|
||||
* Fri Mar 13 2015 Petr Pisar <ppisar@redhat.com> - 10.10-1
|
||||
- PCRE2 library packaged
|
||||
|
Loading…
Reference in New Issue
Block a user