- Update to 1.1.0

* Snappy now uses 64 kB block size instead of 32 kB. On average,
    this means it compresses about 3% denser (more so for some
    inputs), at the same or better speeds.
  * libsnappy no longer depends on iostream.
  * Some small performance improvements in compression on x86
    (0.5–1%).
  * Various portability fixes for ARM-based platforms, for MSVC,
    and for GNU/Hurd.
- refresh and rename random-return.patch
  * snappy-random-return.patch
- reformat spec file
- build with NDEBUG to speedup a library
- install COPYING alongside so file

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/snappy?expand=0&rev=2
This commit is contained in:
Michal Vyskocil 2013-08-15 12:50:54 +00:00 committed by Git OBS Bridge
parent 31d3f70217
commit 548b8aaab7
6 changed files with 125 additions and 51 deletions

View File

@ -1,12 +0,0 @@
Index: snappy_unittest.cc
===================================================================
--- snappy_unittest.cc.orig
+++ snappy_unittest.cc
@@ -161,6 +161,7 @@ static size_t MinimumRequiredOutputSpace
default:
LOG(FATAL) << "Unknown compression type number " << comp;
+ return -1;
}
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6a2d4afc3752d78996f7a881e4f3648c6358654c5ff618f5d1b6b253984fd607
size 1731382

3
snappy-1.1.0.tar.gz Normal file
View File

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

View File

