summaryrefslogtreecommitdiff
path: root/dev-cpp/opentelemetry-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/opentelemetry-cpp')
-rw-r--r--dev-cpp/opentelemetry-cpp/Manifest4
-rw-r--r--dev-cpp/opentelemetry-cpp/files/opentelemetry-cpp-1.3.0-tests.patch92
-rw-r--r--dev-cpp/opentelemetry-cpp/metadata.xml12
-rw-r--r--dev-cpp/opentelemetry-cpp/opentelemetry-cpp-1.3.0-r2.ebuild50
4 files changed, 158 insertions, 0 deletions
diff --git a/dev-cpp/opentelemetry-cpp/Manifest b/dev-cpp/opentelemetry-cpp/Manifest
new file mode 100644
index 000000000000..8e4932b524c3
--- /dev/null
+++ b/dev-cpp/opentelemetry-cpp/Manifest
@@ -0,0 +1,4 @@
+AUX opentelemetry-cpp-1.3.0-tests.patch 2937 BLAKE2B 179c6828a429d8d16ea8a8ff38044da8377922e74422b0a2df8d66e5648ddc8eae87e66ed2ccd8bbd6d4a356a37867c406988568aa8ffd538a2ca26161ab07b9 SHA512 fe8eae72b984bb5730fe095fef2a07a6e5dfdaa4c9b752e7ab5b3170f1c1054b1e888335e51257c52d2955b0a4d5ed80fc206c875fbb80990fa13f9f4ad1759d
+DIST opentelemetry-cpp-1.3.0.tar.gz 710030 BLAKE2B 56aa3213fd9c9ac5266197c2ca417f5ff181ca28016033c9320e63122eaf9a53bdb265e1778227a9036bc42f8837755a3009cb23610268bc03b9fb24b3844c82 SHA512 38f613c208ec847c8bf7765732d8198fcc427c293a929945d72c2f739e89d2a0ad36be4d94cc3c1b77fd7b1f1d1e5d8bdb38094a493ba3da3125281cd1016836
+EBUILD opentelemetry-cpp-1.3.0-r2.ebuild 966 BLAKE2B 256f46f7225b64a79a3e13e9582e0bfb275c5a22cb79f8f6ff619735dfe7a5ef6d4e6a8f2406fce71adb93ec546822c1366e9baa556f7e6e6322f168fe46c776 SHA512 83996a9639d03457037372443af6b48e4d0c75ec60cb8e9e4e9a29223d9b0081c1e9ec2150431e407290f22ee31cb5fcfe111eb9ca0b29c0988eff6eb3af7bfe
+MISC metadata.xml 396 BLAKE2B 4f1e0d0edd6e3c57c5e01d8428a4203113e0bbabb1c9e02c03c99998ce839edf422bb058c28fc0b1adec6655114fd89ef11dec4897cbde4fef61d80bd11fbaf9 SHA512 f56f523cb2b99bb75162d06a0be09e662cfd64b5b58b5f92f61d4384319285f0614965ee3d585e16067249b4b17f01bef566b34e5bbfd6faf5ba2574c233b982
diff --git a/dev-cpp/opentelemetry-cpp/files/opentelemetry-cpp-1.3.0-tests.patch b/dev-cpp/opentelemetry-cpp/files/opentelemetry-cpp-1.3.0-tests.patch
new file mode 100644
index 000000000000..a1ef0ff1d3cd
--- /dev/null
+++ b/dev-cpp/opentelemetry-cpp/files/opentelemetry-cpp-1.3.0-tests.patch
@@ -0,0 +1,92 @@
+diff --git a/ext/test/http/curl_http_test.cc b/ext/test/http/curl_http_test.cc
+index f8d248b..9a5be49 100644
+--- a/ext/test/http/curl_http_test.cc
++++ b/ext/test/http/curl_http_test.cc
+@@ -187,50 +187,6 @@ TEST_F(BasicCurlHttpTests, HttpResponse)
+ ASSERT_EQ(count, 4);
+ }
+
+-TEST_F(BasicCurlHttpTests, SendGetRequest)
+-{
+- received_requests_.clear();
+- auto session_manager = http_client::HttpClientFactory::Create();
+- EXPECT_TRUE(session_manager != nullptr);
+-
+- auto session = session_manager->CreateSession("http://127.0.0.1:19000");
+- auto request = session->CreateRequest();
+- request->SetUri("get/");
+- GetEventHandler *handler = new GetEventHandler();
+- session->SendRequest(*handler);
+- ASSERT_TRUE(waitForRequests(30, 1));
+- session->FinishSession();
+- ASSERT_TRUE(handler->is_called_);
+- delete handler;
+-}
+-
+-TEST_F(BasicCurlHttpTests, SendPostRequest)
+-{
+- received_requests_.clear();
+- auto session_manager = http_client::HttpClientFactory::Create();
+- EXPECT_TRUE(session_manager != nullptr);
+-
+- auto session = session_manager->CreateSession("http://127.0.0.1:19000");
+- auto request = session->CreateRequest();
+- request->SetUri("post/");
+- request->SetMethod(http_client::Method::Post);
+-
+- const char *b = "test-data";
+- http_client::Body body = {b, b + strlen(b)};
+- request->SetBody(body);
+- request->AddHeader("Content-Type", "text/plain");
+- PostEventHandler *handler = new PostEventHandler();
+- session->SendRequest(*handler);
+- ASSERT_TRUE(waitForRequests(30, 1));
+- session->FinishSession();
+- ASSERT_TRUE(handler->is_called_);
+-
+- session_manager->CancelAllSessions();
+- session_manager->FinishAllSessions();
+-
+- delete handler;
+-}
+-
+ TEST_F(BasicCurlHttpTests, RequestTimeout)
+ {
+ received_requests_.clear();
+@@ -271,17 +227,6 @@ TEST_F(BasicCurlHttpTests, CurlHttpOperations)
+ delete handler;
+ }
+
+-TEST_F(BasicCurlHttpTests, SendGetRequestSync)
+-{
+- received_requests_.clear();
+- curl::HttpClientSync http_client;
+-
+- http_client::Headers m1 = {};
+- auto result = http_client.Get("http://127.0.0.1:19000/get/", m1);
+- EXPECT_EQ(result, true);
+- EXPECT_EQ(result.GetSessionState(), http_client::SessionState::Response);
+-}
+-
+ TEST_F(BasicCurlHttpTests, SendGetRequestSyncTimeout)
+ {
+ received_requests_.clear();
+@@ -296,18 +241,6 @@ TEST_F(BasicCurlHttpTests, SendGetRequestSyncTimeout)
+ result.GetSessionState() == http_client::SessionState::SendFailed);
+ }
+
+-TEST_F(BasicCurlHttpTests, SendPostRequestSync)
+-{
+- received_requests_.clear();
+- curl::HttpClientSync http_client;
+-
+- http_client::Headers m1 = {};
+- http_client::Body body = {};
+- auto result = http_client.Post("http://127.0.0.1:19000/post/", body, m1);
+- EXPECT_EQ(result, true);
+- EXPECT_EQ(result.GetSessionState(), http_client::SessionState::Response);
+-}
+-
+ TEST_F(BasicCurlHttpTests, GetBaseUri)
+ {
+ curl::HttpClient session_manager;
diff --git a/dev-cpp/opentelemetry-cpp/metadata.xml b/dev-cpp/opentelemetry-cpp/metadata.xml
new file mode 100644
index 000000000000..c4293b76629d
--- /dev/null
+++ b/dev-cpp/opentelemetry-cpp/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <use>
+ <flag name="jaeger">Include the jaeger exporter</flag>
+ <flag name="prometheus">include the Prometheus Client in the SDK</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-cpp/opentelemetry-cpp/opentelemetry-cpp-1.3.0-r2.ebuild b/dev-cpp/opentelemetry-cpp/opentelemetry-cpp-1.3.0-r2.ebuild
new file mode 100644
index 000000000000..d37e2bfc376f
--- /dev/null
+++ b/dev-cpp/opentelemetry-cpp/opentelemetry-cpp-1.3.0-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="+jaeger prometheus test"
+
+RDEPEND="
+ net-misc/curl:=
+ dev-libs/thrift:=
+ dev-libs/boost:=
+"
+DEPEND="
+ ${RDEPEND}
+ test? (
+ dev-cpp/gtest
+ dev-cpp/benchmark
+ )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ # remove tests the need network
+ "${FILESDIR}/opentelemetry-cpp-1.3.0-tests.patch"
+)
+
+src_configure() {
+ local -a mycmakeargs=(
+ -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
+ -DBUILD_SHARED_LIBS:BOOL=ON
+ -DBUILD_TESTING:BOOL=$(usex test)
+ -DWITH_JAEGER:BOOL=$(usex jaeger)
+ -DWITH_PROMETHEUS:BOOL=$(usex prometheus)
+ )
+
+ cmake_src_configure
+}