dev-cpp/opentelemetry-cpp: add 1.24.0

Disable WITH_STL. It was a bad idea as zerotier notably expects the
stable ABI to link against.

Signed-off-by: Alfred Wingate <parona@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44683
Closes: https://github.com/gentoo/gentoo/pull/44683
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Alfred Wingate
2025-11-21 19:33:40 +02:00
committed by Sam James
parent ec37dd3a7f
commit 42d50946f1
2 changed files with 125 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
DIST opentelemetry-cpp-1.20.0.tar.gz 1115605 BLAKE2B 938fb90e203613e1beb193b28b0232423cbd111b6d9490fd12d706836619eb7fa01d9a625dd1b56fd91a355d49f916b4ccda58d76a862408505467dd2e33a2da SHA512 db9745be96907431c32a69230b29a5bddba0654f3f379f6cd0827f44895ef39c9612381303ec239d6ad98920bcc4006a90e25b715ade9ddf30aff843d1931416
DIST opentelemetry-cpp-1.22.0.tar.gz 1125051 BLAKE2B 40c9824b348a2d72d591aac3f5640cc7a0af77b8b4046acf39d1ced6fcfebb666dae40eb3f4e5f1d739e0b4105e54ca0eaeefc7ef443cd1935e3b1bcb6f32e63 SHA512 a85869d2858f350e4a3b85e5d68e669a5fff42a2222ba7782bba92f5fe6856a110b3ddc9744a6c3e68c1ddfdc7bdb2b570bbeff78275a4e98cea889a8fda0120
DIST opentelemetry-cpp-1.24.0.tar.gz 1223110 BLAKE2B c0a1e5c3a9656074b707183d63077d470bf5ebf9f98be7afbcaf0b1abee71d197fd40cbf7411263c1296ae5eb0ccf70a698a2b167f8cefba7e78da2c1bb7dff7 SHA512 bde103a04ef70a1dccd247f5ab4bca4fff23d081d1ae758286fb1a62409310a399dd90ae29f188e552fb96112c95f501dac5fafab4edc1df924ca43f21d0f150
DIST opentelemetry-cpp-1.6.0.tar.gz 790774 BLAKE2B 9512c092bfe49c9da82eff3950204c1f2eb654df2ed428e58ceb8877d15d80d9978fa6da37f7780352538c74de04bac69660528b255dfbce743f89b9d4020dd2 SHA512 ae0777451a3d2d676afd9f3142ab78c7afb08474f6038bd810ff0ee30fee6695e10100c901e7ffadf3faf16c7d19622acdea414cd720be8572f7720f2d528628
DIST opentelemetry-proto-1.7.0.tar.gz 127009 BLAKE2B c0d5d5a24104cb62537abe8922e1b165fd58670efe549d82fe3295f9017de71077e77a173eca42ef1a339f92960f172f449dc2ba82d75fe5b8dc1ee88996c188 SHA512 488ebeab036c4d202ff40a3c21fdbb6f0ab58338e680240d47ae439d5975da3ff31114325a10c8ca18d3034ed15b1b86454d853405c460891c202e3b4b8c000e
DIST opentelemetry-proto-1.8.0.tar.gz 119085 BLAKE2B 037d8005892035e5dea470108103439b90ce8ce20ac89e14a72d67d406ff5319b76e345f8201b4d0d2e479d95906f88527c516bc1bb53d4c1a72276af9184989 SHA512 43e320c365f73e1302951cf69e4f395c8dec9fe3efba802dea10637b61721a64868fb0a45c33d2ac15f99a7ba0b865c268d268a543a4efeff10f5c59407e7ba9

View File