@ -0,0 +1,61 @@
---
snappy-test.h | 8 ++++++--
snappy_unittest.cc | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
Index: snappy_unittest.cc
===================================================================
--- snappy_unittest.cc.orig
+++ snappy_unittest.cc
@@ -161,6 +161,7 @@ static size_t MinimumRequiredOutputSpace
default:
LOG(FATAL) << "Unknown compression type number " << comp;
+ return -1; //make gcc happy
}
}
Index: snappy-test.h
===================================================================
--- snappy-test.h.orig
+++ snappy-test.h
@@ -132,13 +132,15 @@ namespace File {
} // namespace File
namespace file {
- int Defaults() { }
+ int Defaults() { return 0; } //make gcc happy
class DummyStatus {
public:
void CheckSuccess() { }
};
+ DummyStatus _dummy_ret;
+
DummyStatus ReadFileToString(const char* filename, string* data, int unused) {
FILE* fp = fopen(filename, "rb");
if (fp == NULL) {
@@ -158,12 +160,13 @@ namespace file {
}
fclose(fp);
+ return _dummy_ret; //make gcc happy
}
DummyStatus ReadFileToString(const string& filename,
string* data,
int unused) {
- ReadFileToString(filename.c_str(), data, unused);
+ return ReadFileToString(filename.c_str(), data, unused);
}
DummyStatus WriteStringToFile(const string& str,
@@ -182,6 +185,7 @@ namespace file {
}
fclose(fp);
+ return _dummy_ret; //make gcc happy
}
} // namespace file

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Thu Aug 15 11:41:25 UTC 2013 - mvyskocil@suse.com
- Update to 1.1.0
* Snappy now uses 64 kB block size instead of 32 kB. On average,
this means it compresses about 3% denser (more so for some
inputs), at the same or better speeds.
* libsnappy no longer depends on iostream.
* Some small performance improvements in compression on x86
(0.51%).
* Various portability fixes for ARM-based platforms, for MSVC,
and for GNU/Hurd.
- refresh and rename random-return.patch
* snappy-random-return.patch
- reformat spec file
- build with NDEBUG to speedup a library
- install COPYING alongside so file
-------------------------------------------------------------------
Fri Nov 23 02:19:58 UTC 2012 - mrueckert@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package snappy
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -15,38 +15,37 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%define lib_name libsnappy1
Name: snappy
Version: 1.0.5
Release: 1
#
Version: 1.1.0
Release: 0
Summary: A fast compressor/decompressor library
License: MIT
Group: Development/Libraries/C and C++
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++ zlib-devel lzo-devel
#
Url: http://code.google.com/p/snappy/
Source: snappy-%{version}.tar.gz
Patch: snappy-1.0.4_random_return.patch
#
Summary: A fast compressor/decompressor library
Source0: http://snappy.googlecode.com/files/%{name}-%{version}.tar.gz
#PATCH-FIX-OPENSUSE: fix minor things in unittest, probably not worth for upstreaming ...
Patch0: snappy-random-return.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: lzo-devel
BuildRequires: zlib-devel
%description
Snappy is a compression/decompression library. It does not aim for maximum compression,
or compatibility with any other compression library; instead, it aims for very high
speeds and reasonable compression. For instance, compared to the fastest mode of zlib,
Snappy is an order of magnitude faster for most inputs, but the resulting compressed
files are anywhere from 20% to 100% bigger. On a single core of a Core i7 processor
in 64-bit mode, Snappy compresses at about 250 MB/sec or more and decompresses at about
Snappy is a compression/decompression library. It does not aim for maximum
compression, or compatibility with any other compression library; instead, it
aims for very high speeds and reasonable compression. For instance, compared to
the fastest mode of zlib, Snappy is an order of magnitude faster for most
inputs, but the resulting compressed files are anywhere from 20% to 100%
bigger. On a single core of a Core i7 processor in 64-bit mode, Snappy
compresses at about 250 MB/sec or more and decompresses at about
500 MB/sec or more.
%define lib_name libsnappy1
%package -n %{lib_name}
Group: Development/Libraries/C and C++
#
Summary: Shared library from snappy
Group: Development/Libraries/C and C++
%description -n %{lib_name}
Snappy is a compression/decompression library. It does not aim for maximum compression,
or compatibility with any other compression library; instead, it aims for very high
@ -59,33 +58,40 @@ in 64-bit mode, Snappy compresses at about 250 MB/sec or more and decompresses a
This package holds the shared library of snappy.
%package devel
License: MIT
Group: Development/Libraries/C and C++
Requires: %{lib_name} = %{version}
#
Summary: Development files for snappy
Group: Development/Libraries/C and C++
%description devel
Snappy is a compression/decompression library. It does not aim for maximum compression,
or compatibility with any other compression library; instead, it aims for very high
speeds and reasonable compression. For instance, compared to the fastest mode of zlib,
Snappy is an order of magnitude faster for most inputs, but the resulting compressed
files are anywhere from 20% to 100% bigger. On a single core of a Core i7 processor
in 64-bit mode, Snappy compresses at about 250 MB/sec or more and decompresses at about
Snappy is a compression/decompression library. It does not aim for maximum
compression, or compatibility with any other compression library; instead, it
aims for very high speeds and reasonable compression. For instance, compared to
the fastest mode of zlib, Snappy is an order of magnitude faster for most
inputs, but the resulting compressed files are anywhere from 20% to 100%
bigger. On a single core of a Core i7 processor in 64-bit mode, Snappy
compresses at about 250 MB/sec or more and decompresses at about
500 MB/sec or more.
This package holds the development files for snappy.
%prep
%setup
%patch
%setup -q
%patch0 -p0
%build
%configure --with-pic --disable-static --docdir=%{_defaultdocdir}/%{name}
# mvyskocil: disable assertions to improve a speed a bit in microbenchmarks and hopefully in real-world use as well
# http://code.google.com/p/snappy/issues/detail?id=40
%configure CXXFLAGS="%{optflags} -DNDEBUG" \
--with-pic \
--disable-static \
--docdir=%{_defaultdocdir}/%{name}
make %{?_smp_flags}
%install
%makeinstall
find %{buildroot} -name \*.la -delete -print
rm %{buildroot}/%{_defaultdocdir}/%{name}/INSTALL
%check
make check
@ -98,6 +104,7 @@ rm -rf %{buildroot}
%files -n %{lib_name}
%defattr(-,root,root,-)
%doc %{_defaultdocdir}/%{name}/COPYING
%{_libdir}/libsnappy.so.*
%files devel
@ -105,6 +112,6 @@ rm -rf %{buildroot}
%{_includedir}/snappy*.h
%{_libdir}/libsnappy.so
%doc %{_defaultdocdir}/%{name}
%exclude %{_defaultdocdir}/%{name}/COPYING
%changelog