summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-01-15 07:26:56 +0100
committerMichał Górny <mgorny@gentoo.org>2020-01-15 08:20:17 +0100
commit4fa70a7a39b0c4a4dff4a553da1a37441fa204ce (patch)
tree6388c3595017f5ce40e6b2e40ff88dcf44ce75eb /app-arch/snappy
parentdev-db/barman: Remove redundant versions (diff)
downloadgentoo-4fa70a7a39b0c4a4dff4a553da1a37441fa204ce.tar.gz
gentoo-4fa70a7a39b0c4a4dff4a553da1a37441fa204ce.tar.bz2
gentoo-4fa70a7a39b0c4a4dff4a553da1a37441fa204ce.zip
app-arch/snappy: Bump to 1.1.8
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-arch/snappy')
-rw-r--r--app-arch/snappy/Manifest1
-rw-r--r--app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch3
-rw-r--r--app-arch/snappy/snappy-1.1.8.ebuild62
3 files changed, 64 insertions, 2 deletions
diff --git a/app-arch/snappy/Manifest b/app-arch/snappy/Manifest
index 60e8583cc5d2..1eaae3f2d807 100644
--- a/app-arch/snappy/Manifest
+++ b/app-arch/snappy/Manifest
@@ -1 +1,2 @@
DIST snappy-1.1.7.tar.gz 1090550 BLAKE2B e389c96e093de5db92b896a7fa17a90d3ad0be07972e279321f24875f0f0c8c704ff478f4902a6356d458f93c249e3e06424d5a4efc9753a23ab12b7ee83a088 SHA512 32046f532606ba545a4e4825c0c66a19be449f2ca2ff760a6fa170a3603731479a7deadb683546e5f8b5033414c50f4a9a29f6d23b7a41f047e566e69eca7caf
+DIST snappy-1.1.8.tar.gz 1096137 BLAKE2B e21f2ea23727f118920b7f67981354194f12d1d61eaa18eb1cb2f4285fabafdd221b88cf1e3b3261634f65469a714d3efe6b218c0b1e9d41639cdeb21097d75e SHA512 efe18ff1b3edda1b4b6cefcbc6da8119c05d63afdbf7a784f3490353c74dced76baed7b5f1aa34b99899729192b9d657c33c76de4b507a51553fa8001ae75c1c
diff --git a/app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch b/app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch
index 3327b8bcf0ac..f4fdd4727488 100644
--- a/app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch
+++ b/app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch
@@ -14,8 +14,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f534b1..3a44aa9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -118,7 +118,10 @@ if(SNAPPY_BUILD_TESTS)
- "${PROJECT_SOURCE_DIR}/snappy-test.cc"
+@@ -119,6 +119,9 @@ if(SNAPPY_BUILD_TESTS)
)
target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H)
- target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES})
diff --git a/app-arch/snappy/snappy-1.1.8.ebuild b/app-arch/snappy/snappy-1.1.8.ebuild
new file mode 100644
index 000000000000..974a2a8e1478
--- /dev/null
+++ b/app-arch/snappy/snappy-1.1.8.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+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"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+# all test dependencies are optional:
+# - gflags-2.2 is supposedly needed for command-line option parsing
+# but it's a huge hack and does not work,
+# - gtest probably gives nicer output,
+# - compression libraries are used for benchmarks which we do not run.
+DEPEND="test? ( dev-cpp/gtest )"
+
+# AUTHORS is useless, ChangeLog is stale
+DOCS=( format_description.txt framing_format.txt NEWS README.md )
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch
+ )
+
+ # command-line option parsing does not work at all, so just force
+ # it off
+ sed -i -e '/run_microbenchmarks/s:true:false:' snappy-test.cc || die
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ # TODO: would be nice to make unittest build conditional
+ # but it is not a priority right now
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=ON
+
+ # use gtest for tests only
+ -DCMAKE_DISABLE_FIND_PACKAGE_GTest=$(usex '!test')
+ # gflags does not work anyway
+ -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON
+
+ # we do not want to run benchmarks, and those are only used
+ # for benchmarks
+ -DHAVE_LIBZ=NO
+ -DHAVE_LIBLZO2=NO
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_test() {
+ # run tests directly to get verbose output
+ cd "${S}" || die
+ "${BUILD_DIR}"/snappy_unittest || die
+}