public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/opentelemetry-cpp/files/, dev-cpp/opentelemetry-cpp/
@ 2022-05-04  6:33 Patrick McLean
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McLean @ 2022-05-04  6:33 UTC (permalink / raw
  To: gentoo-commits

commit:     2972cf1653cb4adbd4b6dea1722a0300b4b484b1
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Wed May  4 06:28:06 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed May  4 06:28:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2972cf16

dev-cpp/opentelemetry-cpp: new package, add 1.3.0

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-cpp/opentelemetry-cpp/Manifest                 |  1 +
 .../files/opentelemetry-cpp-1.3.0-tests.patch      | 92 ++++++++++++++++++++++
 dev-cpp/opentelemetry-cpp/metadata.xml             | 12 +++
 .../opentelemetry-cpp-1.3.0.ebuild                 | 48 +++++++++++
 4 files changed, 153 insertions(+)

diff --git a/dev-cpp/opentelemetry-cpp/Manifest b/dev-cpp/opentelemetry-cpp/Manifest
new file mode 100644
index 000000000000..81ee9b9a56ff
--- /dev/null
+++ b/dev-cpp/opentelemetry-cpp/Manifest
@@ -0,0 +1 @@
+DIST opentelemetry-cpp-1.3.0.tar.gz 710030 BLAKE2B 56aa3213fd9c9ac5266197c2ca417f5ff181ca28016033c9320e63122eaf9a53bdb265e1778227a9036bc42f8837755a3009cb23610268bc03b9fb24b3844c82 SHA512 38f613c208ec847c8bf7765732d8198fcc427c293a929945d72c2f739e89d2a0ad36be4d94cc3c1b77fd7b1f1d1e5d8bdb38094a493ba3da3125281cd1016836

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.ebuild b/dev-cpp/opentelemetry-cpp/opentelemetry-cpp-1.3.0.ebuild
new file mode 100644
index 000000000000..011b5b0e193c
--- /dev/null
+++ b/dev-cpp/opentelemetry-cpp/opentelemetry-cpp-1.3.0.ebuild
@@ -0,0 +1,48 @@
+# 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"
+IUSE="+jaeger prometheus test"
+
+RDEPEND="
+	net-misc/curl:=
+"
+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
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/opentelemetry-cpp/files/, dev-cpp/opentelemetry-cpp/
@ 2022-08-19 18:31 Patrick McLean
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McLean @ 2022-08-19 18:31 UTC (permalink / raw
  To: gentoo-commits

commit:     67fb969bd8947f7545dd1498592113a594f7cfc5
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 19 18:30:20 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Aug 19 18:31:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67fb969b

dev-cpp/opentelemetry-cpp: add 1.6.0, fix bug #865029

Closes: https://bugs.gentoo.org/865029
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-cpp/opentelemetry-cpp/Manifest                 |  1 +
 ...entelemetry-cpp-1.6.0-dont-install-nosend.patch | 15 +++++++
 .../opentelemetry-cpp-1.6.0.ebuild                 | 52 ++++++++++++++++++++++
 3 files changed, 68 insertions(+)

diff --git a/dev-cpp/opentelemetry-cpp/Manifest b/dev-cpp/opentelemetry-cpp/Manifest
index 47236b2a0ca7..d1f17d8833bf 100644
--- a/dev-cpp/opentelemetry-cpp/Manifest
+++ b/dev-cpp/opentelemetry-cpp/Manifest
@@ -1,3 +1,4 @@
 DIST opentelemetry-cpp-1.3.0.tar.gz 710030 BLAKE2B 56aa3213fd9c9ac5266197c2ca417f5ff181ca28016033c9320e63122eaf9a53bdb265e1778227a9036bc42f8837755a3009cb23610268bc03b9fb24b3844c82 SHA512 38f613c208ec847c8bf7765732d8198fcc427c293a929945d72c2f739e89d2a0ad36be4d94cc3c1b77fd7b1f1d1e5d8bdb38094a493ba3da3125281cd1016836
 DIST opentelemetry-cpp-1.4.0.tar.gz 722520 BLAKE2B c34867846708218e5ffcff9cdaa275e0c43201f681a68ad697d9f83ac04b7fdc6cdb69d942274cbe200b241e407ba11218c7e92da4f9adf4490e89c06388347f SHA512 a2339c0f9b2dc0d4f1964536a844241436bd68774445a0eab6e89e51965e01d3c40d2aa776d751eb497c50e9fdaa4e0023095efb14c8abbd6bbe23a2596eb3c9
 DIST opentelemetry-cpp-1.5.0.tar.gz 782336 BLAKE2B 11153dc8a219d3916c3d8aeb7575c2a98d5e8e094cbada096bfa03dd465a08a4fb09139ad22400e4b5693a5d740b8095618858256a2c5679ae080e4e3db16005 SHA512 a506973223c49531d4b0c3febf5734dfe2e44c22f8854ed96935cda0783a14d0819cc3dbb2d3f8373f960f27acf78aafc777ee76aeb14828df9c4b4434e4fe6f
+DIST opentelemetry-cpp-1.6.0.tar.gz 790774 BLAKE2B 9512c092bfe49c9da82eff3950204c1f2eb654df2ed428e58ceb8877d15d80d9978fa6da37f7780352538c74de04bac69660528b255dfbce743f89b9d4020dd2 SHA512 ae0777451a3d2d676afd9f3142ab78c7afb08474f6038bd810ff0ee30fee6695e10100c901e7ffadf3faf16c7d19622acdea414cd720be8572f7720f2d528628

diff --git a/dev-cpp/opentelemetry-cpp/files/opentelemetry-cpp-1.6.0-dont-install-nosend.patch b/dev-cpp/opentelemetry-cpp/files/opentelemetry-cpp-1.6.0-dont-install-nosend.patch
new file mode 100644
index 000000000000..f3d757f2c5f4
--- /dev/null
+++ b/dev-cpp/opentelemetry-cpp/files/opentelemetry-cpp-1.6.0-dont-install-nosend.patch
@@ -0,0 +1,15 @@
+diff --git a/ext/src/http/client/nosend/CMakeLists.txt b/ext/src/http/client/nosend/CMakeLists.txt
+index 497daeb3..949bfd36 100644
+--- a/ext/src/http/client/nosend/CMakeLists.txt
++++ b/ext/src/http/client/nosend/CMakeLists.txt
+@@ -27,10 +27,4 @@ if(${BUILD_TESTING})
+   target_link_libraries(http_client_nosend ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIB}
+                         opentelemetry_ext)
+ 
+-  install(
+-    TARGETS http_client_nosend
+-    EXPORT "${PROJECT_NAME}-target"
+-    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+-    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()

diff --git a/dev-cpp/opentelemetry-cpp/opentelemetry-cpp-1.6.0.ebuild b/dev-cpp/opentelemetry-cpp/opentelemetry-cpp-1.6.0.ebuild
new file mode 100644
index 000000000000..d007ad4f6418
--- /dev/null
+++ b/dev-cpp/opentelemetry-cpp/opentelemetry-cpp-1.6.0.ebuild
@@ -0,0 +1,52 @@
+# 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.5.0-tests.patch"
+	# bug #865029
+	"${FILESDIR}/opentelemetry-cpp-1.6.0-dont-install-nosend.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
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-19 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-04  6:33 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/opentelemetry-cpp/files/, dev-cpp/opentelemetry-cpp/ Patrick McLean
  -- strict thread matches above, loose matches on Subject: below --
2022-08-19 18:31 Patrick McLean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox