Compare commits
21 Commits
Author | SHA256 | Date | |
---|---|---|---|
9d27de3b52 | |||
|
92365e1916 | ||
fda27a18a3 | |||
39c678bbe2 | |||
ee98d74d03 | |||
|
3435949e96 | ||
4b7316f733 | |||
|
0eda9d89b9 | ||
4a7639e0cc | |||
4b727327be | |||
c1d504698e | |||
|
bf8762a06c | ||
|
b87f864146 | ||
|
73b169e931 | ||
ec09c9bb80 | |||
|
c869d52eb3 | ||
8d9c269e5c | |||
|
f6b14389ae | ||
|
6de1d60f9f | ||
6c11144279 | |||
|
5921d0dc02 |
BIN
1.1.10.tar.gz
(Stored with Git LFS)
Normal file
BIN
1.1.10.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,28 +0,0 @@
|
||||
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)
|
@@ -2,25 +2,24 @@ Index: snappy-1.1.9/CMakeLists.txt
|
||||
===================================================================
|
||||
--- snappy-1.1.9.orig/CMakeLists.txt
|
||||
+++ snappy-1.1.9/CMakeLists.txt
|
||||
@@ -53,8 +53,8 @@
|
||||
@@ -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-")
|
||||
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-")
|
||||
+ # string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
+ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
|
||||
else(MSVC)
|
||||
else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# Use -Wall for clang and gcc.
|
||||
if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
|
||||
@@ -83,8 +83,8 @@
|
||||
@@ -77,9 +73,6 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSV
|
||||
string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
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")
|
||||
+ # string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
+ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
|
||||
endif(MSVC)
|
||||
endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
|
||||
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:90f74bc1fbf78a6c56b3c4a082a05103b3a56bb17bca1a27e052ea11723292dc
|
||||
size 1108618
|
@@ -1,41 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
25
snappy.spec
25
snappy.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package snappy
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,23 +18,22 @@
|
||||
|
||||
%define libname libsnappy1
|
||||
Name: snappy
|
||||
Version: 1.2.2
|
||||
Version: 1.1.10
|
||||
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#/snappy-%{version}.tar.gz
|
||||
Source0: https://github.com/google/snappy/archive/%{version}.tar.gz
|
||||
Source1: snappy.pc
|
||||
Source99: baselibs.conf
|
||||
Patch0: use-system-test-libs.patch
|
||||
Patch1: reenable-rtti.patch
|
||||
Patch2: correct_testing_link.patch
|
||||
BuildRequires: cmake >= 3.10
|
||||
Patch2: reenable-rtti.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: lzo-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(benchmark)
|
||||
BuildRequires: pkgconfig(gmock)
|
||||
BuildRequires: pkgconfig(gtest)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
|
||||
@@ -44,7 +43,8 @@ compression, or compatibility with any other compression library; instead, it
|
||||
aims for high speeds and reasonable compression.
|
||||
|
||||
%package -n %{libname}
|
||||
Summary: A compressor/decompressor library favoring time
|
||||
Summary: Shared library from snappy
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{libname}
|
||||
Snappy is a compression/decompression library. It does not aim for maximum
|
||||
@@ -60,6 +60,7 @@ 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
|
||||
@@ -73,10 +74,7 @@ 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=17
|
||||
%cmake -DSNAPPY_USE_BUNDLED_GTEST=OFF -DSNAPPY_USE_BUNDLED_BENCHMARK_LIB=OFF -DCMAKE_CXX_STANDARD=14
|
||||
%make_build
|
||||
|
||||
%install
|
||||
@@ -87,7 +85,8 @@ install -m 644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
|
||||
%check
|
||||
%ctest
|
||||
|
||||
%ldconfig_scriptlets -n %{libname}
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%files -n %{libname}
|
||||
%license COPYING
|
||||
|
@@ -1,51 +1,120 @@
|
||||
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
|
||||
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
|
||||
|
||||
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
|
||||
@@ -330,20 +330,20 @@
|
||||
set(build_gmock ON)
|
||||
@@ -90,6 +90,14 @@ option(SNAPPY_BUILD_TESTS "Build Snappy's own tests." ON)
|
||||
|
||||
# This project is tested using GoogleTest.
|
||||
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.
|
||||
- add_subdirectory("third_party/googletest")
|
||||
+ # add_subdirectory("third_party/googletest")
|
||||
|
||||
# GoogleTest triggers a missing field initializers warning.
|
||||
-
|
||||
- # 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_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)
|
||||
+ 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)
|
||||
|
||||
add_executable(snappy_unittest "")
|
||||
target_sources(snappy_unittest
|
||||
@@ -376,7 +376,7 @@
|
||||
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)
|
||||
|
||||
# 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")
|
||||
+ # add_subdirectory("third_party/benchmark")
|
||||
+ if(SNAPPY_USE_BUNDLED_BENCHMARK_LIB)
|
||||
+ add_subdirectory("third_party/benchmark")
|
||||
+ endif(SNAPPY_USE_BUNDLED_BENCHMARK_LIB)
|
||||
endif(SNAPPY_BUILD_BENCHMARKS)
|
||||
|
||||
if(SNAPPY_FUZZING_BUILD)
|
||||
|
Reference in New Issue
Block a user