diff --git a/snappy-1.1.10.tar.gz b/snappy-1.1.10.tar.gz deleted file mode 100644 index b56209d781949868a64e4ead45f0fc48d1aa1e6e..0000000000000000000000000000000000000000 Binary files a/snappy-1.1.10.tar.gz and /dev/null differ diff --git a/snappy-1.2.1.tar.gz b/snappy-1.2.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..76606382555f99ad19b188094b59d6e278755bbe Binary files /dev/null and b/snappy-1.2.1.tar.gz differ diff --git a/remove-dependency-on-google-benchmark-and-gmock.patch b/snappy-thirdparty.patch similarity index 33% rename from remove-dependency-on-google-benchmark-and-gmock.patch rename to snappy-thirdparty.patch index 4a13400c6f4990b3aae823d16cfba243600fd898..a1bfdb7342ea7485c32192639bc2527f7665f2e9 100644 --- a/remove-dependency-on-google-benchmark-and-gmock.patch +++ b/snappy-thirdparty.patch @@ -1,51 +1,41 @@ -From 14ccda0d6c228999c8d982a84562432cd7465743 Mon Sep 17 00:00:00 2001 -From: hanxinke -Date: Tue, 7 Dec 2021 15:34:34 +0800 -Subject: [PATCH] remove dependency on google benchmark and gmock - -Signed-off-by: hanxinke ---- - CMakeLists.txt | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - diff --git a/CMakeLists.txt b/CMakeLists.txt -index 672561e..3127d9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -88,7 +88,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." OFF) +@@ -26,7 +26,7 @@ + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - option(SNAPPY_BUILD_TESTS "Build Snappy's own tests." ON) +-cmake_minimum_required(VERSION 3.1) ++cmake_minimum_required(VERSION 3.5) + project(Snappy VERSION 1.2.1 LANGUAGES C CXX) --option(SNAPPY_BUILD_BENCHMARKS "Build Snappy's benchmarks" ON) -+option(SNAPPY_BUILD_BENCHMARKS "Build Snappy's benchmarks" OFF) + # C++ standard can be overridden when this is used as a sub-project. +@@ -319,34 +319,12 @@ + if(SNAPPY_BUILD_TESTS) + enable_testing() - option(SNAPPY_FUZZING_BUILD "Build Snappy for fuzzing." OFF) - -@@ -288,25 +288,25 @@ if(SNAPPY_BUILD_TESTS) - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - set(install_gtest OFF) - set(install_gmock OFF) +- # 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) -+ set(build_gmock OFF) - - # This project is tested using GoogleTest. +- +- # 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_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 @@ -56,15 +46,24 @@ index 672561e..3127d9b 100644 add_test( NAME snappy_unittest -@@ -332,7 +332,7 @@ if(SNAPPY_BUILD_BENCHMARKS) - # 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") - endif(SNAPPY_BUILD_BENCHMARKS) +@@ -361,20 +339,6 @@ + target_link_libraries(snappy_test_tool snappy_test_support) + endif(SNAPPY_BUILD_TESTS) +-if(SNAPPY_BUILD_BENCHMARKS) +- add_executable(snappy_benchmark "") +- target_sources(snappy_benchmark +- PRIVATE +- "snappy_benchmark.cc" +- ) +- 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(SNAPPY_FUZZING_BUILD) --- -1.8.3.1 - + add_executable(snappy_compress_fuzzer "") + target_sources(snappy_compress_fuzzer diff --git a/snappy.pc b/snappy.pc deleted file mode 100644 index 0acb99bfab4c60fd7f990fd09fc652bf4ed0aeab..0000000000000000000000000000000000000000 --- a/snappy.pc +++ /dev/null @@ -1,10 +0,0 @@ -prefix=/usr -exec_prefix=${prefix} -includedir=${prefix}/include -libdir=${prefix}/lib64 - -Name: snappy -Description: A fast compression/decompression library -Version: 1.1.8 -Libs: -L\${libdir} -lsnappy -Cflags: -I\${includedir} diff --git a/snappy.spec b/snappy.spec index 9179036199c5312f9a8dd5f0bc5f1963cf64bfdc..cfc172ec45d617112314927085d357ebf4779865 100644 --- a/snappy.spec +++ b/snappy.spec @@ -1,14 +1,13 @@ Name: snappy -Version: 1.1.10 -Release: 3 +Version: 1.2.1 +Release: 1 Summary: A fast compressor/decompressor License: BSD URL: https://github.com/google/snappy Source0: https://github.com/google/snappy/archive/%{version}/%{name}-%{version}.tar.gz -Source1: snappy.pc -Patch0: remove-dependency-on-google-benchmark-and-gmock.patch -Patch2: add-option-to-enable-rtti-set-default-to-current-ben.patch +Patch0: snappy-thirdparty.patch +Patch2: add-option-to-enable-rtti-set-default-to-current-ben.patch BuildRequires: gcc-c++ make gtest-devel cmake @@ -36,7 +35,21 @@ This package is the development files for snappy. %install %cmake_install -install -p -D %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/snappy.pc + +# create pkgconfig file +mkdir -p %{buildroot}%{_libdir}/pkgconfig +cat << EOF >%{buildroot}%{_libdir}/pkgconfig/snappy.pc +prefix=%{_prefix} +exec_prefix=%{_exec_prefix} +includedir=%{_includedir} +libdir=%{_libdir} + +Name: %{name} +Description: A fast compression/decompression library +Version: %{version} +Cflags: -I\${includedir} +Libs: -L\${libdir} -lsnappy +EOF %check %ctest @@ -50,12 +63,15 @@ install -p -D %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/snappy.pc %{_includedir}/snappy*.h %{_libdir}/libsnappy.so %{_libdir}/pkgconfig/snappy.pc -%{_libdir}/cmake/Snappy/*.cmake +%{_libdir}/cmake/Snappy %files help %doc NEWS README.md %changelog +* Fri Mar 07 2025 Funda Wang - 1.2.1-1 +- update to 1.2.1 + * Thu Nov 14 2024 Funda Wang - 1.1.10-3 - adopt to new cmake macro