From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 48DC213835A for ; Thu, 3 Jun 2021 09:13:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E1F6E085A; Thu, 3 Jun 2021 09:12:59 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 303C3E085A for ; Thu, 3 Jun 2021 09:12:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B8FF2335CB7 for ; Thu, 3 Jun 2021 09:12:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EB60F79E for ; Thu, 3 Jun 2021 09:12:54 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1622711568.a16aff822830ef6bd7bb40b14b5ad5853f155437.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/snappy/files/, app-arch/snappy/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-arch/snappy/Manifest app-arch/snappy/files/snappy-1.1.9_external_gtest.patch app-arch/snappy/files/snappy-1.1.9_gcc_inline.patch app-arch/snappy/metadata.xml app-arch/snappy/snappy-1.1.9.ebuild X-VCS-Directories: app-arch/snappy/files/ app-arch/snappy/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: a16aff822830ef6bd7bb40b14b5ad5853f155437 X-VCS-Branch: master Date: Thu, 3 Jun 2021 09:12:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ad57734f-ffab-477a-9450-02399287516a X-Archives-Hash: 53090897bddfb715078f97fa52c5617c commit: a16aff822830ef6bd7bb40b14b5ad5853f155437 Author: Azamat H. Hackimov gmail com> AuthorDate: Wed May 5 18:28:17 2021 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Thu Jun 3 09:12:48 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a16aff82 app-arch/snappy: update to 1.1.9 Taking maitainership, cleanup ebuild. Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Azamat H. Hackimov gmail.com> Closes: https://github.com/gentoo/gentoo/pull/20692 Signed-off-by: Joonas Niilola gentoo.org> app-arch/snappy/Manifest | 1 + .../snappy/files/snappy-1.1.9_external_gtest.patch | 34 +++++++++++ .../snappy/files/snappy-1.1.9_gcc_inline.patch | 67 ++++++++++++++++++++++ app-arch/snappy/metadata.xml | 17 ++++-- app-arch/snappy/snappy-1.1.9.ebuild | 45 +++++++++++++++ 5 files changed, 159 insertions(+), 5 deletions(-) diff --git a/app-arch/snappy/Manifest b/app-arch/snappy/Manifest index 0995e291b70..6ecc06c8336 100644 --- a/app-arch/snappy/Manifest +++ b/app-arch/snappy/Manifest @@ -1 +1,2 @@ DIST snappy-1.1.8.tar.gz 1096137 BLAKE2B e21f2ea23727f118920b7f67981354194f12d1d61eaa18eb1cb2f4285fabafdd221b88cf1e3b3261634f65469a714d3efe6b218c0b1e9d41639cdeb21097d75e SHA512 efe18ff1b3edda1b4b6cefcbc6da8119c05d63afdbf7a784f3490353c74dced76baed7b5f1aa34b99899729192b9d657c33c76de4b507a51553fa8001ae75c1c +DIST snappy-1.1.9.tar.gz 1102382 BLAKE2B 926d03156168e3d4800dc17144db3de2c182c6eb9970d87a00b94fb09b67e403479a64cbed75833b83fd03173c1bb8caaf248a55627e89fe2a34456f12ff3b42 SHA512 f1f8a90f5f7f23310423574b1d8c9acb84c66ea620f3999d1060395205e5760883476837aba02f0aa913af60819e34c625d8308c18a5d7a9c4e190f35968b024 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 00000000000..8aa4c1eabd2 --- /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" +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 00000000000..04d35f56ee9 --- /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" +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 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 c149214b310..9fbbf8bb934 100644 --- a/app-arch/snappy/metadata.xml +++ b/app-arch/snappy/metadata.xml @@ -1,11 +1,18 @@ - - 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. + + azamat.hackimov@gmail.com + Azamat H. Hackimov + + + proxy-maint@gentoo.org + Proxy Maintainers + + 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. google/snappy 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 00000000000..afb71c795da --- /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 + # we do not want to run benchmarks, and those are only used + # for benchmarks + -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 +}