summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cygwin-zlib.spec61
-rw-r--r--sources2
-rw-r--r--zlib-1.2.5-gentoo.patch12
-rw-r--r--zlib-1.2.7-minizip-cygwin.patch69
4 files changed, 120 insertions, 24 deletions
diff --git a/cygwin-zlib.spec b/cygwin-zlib.spec
index f8412dd..d24cbad 100644
--- a/cygwin-zlib.spec
+++ b/cygwin-zlib.spec
@@ -6,19 +6,19 @@
%define __debug_install_post %{_cygwin_debug_install_post}
Name: cygwin-zlib
-Version: 1.2.5
-Release: 2
+Version: 1.2.7
+Release: 1
Summary: Cygwin zlib compression library
License: zlib
Group: Development/Libraries
URL: http://www.zlib.net/
-Source0: http://www.zlib.net/zlib-%{version}.tar.gz
-# https://bugzilla.redhat.com/show_bug.cgi?id=591317
-Patch0: zlib-1.2.5-gentoo.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+Source0: http://www.zlib.net/zlib-%{version}.tar.gz
+Patch0: zlib-1.2.7-minizip-cygwin.patch
+
BuildRequires: cygwin-filesystem
BuildRequires: cygwin-gcc
BuildRequires: cygwin-binutils
@@ -35,14 +35,27 @@ Requires: cygwin-zlib = %{version}-%{release}
%description static
The cygwin-zlib-static package contains static library for cygwin-zlib development.
+%package -n cygwin-minizip
+Summary: Minizip library for Cygwin toolchain
+Group: Development/Libraries
+BuildRequires: cygwin-bzip2
+Requires: cygwin-zlib = %{version}-%{release}
+
+%description -n cygwin-minizip
+Minizip library for the Cygwin cross-compiler toolchain.
+
%{_cygwin_debug_package}
%prep
%setup -q -n zlib-%{version}
-%patch0 -p1 -b .gentoo
+%patch0 -p2
iconv -f windows-1252 -t utf-8 <ChangeLog >ChangeLog.tmp
+sed -i -e '/gzopen_w/d' win32/zlib.def
+pushd contrib/minizip
+%{_cygwin_autoreconf}
+popd
%build
CC=%{_cygwin_cc} \
@@ -58,19 +71,35 @@ make -f win32/Makefile.gcc \
IMPLIB=libz.dll.a \
all
+pushd contrib/minizip
+%{_cygwin_configure} --disable-static \
+ CPPFLAGS=-DHAVE_BZIP2 \
+ LIBS=-lbz2
+make %{?_smp_flags}
+popd
+
%install
rm -rf $RPM_BUILD_ROOT
make -f win32/Makefile.gcc \
- BINARY_PATH=$RPM_BUILD_ROOT/%{_cygwin_bindir} \
- INCLUDE_PATH=$RPM_BUILD_ROOT/%{_cygwin_includedir} \
- LIBRARY_PATH=$RPM_BUILD_ROOT/%{_cygwin_libdir} \
+ DESTDIR=$RPM_BUILD_ROOT \
+ BINARY_PATH=%{_cygwin_bindir} \
+ INCLUDE_PATH=%{_cygwin_includedir} \
+ LIBRARY_PATH=%{_cygwin_libdir} \
SHARED_MODE=1 \
SHAREDLIB=cygz.dll \
IMPLIB=libz.dll.a \
install
+pushd contrib/minizip
+make install DESTDIR=$RPM_BUILD_ROOT
+popd
+
+# We intentionally don't ship *.la files
+rm -f $RPM_BUILD_ROOT%{_cygwin_libdir}/*.la
+
+# Remove the documentation and manpages which duplicate Fedora native
rm -rf $RPM_BUILD_ROOT/%{_cygwin_mandir}
@@ -80,18 +109,28 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
+%{_cygwin_bindir}/cygz.dll
%{_cygwin_includedir}/zconf.h
%{_cygwin_includedir}/zlib.h
%{_cygwin_libdir}/libz.dll.a
-%{_cygwin_bindir}/cygz.dll
-
+%{_cygwin_libdir}/pkgconfig/zlib.pc
%files static
%defattr(-,root,root,-)
%{_cygwin_libdir}/libz.a
+%files -n cygwin-minizip
+%{_cygwin_bindir}/cygminizip-1.dll
+%{_cygwin_includedir}/minizip/
+%{_cygwin_libdir}/libminizip.dll.a
+%{_cygwin_libdir}/pkgconfig/minizip.pc
+
%changelog
+* Wed May 23 2012 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.2.7-1
+- Version bump.
+- Added minizip subpackage.
+
* Thu Feb 17 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.2.5-2
- Added debuginfo package.
diff --git a/sources b/sources
index c00fef0..837af02 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c735eab2d659a96e5a594c9e8541ad63 zlib-1.2.5.tar.gz
+60df6a37c56e7c1366cca812414f7b85 zlib-1.2.7.tar.gz
diff --git a/zlib-1.2.5-gentoo.patch b/zlib-1.2.5-gentoo.patch
deleted file mode 100644
index 82c7f39..0000000
--- a/zlib-1.2.5-gentoo.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up zlib-1.2.5/zlib.h.pom zlib-1.2.5/zlib.h
---- zlib-1.2.5/zlib.h.pom 2010-04-20 06:12:48.000000000 +0200
-+++ zlib-1.2.5/zlib.h 2010-06-16 13:08:59.000000000 +0200
-@@ -1578,7 +1578,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF(
- # define gzoffset gzoffset64
- # define adler32_combine adler32_combine64
- # define crc32_combine crc32_combine64
--# ifdef _LARGEFILE64_SOURCE
-+# ifndef _LARGEFILE64_SOURCE
- ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
- ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
- ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
diff --git a/zlib-1.2.7-minizip-cygwin.patch b/zlib-1.2.7-minizip-cygwin.patch
new file mode 100644
index 0000000..3cc37d3
--- /dev/null
+++ b/zlib-1.2.7-minizip-cygwin.patch
@@ -0,0 +1,69 @@
+--- origsrc/zlib-1.2.7/contrib/minizip/Makefile.am 2012-03-26 23:17:41.000000000 -0400
++++ src/zlib-1.2.7/contrib/minizip/Makefile.am 2012-05-13 00:10:19.745354100 -0400
+@@ -22,7 +22,8 @@ libminizip_la_SOURCES = \
+ zip.c \
+ ${iowin32_src}
+
+-libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
++libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -no-undefined
++libminizip_la_LIBADD = -lz
+
+ minizip_includedir = $(includedir)/minizip
+ minizip_include_HEADERS = \
+--- origsrc/zlib-1.2.7/contrib/minizip/ioapi.c 2012-01-21 14:58:45.000000000 -0500
++++ src/zlib-1.2.7/contrib/minizip/ioapi.c 2012-05-13 00:10:19.759354900 -0400
+@@ -14,8 +14,9 @@
+ #define _CRT_SECURE_NO_WARNINGS
+ #endif
+
+-#if defined(__APPLE__) || defined(IOAPI_NO_64)
++#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__CYGWIN__)
+ // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
++// Ditto cygwin.
+ #define FOPEN_FUNC(filename, mode) fopen(filename, mode)
+ #define FTELLO_FUNC(stream) ftello(stream)
+ #define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
+--- origsrc/zlib-1.2.7/contrib/minizip/miniunz.c 2010-07-18 12:04:24.000000000 -0400
++++ src/zlib-1.2.7/contrib/minizip/miniunz.c 2012-05-13 00:10:19.786356400 -0400
+@@ -27,8 +27,9 @@
+ #endif
+ #endif
+
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(__CYGWIN__)
+ // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
++// Ditto cygwin.
+ #define FOPEN_FUNC(filename, mode) fopen(filename, mode)
+ #define FTELLO_FUNC(stream) ftello(stream)
+ #define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
+@@ -97,7 +98,7 @@ void change_file_date(filename,dosdate,t
+ SetFileTime(hFile,&ftm,&ftLastAcc,&ftm);
+ CloseHandle(hFile);
+ #else
+-#ifdef unix || __APPLE__
++#if defined(unix) || defined(__APPLE__)
+ struct utimbuf ut;
+ struct tm newdate;
+ newdate.tm_sec = tmu_date.tm_sec;
+--- origsrc/zlib-1.2.7/contrib/minizip/minizip.c 2012-01-21 15:00:26.000000000 -0500
++++ src/zlib-1.2.7/contrib/minizip/minizip.c 2012-05-13 00:10:19.814358000 -0400
+@@ -28,8 +28,9 @@
+ #endif
+ #endif
+
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(__CYGWIN__)
+ // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
++// Ditto cygwin.
+ #define FOPEN_FUNC(filename, mode) fopen(filename, mode)
+ #define FTELLO_FUNC(stream) ftello(stream)
+ #define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
+@@ -94,7 +95,7 @@ uLong filetime(f, tmzip, dt)
+ return ret;
+ }
+ #else
+-#ifdef unix || __APPLE__
++#if defined(unix) || defined(__APPLE__)
+ uLong filetime(f, tmzip, dt)
+ char *f; /* name of file to get info on */
+ tm_zip *tmzip; /* return value: access, modific. and creation times */