1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 # Python is required for tests and some build tasks.
7 PYTHON_COMPAT=( python2_7 )
10 GOOGLETEST_COMMIT=da10da05c262af0a9e8fa91789a272a3dec67655
11 inherit cmake-multilib python-any-r1
13 if [[ ${PV} == "9999" ]]; then
15 EGIT_REPO_URI="https://github.com/google/googletest"
17 if [[ -z ${GOOGLETEST_COMMIT} ]]; then
20 MY_PV=${GOOGLETEST_COMMIT}
22 SRC_URI="https://github.com/google/googletest/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
23 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
24 S="${WORKDIR}"/googletest-${MY_PV}
27 DESCRIPTION="Google C++ Testing Framework"
28 HOMEPAGE="https://github.com/google/googletest"
32 IUSE="doc examples test"
33 RESTRICT="!test? ( test )"
35 DEPEND="test? ( ${PYTHON_DEPS} )"
36 RDEPEND="!dev-cpp/gmock"
39 "${FILESDIR}"/${PN}-1.9.0_pre20190607-increase-clone-stack-size.patch
43 use test && python-any-r1_pkg_setup
49 sed -i -e '/set(cxx_base_flags /s:-Werror::' \
50 googletest/cmake/internal_utils.cmake || die "sed failed!"
53 multilib_src_configure() {
59 -Dgmock_build_tests=$(usex test)
60 -Dgtest_build_tests=$(usex test)
61 -DPYTHON_EXECUTABLE="${PYTHON}"
66 multilib_src_install_all() {
71 dodoc -r googletest/docs/.
73 dodoc -r googlemock/docs/.
78 dodoc googletest/samples/*.{cc,h}