%define realname pcre
-Summary: Perl-Compatible Regular Expression library - Mingw32 cross version
-Summary(pl.UTF-8): Biblioteka perlowych wyrażeń regularnych - wersja skrośna dla Mingw32
+Summary: Perl-Compatible Regular Expression library - MinGW32 cross version
+Summary(pl.UTF-8): Biblioteka perlowych wyrażeń regularnych - wersja skrośna dla MinGW32
Name: crossmingw32-%{realname}
-Version: 7.3
+Version: 8.31
Release: 1
License: BSD (see LICENCE)
Group: Development/Libraries
Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{realname}-%{version}.tar.bz2
-# Source0-md5: 08b48bf97ff84a9dea07d6be518f0046
+# Source0-md5: 1c9a276af932b5599157f96e945391f0
URL: http://www.pcre.org/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.57
BuildRequires: automake
BuildRequires: crossmingw32-gcc-c++
BuildRequires: crossmingw32-w32api
-BuildRequires: libtool
+BuildRequires: libtool >= 2:1.5
Requires: crossmingw32-runtime
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define target_platform i386-pc-mingw32
%define _prefix /usr/%{target}
+%define _libdir %{_prefix}/lib
%define _pkgconfigdir %{_prefix}/lib/pkgconfig
%define _dlldir /usr/share/wine/windows/system
%define __cc %{target}-gcc
%define __cxx %{target}-g++
-%ifarch alpha sparc sparc64 sparcv9
+%ifnarch %{ix86}
+# arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
%define optflags -O2
%endif
+# -z options are invalid for mingw linker, most of -f options are Linux-specific
+%define filterout_ld -Wl,-z,.*
+%define filterout_c -f[-a-z0-9=]*
%description
PCRE stands for the Perl Compatible Regular Expression library. It
Zawiera także bibliotekę kompatybilną z POSIX.
%package static
-Summary: Static PCRE libraries (cross mingw32 version)
-Summary(pl.UTF-8): Statyczne biblioteki PCRE (wersja skrośna mingw32)
+Summary: Static PCRE libraries (cross MinGW32 version)
+Summary(pl.UTF-8): Statyczne biblioteki PCRE (wersja skrośna MinGW32)
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description static
-Static PCRE libraries (cross mingw32 version).
+Static PCRE libraries (cross MinGW32 version).
%description static -l pl.UTF-8
-Statyczne biblioteki PCRE (wersja skrośna mingw32).
+Statyczne biblioteki PCRE (wersja skrośna MinGW32).
%package dll
Summary: %{realname} - DLL libraries for Windows
%configure \
--host=%{target} \
--target=%{target} \
+ --enable-jit \
+ --enable-pcre16 \
--enable-unicode-properties \
--enable-utf8
%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
%endif
-rm -rf $RPM_BUILD_ROOT%{_datadir}/{doc,man}
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{doc,man}
%clean
rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog LICENCE NEWS NON-UNIX-USE README
%{_libdir}/libpcre.dll.a
+%{_libdir}/libpcre16.dll.a
%{_libdir}/libpcrecpp.dll.a
%{_libdir}/libpcreposix.dll.a
%{_libdir}/libpcre.la
+%{_libdir}/libpcre16.la
%{_libdir}/libpcrecpp.la
%{_libdir}/libpcreposix.la
%{_includedir}/pcre*.h
%{_pkgconfigdir}/libpcre.pc
+%{_pkgconfigdir}/libpcre16.pc
%{_pkgconfigdir}/libpcrecpp.pc
+%{_pkgconfigdir}/libpcreposix.pc
%files static
%defattr(644,root,root,755)
%{_libdir}/libpcre.a
+%{_libdir}/libpcre16.a
%{_libdir}/libpcrecpp.a
%{_libdir}/libpcreposix.a
%files dll
%defattr(644,root,root,755)
-%{_dlldir}/libpcre-*.dll
-%{_dlldir}/libpcrecpp-*.dll
-%{_dlldir}/libpcreposix-*.dll
+%{_dlldir}/libpcre-1.dll
+%{_dlldir}/libpcre16-0.dll
+%{_dlldir}/libpcrecpp-0.dll
+%{_dlldir}/libpcreposix-0.dll