diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-15 14:57:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-15 14:57:03 +0100 |
commit | d18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch) | |
tree | 4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /app-arch/snappy | |
parent | e748ba9741f6540f4675c23e3e37b73e822c13a4 (diff) |
gentoo resync : 15.06.2021
Diffstat (limited to 'app-arch/snappy')
-rw-r--r-- | app-arch/snappy/Manifest | 6 | ||||
-rw-r--r-- | app-arch/snappy/files/snappy-1.1.9_external_gtest.patch | 34 | ||||
-rw-r--r-- | app-arch/snappy/files/snappy-1.1.9_gcc_inline.patch | 67 | ||||
-rw-r--r-- | app-arch/snappy/metadata.xml | 17 | ||||
-rw-r--r-- | app-arch/snappy/snappy-1.1.9.ebuild | 45 |
5 files changed, 163 insertions, 6 deletions
diff --git a/app-arch/snappy/Manifest b/app-arch/snappy/Manifest index 59d23a0d0452..6fa7b91a6963 100644 --- a/app-arch/snappy/Manifest +++ b/app-arch/snappy/Manifest @@ -1,4 +1,8 @@ AUX snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch 970 BLAKE2B 5288f515e3806394b540bd5187cc277467b462526fac35dc2112fde0529f952083a02dc3bdd349e8fd6d24598f1021904861dec683a03bf9c98d9bfc60bb0aa7 SHA512 070e4bb4c2e4f67d6c22743d82660506478fee8c6fd936508a2beb687a57fbb7325283fa2e9b3f6cdac599a5bc19519b35236752d1926554047444322ac7689f +AUX snappy-1.1.9_external_gtest.patch 1092 BLAKE2B 392ee98254749dbf65ae8317dd2c26dfc140b768a08fe265cca26a0dce0eb43a1283eb55659c1fbf8e36e7037e65ec3f5ef970eb6436822fb6af212981f1facb SHA512 0b867b60b6e90551ab3c1ce4990775f2b0085d68fae72c4b63925f772b565cd86e9ad36659dae3a5cfb621ee628a0a547c82356f0f44d67ca2cc4ad9bfe16333 +AUX snappy-1.1.9_gcc_inline.patch 3166 BLAKE2B b4d05035647a97709ba43ee9673fbdaf1a160cc5859fd7401a8cdb67e04ba49bdfe98a9801257356841326b26759eff1022af3d5253628a87b0035af122a8fdd SHA512 5e8389e31a8d6e092843a3456f4a75d1f5f26af25d9d7ddfec283573a423522ce779b9ed4da5d2e3b6346153b5d137070611f88ebc907cfec64748afd29759f2 DIST snappy-1.1.8.tar.gz 1096137 BLAKE2B e21f2ea23727f118920b7f67981354194f12d1d61eaa18eb1cb2f4285fabafdd221b88cf1e3b3261634f65469a714d3efe6b218c0b1e9d41639cdeb21097d75e SHA512 efe18ff1b3edda1b4b6cefcbc6da8119c05d63afdbf7a784f3490353c74dced76baed7b5f1aa34b99899729192b9d657c33c76de4b507a51553fa8001ae75c1c +DIST snappy-1.1.9.tar.gz 1102382 BLAKE2B 926d03156168e3d4800dc17144db3de2c182c6eb9970d87a00b94fb09b67e403479a64cbed75833b83fd03173c1bb8caaf248a55627e89fe2a34456f12ff3b42 SHA512 f1f8a90f5f7f23310423574b1d8c9acb84c66ea620f3999d1060395205e5760883476837aba02f0aa913af60819e34c625d8308c18a5d7a9c4e190f35968b024 EBUILD snappy-1.1.8.ebuild 1825 BLAKE2B 4b19d78a843db8eda46fab568953a4f652dba370efa95f3fa8c8fec618b8a1dd35acf778fa1ca9fba4c5e49299218689feb7ef39a957d9bbd3c7d81afcee38aa SHA512 c1e57f6643737792ffc3ccfc11ad65e3255f8bed581b6ab2e41c2c2b7d7da916dad9d381bcedf9fb6e1587af6cd76386b8cf2516bcd378e2461fa0d5882c388c -MISC metadata.xml 504 BLAKE2B 4acd6fe7edce1448a36e1c304406c3094b67522349872703f3820a62eb99e04b8ba5cf43452703eb3f45382c89fcfee859e484e0e52379db98f9839daaea67b8 SHA512 b0f13292d7a92ed44a5e43e96d4f6f06d84147c74c5e5ef00dd72cd6f82ea6c984dd2b7ce13aba4111fa79f2c114b373acc1fc05565e2b7b585b0c6af74ec696 +EBUILD snappy-1.1.9.ebuild 1124 BLAKE2B a8487e99baaf6d8b20010773f192bae10a7b7b5113ada809b96405f4400b228b188f25252be7e4cea6521ef3bb8d8d1b62394d771fd3f24f0efa3a720a973500 SHA512 7ea0e0638e04610958a0c5e0a11b23e4592e4720de032188e5aabb7bcd6b11e2090646571706a8f25187c17fe5207783e59d6653ba61892f4326d38fd2fa282f +MISC metadata.xml 743 BLAKE2B a2fd45ba06200b0dff520db28f0c6dfa1a2a0f5e367d146f66255ee3864570502d0f243feba65488033d0c3fc72913bcfc922bb8c711e972766fe0a9526c9d15 SHA512 f271ff6e36ae3a3701f71633561c1f1a6a5d49f87822f3a6c6337f200508625126c1783f40069ddcd06599d9013b436a9a67e2657e256a70edc0901c157e289e diff --git a/app-arch/snappy/files/snappy-1.1.9_external_gtest.patch b/app-arch/snappy/files/snappy-1.1.9_external_gtest.patch new file mode 100644 index 000000000000..8aa4c1eabd22 --- /dev/null +++ b/app-arch/snappy/files/snappy-1.1.9_external_gtest.patch @@ -0,0 +1,34 @@ +From 9c1283f6022647a6ea39c1388321d6029fcdf80c Mon Sep 17 00:00:00 2001 +From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com> +Date: Wed, 5 May 2021 21:19:22 +0300 +Subject: [PATCH] Use external GTest framework + +--- + CMakeLists.txt | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 672561e..fc830fe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -291,15 +291,8 @@ if(SNAPPY_BUILD_TESTS) + 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) ++ find_package(GTest REQUIRED) ++ include(GoogleTest) + + add_executable(snappy_unittest "") + target_sources(snappy_unittest +-- +2.26.3 + diff --git a/app-arch/snappy/files/snappy-1.1.9_gcc_inline.patch b/app-arch/snappy/files/snappy-1.1.9_gcc_inline.patch new file mode 100644 index 000000000000..04d35f56ee98 --- /dev/null +++ b/app-arch/snappy/files/snappy-1.1.9_gcc_inline.patch @@ -0,0 +1,67 @@ +From 0c716d435abe65250100c2caea0e5126ac4e14bd Mon Sep 17 00:00:00 2001 +From: "Georgi D. Sotirov" <gdsotirov@gmail.com> +Date: Wed, 5 May 2021 14:16:46 +0300 +Subject: [PATCH] Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE + +Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE on AdvanceToNextTag to +fix the following compilation errors and a warning with GCC: + +[ 2%] Building CXX object CMakeFiles/snappy.dir/snappy.cc.o +/usr/bin/c++ -DHAVE_CONFIG_H -Dsnappy_EXPORTS +-I/tmp/snappy-1.1.9/build -I/tmp/snappy-1.1.9 -O3 +-march=i586 -mtune=i686 -Wall -Wextra -fno-exceptions -fno-rtti -O3 +-DNDEBUG -fPIC -std=c++11 -o CMakeFiles/snappy.dir/snappy.cc.o -c +/tmp/snappy-1.1.9/snappy.cc +/tmp/snappy-1.1.9/snappy.cc:1017:8: warning: always_inline +function might not be inlinable [-Wattributes] + size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { + ^ +/tmp/snappy-1.1.9/snappy.cc: In function 'std::pair<const +unsigned char*, int> snappy::DecompressBranchless(const uint8_t*, const +uint8_t*, ptrdiff_t, T, ptrdiff_t) [with T = char*; uint8_t = unsigned +char; ptrdiff_t = int]': +/tmp/snappy-1.1.9/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 +/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here + size_t tag_type = AdvanceToNextTag(&ip, &tag); + ^ +/tmp/snappy-1.1.9/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 + size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { + ^ +/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here + size_t tag_type = AdvanceToNextTag(&ip, &tag); + ^ +/tmp/snappy-1.1.9/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 + size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { + ^ +/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here + size_t tag_type = AdvanceToNextTag(&ip, &tag); + ^ +CMakeFiles/snappy.dir/build.make:137: recipe for target +'CMakeFiles/snappy.dir/snappy.cc.o' failed + +Just like with other functions using SNAPPY_ATTRIBUTE_ALWAYS_INLINE +macro (i.e. __attribute__((always_inline)) ) it is necessary to use C++ +inline specifier. +--- + snappy.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/snappy.cc b/snappy.cc +index 79dc0e8..51157be 100644 +--- a/snappy.cc ++++ b/snappy.cc +@@ -1014,7 +1014,7 @@ void MemMove(ptrdiff_t dst, const void* src, size_t size) { + } + + 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) { + 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 diff --git a/app-arch/snappy/metadata.xml b/app-arch/snappy/metadata.xml index c149214b3101..9fbbf8bb934e 100644 --- a/app-arch/snappy/metadata.xml +++ b/app-arch/snappy/metadata.xml @@ -1,11 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> - <longdescription lang="en">Snappy is a compression/decompression library. It does not aim for - maximum compression, or compatibility with any other compression - library; instead, it aims for very high speeds and reasonable - compression.</longdescription> + <maintainer type="person" proxied="yes"> + <email>azamat.hackimov@gmail.com</email> + <name>Azamat H. Hackimov</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en">Snappy is a compression/decompression library. + It does not aim for maximum compression, or compatibility with any + other compression library; instead, it aims for very high speeds and + reasonable compression.</longdescription> <upstream> <remote-id type="github">google/snappy</remote-id> </upstream> diff --git a/app-arch/snappy/snappy-1.1.9.ebuild b/app-arch/snappy/snappy-1.1.9.ebuild new file mode 100644 index 000000000000..ad43d4fa986c --- /dev/null +++ b/app-arch/snappy/snappy-1.1.9.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_ECLASS=cmake +inherit cmake-multilib + +DESCRIPTION="A high-speed compression/decompression library by Google" +HOMEPAGE="https://github.com/google/snappy" +SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/${PV%%.*}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND="test? ( dev-cpp/gtest )" + +DOCS=( format_description.txt framing_format.txt NEWS README.md ) + +PATCHES=( + "${FILESDIR}/${P}_gcc_inline.patch" + "${FILESDIR}/${P}_external_gtest.patch" +) + +multilib_src_configure() { + local mycmakeargs=( + -DSNAPPY_BUILD_TESTS=$(usex test) + -DSNAPPY_BUILD_BENCHMARKS=OFF + + # Options below are related to benchmarking, that we disable. + -DHAVE_LIBZ=NO + -DHAVE_LIBLZO2=NO + -DHAVE_LIBLZ4=NO + ) + cmake_src_configure +} + +multilib_src_test() { + # run tests directly to get verbose output + cd "${S}" || die + "${BUILD_DIR}"/snappy_unittest || die +} |