pcre/pcre.spec
Cristian Rodríguez 8717295031 Accepting request 232505 from home:coolo:branches:openSUSE:Factory
- update to 0.35:
  There have been performance improvements for classes containing non-ASCII
  characters and the "auto-possessification" feature has been extended. Other
  minor improvements have been implemented and bugs fixed. There is a new callout
  feature to enable applications to do detailed stack checks at compile time, to
  avoid running out of stack for deeply nested parentheses. The JIT compiler has
  been extended with experimental support for ARM-64, MIPS-64, and PPC-LE.
- add pcre-commit1472.patch from SVN to work with gcc49, see
  http://bugs.exim.org/show_bug.cgi?id=1463

OBS-URL: https://build.opensuse.org/request/show/232505
OBS-URL: https://build.opensuse.org/package/show/Base:System/pcre?expand=0&rev=56
2014-05-04 19:57:35 +00:00

248 lines
6.9 KiB
RPMSpec

#
# spec file for package pcre
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: pcre
Version: 8.35
Release: 0
Summary: A library for Perl-compatible regular expressions
License: BSD-3-Clause
Group: System/Libraries
Url: http://www.pcre.org/
#SVN-Clone: svn://vcs.exim.org/pcre/code/trunk
#Freecode-URL: http://freecode.com/projects/pcre
Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2
Source2: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2.sig
Source3: %{name}.keyring
Source4: baselibs.conf
#PATCH-FIX-UPSTREAM crrodriguez@opensuse.org http://bugs.exim.org/show_bug.cgi?id=1173
Patch0: pcre-8.32-visibility.patch
#PATCH-FIX-OPENSUSE tchvatal@suse.cz upstream thinks it is good idea to use rpath, taken from RH
Patch1: pcre-8.21-multilib.patch
#PATCH-FIX-UPSTREAM http://bugs.exim.org/show_bug.cgi?id=1463
Patch2: pcre-commit1472.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# bug437293
%ifarch ppc64
Obsoletes: pcre-64bit
%endif
%description
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
%package devel
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
Requires: libpcre1 = %{version}
Requires: libpcre16-0 = %{version}
Requires: libpcrecpp0 = %{version}
Requires: libpcreposix0 = %{version}
Requires: libstdc++-devel
# bug437293
%ifarch ppc64
Obsoletes: pcre-devel-64bit
%endif
#
%description devel
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
%package devel-static
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
Requires: pcre-devel = %{version}
%description devel-static
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
This package contains static versions of the PCRE libraries.
%package -n libpcre1
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n libpcre1
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
This PCRE library variant supports 8-bit and UTF-8 strings.
(See also libpcre16.)
%package -n libpcre16-0
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%description -n libpcre16-0
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
libpcre16 supports 16-bit and UTF-16 strings.
%package -n libpcreposix0
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%description -n libpcreposix0
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
pcreposix provides a POSIX-compatible API to the PCRE engine.
%package -n libpcrecpp0
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%description -n libpcrecpp0
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
pcrecpp provides a C++ API to the PCRE engine.
%package doc
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description doc
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
%package tools
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
Recommends: %{name}-doc
%description tools
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
%prep
%{?gpg_verify: %gpg_verify %{SOURCE2}}
%setup -q
%patch0 -p1
%patch1 -p1
%patch2
%build
# Available JIT archs see sljit/sljitConfig.h
autoreconf -fiv
%configure \
%ifarch %{ix86} x86_64 %{arm} ppc ppc64 mips sparc
--enable-jit \
%endif
--enable-static \
--with-link-size=2 \
--with-match-limit=10000000 \
--enable-newline-is-lf \
--enable-pcre16 \
--enable-utf8 \
--enable-unicode-properties
make %{?_smp_mflags} V=1
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
mkdir -p %{buildroot}/%{_defaultdocdir}
mv %{buildroot}%{_datadir}/doc/pcre %{buildroot}/%{_defaultdocdir}/pcre-doc
#empty dependecy_libs
find %{buildroot} -type f -name "*.la" -delete -print
%check
export LANG=POSIX
make test -j1
%post -n libpcre1 -p /sbin/ldconfig
%postun -n libpcre1 -p /sbin/ldconfig
%post -n libpcre16-0 -p /sbin/ldconfig
%postun -n libpcre16-0 -p /sbin/ldconfig
%post -n libpcrecpp0 -p /sbin/ldconfig
%postun -n libpcrecpp0 -p /sbin/ldconfig
%post -n libpcreposix0 -p /sbin/ldconfig
%postun -n libpcreposix0 -p /sbin/ldconfig
%files -n libpcre1
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog LICENCE NEWS README
%{_libdir}/libpcre.so.*
%files -n libpcre16-0
%defattr(-,root,root)
%{_libdir}/libpcre16.so.*
%files -n libpcrecpp0
%defattr(-,root,root)
%{_libdir}/libpcrecpp.so.*
%files -n libpcreposix0
%defattr(-,root,root)
%{_libdir}/libpcreposix.so.*
%files tools
%defattr(-,root,root)
%{_bindir}/pcregrep
%{_bindir}/pcretest
%{_mandir}/man1/pcregrep.*
%{_mandir}/man1/pcretest.*
%files doc
%defattr(-,root,root)
%doc doc/html doc/*.txt
%files devel
%defattr(-,root,root)
%{_bindir}/pcre-config
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/libpcre.pc
%{_libdir}/pkgconfig/libpcre16.pc
%{_libdir}/pkgconfig/libpcrecpp.pc
%{_libdir}/pkgconfig/libpcreposix.pc
%{_mandir}/man1/pcre-config.*
%{_mandir}/man3/*.gz
%files devel-static
%defattr(-,root,root)
%{_libdir}/*.a
%changelog