Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Oct 2024 10:05:54 GMT
From:      Vasil Dimov <vd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 7541fc802d65 - main - net-p2p/clboss: upgrade from 0.13.3 to 0.14.0
Message-ID:  <202410091005.499A5sbC003398@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by vd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7541fc802d650f310fa0770d60b9edbfdb91ad04

commit 7541fc802d650f310fa0770d60b9edbfdb91ad04
Author:     Vasil Dimov <vd@FreeBSD.org>
AuthorDate: 2024-10-09 10:04:58 +0000
Commit:     Vasil Dimov <vd@FreeBSD.org>
CommitDate: 2024-10-09 10:05:40 +0000

    net-p2p/clboss: upgrade from 0.13.3 to 0.14.0
---
 net-p2p/clboss/Makefile                            | 10 +++-
 net-p2p/clboss/distinfo                            |  6 +-
 .../files/patch-program_invocation_name.diff       | 67 ++++++++++++++++++++++
 3 files changed, 79 insertions(+), 4 deletions(-)

diff --git a/net-p2p/clboss/Makefile b/net-p2p/clboss/Makefile
index 54902737255d..4291aa5b39c1 100644
--- a/net-p2p/clboss/Makefile
+++ b/net-p2p/clboss/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	clboss
 DISTVERSIONPREFIX=	v
 # To build from an arbitrary git commit comment DISTVERSION
-DISTVERSION=	0.13.3
+DISTVERSION=	0.14.0
 # and uncomment the following two lines (use for example -gf8d8348c where f8d8348c is a commit hash)
 #DISTVERSION=	0
 #DISTVERSIONSUFFIX=	-g0673c50e7
@@ -28,7 +28,10 @@ USES=		autoreconf \
 		pkgconfig \
 		sqlite:3
 
+PATCH_STRIP=	-p1
+
 CXXFLAGS+=	-Wno-deprecated-declarations
+LDFLAGS+=	-lexecinfo
 
 GNU_CONFIGURE=	yes
 
@@ -38,4 +41,9 @@ GH_ACCOUNT=	ZmnSCPxj
 SUB_FILES=	pkg-message
 PLIST_FILES=	bin/clboss
 
+post-patch:
+	echo "#pragma once" > ${WRKSRC}/commit_hash.h
+	echo "#define GIT_COMMIT_HASH \"d5955419e3bea3f0414affc4a4994043abc0a726\"" >> ${WRKSRC}/commit_hash.h
+	echo "#define GIT_DESCRIBE \"v0.14.0-0-gd595541-dirty\"" >> ${WRKSRC}/commit_hash.h
+
 .include <bsd.port.mk>
diff --git a/net-p2p/clboss/distinfo b/net-p2p/clboss/distinfo
index d0ea4ae8ed9c..4caef010f51f 100644
--- a/net-p2p/clboss/distinfo
+++ b/net-p2p/clboss/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1725363351
-SHA256 (ZmnSCPxj-clboss-v0.13.3_GH0.tar.gz) = 9b19cc3d6f5b444605df0a904481e87b686b14f155ce947061f815d35f59294a
-SIZE (ZmnSCPxj-clboss-v0.13.3_GH0.tar.gz) = 2948591
+TIMESTAMP = 1728188289
+SHA256 (ZmnSCPxj-clboss-v0.14.0_GH0.tar.gz) = 629216804fa9696ebdb90ae0f92ab3b96b90f25d10c0dab7fe1f36651a24de72
+SIZE (ZmnSCPxj-clboss-v0.14.0_GH0.tar.gz) = 2966085
diff --git a/net-p2p/clboss/files/patch-program_invocation_name.diff b/net-p2p/clboss/files/patch-program_invocation_name.diff
new file mode 100644
index 000000000000..ce366ddda9aa
--- /dev/null
+++ b/net-p2p/clboss/files/patch-program_invocation_name.diff
@@ -0,0 +1,67 @@
+diff --git i/Boss/Main.cpp w/Boss/Main.cpp
+index ff9bf8f..41dc6d5 100644
+--- i/Boss/Main.cpp
++++ w/Boss/Main.cpp
+@@ -17,12 +17,14 @@
+ #include<unistd.h>
+ 
+ #ifdef HAVE_CONFIG_H
+ # include "config.h"
+ #endif
+ 
++const char* g_argv0{"unknown"};
++
+ namespace Boss {
+ 
+ class Main::Impl {
+ private:
+ 	std::istream& cin;
+ 	std::ostream& cout;
+@@ -59,12 +61,13 @@ public:
+ 	      , exit_code(0)
+ 	      , is_version(false)
+ 	      , is_help(false)
+ 	      {
+ 		assert(argv.size() >= 1);
+ 		argv0 = argv[0];
++		g_argv0 = argv0.c_str();
+ 		if (argv.size() >= 2) {
+ 			auto argv1 = argv[1];
+ 			if (argv1 == "--version" || argv1 == "-V")
+ 				is_version = true;
+ 			else if (argv1 == "--debugger") {
+ 				auto os = std::ostringstream();
+diff --git i/Util/BacktraceException.hpp w/Util/BacktraceException.hpp
+index 313efb8..8d022e8 100644
+--- i/Util/BacktraceException.hpp
++++ w/Util/BacktraceException.hpp
+@@ -6,12 +6,14 @@
+ #include <iomanip>
+ #include <memory>
+ #include <sstream>
+ #include <vector>
+ #include <string.h>
+ 
++extern const char* g_argv0;
++
+ namespace Util {
+ 
+ /** class Util::BacktraceException<E>
+  *
+  * @brief A wrapper for an exception E which additionally stores a
+  * backtrace when it is constructed.  The backtrace formatting is
+@@ -77,13 +79,13 @@ private:
+ 	// Unfortunately there is no simple way to get a high quality
+ 	// backtrace using in-process libraries.  Instead for now we
+ 	// popen an addr2line process and use it's output.
+ 	std::string addr2line(void* addr) const {
+ 		char cmd[512];
+ 		snprintf(cmd, sizeof(cmd),
+-			 "addr2line -C -f -p -e %s %p", program_invocation_name, addr);
++			 "addr2line -C -f -p -e %s %p", g_argv0, addr);
+ 
+ 		std::array<char, 128> buffer;
+ 		std::string result;
+ 		std::unique_ptr<FILE, PcloseDeleter> pipe(popen(cmd, "r"));
+ 
+ 		if (!pipe) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410091005.499A5sbC003398>