From 619cfe3daec298493d31030008efc12e5ebbf7ec Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 29 Mar 2021 18:00:00 +0000 Subject: dev-cpp/abseil-cpp: Fix building on ARM{32,64} CPUs without crypto extension. Closes: https://bugs.gentoo.org/778926 Signed-off-by: Arfrever Frehtes Taifersar Arahesis Signed-off-by: Georgy Yakovlev --- dev-cpp/abseil-cpp/abseil-cpp-20200923.2.ebuild | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'dev-cpp/abseil-cpp/abseil-cpp-20200923.2.ebuild') diff --git a/dev-cpp/abseil-cpp/abseil-cpp-20200923.2.ebuild b/dev-cpp/abseil-cpp/abseil-cpp-20200923.2.ebuild index 8e62b032d05f..90be485e13ae 100644 --- a/dev-cpp/abseil-cpp/abseil-cpp-20200923.2.ebuild +++ b/dev-cpp/abseil-cpp/abseil-cpp-20200923.2.ebuild @@ -1,11 +1,11 @@ -# Copyright 2020 Gentoo Authors +# Copyright 2020-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 PYTHON_COMPAT=( python3_{7,8,9} ) -inherit cmake python-any-r1 +inherit cmake python-any-r1 toolchain-funcs # yes, it needs SOURCE, not just installed one GTEST_COMMIT="aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e" @@ -34,6 +34,10 @@ BDEPEND=" RESTRICT="!test? ( test )" +PATCHES=( + "${FILESDIR}/${PN}-20200923-arm_no_crypto.patch" +) + src_prepare() { cmake_src_prepare @@ -53,6 +57,12 @@ src_prepare() { } src_configure() { + if use arm || use arm64; then + if [[ $($(tc-getCXX) ${CXXFLAGS} -E -P - <<<$'#if defined(__ARM_FEATURE_CRYPTO)\nHAVE_ARM_FEATURE_CRYPTO\n#endif') != *HAVE_ARM_FEATURE_CRYPTO* ]]; then + append-cxxflags -DABSL_ARCH_ARM_NO_CRYPTO + fi + fi + local mycmakeargs=( -DABSL_ENABLE_INSTALL=TRUE -DABSL_LOCAL_GOOGLETEST_DIR="${WORKDIR}/googletest-${GTEST_COMMIT}" -- cgit v1.2.3