Skip to content

Commit

Permalink
dev-cpp/abseil-cpp: download gtest tarball only if tests requested
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Georgy Yakovlev <[email protected]>
  • Loading branch information
gyakovlev committed Apr 4, 2021
1 parent 809df6d commit cbee4bd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dev-cpp/abseil-cpp/abseil-cpp-20210324.0-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GTEST_FILE="gtest-1.10.0_p20200702.tar.gz"
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
HOMEPAGE="https://abseil.io"
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz
https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${GTEST_FILE}"
test? ( https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${GTEST_FILE} )"

LICENSE="
Apache-2.0
Expand Down Expand Up @@ -54,8 +54,10 @@ src_prepare() {
python_fix_shebang absl/copts/generate_copts.py
absl/copts/generate_copts.py || die

sed -i 's/-Werror//g' \
"${WORKDIR}/googletest-${GTEST_COMMIT}"/googletest/cmake/internal_utils.cmake || die
if use test; then
sed -i 's/-Werror//g' \
"${WORKDIR}/googletest-${GTEST_COMMIT}"/googletest/cmake/internal_utils.cmake || die
fi
}

src_configure() {
Expand Down

0 comments on commit cbee4bd

Please sign in to comment.