3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
PYTHON_COMPAT=( python3_{9..11} )
|
|
6 |
PYTHON_COMPAT=( python3_{10..12} )
|
7 |
7 |
|
8 |
8 |
inherit cmake-multilib python-any-r1
|
9 |
9 |
|
10 |
|
# yes, it needs SOURCE, not just installed one
|
11 |
|
GTEST_COMMIT="v1.13.0"
|
12 |
|
GTEST_FILE="gtest-${GTEST_COMMIT#v}.tar.gz"
|
13 |
|
|
14 |
10 |
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
|
15 |
|
HOMEPAGE="https://abseil.io"
|
16 |
|
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz
|
17 |
|
test? ( https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${GTEST_FILE} )"
|
18 |
|
|
19 |
|
LICENSE="
|
20 |
|
Apache-2.0
|
21 |
|
test? ( BSD )
|
22 |
|
"
|
23 |
|
SLOT="0/${PV%%.*}"
|
24 |
|
KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv x86"
|
|
11 |
HOMEPAGE="https://abseil.io/"
|
|
12 |
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
|
13 |
|
|
14 |
LICENSE="Apache-2.0"
|
|
15 |
SLOT="0/${PV%%.*}.0"
|
|
16 |
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
|
25 |
17 |
IUSE="test"
|
26 |
18 |
|
|
19 |
DEPEND=""
|
|
20 |
RDEPEND="${DEPEND}"
|
|
21 |
|
27 |
22 |
BDEPEND="
|
28 |
23 |
${PYTHON_DEPS}
|
29 |
|
test? ( sys-libs/timezone-data )
|
|
24 |
test? (
|
|
25 |
>=dev-cpp/gtest-1.13.0
|
|
26 |
sys-libs/timezone-data
|
|
27 |
)
|
30 |
28 |
"
|
31 |
29 |
|
32 |
30 |
RESTRICT="!test? ( test )"
|
... | ... | |
49 |
47 |
# now generate cmake files
|
50 |
48 |
python_fix_shebang absl/copts/generate_copts.py
|
51 |
49 |
absl/copts/generate_copts.py || die
|
52 |
|
|
53 |
|
if use test; then
|
54 |
|
sed -i 's/-Werror//g' \
|
55 |
|
"${WORKDIR}/googletest-${GTEST_COMMIT#v}"/googletest/cmake/internal_utils.cmake || die
|
56 |
|
fi
|
57 |
50 |
}
|
58 |
51 |
|
59 |
52 |
multilib_src_configure() {
|
60 |
53 |
local mycmakeargs=(
|
61 |
|
-DCMAKE_CXX_STANDARD=17
|
|
54 |
# We use -std=c++14 here so that abseil-cpp's string_view is used
|
|
55 |
# See the discussion in https://github.com/gentoo/gentoo/pull/32281.
|
|
56 |
-DCMAKE_CXX_STANDARD=14
|
62 |
57 |
-DABSL_ENABLE_INSTALL=TRUE
|
63 |
|
-DABSL_LOCAL_GOOGLETEST_DIR="${WORKDIR}/googletest-${GTEST_COMMIT#v}"
|
|
58 |
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
|
64 |
59 |
-DABSL_PROPAGATE_CXX_STD=TRUE
|
|
60 |
-DABSL_BUILD_TEST_HELPERS=$(usex test ON OFF)
|
65 |
61 |
-DABSL_BUILD_TESTING=$(usex test ON OFF)
|
66 |
|
$(usex test -DBUILD_TESTING=ON '') #intentional usex, it used both variables for tests.
|
|
62 |
$(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests.
|
67 |
63 |
)
|
68 |
64 |
|
69 |
65 |
cmake_src_configure
|