1 # Copyright 2020-2025 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{10..13} )
8 inherit cmake-multilib python-any-r1
10 DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
11 HOMEPAGE="https://abseil.io/"
12 SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
15 SLOT="0/${PV:2:4}.$(ver_cut 2).0"
16 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos"
19 RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]"
24 sys-libs/timezone-data
28 RESTRICT="!test? ( test )"
31 "${FILESDIR}/${PN}-20230802.0-sdata-tests.patch"
32 # "${FILESDIR}/${PN}-random-tests.patch" #935417
33 # "${FILESDIR}/${PN}-20230802.0-conditional-use-of-lzcnt.patch" #934337
34 "${FILESDIR}/${PN}-include-cstdint.patch" #937307
35 "${FILESDIR}/${PN}-20240722.0-lto-odr.patch"
41 use ppc && eapply "${FILESDIR}/${PN}-atomic.patch"
43 # un-hardcode abseil compiler flags
47 -e '/"-mfpu=neon"/d' \
48 -e '/"-march=armv8-a+crypto"/d' \
49 absl/copts/copts.py || die
51 # now generate cmake files
52 python_fix_shebang absl/copts/generate_copts.py
53 absl/copts/generate_copts.py || die
56 multilib_src_configure() {
58 -DABSL_ENABLE_INSTALL=TRUE
59 -DABSL_USE_EXTERNAL_GOOGLETEST=ON
60 -DABSL_PROPAGATE_CXX_STD=TRUE
61 # TEST_HELPERS needed for protobuf (bug #915902)
62 -DABSL_BUILD_TEST_HELPERS=ON
63 -DABSL_BUILD_TESTING="$(usex test)"
65 # intentional use, it uses both variables for tests.
83 absl_failure_signal_handler_test