summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>2023-03-15 19:41:39 +0300
committerSam James <sam@gentoo.org>2023-03-19 03:16:00 +0000
commitfcc99e315924b679a450cb466c82232e4c3e64ca (patch)
tree9d475a8e82d25ab2b8fd70461d3865a0806c5cf4 /app-arch
parentdev-cpp/doctest: add 2.4.11 (diff)
downloadgentoo-fcc99e315924b679a450cb466c82232e4c3e64ca.tar.gz
gentoo-fcc99e315924b679a450cb466c82232e4c3e64ca.tar.bz2
gentoo-fcc99e315924b679a450cb466c82232e4c3e64ca.zip
app-arch/snappy: add 1.1.10
Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/30138 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/snappy/Manifest1
-rw-r--r--app-arch/snappy/metadata.xml1
-rw-r--r--app-arch/snappy/snappy-1.1.10.ebuild47
3 files changed, 49 insertions, 0 deletions
diff --git a/app-arch/snappy/Manifest b/app-arch/snappy/Manifest
index 6d2cae5cff27..2b0fde8309f0 100644
--- a/app-arch/snappy/Manifest
+++ b/app-arch/snappy/Manifest
@@ -1 +1,2 @@
+DIST snappy-1.1.10.tar.gz 1105312 BLAKE2B 5195335fb1883974d290e7dca2b6d928bde2b183f3f61bca9da28855b39fd9a4ee1c24014322d238d2ec94f3a3a55fd43110c88283e85865272226e11cbb4834 SHA512 3578597f1d4ec09104ce0296b825b013590351230dfe56c635081fd282ce7a13a34caf2c283ac77bd24065e2d27af6db068d1f84b98cec2fd39a0e37a0d77070
DIST snappy-1.1.9.tar.gz 1102382 BLAKE2B 926d03156168e3d4800dc17144db3de2c182c6eb9970d87a00b94fb09b67e403479a64cbed75833b83fd03173c1bb8caaf248a55627e89fe2a34456f12ff3b42 SHA512 f1f8a90f5f7f23310423574b1d8c9acb84c66ea620f3999d1060395205e5760883476837aba02f0aa913af60819e34c625d8308c18a5d7a9c4e190f35968b024
diff --git a/app-arch/snappy/metadata.xml b/app-arch/snappy/metadata.xml
index 733bf82bf93e..f228393d37be 100644
--- a/app-arch/snappy/metadata.xml
+++ b/app-arch/snappy/metadata.xml
@@ -14,6 +14,7 @@
other compression library; instead, it aims for very high speeds and
reasonable compression.</longdescription>
<upstream>
+ <remote-id type="cpe">cpe:/a:google:snappy</remote-id>
<remote-id type="github">google/snappy</remote-id>
</upstream>
</pkgmetadata>
diff --git a/app-arch/snappy/snappy-1.1.10.ebuild b/app-arch/snappy/snappy-1.1.10.ebuild
new file mode 100644
index 000000000000..f78200c4847b
--- /dev/null
+++ b/app-arch/snappy/snappy-1.1.10.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-cpp/gtest )"
+
+DOCS=( format_description.txt framing_format.txt NEWS README.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.9_external_gtest.patch"
+ "${FILESDIR}/${PN}-1.1.9-clang-werror.patch"
+ "${FILESDIR}/${PN}-1.1.9_remove-no-rtti.patch"
+)
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_CXX_STANDARD=14 # Latest gtest needs -std=c++14 or newer
+ -DSNAPPY_BUILD_TESTS=$(usex test)
+ -DSNAPPY_REQUIRE_AVX=$(usex cpu_flags_x86_avx)
+ -DSNAPPY_REQUIRE_AVX2=$(usex cpu_flags_x86_avx2)
+ -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
+}