[packages/snappy] - updated to 1.1.9 - updated gtest patch - removed obsolete gflags patch - added inline patch (fixes

qboosh qboosh at pld-linux.org
Mon Feb 14 21:44:16 CET 2022


commit 18b673e6c8cf28bc5ea114614eff8cb4d71ce694
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Feb 14 21:45:58 2022 +0100

    - updated to 1.1.9
    - updated gtest patch
    - removed obsolete gflags patch
    - added inline patch (fixes inlining with gcc)

 snappy-gflags.patch | 11 -----------
 snappy-gtest.patch  | 42 +++++++++++++++++++++++++++++++++---------
 snappy-inline.patch | 11 +++++++++++
 snappy.spec         | 11 ++++++-----
 4 files changed, 50 insertions(+), 25 deletions(-)
---
diff --git a/snappy.spec b/snappy.spec
index ec5e772..0949b36 100644
--- a/snappy.spec
+++ b/snappy.spec
@@ -6,23 +6,22 @@
 Summary:	Snappy - fast compression/decompression library
 Summary(pl.UTF-8):	Snappy - biblioteka do szybkiej kompresji i dekompresji
 Name:		snappy
-Version:	1.1.8
+Version:	1.1.9
 Release:	1
 License:	BSD
 Group:		Libraries
 #Source0Download: https://github.com/google/snappy/releases
 Source0:	https://github.com/google/snappy/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	70e48cba7fecf289153d009791c9977f
+# Source0-md5:	213b6324b7790d25f5368629540a172c
 Source1:	%{name}.pc.in
-Patch0:		%{name}-gflags.patch
-Patch1:		%{name}-gtest.patch
+Patch0:		%{name}-gtest.patch
+Patch1:		%{name}-inline.patch
 URL:		http://google.github.io/snappy/
 BuildRequires:	cmake >= 3.1
 BuildRequires:	libstdc++-devel
 BuildRequires:	libtool >= 2:2.0
 BuildRequires:	pkgconfig
 %if %{with tests}
-BuildRequires:	gflags-devel
 BuildRequires:	gtest-devel
 BuildRequires:	lzo-devel >= 2
 BuildRequires:	zlib-devel
@@ -110,6 +109,7 @@ install -d build-static
 cd build-static
 %cmake .. \
 	-DBUILD_SHARED_LIBS=OFF \
+	-DSNAPPY_BUILD_BENCHMARKS=OFF \
 	%{!?with_tests:-DSNAPPY_BUILD_TESTS=OFF}
 
 %{__make}
@@ -119,6 +119,7 @@ cd ..
 install -d build
 cd build
 %cmake .. \
+	-DSNAPPY_BUILD_BENCHMARKS=OFF \
 	%{!?with_tests:-DSNAPPY_BUILD_TESTS=OFF}
 
 %{__make}
diff --git a/snappy-gflags.patch b/snappy-gflags.patch
deleted file mode 100644
index 4057382..0000000
--- a/snappy-gflags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- snappy-1.1.2/snappy-test.h.orig	1980-01-01 00:00:00.000000000 +0100
-+++ snappy-1.1.2/snappy-test.h	2015-03-01 19:53:47.391152000 +0100
-@@ -89,7 +89,7 @@
- // though, so we call it first and hope for the best.
- #define InitGoogle(argv0, argc, argv, remove_flags) \
-   INIT_GTEST(argc, argv); \
--  google::ParseCommandLineFlags(argc, argv, remove_flags);
-+  gflags::ParseCommandLineFlags(argc, argv, remove_flags);
- 
- #else
- 
diff --git a/snappy-gtest.patch b/snappy-gtest.patch
index d990e5b..ecf969d 100644
--- a/snappy-gtest.patch
+++ b/snappy-gtest.patch
@@ -1,11 +1,35 @@
---- snappy-1.1.7/CMakeLists.txt.orig	2017-08-25 01:54:23.000000000 +0200
-+++ snappy-1.1.7/CMakeLists.txt	2017-12-24 14:32:18.896409605 +0100
-@@ -118,7 +118,7 @@
-       "${PROJECT_SOURCE_DIR}/snappy-test.cc"
+--- snappy-1.1.9/CMakeLists.txt.orig	2021-05-05 00:53:34.000000000 +0200
++++ snappy-1.1.9/CMakeLists.txt	2022-02-14 16:29:44.015674683 +0100
+@@ -286,20 +286,6 @@ if(SNAPPY_BUILD_TESTS)
+ 
+   # 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)
+ 
+   add_executable(snappy_unittest "")
+   target_sources(snappy_unittest
+@@ -328,11 +314,6 @@ if(SNAPPY_BUILD_BENCHMARKS)
+       "snappy_benchmark.cc"
    )
-   target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H)
--  target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES})
-+  target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES} ${GTEST_LIBRARIES})
+   target_link_libraries(snappy_benchmark snappy_test_support benchmark_main)
+-
+-  # 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")
+ endif(SNAPPY_BUILD_BENCHMARKS)
  
-   if(HAVE_LIBZ)
-     target_link_libraries(snappy_unittest z)
+ if(SNAPPY_FUZZING_BUILD)
diff --git a/snappy-inline.patch b/snappy-inline.patch
new file mode 100644
index 0000000..b45da9a
--- /dev/null
+++ b/snappy-inline.patch
@@ -0,0 +1,11 @@
+--- snappy-1.1.9/snappy.cc.orig	2021-05-05 00:53:34.000000000 +0200
++++ snappy-1.1.9/snappy.cc	2022-02-14 16:46:13.219517746 +0100
+@@ -1014,7 +1014,7 @@ void MemMove(ptrdiff_t dst, const void*
+ }
+ 
+ SNAPPY_ATTRIBUTE_ALWAYS_INLINE
+-size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
++static inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
+   const uint8_t*& ip = *ip_p;
+   // This section is crucial for the throughput of the decompression loop.
+   // The latency of an iteration is fundamentally constrained by the
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/snappy.git/commitdiff/18b673e6c8cf28bc5ea114614eff8cb4d71ce694



More information about the pld-cvs-commit mailing list