1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
9 inherit cmake-utils distutils-r1 eapi7-ver
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 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
32 SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
36 cmake-utils_src_prepare
37 use python && distutils-r1_src_prepare
42 -DBUILD_SHARED_LIBS=ON
43 -DBUILD_TESTING="$(usex test)"
45 cmake-utils_src_configure
46 use python && distutils-r1_src_configure
50 cmake-utils_src_compile
51 use python && distutils-r1_src_compile
60 use python && distutils-r1_src_test
64 cmake-utils_src_install
65 use python && distutils-r1_src_install