SHA256
3
0
forked from pool/zlib

Accepting request 116645 from home:worldcitizen:branches:devel:libraries:c_c++

Update to 1.2.7
Passed the spec file through spec cleaner

OBS-URL: https://build.opensuse.org/request/show/116645
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zlib?expand=0&rev=3
This commit is contained in:
Ismail Dönmez 2012-05-07 12:48:26 +00:00 committed by Git OBS Bridge
parent 7297c4e7d2
commit 32d9e928f6
8 changed files with 26 additions and 138 deletions

View File

@ -1,32 +0,0 @@
--- zlib.h.orig
+++ zlib.h
@@ -696,7 +696,7 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z
be larger than the value returned by deflateBound() if flush options other
than Z_FINISH or Z_NO_FLUSH are used.
*/
-
+
ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
unsigned *pending,
int *bits));
@@ -706,7 +706,7 @@ ZEXTERN int ZEXPORT deflatePending OF((z
provided would be due to the available output space having being consumed.
The number of bits of output not provided are between 0 and 7, where they
await more bits to join them in order to fill out a full byte.
-
+
deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent.
*/
@@ -1280,7 +1280,10 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile f
error.
*/
-ZEXTERN int ZEXPORTVA gzprintf ON((gzFile file, const char *format, ...));
+ZEXTERN
+__attribute__((__format__(__printf__,2,3)))
+int ZEXPORTVA gzprintf ON((gzFile file, const char *format, ...));
+
/*
Converts, formats, and writes the arguments to the compressed file under
control of the format string, as in fprintf. gzprintf returns the number of

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:30f4918fca1ef33752987945b52e28a444367ccdf8e9d6f0bf5afa46f25bf652
size 517856

3
zlib-1.2.7.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:49e2e9658dfb036900da6ea0267a737fa3c4eee6666776d378c79d52e9334934
size 505085

View File

@ -1,60 +0,0 @@
diff --git a/x86/adler32.c b/x86/adler32.c
index 3f66f54..a941438 100644
--- a/x86/adler32.c
+++ b/x86/adler32.c
@@ -20,6 +20,19 @@
# define VEC_NO_GO
#endif
+#if GCC_VERSION_GE(404)
+#define GCC_ATTR_MMX __attribute__((__target__("mmx")))
+#define GCC_ATTR_SSE __attribute__((__target__("sse")))
+#define GCC_ATTR_SSE2 __attribute__((__target__("sse2")))
+#define GCC_ATTR_SSSE3 __attribute__((__target__("ssse3")))
+#else
+#define GCC_ATTR_MMX
+#define GCC_ATTR_SSE
+#define GCC_ATTR_SSE2
+#define GCC_ATTR_SSSE3
+#endif
+
+
/* inline asm, so only on GCC (or compatible) */
#if defined(__GNUC__) && !defined(VEC_NO_GO)
# define HAVE_ADLER32_VEC
@@ -240,7 +253,7 @@ local noinline const Bytef *adler32_jumped(buf, s1, s2, k)
#endif
/* ========================================================================= */
-local uLong adler32_SSSE3(adler, buf, len)
+local GCC_ATTR_SSSE3 uLong adler32_SSSE3(adler, buf, len)
uLong adler;
const Bytef *buf;
uInt len;
@@ -383,7 +396,7 @@ local uLong adler32_SSSE3(adler, buf, len)
}
/* ========================================================================= */
-local uLong adler32_SSE2(adler, buf, len)
+local GCC_ATTR_SSE2 uLong adler32_SSE2(adler, buf, len)
uLong adler;
const Bytef *buf;
uInt len;
@@ -604,7 +617,7 @@ local noinline uLong adler32_SSE2_no_oooe(adler, buf, len)
/*
* SSE version to help VIA-C3_2, P2 & P3
*/
-local uLong adler32_SSE(adler, buf, len)
+local GCC_ATTR_SSE uLong adler32_SSE(adler, buf, len)
uLong adler;
const Bytef *buf;
uInt len;
@@ -740,7 +753,7 @@ local uLong adler32_SSE(adler, buf, len)
* (maybe except AMD K6, Cyrix, Winchip/VIA).
* I did my best to get at least 1 instruction between result -> use
*/
-local uLong adler32_MMX(adler, buf, len)
+local GCC_ATTR_MMX uLong adler32_MMX(adler, buf, len)
uLong adler;
const Bytef *buf;
uInt len;

View File

@ -1,11 +0,0 @@
--- zlib.h.orig
+++ zlib.h
@@ -37,7 +37,7 @@
extern "C" {
#endif
-#define ZLIB_VERSION "1.2.5.2-motley"
+#define ZLIB_VERSION "1.2.5.2"
#define ZLIB_VERNUM 0x1252
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 2

View File

@ -1,10 +0,0 @@
--- gzlib.c.orig
+++ gzlib.c
@@ -168,6 +168,7 @@ local gzFile gz_open(path, fd, mode)
#ifdef O_BINARY
O_BINARY |
#endif
+ O_CLOEXEC |
(state->mode == GZ_READ ?
O_RDONLY :
(O_WRONLY | O_CREAT | (

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon May 7 12:34:45 UTC 2012 - joop.boonen@opensuse.org
- Update to 1.2.7
* Fix bug in gzclose_w() when gzwrite() fails to allocate memory
* Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen()
* Add gzopen_w() in Windows for wide character path names
* Fix type mismatch between get_crc_table() and crc_table
- Passed the spec file through spec cleaner
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 9 16:17:55 UTC 2012 - jengelh@medozas.de Thu Feb 9 16:17:55 UTC 2012 - jengelh@medozas.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package zlib # spec file for package zlib
# #
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -24,23 +24,18 @@ Obsoletes: libz
Obsoletes: zlib-64bit Obsoletes: zlib-64bit
%endif %endif
# #
Version: 1.2.5.2_git201109121534 Version: 1.2.7
Release: 0 Release: 0
Summary: Data Compression Library Summary: Data Compression Library
License: Zlib License: Zlib
Group: System/Libraries Group: System/Libraries
Url: http://www.zlib.net/ Url: http://www.zlib.net/
# git://github.com/kaffeemonster/zlib.git (branch adler32_vec) # git://github.com/kaffeemonster/zlib.git (branch adler32_vec)
Source: zlib-%{version}.tar.bz2 Source: http://zlib.net/zlib-%{version}.tar.bz2
Source1: LICENSE Source1: LICENSE
Source2: baselibs.conf Source2: baselibs.conf
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/Packaging/Patches
Patch0: zlib-1.2.2-format.patch
Patch4: zlib-adler-target-attr.patch
Patch5: zlib-ocloexec.patch
Patch6: zlib-no-sslibsuffix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt
@ -78,10 +73,6 @@ libraries.
%prep %prep
%setup -q %setup -q
%patch0
%patch4 -p1
%patch5
%patch6
%build %build
export LDFLAGS="-Wl,-z,relro,-z,now" export LDFLAGS="-Wl,-z,relro,-z,now"
@ -90,15 +81,15 @@ export LDFLAGS="-Wl,-z,relro,-z,now"
%if %{do_profiling} %if %{do_profiling}
profiledir=$(mktemp -d) profiledir=$(mktemp -d)
trap "rm -rf $profiledir" EXIT trap "rm -rf $profiledir" EXIT
CC="%__cc" ./configure --shared --prefix=%_prefix --libdir=/%_lib CC="gcc" ./configure --shared --prefix=%{_prefix} --libdir=/%{_lib}
%{__make} CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_generate}=$profiledir" %{?_smp_mflags} make CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir" %{?_smp_mflags}
time make check time make check
make clean make clean
%{__make} CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_feedback}=$profiledir" %{?_smp_mflags} make CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir" %{?_smp_mflags}
%else %else
export CFLAGS="%optflags" export CFLAGS="%{optflags}"
CC="%__cc" ./configure --shared --prefix=%_prefix --libdir=/%_lib CC="gcc" ./configure --shared --prefix=%{_prefix} --libdir=/%{_lib}
%{__make} %{?_smp_mflags} make %{?_smp_mflags}
%endif %endif
%check %check
@ -107,9 +98,9 @@ time make check
%install %install
#mkdir -p %{buildroot}%{_mandir}/man3 #mkdir -p %{buildroot}%{_mandir}/man3
mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_libdir}
make install DESTDIR=%{buildroot} %make_install
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/libz.so) %{buildroot}%{_libdir}/libz.so ln -s -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/libz.so) %{buildroot}%{_libdir}/libz.so
%{__rm} -v %{buildroot}/%{_lib}/libz.so rm -v %{buildroot}/%{_lib}/libz.so
# static lib # static lib
mv %{buildroot}/%{_lib}/libz.a %{buildroot}%{_libdir} mv %{buildroot}/%{_lib}/libz.a %{buildroot}%{_libdir}
# Move .pc file to %{_libdir} # Move .pc file to %{_libdir}