You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-libs/google-cloud-cpp/google-cloud-cpp-2.19.0.ebuild

58 lines
1.4 KiB

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
# From cmake/GoogleapisConfig.cmake
GOOGLEAPIS_COMMIT="0e3b813b0d0da539eacbe86b8716feeed00943c5"
DESCRIPTION="Google Cloud Client Library for C++"
HOMEPAGE="https://cloud.google.com/"
SRC_URI="https://github.com/GoogleCloudPlatform/google-cloud-cpp/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/googleapis/googleapis/archive/${GOOGLEAPIS_COMMIT}.tar.gz -> googleapis-${GOOGLEAPIS_COMMIT}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="dev-cpp/abseil-cpp:=
dev-cpp/nlohmann_json
dev-libs/protobuf:=
dev-libs/crc32c
dev-libs/openssl:=
dev-libs/re2:=
net-misc/curl
net-libs/grpc:=
sys-libs/zlib"
DEPEND="${RDEPEND}
dev-cpp/gtest
test? (
dev-cpp/benchmark
)"
DOCS=( README.md )
src_configure() {
local mycmakeargs=(
-DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF
-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF
-DBUILD_TESTING=$(usex test)
-DCMAKE_CXX_STANDARD=17
)
cmake_src_configure
mkdir -p "${BUILD_DIR}/external/googleapis/src/" || die
cp "${DISTDIR}/googleapis-${GOOGLEAPIS_COMMIT}.tar.gz" \
"${BUILD_DIR}/external/googleapis/src/${GOOGLEAPIS_COMMIT}.tar.gz" || die
}
src_test() {
# ClogEnvironment fails under portage sandbox, no fail outside
cmake_src_test -LE "integration-test" -E common_log_test
}