diff options
author | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2011-02-17 22:01:32 -0600 |
---|---|---|
committer | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2011-02-17 22:01:32 -0600 |
commit | 7e4d13e800b8cda99355b820994e3d5e1f16959b (patch) | |
tree | cdf1fc1dcff1f2d4867c5492e01c32e268edff6a | |
download | cygwin-pcre-7e4d13e800b8cda99355b820994e3d5e1f16959b.tar.gz cygwin-pcre-7e4d13e800b8cda99355b820994e3d5e1f16959b.tar.xz cygwin-pcre-7e4d13e800b8cda99355b820994e3d5e1f16959b.zip |
8.12-1
-rw-r--r-- | cygwin-pcre.spec | 102 | ||||
-rw-r--r-- | pcre-8.10-multilib.patch | 38 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 141 insertions, 0 deletions
diff --git a/cygwin-pcre.spec b/cygwin-pcre.spec new file mode 100644 index 0000000..8c3f318 --- /dev/null +++ b/cygwin-pcre.spec @@ -0,0 +1,102 @@ +%global __strip %{_cygwin_strip} +%global __objdump %{_cygwin_objdump} +%global _use_internal_dependency_generator 0 +%global __find_requires %{_cygwin_findrequires} +%global __find_provides %{_cygwin_findprovides} +%define __debug_install_post %{_cygwin_debug_install_post} + +Name: cygwin-pcre +Version: 8.12 +Release: 1%{?dist} +Summary: Cygwin 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 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +Requires: pkgconfig + +BuildRequires: cygwin-filesystem +BuildRequires: cygwin-gcc +BuildRequires: cygwin-gcc-c++ +BuildRequires: cygwin-binutils + +# New libtool to get rid of rpath +BuildRequires: autoconf, automake, libtool + +%{?_cygwin_debug_package} + +%description +Cross compiled Perl-compatible regular expression library for use with cygwin. + +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. + + +%package static +Summary: Static version of the Cygwin PCRE library +Requires: %{name} = %{version}-%{release} +Group: Development/Libraries + +%description static +Static version of the Cygwin PCRE library. + + +%prep +%setup -q -n pcre-%{version} + +# 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 +%{_cygwin_configure} --enable-utf8 --enable-unicode-properties +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +# same documentation as from native pcre +rm -rf $RPM_BUILD_ROOT%{_cygwin_datadir}/doc/* +rm -rf $RPM_BUILD_ROOT%{_cygwin_datadir}/man/* + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%{_cygwin_bindir}/pcre-config +%{_cygwin_bindir}/pcregrep.exe +%{_cygwin_bindir}/pcretest.exe +%{_cygwin_bindir}/cygpcre*.dll +%{_cygwin_libdir}/libpcre*.dll.a +%{_cygwin_libdir}/libpcre*.la +%{_cygwin_libdir}/pkgconfig/libpcre*.pc +%{_cygwin_includedir}/*.h +%doc AUTHORS COPYING LICENCE NEWS README ChangeLog + + +%files static +%defattr(-,root,root,-) +%{_cygwin_libdir}/libpcre.a +%{_cygwin_libdir}/libpcrecpp.a +%{_cygwin_libdir}/libpcreposix.a + + +%changelog +* Thu Feb 17 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 8.12-1 +- Initial spec file, largely based on mingw32-pcre. diff --git a/pcre-8.10-multilib.patch b/pcre-8.10-multilib.patch new file mode 100644 index 0000000..d491612 --- /dev/null +++ b/pcre-8.10-multilib.patch @@ -0,0 +1,38 @@ +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 @@ -0,0 +1 @@ +fa69e4c5d8971544acd71d1f10d59193 pcre-8.12.tar.gz |