diff --git a/.gitignore b/.gitignore index 3e432ca..82bc7d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pcre-8.10.tar.gz +/pcre-8.30.tar.gz diff --git a/mingw-pcre.spec b/mingw-pcre.spec index 34d92a0..275ab39 100644 --- a/mingw-pcre.spec +++ b/mingw-pcre.spec @@ -1,30 +1,33 @@ -%global __strip %{mingw32_strip} -%global __objdump %{mingw32_objdump} -%define __debug_install_post %{mingw32_debug_install_post} +%?mingw_package_header Name: mingw-pcre -Version: 8.10 -Release: 8%{?dist} +Version: 8.30 +Release: 1%{?dist} Summary: MinGW Windows pcre library Group: Development/Libraries License: BSD URL: http://www.pcre.org/ Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-%{version}.tar.gz -Patch0: pcre-8.10-multilib.patch +Patch0: pcre-8.21-multilib.patch BuildArch: noarch BuildRequires: redhat-rpm-config -BuildRequires: mingw32-filesystem + +BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc BuildRequires: mingw32-gcc-c++ BuildRequires: mingw32-binutils +BuildRequires: mingw64-filesystem >= 95 +BuildRequires: mingw64-gcc +BuildRequires: mingw64-gcc-c++ +BuildRequires: mingw64-binutils + # New libtool to get rid of rpath BuildRequires: autoconf, automake, libtool -%{?mingw32_debug_package} %description Cross compiled Perl-compatible regular expression library for use with mingw32. @@ -36,6 +39,7 @@ themselves still follow Perl syntax and semantics. The header file for the POSIX-style functions is called pcreposix.h. +# Win32 %package -n mingw32-pcre Summary: MinGW Windows pcre library Requires: pkgconfig @@ -49,6 +53,23 @@ just provides a POSIX calling interface to PCRE: the regular expressions themselves still follow Perl syntax and semantics. The header file for the POSIX-style functions is called pcreposix.h. +# Win64 +%package -n mingw64-pcre +Summary: MinGW Windows pcre library +Requires: pkgconfig + +%description -n mingw64-pcre +Cross compiled Perl-compatible regular expression library for use with mingw64. + +PCRE has its own native API, but a set of "wrapper" functions that are based on +the POSIX API are also supplied in the library libpcreposix. Note that this +just provides a POSIX calling interface to PCRE: the regular expressions +themselves still follow Perl syntax and semantics. The header file +for the POSIX-style functions is called pcreposix.h. + + +%?mingw_debug_package + %prep %setup -q -n pcre-%{version} @@ -56,27 +77,28 @@ for the POSIX-style functions is called pcreposix.h. # Get rid of rpath %patch0 -p1 -b .multilib libtoolize --copy --force && autoreconf -# One contributor's name is non-UTF-8 -for F in ChangeLog; do - iconv -f latin1 -t utf8 "$F" >"${F}.utf8" - touch --reference "$F" "${F}.utf8" - mv "${F}.utf8" "$F" -done + %build -%{mingw32_configure} --enable-utf8 --enable-unicode-properties --disable-static -make %{?_smp_mflags} +%mingw_configure --enable-utf8 --enable-unicode-properties --disable-static +%mingw_make %{?_smp_mflags} + %install -make DESTDIR=$RPM_BUILD_ROOT install +%mingw_make DESTDIR=$RPM_BUILD_ROOT install rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/doc/* +rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/doc/* rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/man/* +rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/man/* # Drop all .la files find $RPM_BUILD_ROOT -name "*.la" -delete + +# Win32 %files -n mingw32-pcre +%doc AUTHORS COPYING LICENCE NEWS README ChangeLog %{mingw32_bindir}/pcre-config %{mingw32_bindir}/pcregrep.exe %{mingw32_bindir}/pcretest.exe @@ -85,9 +107,23 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %{mingw32_libdir}/pkgconfig/libpcre*.pc %{mingw32_includedir}/*.h +# Win64 +%files -n mingw64-pcre %doc AUTHORS COPYING LICENCE NEWS README ChangeLog +%{mingw64_bindir}/pcre-config +%{mingw64_bindir}/pcregrep.exe +%{mingw64_bindir}/pcretest.exe +%{mingw64_bindir}/libpcre*.dll +%{mingw64_libdir}/libpcre*.dll.a +%{mingw64_libdir}/pkgconfig/libpcre*.pc +%{mingw64_includedir}/*.h + %changelog +* Sat Apr 14 2012 Erik van Pienbroek - 8.30-9 +- Update to 8.30 +- Added win64 support + * Fri Mar 09 2012 Erik van Pienbroek - 8.10-8 - Dropped .la files diff --git a/pcre-8.10-multilib.patch b/pcre-8.10-multilib.patch deleted file mode 100644 index d491612..0000000 --- a/pcre-8.10-multilib.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -Naur pcre-8.10.orig/pcre-config.in pcre-8.10/pcre-config.in ---- pcre-8.10.orig/pcre-config.in 2010-03-02 12:08:45.000000000 +0100 -+++ pcre-8.10/pcre-config.in 2010-07-12 14:15:30.666700210 +0200 -@@ -15,16 +15,6 @@ - exit 1 - fi - --libR= --case `uname -s` in -- *SunOS*) -- libR=" -R@libdir@" -- ;; -- *BSD*) -- libR=" -Wl,-R@libdir@" -- ;; --esac -- - while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; -@@ -58,14 +48,14 @@ - echo $includes @PCRE_STATIC_CFLAG@ - ;; - --libs-posix) -- echo -L@libdir@$libR -lpcreposix -lpcre -+ echo -lpcreposix -lpcre - ;; - --libs) -- echo -L@libdir@$libR -lpcre -+ echo -lpcre - ;; - --libs-cpp) - if test @enable_cpp@ = yes ; then -- echo -L@libdir@$libR -lpcrecpp -lpcre -+ echo -lpcrecpp -lpcre - else - echo "${usage}" 1>&2 - fi diff --git a/pcre-8.21-multilib.patch b/pcre-8.21-multilib.patch new file mode 100644 index 0000000..345e624 --- /dev/null +++ b/pcre-8.21-multilib.patch @@ -0,0 +1,37 @@ +From 1d5ce3e2e6341b01609aefab20786a8638fee17a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 6 Dec 2011 18:44:11 +0100 +Subject: [PATCH] Fix multilib + +Do not set RPATH nor add explicit -L path to compiler. +--- + pcre-config.in | 12 ------------ + 1 files changed, 0 insertions(+), 12 deletions(-) + +diff --git a/pcre-config.in b/pcre-config.in +index ccbf210..aeee182 100644 +--- a/pcre-config.in ++++ b/pcre-config.in +@@ -16,19 +16,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 +-- +1.7.7.4 + diff --git a/sources b/sources index 9340786..4122025 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9524f0ff50b9093c02c81f911e41b066 pcre-8.10.tar.gz +d5ee0d9f6d2f0b7489331d04b6c182ef pcre-8.30.tar.gz