Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/snappy/
Date: Sun, 19 Mar 2023 03:23:02
Message-Id: 1679195760.fcc99e315924b679a450cb466c82232e4c3e64ca.sam@gentoo
1 commit: fcc99e315924b679a450cb466c82232e4c3e64ca
2 Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
3 AuthorDate: Wed Mar 15 16:41:39 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 19 03:16:00 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcc99e31
7
8 app-arch/snappy: add 1.1.10
9
10 Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
11 Closes: https://github.com/gentoo/gentoo/pull/30138
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 app-arch/snappy/Manifest | 1 +
15 app-arch/snappy/metadata.xml | 1 +
16 app-arch/snappy/snappy-1.1.10.ebuild | 47 ++++++++++++++++++++++++++++++++++++
17 3 files changed, 49 insertions(+)
18
19 diff --git a/app-arch/snappy/Manifest b/app-arch/snappy/Manifest
20 index 6d2cae5cff27..2b0fde8309f0 100644
21 --- a/app-arch/snappy/Manifest
22 +++ b/app-arch/snappy/Manifest
23 @@ -1 +1,2 @@
24 +DIST snappy-1.1.10.tar.gz 1105312 BLAKE2B 5195335fb1883974d290e7dca2b6d928bde2b183f3f61bca9da28855b39fd9a4ee1c24014322d238d2ec94f3a3a55fd43110c88283e85865272226e11cbb4834 SHA512 3578597f1d4ec09104ce0296b825b013590351230dfe56c635081fd282ce7a13a34caf2c283ac77bd24065e2d27af6db068d1f84b98cec2fd39a0e37a0d77070
25 DIST snappy-1.1.9.tar.gz 1102382 BLAKE2B 926d03156168e3d4800dc17144db3de2c182c6eb9970d87a00b94fb09b67e403479a64cbed75833b83fd03173c1bb8caaf248a55627e89fe2a34456f12ff3b42 SHA512 f1f8a90f5f7f23310423574b1d8c9acb84c66ea620f3999d1060395205e5760883476837aba02f0aa913af60819e34c625d8308c18a5d7a9c4e190f35968b024
26
27 diff --git a/app-arch/snappy/metadata.xml b/app-arch/snappy/metadata.xml
28 index 733bf82bf93e..f228393d37be 100644
29 --- a/app-arch/snappy/metadata.xml
30 +++ b/app-arch/snappy/metadata.xml
31 @@ -14,6 +14,7 @@
32 other compression library; instead, it aims for very high speeds and
33 reasonable compression.</longdescription>
34 <upstream>
35 + <remote-id type="cpe">cpe:/a:google:snappy</remote-id>
36 <remote-id type="github">google/snappy</remote-id>
37 </upstream>
38 </pkgmetadata>
39
40 diff --git a/app-arch/snappy/snappy-1.1.10.ebuild b/app-arch/snappy/snappy-1.1.10.ebuild
41 new file mode 100644
42 index 000000000000..f78200c4847b
43 --- /dev/null
44 +++ b/app-arch/snappy/snappy-1.1.10.ebuild
45 @@ -0,0 +1,47 @@
46 +# Copyright 1999-2023 Gentoo Authors
47 +# Distributed under the terms of the GNU General Public License v2
48 +
49 +EAPI=8
50 +
51 +inherit cmake-multilib
52 +
53 +DESCRIPTION="A high-speed compression/decompression library by Google"
54 +HOMEPAGE="https://github.com/google/snappy"
55 +SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
56 +
57 +LICENSE="BSD"
58 +SLOT="0/${PV%%.*}"
59 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
60 +IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 test"
61 +RESTRICT="!test? ( test )"
62 +
63 +DEPEND="test? ( dev-cpp/gtest )"
64 +
65 +DOCS=( format_description.txt framing_format.txt NEWS README.md )
66 +
67 +PATCHES=(
68 + "${FILESDIR}/${PN}-1.1.9_external_gtest.patch"
69 + "${FILESDIR}/${PN}-1.1.9-clang-werror.patch"
70 + "${FILESDIR}/${PN}-1.1.9_remove-no-rtti.patch"
71 +)
72 +
73 +multilib_src_configure() {
74 + local mycmakeargs=(
75 + -DCMAKE_CXX_STANDARD=14 # Latest gtest needs -std=c++14 or newer
76 + -DSNAPPY_BUILD_TESTS=$(usex test)
77 + -DSNAPPY_REQUIRE_AVX=$(usex cpu_flags_x86_avx)
78 + -DSNAPPY_REQUIRE_AVX2=$(usex cpu_flags_x86_avx2)
79 + -DSNAPPY_BUILD_BENCHMARKS=OFF
80 + # Options below are related to benchmarking, that we disable.
81 + -DHAVE_LIBZ=NO
82 + -DHAVE_LIBLZO2=NO
83 + -DHAVE_LIBLZ4=NO
84 + )
85 + cmake_src_configure
86 +}
87 +
88 +multilib_src_test() {
89 + # run tests directly to get verbose output
90 + cd "${S}" || die
91 + "${BUILD_DIR}"/snappy_unittest || die
92 +}