From 3e26450b849fdf53274c008860ca15a5529a4c4d Mon Sep 17 00:00:00 2001 From: skmpz Date: Mon, 24 May 2021 14:16:20 +0400 Subject: [PATCH] snappy: update to 1.1.9. Patch taken from https://github.com/google/snappy/pull/128 --- .../patches/cmakelists_no_3rdparty.patch | 28 +++++++++++++++++++ srcpkgs/snappy/patches/inline.patch | 11 ++++++++ srcpkgs/snappy/template | 10 +++---- 3 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/snappy/patches/cmakelists_no_3rdparty.patch create mode 100644 srcpkgs/snappy/patches/inline.patch diff --git a/srcpkgs/snappy/patches/cmakelists_no_3rdparty.patch b/srcpkgs/snappy/patches/cmakelists_no_3rdparty.patch new file mode 100644 index 0000000000..ba3d91c35e --- /dev/null +++ b/srcpkgs/snappy/patches/cmakelists_no_3rdparty.patch @@ -0,0 +1,28 @@ +--- CMakeLists.txt 2021-05-05 02:53:34.000000000 +0400 ++++ CMakeLists.txt 2021-05-24 13:49:21.551706280 +0400 +@@ -287,17 +286,0 @@ 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) +- +@@ -309 +292 @@ if(SNAPPY_BUILD_TESTS) +- target_link_libraries(snappy_unittest snappy_test_support gmock_main gtest) ++ target_link_libraries(snappy_unittest snappy_test_support gtest_main gtest) +@@ -330 +313 @@ if(SNAPPY_BUILD_BENCHMARKS) +- target_link_libraries(snappy_benchmark snappy_test_support benchmark_main) ++ target_link_libraries(snappy_benchmark snappy_test_support benchmark_main benchmark) +@@ -335 +317,0 @@ if(SNAPPY_BUILD_BENCHMARKS) +- add_subdirectory("third_party/benchmark") diff --git a/srcpkgs/snappy/patches/inline.patch b/srcpkgs/snappy/patches/inline.patch new file mode 100644 index 0000000000..17f05206ef --- /dev/null +++ b/srcpkgs/snappy/patches/inline.patch @@ -0,0 +1,11 @@ +Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE on AdvanceToNextTag to fix: +1097 | size_t tag_type = AdvanceToNextTag(&ip, &tag); + | ~~~~~~~~~~~~~~~~^~~~~~~~~~~ +../snappy.cc:1017:8: error: inlining failed in call to 'always_inline' +'size_t snappy::AdvanceToNextTag(const uint8_t**, size_t*)': function body can be overwritten at link time + +--- snappy.cc 2021-05-05 02:53:34.000000000 +0400 ++++ snappy.cc 2021-05-24 01:24:59.124654893 +0400 +@@ -1017 +1017 @@ SNAPPY_ATTRIBUTE_ALWAYS_INLINE +-size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { ++inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { diff --git a/srcpkgs/snappy/template b/srcpkgs/snappy/template index 7062cb7b0d..7e9e5214fb 100644 --- a/srcpkgs/snappy/template +++ b/srcpkgs/snappy/template @@ -1,23 +1,23 @@ # Template file for 'snappy' pkgname=snappy -version=1.1.8 +version=1.1.9 revision=1 build_style=cmake configure_args="-DBUILD_SHARED_LIBS=1" -makedepends="zlib-devel lzo-devel" +makedepends="zlib-devel lzo-devel gtest-devel benchmark-devel" short_desc="Fast compressor/decompressor library" -maintainer="Orphaned " +maintainer="skmpz " license="BSD-3-Clause" homepage="https://google.github.io/snappy" distfiles="https://github.com/google/snappy/archive/${version}.tar.gz" -checksum=16b677f07832a612b0836178db7f374e414f94657c138e6993cbfc5dcc58651f +checksum=75c1fbb3d618dd3a0483bff0e26d0a92b495bbe5059c8b4f1c962b478b6e06e7 post_install() { vlicense COPYING } snappy-devel_package() { - depends="${sourcepkg}-${version}_${revision}" + depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include