SHA256
11
0
forked from pool/snappy

8 Commits

Author SHA256 Message Date
c21dc75d3a Accepting request 1290696 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/1290696
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/snappy?expand=0&rev=15
2025-07-06 15:04:00 +00:00
a1bd0bb2c5 - update to 1.2.2
* We fixed a very old issue of data corruption when compressed
    size exceeds 4GB. This can happen when you compress data
    close to 4GB and it's incompressible, for example, random
    data.
 *  Started to use minimum CMake 3.10 because older ones are not
    planned to be supported.
- update to 1.2.1
  * We restored old functions/symbols after reports of ABI
    incompatibility apache/arrow#41058
- update to 1.2.0
  * Level API was added with level 2 support. Compresses 5-10%
    denser and decompresses 5-10% faster. The compression speed
    drop is about 20-30%
- add correct_testing_link.patch, taken from Debian
- adjust reenable-rtti.patch
- adjust use-system-test-libs.patch, following the patch from
  Debian

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/snappy?expand=0&rev=30
2025-07-04 13:49:53 +00:00
c46fceb437 Accepting request 1287813 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/1287813
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/snappy?expand=0&rev=14
2025-06-24 18:45:56 +00:00
ec2305811a Accepting request 1286910 from home:AndreasStieger:branches:devel:libraries:c_c++
- Fix build with googletest 1.17.0 by using C++17, boo#1244989

OBS-URL: https://build.opensuse.org/request/show/1286910
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/snappy?expand=0&rev=28
2025-06-23 05:51:27 +00:00
4de01910a1 Accepting request 1271999 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/1271999
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/snappy?expand=0&rev=13
2025-04-23 13:17:57 +00:00
ed4e35da9b - Update summary of the most prominently installed (sub)package.
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/snappy?expand=0&rev=26
2025-04-22 17:45:33 +00:00
cc0b05682f Accepting request 1256199 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/1256199
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/snappy?expand=0&rev=12
2025-03-28 08:36:20 +00:00
305f069a59 - Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to fix FTBFS with cmake4
- Remove Group: declarations, no longer used

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/snappy?expand=0&rev=24
2025-03-26 12:26:41 +00:00
7 changed files with 123 additions and 124 deletions

BIN
1.1.10.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@@ -0,0 +1,28 @@
Description: add required libraries to link with
Just add those libraries to the linker.
Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Forwarded: not-needed
Last-Update: 2021-12-04
---
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -350,7 +350,7 @@ if(SNAPPY_BUILD_TESTS)
PRIVATE
"snappy_unittest.cc"
)
- target_link_libraries(snappy_unittest snappy_test_support gmock_main gtest)
+ target_link_libraries(snappy_unittest snappy_test_support gmock_main gmock gtest pthread)
add_test(
NAME snappy_unittest
@@ -371,7 +371,7 @@ if(SNAPPY_BUILD_BENCHMARKS)
PRIVATE
"snappy_benchmark.cc"
)
- target_link_libraries(snappy_benchmark snappy_test_support benchmark_main)
+ target_link_libraries(snappy_benchmark snappy_test_support benchmark_main benchmark pthread)
# This project uses Google benchmark for benchmarking.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)

View File

@@ -2,24 +2,25 @@ Index: snappy-1.1.9/CMakeLists.txt
===================================================================
--- snappy-1.1.9.orig/CMakeLists.txt
+++ snappy-1.1.9/CMakeLists.txt
@@ -51,10 +51,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC"
string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHs-c-")
@@ -53,8 +53,8 @@
add_definitions(-D_HAS_EXCEPTIONS=0)
-
- # Disable RTTI.
# Disable RTTI.
- string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ # string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
else(MSVC)
# Use -Wall for clang and gcc.
if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
@@ -77,9 +73,6 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSV
string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
@@ -83,8 +83,8 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
- # Disable RTTI.
# Disable RTTI.
- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ # string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
endif(MSVC)
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make

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

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

View File

