pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cpptrace: add cpptrace 1.0.4



Module Name:	pkgsrc-wip
Committed By:	Paul Ripke <stix%stix.id.au@localhost>
Pushed By:	stix
Date:		Sun Sep 6 21:22:33 2026 +1000
Changeset:	d218a07bfe53d0ed28e919008e8d709b0ac6d41c

Added Files:
	cpptrace/COMMIT_MSG
	cpptrace/DESCR
	cpptrace/Makefile
	cpptrace/PLIST
	cpptrace/buildlink3.mk
	cpptrace/distinfo
	cpptrace/patches/patch-src_binary_elf.cpp
	cpptrace/patches/patch-src_binary_elf.hpp
	cpptrace/patches/patch-src_binary_module__base.cpp
	cpptrace/patches/patch-src_binary_object.cpp
	cpptrace/patches/patch-src_platform_platform.hpp
	cpptrace/patches/patch-src_platform_program__name.hpp

Log Message:
cpptrace: add cpptrace 1.0.4

Simple, portable, and self-contained stacktrace library for C++11+

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d218a07bfe53d0ed28e919008e8d709b0ac6d41c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 cpptrace/COMMIT_MSG                                |  5 ++++
 cpptrace/DESCR                                     |  3 +++
 cpptrace/Makefile                                  | 29 ++++++++++++++++++++++
 cpptrace/PLIST                                     | 20 +++++++++++++++
 cpptrace/buildlink3.mk                             | 16 ++++++++++++
 cpptrace/distinfo                                  | 11 ++++++++
 cpptrace/patches/patch-src_binary_elf.cpp          | 15 +++++++++++
 cpptrace/patches/patch-src_binary_elf.hpp          | 15 +++++++++++
 cpptrace/patches/patch-src_binary_module__base.cpp | 24 ++++++++++++++++++
 cpptrace/patches/patch-src_binary_object.cpp       | 24 ++++++++++++++++++
 cpptrace/patches/patch-src_platform_platform.hpp   | 24 ++++++++++++++++++
 .../patches/patch-src_platform_program__name.hpp   | 15 +++++++++++
 12 files changed, 201 insertions(+)

