blob: c015af9014619c3ab46a3b28cd86fe02172e7c84 [file] [log] [blame]
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
inherit cmake-multilib
DESCRIPTION="A high-speed compression/decompression library by Google"
SRC_URI="${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
IUSE="static-libs test"
# upstream killed static lib support with build system update
# (and we have packages depending on the flag)
# 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 )
src_prepare() {
local PATCHES=(
# command-line option parsing does not work at all, so just force
# it off
sed -i -e '/run_microbenchmarks/s:true:false:' || die
multilib_src_configure() {
# TODO: would be nice to make unittest build conditional
# but it is not a priority right now
local mycmakeargs=(
# use gtest for tests only
# gflags does not work anyway
# we do not want to run benchmarks, and those are only used
# for benchmarks
multilib_src_test() {
# run tests directly to get verbose output
cd "${S}" || die
"${BUILD_DIR}"/snappy_unittest || die