@@ -0,0 +1,123 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# update based on third_party_release
OPENTELEMETRY_PROTO="1.8.0"
inherit cmake
DESCRIPTION="The OpenTelemetry C++ Client"
HOMEPAGE="
https://opentelemetry.io/
https://github.com/open-telemetry/opentelemetry-cpp/
"
SRC_URI="
https://github.com/open-telemetry/${PN}/archive/refs/tags/v${PV}.tar.gz
-> ${P}.tar.gz
otlp? (
https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v${OPENTELEMETRY_PROTO}.tar.gz
-> opentelemetry-proto-${OPENTELEMETRY_PROTO}.tar.gz
)
"
LICENSE="Apache-2.0"
SLOT="0/1"
KEYWORDS="~amd64 ~arm64 ~ppc64"
IUSE="elasticsearch grpc http otlp prometheus test"
REQUIRED_USE="
grpc? ( otlp )
http? ( otlp )
"
RESTRICT="!test? ( test )"
RDEPEND="
http? (
net-misc/curl
virtual/zlib:=
)
elasticsearch? (
dev-cpp/nlohmann_json
net-misc/curl
)
grpc? ( net-libs/grpc:= )
otlp? (
dev-cpp/abseil-cpp:=
dev-libs/protobuf:=[libprotoc(+)]
dev-cpp/nlohmann_json
)
prometheus? ( dev-cpp/prometheus-cpp )
"
DEPEND="
${RDEPEND}
test? ( dev-cpp/gtest )
"
BDEPEND="
virtual/pkgconfig
otlp? ( dev-libs/protobuf[protoc(+)] )
"
src_configure() {
# sanity check subslot to kick would be drive by bumpers
# https://github.com/open-telemetry/opentelemetry-cpp/blob/main/docs/abi-version-policy.md
local detected_abi
detected_abi="$(sed -n -e 's/^# define OPENTELEMETRY_ABI_VERSION_NO \(.*\)/\1/p' \
api/include/opentelemetry/version.h)"
detected_abi="${detected_abi}"
if [[ "${SLOT}" != "0/${detected_abi}" ]]; then
die "SLOT ${SLOT} doesn't match upstream specified ABI ${detected_abi}."
fi
local detected_proto_ver
detected_proto_ver="$(sed -n -e '/^opentelemetry-proto=/p' third_party_release)"
if [[ "${OPENTELEMETRY_PROTO}" != "${detected_proto_ver#opentelemetry-proto=v}" ]]; then
die "OPENTELEMETRY_PROTO=${OPENTELEMETRY_PROTO} doesn't match upstream specified ${detected_proto_ver}"
fi
local mycmakeargs=(
-DBUILD_TESTING=$(usex test)
-DWITH_BENCHMARK=OFF # benchmark tests dont make sense in ebuilds
-DBUILD_W3CTRACECONTEXT_TEST=OFF # network-sandbox breaking tests
-DWITH_FUNC_TESTS=ON
-DOTELCPP_VERSIONED_LIBS=ON
-DOTELCPP_MAINTAINER_MODE=OFF
-DOPENTELEMETRY_INSTALL=ON
# Modifies ABI and some project expect the non C++ std reliant ABI specifically
-DWITH_STL=OFF
-DWITH_GSL=OFF
-DWITH_API_ONLY=OFF
-DWITH_CONFIGURATION=OFF # experimental, vendored rapidyaml
-DWITH_ELASTICSEARCH=$(usex elasticsearch)
-DWITH_PROMETHEUS=$(usex prometheus)
-DWITH_OPENTRACING=OFF # unpackaged
-DWITH_ZIPKIN=OFF # unpackaged
-DWITH_ETW=OFF # unpackaged
# https://github.com/open-telemetry/opentelemetry-cpp/blob/main/exporters/otlp/README.md
# file exporter can be built separately to the other exporter.
# Its just simpler dependency wise to have a "otlp" use flag that the other exporter require.
-DWITH_OTLP_FILE=$(usex otlp)
-DWITH_OTLP_GRPC=$(usex grpc)
-DWITH_OTLP_HTTP=$(usex http)
-DWITH_OTLP_HTTP_COMPRESSION=ON # zlib is in the system set
)
use otlp && mycmakeargs+=( -DOTELCPP_PROTO_PATH="${WORKDIR}"/opentelemetry-proto-${OPENTELEMETRY_PROTO} )
cmake_src_configure
}
src_test() {
local CMAKE_SKIP_TESTS=(
# needs a running prometheus instance
exporter.PrometheusExporter.ShutdownSetsIsShutdownToTrue
)
# curl tests fragile
cmake_src_test -j1
}