@@ -1,3 +1,41 @@
-------------------------------------------------------------------
Sun Jun 29 11:18:27 UTC 2025 - Christoph G <foss@grueninger.de>
- update to 1.2.2
* We fixed a very old issue of data corruption when compressed
size exceeds 4GB. This can happen when you compress data
close to 4GB and it's incompressible, for example, random
data.
* Started to use minimum CMake 3.10 because older ones are not
planned to be supported.
- update to 1.2.1
* We restored old functions/symbols after reports of ABI
incompatibility apache/arrow#41058
- update to 1.2.0
* Level API was added with level 2 support. Compresses 5-10%
denser and decompresses 5-10% faster. The compression speed
drop is about 20-30%
- add correct_testing_link.patch, taken from Debian
- adjust reenable-rtti.patch
- adjust use-system-test-libs.patch, following the patch from
Debian
-------------------------------------------------------------------
Thu Jun 19 11:08:34 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
- Fix build with googletest 1.17.0 by using C++17, boo#1244989
-------------------------------------------------------------------
Thu Apr 17 12:41:48 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Update summary of the most prominently installed (sub)package.
-------------------------------------------------------------------
Sat Mar 22 15:51:54 UTC 2025 - Shawn Dunn <sfalken@opensuse.org>
- Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to fix FTBFS with cmake4
- Remove Group: declarations, no longer used
-------------------------------------------------------------------
Mon Mar 25 11:34:39 UTC 2024 - Danilo Spinella <danilo.spinella@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package snappy
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,22 +18,23 @@
%define libname libsnappy1
Name: snappy
Version: 1.1.10
Version: 1.2.2
Release: 0
Summary: A compressor/decompressor library favoring time
License: BSD-3-Clause
Group: Development/Libraries/C and C++
URL: https://github.com/google/snappy/
Source0: https://github.com/google/snappy/archive/%{version}.tar.gz
Source0: https://github.com/google/snappy/archive/%{version}.tar.gz#/snappy-%{version}.tar.gz
Source1: snappy.pc
Source99: baselibs.conf
Patch0: use-system-test-libs.patch
Patch2: reenable-rtti.patch
BuildRequires: cmake
Patch1: reenable-rtti.patch
Patch2: correct_testing_link.patch
BuildRequires: cmake >= 3.10
BuildRequires: gcc-c++
BuildRequires: lzo-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(benchmark)
BuildRequires: pkgconfig(gmock)
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(zlib)
@@ -43,8 +44,7 @@ compression, or compatibility with any other compression library; instead, it
aims for high speeds and reasonable compression.
%package -n %{libname}
Summary: Shared library from snappy
Group: System/Libraries
Summary: A compressor/decompressor library favoring time
%description -n %{libname}
Snappy is a compression/decompression library. It does not aim for maximum
@@ -60,7 +60,6 @@ This package holds the shared library of snappy.
%package devel
Summary: Development files for snappy
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
%description devel
@@ -74,7 +73,10 @@ This package holds the development files for snappy.
%autosetup
%build
%cmake -DSNAPPY_USE_BUNDLED_GTEST=OFF -DSNAPPY_USE_BUNDLED_BENCHMARK_LIB=OFF -DCMAKE_CXX_STANDARD=14
%cmake \
-DSNAPPY_USE_BUNDLED_GTEST=OFF \
-DSNAPPY_USE_BUNDLED_BENCHMARK_LIB=OFF \
-DCMAKE_CXX_STANDARD=17
%make_build
%install
@@ -85,8 +87,7 @@ install -m 644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
%check
%ctest
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%ldconfig_scriptlets -n %{libname}
%files -n %{libname}
%license COPYING

View File

