snappy: update to 1.1.9.

Patch taken from https://github.com/google/snappy/pull/128
This commit is contained in:
skmpz 2021-05-24 14:16:20 +04:00 committed by Érico Nogueira Rolim
parent fcc136529e
commit 3e26450b84
3 changed files with 44 additions and 5 deletions

View file

@ -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")

View file

@ -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) {

View file

@ -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 <orphan@voidlinux.org>"
maintainer="skmpz <dem.procopiou@gmail.com>"
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