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,41 +1,49 @@ 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 CATEGORIES= net-p2p finance .if defined(DISTVERSIONSUFFIX) PKGNAMESUFFIX= -devel .endif MAINTAINER= vd@FreeBSD.org COMMENT= Core Lightning Node Manager WWW= https://github.com/ZmnSCPxj/clboss LICENSE= MIT BUILD_DEPENDS= autoconf-archive>=0:devel/autoconf-archive LIB_DEPENDS= libcurl.so:ftp/curl \ libev.so:devel/libev RUN_DEPENDS= lightningd:net-p2p/c-lightning USES= autoreconf \ compiler:c11 \ gmake \ libtool \ pkgconfig \ sqlite:3 +PATCH_STRIP= -p1 + CXXFLAGS+= -Wno-deprecated-declarations +LDFLAGS+= -lexecinfo GNU_CONFIGURE= yes USE_GITHUB= yes 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 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 + + #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 + #include + #include + #include + #include + ++extern const char* g_argv0; ++ + namespace Util { + + /** class Util::BacktraceException + * + * @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 buffer; + std::string result; + std::unique_ptr pipe(popen(cmd, "r")); + + if (!pipe) {