diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-arch/snappy | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-arch/snappy')
-rw-r--r-- | app-arch/snappy/Manifest | 4 | ||||
-rw-r--r-- | app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch | 31 | ||||
-rw-r--r-- | app-arch/snappy/metadata.xml | 15 | ||||
-rw-r--r-- | app-arch/snappy/snappy-1.1.7.ebuild | 64 |
4 files changed, 114 insertions, 0 deletions
diff --git a/app-arch/snappy/Manifest b/app-arch/snappy/Manifest new file mode 100644 index 000000000000..514fba7d33f6 --- /dev/null +++ b/app-arch/snappy/Manifest @@ -0,0 +1,4 @@ +AUX snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch 1017 BLAKE2B e9181a6a89bd62c3433c71008d182fcbdd2960e29542539f9ef5a48eff15347968a8a1a2d362633056f27df0a5ea84a5a721afcc375335295cb7c0cdd9267790 SHA512 52bf7db93ddfaba96fb16379f5d3e923bb27b6763db15698b5a5b6529c17e667b9b5c98108291a8eb9ddb98b7cfb0b5836602f66ac6beeacafa9da654e632ef4 +DIST snappy-1.1.7.tar.gz 1090550 BLAKE2B e389c96e093de5db92b896a7fa17a90d3ad0be07972e279321f24875f0f0c8c704ff478f4902a6356d458f93c249e3e06424d5a4efc9753a23ab12b7ee83a088 SHA512 32046f532606ba545a4e4825c0c66a19be449f2ca2ff760a6fa170a3603731479a7deadb683546e5f8b5033414c50f4a9a29f6d23b7a41f047e566e69eca7caf +EBUILD snappy-1.1.7.ebuild 1935 BLAKE2B 846088d7d1831d9c18160eb6215bcc906d88310488de2a1888b5da5a84a388238ea25393ddb05689711bae5f896e59002ecf525f3cd120ea49be896c30ed234d SHA512 58ce4a5283355b1e562285642fe197903b7715dd049f3a990f65b16e1bc63cb0c99348c90e40229c3b187c3b33a694e4b3de653ed12d5ed5c4574853ef425b91 +MISC metadata.xml 584 BLAKE2B 9972ee3948809ca45ea18129bde88c5a93fbe73d24c6e125cd13a45bb381099110dc0e006cf76a57d0baf7d18001bf261dd1d6db1025750b114903725e2e3aa4 SHA512 5897170c6fb84f520d879b5df295608b92376150ed2535b578ff04c5cfb5a0ba334a7aee3ad1ef41a8ed45b3fb36425e1dc0e54c0fb880e0c2bf72803a2da552 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 new file mode 100644 index 000000000000..3327b8bcf0ac --- /dev/null +++ b/app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch @@ -0,0 +1,31 @@ +From 1c9f699a6275f085ad710c9ae940e096ce552452 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Mon, 31 Jul 2017 20:49:22 +0200 +Subject: [PATCH] cmake: Add missing linking to GTEST_LIBRARIES + +Since the snappy_unittest target uses gtest routines (when available), +it needs to link to gtest explicitly. Otherwise, the build fails due +to unavailable gtest symbols. +--- + CMakeLists.txt | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +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" + ) + target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H) +- target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES}) ++ target_link_libraries(snappy_unittest ++ snappy ++ ${GFLAGS_LIBRARIES} ++ ${GTEST_LIBRARIES}) + + if(HAVE_LIBZ) + target_link_libraries(snappy_unittest z) +-- +2.14.1 + diff --git a/app-arch/snappy/metadata.xml b/app-arch/snappy/metadata.xml new file mode 100644 index 000000000000..e5215ea6cd04 --- /dev/null +++ b/app-arch/snappy/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type='person'> + <email>mgorny@gentoo.org</email> + <name>Michał Górny</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> +</pkgmetadata> diff --git a/app-arch/snappy/snappy-1.1.7.ebuild b/app-arch/snappy/snappy-1.1.7.ebuild new file mode 100644 index 000000000000..2c091619b04b --- /dev/null +++ b/app-arch/snappy/snappy-1.1.7.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +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 ~sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux" +IUSE="static-libs test" +# upstream killed static lib support with build system update +# (and we have packages depending on the flag) +REQUIRED_USE="!static-libs" + +# 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 +} |