Accepting request 48171 from Archiving

Copy from Archiving/zlib based on submit request 48171 from user elvigia

OBS-URL: https://build.opensuse.org/request/show/48171
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zlib?expand=0&rev=20
This commit is contained in:
OBS User autobuild 2010-09-17 18:45:41 +00:00 committed by Git OBS Bridge
parent f2140951f9
commit 70d5f064b3
3 changed files with 45 additions and 1 deletions

34
zlib-lfs.patch Normal file
View File

@ -0,0 +1,34 @@
diff -urNp zlib-1.2.5/zlib.h zlib-1.2.5-new/zlib.h
--- zlib-1.2.5/zlib.h 2010-04-20 09:42:48.000000000 +0530
+++ zlib-1.2.5-new/zlib.h 2010-04-21 13:44:40.105742649 +0530
@@ -1571,21 +1571,20 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF(
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
#endif
-#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && \
+ _LFS64_LARGEFILE-0 && _LARGEFILE64_SOURCE
# define gzopen gzopen64
# define gzseek gzseek64
# define gztell gztell64
# define gzoffset gzoffset64
# define adler32_combine adler32_combine64
# define crc32_combine crc32_combine64
-# ifdef _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));
- ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
- ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
- ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
-# endif
+ 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));
+ ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
#else
ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Sep 14 20:10:13 UTC 2010 - dimstar@opensuse.org
- Add zlib-lfs.patch: Fix Large File Support. Patch comes from the
zlib-devel mailinglist:
http://mail.madler.net/pipermail/zlib-devel_madler.net/2010-May/002303.html
-------------------------------------------------------------------
Tue Aug 10 16:04:54 CEST 2010 - dimstar@opensuse.org

View File

@ -28,7 +28,7 @@ Obsoletes: zlib-64bit
%endif
#
Version: 1.2.5
Release: 1
Release: 2
Summary: Data Compression Library
Url: http://www.zlib.net/
Source: zlib-%{version}.tar.bz2
@ -36,6 +36,8 @@ Source1: LICENSE
Source2: baselibs.conf
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/Packaging/Patches
Patch0: zlib-1.2.2-format.patch
# PATCH-FIX-UPSTREAM zlib-lfs.patch dimstar@opensuse.org -- Properly define large file support. Patch taken from gentoo
Patch1: zlib-lfs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkgconfig
@ -78,6 +80,7 @@ libraries.
%prep
%setup -q
%patch0
%patch1 -p1
%build
CFLAGS="%{optflags}" ./configure --shared