@@ -1,120 +1,51 @@
From 114df35e84ad95b6d5afbcf69aa85a14ff029000 Mon Sep 17 00:00:00 2001
From: Danilo Spinella <danilo.spinella@suse.com>
Date: Fri, 9 Jul 2021 16:57:35 +0200
Subject: [PATCH] Add a switch to use system gtest and benchmark
Upstream: https://github.com/google/snappy/pull/132
Description: googletest and gmock are packaged, use those
No need to add external (empty) project directories, will link with system
ones357.
Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Forwarded: not-needed
Last-Update: 2024-05-01
Allow to use the gtest and benchmark libraries from the system.
Use pkg-config to check that the libraries are installed and to
add the correct cflags/link flags.
---
CMakeLists.txt | 66 ++++++++++++++++++++++++++++++++++++--------------
1 file changed, 48 insertions(+), 18 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 672561e..eb2a743 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,6 +90,14 @@ option(SNAPPY_BUILD_TESTS "Build Snappy's own tests." ON)
@@ -330,20 +330,20 @@
set(build_gmock ON)
option(SNAPPY_BUILD_BENCHMARKS "Build Snappy's benchmarks" ON)
+if(UNIX)
+ option(SNAPPY_USE_BUNDLED_GTEST "Build test using bundled googletest library" ON)
+ option(SNAPPY_USE_BUNDLED_BENCHMARK_LIB "Build benchmarks using bundled benchmark library" ON)
+else(UNIX)
+ set(SNAPPY_USE_BUNDLED_GTEST ON)
+ set(SNAPPY_USE_BUNDLED_BENCHMARK_LIB ON)
+endif(UNIX)
+
option(SNAPPY_FUZZING_BUILD "Build Snappy for fuzzing." OFF)
option(SNAPPY_REQUIRE_AVX "Target processors with AVX support." OFF)
@@ -284,29 +292,40 @@ endif(SNAPPY_BUILD_TESTS OR SNAPPY_BUILD_BENCHMARKS)
if(SNAPPY_BUILD_TESTS)
enable_testing()
- # Prevent overriding the parent project's compiler/linker settings on Windows.
- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
- set(install_gtest OFF)
- set(install_gmock OFF)
- set(build_gmock ON)
-
- # This project is tested using GoogleTest.
# This project is tested using GoogleTest.
- add_subdirectory("third_party/googletest")
-
- # GoogleTest triggers a missing field initializers warning.
+ # add_subdirectory("third_party/googletest")
# GoogleTest triggers a missing field initializers warning.
- if(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
- set_property(TARGET gtest
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
- set_property(TARGET gmock
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
- endif(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+ if(SNAPPY_USE_BUNDLED_GTEST)
+ # Prevent overriding the parent project's compiler/linker settings on Windows.
+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+ set(install_gtest OFF)
+ set(install_gmock OFF)
+ set(build_gmock ON)
+
+ # This project is tested using GoogleTest.
+ add_subdirectory("third_party/googletest")
+
+ # GoogleTest triggers a missing field initializers warning.
+ if(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+ set_property(TARGET gtest
+ APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
+ set_property(TARGET gmock
+ APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
+ endif(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+ else(SNAPPY_USE_BUNDLED_GTEST)
+ find_package(PkgConfig)
+ pkg_search_module(GTEST REQUIRED gtest_main)
+ endif(SNAPPY_USE_BUNDLED_GTEST)
-
- if(SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
- set_property(TARGET gtest
- APPEND PROPERTY COMPILE_OPTIONS -Wno-implicit-int-float-conversion)
- endif(SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
+ # if(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+ # set_property(TARGET gtest
+ # APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
+ # set_property(TARGET gmock
+ # APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
+ # endif(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+ #
+ # if(SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
+ # set_property(TARGET gtest
+ # APPEND PROPERTY COMPILE_OPTIONS -Wno-implicit-int-float-conversion)
+ # endif(SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
add_executable(snappy_unittest "")
target_sources(snappy_unittest
PRIVATE
"snappy_unittest.cc"
)
- target_link_libraries(snappy_unittest snappy_test_support gmock_main gtest)
+ target_link_libraries(snappy_unittest snappy_test_support)
+ if(SNAPPY_USE_BUNDLED_GTEST)
+ target_link_libraries(snappy_unittest gmock_main gtest)
+ else(SNAPPY_USE_BUNDLED_BENCHMARK_LIB)
+ target_link_libraries(snappy_unittest ${GTEST_LDFLAGS})
+ target_compile_options(snappy_unittest PUBLIC ${GTEST_CFLAGS})
+ endif(SNAPPY_USE_BUNDLED_GTEST)
add_test(
NAME snappy_unittest
@@ -322,17 +341,28 @@ if(SNAPPY_BUILD_TESTS)
endif(SNAPPY_BUILD_TESTS)
if(SNAPPY_BUILD_BENCHMARKS)
+ if(NOT SNAPPY_USE_BUNDLED_BENCHMARK_LIB)
+ find_package(PkgConfig)
+ pkg_search_module(BENCHMARK REQUIRED benchmark)
+ endif(NOT SNAPPY_USE_BUNDLED_BENCHMARK_LIB)
+
add_executable(snappy_benchmark "")
target_sources(snappy_benchmark
PRIVATE
"snappy_benchmark.cc"
)
target_link_libraries(snappy_benchmark snappy_test_support benchmark_main)
+ if(NOT SNAPPY_USE_BUNDLED_BENCHMARK_LIB)
+ target_link_libraries(snappy_benchmark ${BENCHMARK_LDFLAGS})
+ target_compile_options(snappy_benchmark PUBLIC ${BENCHMARK_CFLAGS})
+ endif(NOT SNAPPY_USE_BUNDLED_BENCHMARK_LIB)
@@ -376,7 +376,7 @@
# This project uses Google benchmark for benchmarking.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "" FORCE)
- add_subdirectory("third_party/benchmark")
+ if(SNAPPY_USE_BUNDLED_BENCHMARK_LIB)
+ add_subdirectory("third_party/benchmark")
+ endif(SNAPPY_USE_BUNDLED_BENCHMARK_LIB)
+ # add_subdirectory("third_party/benchmark")
endif(SNAPPY_BUILD_BENCHMARKS)
if(SNAPPY_FUZZING_BUILD)