mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 21:08:35 -07:00
dev-cpp/abseil-cpp: add USE=test-helpers
USE=test-helpers builds libraries required to build tests against Abseil code. Closes: https://bugs.gentoo.org/953140 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -14,10 +14,10 @@ SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.g
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0/${PV:2:4}.$(ver_cut 2).0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="test"
|
||||
IUSE="test test-helpers"
|
||||
|
||||
RDEPEND="
|
||||
test? (
|
||||
test-helpers? (
|
||||
dev-cpp/gtest:=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
"
|
||||
@@ -45,6 +45,7 @@ src_prepare() {
|
||||
use ppc && eapply "${FILESDIR}/${PN}-atomic.patch"
|
||||
|
||||
# un-hardcode abseil compiler flags
|
||||
# 942192
|
||||
sed -i \
|
||||
-e '/"-maes",/d' \
|
||||
-e '/"-msse4.1",/d' \
|
||||
@@ -63,14 +64,18 @@ multilib_src_configure() {
|
||||
# We use -std=c++14 here so that abseil-cpp's string_view is used
|
||||
# See the discussion in https://github.com/gentoo/gentoo/pull/32281.
|
||||
-DCMAKE_CXX_STANDARD=14
|
||||
-DABSL_ENABLE_INSTALL=TRUE
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
|
||||
-DABSL_PROPAGATE_CXX_STD=TRUE
|
||||
|
||||
-DABSL_ENABLE_INSTALL="yes"
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST="yes"
|
||||
-DABSL_PROPAGATE_CXX_STD="yes"
|
||||
|
||||
# TEST_HELPERS needed for protobuf (bug #915902)
|
||||
-DABSL_BUILD_TEST_HELPERS="$(usex test)"
|
||||
-DABSL_BUILD_TEST_HELPERS="$(usex test-helpers)"
|
||||
|
||||
-DABSL_BUILD_TESTING="$(usex test)"
|
||||
)
|
||||
# intentional use, it uses both variables for tests.
|
||||
# intentional use, it requires both variables for tests.
|
||||
# (BUILD_TESTING AND ABSL_BUILD_TESTING)
|
||||
if use test; then
|
||||
mycmakeargs+=(
|
||||
-DBUILD_TESTING="yes"
|
||||
|
||||
@@ -14,10 +14,10 @@ SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.g
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0/${PV:2:4}.$(ver_cut 2).0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
|
||||
IUSE="test"
|
||||
IUSE="test test-helpers"
|
||||
|
||||
RDEPEND="
|
||||
test? (
|
||||
test-helpers? (
|
||||
dev-cpp/gtest:=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
"
|
||||
@@ -45,6 +45,7 @@ src_prepare() {
|
||||
use ppc && eapply "${FILESDIR}/${PN}-atomic.patch"
|
||||
|
||||
# un-hardcode abseil compiler flags
|
||||
# 942192
|
||||
sed -i \
|
||||
-e '/"-maes",/d' \
|
||||
-e '/"-msse4.1",/d' \
|
||||
@@ -63,14 +64,18 @@ multilib_src_configure() {
|
||||
# We use -std=c++14 here so that abseil-cpp's string_view is used
|
||||
# See the discussion in https://github.com/gentoo/gentoo/pull/32281.
|
||||
-DCMAKE_CXX_STANDARD=14
|
||||
-DABSL_ENABLE_INSTALL=TRUE
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
|
||||
-DABSL_PROPAGATE_CXX_STD=TRUE
|
||||
|
||||
-DABSL_ENABLE_INSTALL="yes"
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST="yes"
|
||||
-DABSL_PROPAGATE_CXX_STD="yes"
|
||||
|
||||
# TEST_HELPERS needed for protobuf (bug #915902)
|
||||
-DABSL_BUILD_TEST_HELPERS="$(usex test)"
|
||||
-DABSL_BUILD_TEST_HELPERS="$(usex test-helpers)"
|
||||
|
||||
-DABSL_BUILD_TESTING="$(usex test)"
|
||||
)
|
||||
# intentional use, it uses both variables for tests.
|
||||
# intentional use, it requires both variables for tests.
|
||||
# (BUILD_TESTING AND ABSL_BUILD_TESTING)
|
||||
if use test; then
|
||||
mycmakeargs+=(
|
||||
-DBUILD_TESTING="yes"
|
||||
|
||||
@@ -14,10 +14,10 @@ SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.g
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0/${PV:2:4}.$(ver_cut 2).0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
|
||||
IUSE="test"
|
||||
IUSE="test test-helpers"
|
||||
|
||||
RDEPEND="
|
||||
test? (
|
||||
test-helpers? (
|
||||
dev-cpp/gtest:=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
"
|
||||
@@ -44,6 +44,7 @@ src_prepare() {
|
||||
use ppc && eapply "${FILESDIR}/${PN}-atomic.patch"
|
||||
|
||||
# un-hardcode abseil compiler flags
|
||||
# 942192
|
||||
sed -i \
|
||||
-e '/"-maes",/d' \
|
||||
-e '/"-msse4.1",/d' \
|
||||
@@ -59,14 +60,17 @@ src_prepare() {
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DABSL_ENABLE_INSTALL=TRUE
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
|
||||
-DABSL_PROPAGATE_CXX_STD=TRUE
|
||||
-DABSL_ENABLE_INSTALL="yes"
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST="yes"
|
||||
-DABSL_PROPAGATE_CXX_STD="yes"
|
||||
|
||||
# TEST_HELPERS needed for protobuf (bug #915902)
|
||||
-DABSL_BUILD_TEST_HELPERS="$(usex test)"
|
||||
-DABSL_BUILD_TEST_HELPERS="$(usex test-helpers)"
|
||||
|
||||
-DABSL_BUILD_TESTING="$(usex test)"
|
||||
)
|
||||
# intentional use, it uses both variables for tests.
|
||||
# intentional use, it requires both variables for tests.
|
||||
# (BUILD_TESTING AND ABSL_BUILD_TESTING)
|
||||
if use test; then
|
||||
mycmakeargs+=(
|
||||
-DBUILD_TESTING="yes"
|
||||
|
||||
@@ -18,10 +18,10 @@ SRC_URI="
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0/${PV:2:4}.$(ver_cut 2).0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
|
||||
IUSE="test"
|
||||
IUSE="test test-helpers"
|
||||
|
||||
RDEPEND="
|
||||
test? (
|
||||
test-helpers? (
|
||||
dev-cpp/gtest:=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
"
|
||||
@@ -60,14 +60,17 @@ src_prepare() {
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DABSL_ENABLE_INSTALL=TRUE
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
|
||||
-DABSL_PROPAGATE_CXX_STD=TRUE
|
||||
-DABSL_ENABLE_INSTALL="yes"
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST="yes"
|
||||
-DABSL_PROPAGATE_CXX_STD="yes"
|
||||
|
||||
# TEST_HELPERS needed for protobuf (bug #915902)
|
||||
-DABSL_BUILD_TEST_HELPERS="$(usex test)"
|
||||
-DABSL_BUILD_TEST_HELPERS="$(usex test-helpers)"
|
||||
|
||||
-DABSL_BUILD_TESTING="$(usex test)"
|
||||
)
|
||||
# intentional use, it uses both variables for tests.
|
||||
# intentional use, it requires both variables for tests.
|
||||
# (BUILD_TESTING AND ABSL_BUILD_TESTING)
|
||||
if use test; then
|
||||
mycmakeargs+=(
|
||||
-DBUILD_TESTING="yes"
|
||||
|
||||
@@ -13,4 +13,7 @@
|
||||
<upstream>
|
||||
<remote-id type="github">abseil/abseil-cpp</remote-id>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="test-helpers">Build libraries that you can use to write tests against Abseil code.</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
Reference in New Issue
Block a user