diffs:
diff --git a/cpptrace/COMMIT_MSG b/cpptrace/COMMIT_MSG
new file mode 100644
index 0000000000..bc5cef68f3
--- /dev/null
+++ b/cpptrace/COMMIT_MSG
@@ -0,0 +1,5 @@
+devel/cpptrace: Add cpptrace 1.0.4
+
+Cpptrace is a simple and portable C++ stacktrace library supporting C++11 and
+greater on Linux, macOS, and Windows including MinGW and Cygwin environments.
+The goal: Make stack traces simple for once.
diff --git a/cpptrace/DESCR b/cpptrace/DESCR
new file mode 100644
index 0000000000..dacf8abee4
--- /dev/null
+++ b/cpptrace/DESCR
@@ -0,0 +1,3 @@
+Cpptrace is a simple and portable C++ stacktrace library supporting C++11 and
+greater on Linux, macOS, and Windows including MinGW and Cygwin environments.
+The goal: Make stack traces simple for once.
diff --git a/cpptrace/Makefile b/cpptrace/Makefile
new file mode 100644
index 0000000000..9c143a9d00
--- /dev/null
+++ b/cpptrace/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD$
+
+DISTNAME=	cpptrace-1.0.4
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GITHUB:=jeremy-rifkin/}
+GITHUB_PROJECT=	cpptrace
+GITHUB_TAG=	v1.0.4
+
+MAINTAINER=	stix%stix.id.au@localhost
+HOMEPAGE=	https://github.com/jeremy-rifkin/cpptrace
+COMMENT=	Simple, portable, and self-contained stacktrace library for C++11+
+LICENSE=	mit
+
+USE_TOOLS+=		pkg-config
+USE_LANGUAGES=		c c++
+USE_CXX_FEATURES=	c++11
+
+CMAKE_CONFIGURE_ARGS+=	-DCMAKE_MODULE_PATH:STRING=${WRKSRC}/cmake
+CMAKE_CONFIGURE_ARGS+=	-DCPPTRACE_USE_EXTERNAL_ZSTD:BOOL=TRUE
+CMAKE_CONFIGURE_ARGS+=	-DCPPTRACE_USE_EXTERNAL_LIBDWARF:BOOL=TRUE
+CMAKE_CONFIGURE_ARGS+=	-DCPPTRACE_FIND_LIBDWARF_WITH_PKGCONFIG:BOOL=TRUE
+
+.include "../../mk/bsd.prefs.mk"
+
+.include "../../archivers/zstd/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../devel/libdwarf/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/cpptrace/PLIST b/cpptrace/PLIST
new file mode 100644
index 0000000000..df02ad1e57
--- /dev/null
+++ b/cpptrace/PLIST
@@ -0,0 +1,20 @@
+@comment $NetBSD$
+include/cpptrace/basic.hpp
+include/cpptrace/cpptrace.hpp
+include/cpptrace/exceptions.hpp
+include/cpptrace/exceptions_macros.hpp
+include/cpptrace/formatting.hpp
+include/cpptrace/forward.hpp
+include/cpptrace/from_current.hpp
+include/cpptrace/from_current_macros.hpp
+include/cpptrace/gdb_jit.hpp
+include/cpptrace/io.hpp
+include/cpptrace/utils.hpp
+include/cpptrace/version.hpp
+include/ctrace/ctrace.h
+lib/cmake/cpptrace/Findzstd.cmake
+lib/cmake/cpptrace/cpptrace-config-version.cmake
+lib/cmake/cpptrace/cpptrace-config.cmake
+lib/cmake/cpptrace/cpptrace-targets-noconfig.cmake
+lib/cmake/cpptrace/cpptrace-targets.cmake
+lib/libcpptrace.a
diff --git a/cpptrace/buildlink3.mk b/cpptrace/buildlink3.mk
new file mode 100644
index 0000000000..b0e57dd524
--- /dev/null
+++ b/cpptrace/buildlink3.mk
@@ -0,0 +1,16 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	cpptrace
+
+.if !defined(CPPTRACE_BUILDLINK3_MK)
+CPPTRACE_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.cpptrace+=	cpptrace>=1.0.4
+BUILDLINK_PKGSRCDIR.cpptrace?=		../../wip/cpptrace
+
+.include "../../archivers/zstd/buildlink3.mk"
+.include "../../devel/libdwarf/buildlink3.mk"
+
+.endif	# CPPTRACE_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-cpptrace
diff --git a/cpptrace/distinfo b/cpptrace/distinfo
new file mode 100644
index 0000000000..f9afbb0475
--- /dev/null
+++ b/cpptrace/distinfo
@@ -0,0 +1,11 @@
+$NetBSD$
+
+BLAKE2s (cpptrace-1.0.4.tar.gz) = 9fffa3470c2d2187b48050e3f5a49a66317b88bb180567cb58c5a379492f9d25
+SHA512 (cpptrace-1.0.4.tar.gz) = e88edddbcdd423d49ed3adb02cf70580ee3a56065db4d81ca69d3f9f6d9b64ac27734842ca3b6d8ff45a548c25900a88f979e39d777af422a153e586d26ac5b5
+Size (cpptrace-1.0.4.tar.gz) = 494169 bytes
+SHA1 (patch-src_binary_elf.cpp) = 580c2512c8f9eb9596f86397e960c8f0f2928d7e
+SHA1 (patch-src_binary_elf.hpp) = dac62f83274772fa777f618c1830c950ac6826d4
+SHA1 (patch-src_binary_module__base.cpp) = 29248f715f2dfe802b839f76641044393958a389
+SHA1 (patch-src_binary_object.cpp) = d7f13573c057c3526af7858da7f6e749075e3c2f
+SHA1 (patch-src_platform_platform.hpp) = bf2aadf7aaeaa2cf01e145f7fe2ff48ec5798404
+SHA1 (patch-src_platform_program__name.hpp) = 535cd463a2b4817fdca7237cf3f3afec3d3aef2c
diff --git a/cpptrace/patches/patch-src_binary_elf.cpp b/cpptrace/patches/patch-src_binary_elf.cpp
new file mode 100644
index 0000000000..52dca79865
--- /dev/null
+++ b/cpptrace/patches/patch-src_binary_elf.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Treat NetBSD the same as Linux.
+
+--- src/binary/elf.cpp.orig	2026-09-06 08:54:39.304728113 +0000
++++ src/binary/elf.cpp
+@@ -7,7 +7,7 @@
+ #include "utils/io/file.hpp"
+ #include "utils/string_view.hpp"
+ 
+-#if IS_LINUX
++#if IS_LINUX || IS_NETBSD
+ 
+ #include <array>
+ #include <cstdint>
diff --git a/cpptrace/patches/patch-src_binary_elf.hpp b/cpptrace/patches/patch-src_binary_elf.hpp
new file mode 100644
index 0000000000..01f15ff876
--- /dev/null
+++ b/cpptrace/patches/patch-src_binary_elf.hpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Treat NetBSD the same as Linux.
+
+--- src/binary/elf.hpp.orig	2026-09-06 08:54:12.816180746 +0000
++++ src/binary/elf.hpp
+@@ -7,7 +7,7 @@
+ #include "utils/span.hpp"
+ #include "utils/utils.hpp"
+ 
+-#if IS_LINUX
++#if IS_LINUX || IS_NETBSD
+ 
+ #include <cstdint>
+ #include <string>
diff --git a/cpptrace/patches/patch-src_binary_module__base.cpp b/cpptrace/patches/patch-src_binary_module__base.cpp
new file mode 100644
index 0000000000..d16d0dbc84
--- /dev/null
+++ b/cpptrace/patches/patch-src_binary_module__base.cpp
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Treat NetBSD the same as Linux.
+
+--- src/binary/module_base.cpp.orig	2026-09-06 08:40:24.216792524 +0000
++++ src/binary/module_base.cpp
+@@ -7,7 +7,7 @@
+ #include <mutex>
+ #include <unordered_map>
+ 
+-#if IS_LINUX || IS_APPLE
++#if IS_LINUX || IS_NETBSD || IS_APPLE
+  #include <unistd.h>
+  #include <dlfcn.h>
+  #if IS_APPLE
+@@ -21,7 +21,7 @@
+ 
+ CPPTRACE_BEGIN_NAMESPACE
+ namespace detail {
+-    #if IS_LINUX
++    #if IS_LINUX || IS_NETBSD
+     Result<std::uintptr_t, internal_error> get_module_image_base(const std::string& object_path) {
+         static std::mutex mutex;
+         std::lock_guard<std::mutex> lock(mutex);
diff --git a/cpptrace/patches/patch-src_binary_object.cpp b/cpptrace/patches/patch-src_binary_object.cpp
new file mode 100644
index 0000000000..cf6998e571
--- /dev/null
+++ b/cpptrace/patches/patch-src_binary_object.cpp
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Treat NetBSD the same as Linux.
+
+--- src/binary/object.cpp.orig	2026-09-06 09:09:56.442014907 +0000
++++ src/binary/object.cpp
+@@ -11,7 +11,7 @@
+ #include <mutex>
+ #include <unordered_map>
+ 
+-#if IS_LINUX || IS_APPLE
++#if IS_LINUX || IS_NETBSD || IS_APPLE
+  #include <unistd.h>
+  #include <dlfcn.h>
+  #if IS_LINUX
+@@ -26,7 +26,7 @@
+ 
+ CPPTRACE_BEGIN_NAMESPACE
+ namespace detail {
+-    #if IS_LINUX || IS_APPLE
++    #if IS_LINUX || IS_NETBSD || IS_APPLE
+     #if defined(CPPTRACE_HAS_DL_FIND_OBJECT) || defined(CPPTRACE_HAS_DLADDR1)
+     std::string resolve_l_name(const char* l_name) {
+         if(l_name != nullptr && l_name[0] != 0) {
diff --git a/cpptrace/patches/patch-src_platform_platform.hpp b/cpptrace/patches/patch-src_platform_platform.hpp
new file mode 100644
index 0000000000..ddfa2df396
--- /dev/null
+++ b/cpptrace/patches/patch-src_platform_platform.hpp
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Add platform support for NetBSD.
+
+--- src/platform/platform.hpp.orig	2025-07-25 05:41:51.000000000 +0000
++++ src/platform/platform.hpp
+@@ -4,6 +4,7 @@
+ #define IS_WINDOWS 0
+ #define IS_LINUX 0
+ #define IS_APPLE 0
++#define IS_NETBSD 0
+ 
+ #if defined(_WIN32)
+  #undef IS_WINDOWS
+@@ -14,6 +15,9 @@
+ #elif defined(__APPLE__)
+  #undef IS_APPLE
+  #define IS_APPLE 1
++#elif defined(__NetBSD__)
++ #undef IS_NETBSD
++ #define IS_NETBSD 1
+ #else
+  #error "Unexpected platform"
+ #endif
diff --git a/cpptrace/patches/patch-src_platform_program__name.hpp b/cpptrace/patches/patch-src_platform_program__name.hpp
new file mode 100644
index 0000000000..4f3b4187d7
--- /dev/null
+++ b/cpptrace/patches/patch-src_platform_program__name.hpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Treat NetBSD the same as Linux.
+
+--- src/platform/program_name.hpp.orig	2025-07-25 05:41:51.000000000 +0000
++++ src/platform/program_name.hpp
+@@ -66,7 +66,7 @@ namespace detail {
+ }
+ CPPTRACE_END_NAMESPACE
+ 
+-#elif IS_LINUX
++#elif IS_LINUX || IS_NETBSD
+ 
+ #include <sys/types.h>
+ #include <unistd.h>


Home | Main Index | Thread Index | Old Index