1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
9 inherit cmake-utils distutils-r1
11 DESCRIPTION="Generic-purpose lossless compression algorithm"
12 HOMEPAGE="https://github.com/google/brotli"
16 RDEPEND="python? ( ${PYTHON_DEPS} )"
20 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
22 LICENSE="MIT python? ( Apache-2.0 )"
24 DOCS=( README.md CONTRIBUTING.md )
26 if [[ ${PV} == "9999" ]] ; then
28 EGIT_REPO_URI="https://github.com/google/${PN}.git"
31 PATCHES=( "${FILESDIR}"/${P}-no-rpath.patch )
32 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
33 SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
37 cmake-utils_src_prepare
38 use python && distutils-r1_src_prepare
43 -DBUILD_SHARED_LIBS=ON
44 -DBUILD_TESTING="$(usex test)"
46 cmake-utils_src_configure
47 use python && distutils-r1_src_configure
51 cmake-utils_src_compile
52 use python && distutils-r1_src_compile
61 use python && distutils-r1_src_test
65 cmake-utils_src_install
66 use python && distutils-r1_src_install