Skip to content

Truly independent web browser

Meta: Update cpptrace to version 1.0.4#2

Timothy Flynn8f0a213e60cb
diff --git a/Meta/CMake/flatpak/org.ladybird.Ladybird.json b/Meta/CMake/flatpak/org.ladybird.Ladybird.json
index 8711702eb19..958d78ad63d 100644
--- a/Meta/CMake/flatpak/org.ladybird.Ladybird.json
+++ b/Meta/CMake/flatpak/org.ladybird.Ladybird.json
@@ -601,7 +601,7 @@
{
"type": "git",
"url": "https://github.com/jeremy-rifkin/cpptrace.git",
- "tag": "v1.0.2"
+ "tag": "v1.0.4"
}
],
"config-opts": [
diff --git a/Meta/CMake/vcpkg/overlay-ports/cpptrace/emscripten-platform.diff b/Meta/CMake/vcpkg/overlay-ports/cpptrace/emscripten-platform.diff
new file mode 100644
index 00000000000..8d06725727f
--- /dev/null
+++ b/Meta/CMake/vcpkg/overlay-ports/cpptrace/emscripten-platform.diff
@@ -0,0 +1,12 @@
+diff --git a/src/platform/platform.hpp b/src/platform/platform.hpp
+--- a/src/platform/platform.hpp
++++ b/src/platform/platform.hpp
+@@ -8,7 +8,7 @@
+ #if defined(_WIN32)
+ #undef IS_WINDOWS
+ #define IS_WINDOWS 1
+-#elif defined(__linux)
++#elif defined(__linux) || defined(__EMSCRIPTEN__)
+ #undef IS_LINUX
+ #define IS_LINUX 1
+ #elif defined(__APPLE__)
diff --git a/Meta/CMake/vcpkg/overlay-ports/cpptrace/portfile.cmake b/Meta/CMake/vcpkg/overlay-ports/cpptrace/portfile.cmake
index 75f7551be62..4e0061b6be4 100644
--- a/Meta/CMake/vcpkg/overlay-ports/cpptrace/portfile.cmake
+++ b/Meta/CMake/vcpkg/overlay-ports/cpptrace/portfile.cmake
@@ -2,15 +2,38 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jeremy-rifkin/cpptrace
REF "v${VERSION}"
- SHA512 4ae394fb3c21149bf2441a754eebe639e6a5534927426b6507806c7bee0b1c982e047c972904d472f1c660adb5be3881e7e3a6eddd18e4e9d376ae3855d50a7c
+ SHA512 e88edddbcdd423d49ed3adb02cf70580ee3a56065db4d81ca69d3f9f6d9b64ac27734842ca3b6d8ff45a548c25900a88f979e39d777af422a153e586d26ac5b5
HEAD_REF main
PATCHES
- delay.patch
+ emscripten-platform.diff
+ delay.patch
)
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ libunwind CPPTRACE_UNWIND_WITH_LIBUNWIND
+)
+
+if(VCPKG_TARGET_IS_EMSCRIPTEN)
+ # Emscripten exposes no stack-unwinding or symbol back-end, so build a no-op tracer.
+ set(BACKEND_OPTIONS
+ -DCPPTRACE_UNWIND_WITH_NOTHING=ON
+ -DCPPTRACE_GET_SYMBOLS_WITH_NOTHING=ON
+ )
+else()
+ set(BACKEND_OPTIONS
+ -DCPPTRACE_USE_EXTERNAL_LIBDWARF=ON
+ )
+endif()
+
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
- OPTIONS -DCPPTRACE_USE_EXTERNAL_LIBDWARF=ON -DCPPTRACE_USE_EXTERNAL_ZSTD=ON -DCPPTRACE_VCPKG=ON -DCPPTRACE_DELAYLOAD_DBGHELP=ON
+ OPTIONS
+ -DCPPTRACE_USE_EXTERNAL_ZSTD=ON
+ -DCPPTRACE_VCPKG=ON
+ -DCPPTRACE_DELAYLOAD_DBGHELP=ON
+ ${BACKEND_OPTIONS}
+ ${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
diff --git a/Meta/CMake/vcpkg/overlay-ports/cpptrace/vcpkg.json b/Meta/CMake/vcpkg/overlay-ports/cpptrace/vcpkg.json
index bb54c842158..86b1e9c31c0 100644
--- a/Meta/CMake/vcpkg/overlay-ports/cpptrace/vcpkg.json
+++ b/Meta/CMake/vcpkg/overlay-ports/cpptrace/vcpkg.json
@@ -1,6 +1,7 @@
{
"name": "cpptrace",
- "version": "1.0.2",
+ "version": "1.0.4",
+ "port-version": 2,
"description": "Simple, portable, and self-contained stacktrace library for C++11 and newer",
"homepage": "https://github.com/jeremy-rifkin/cpptrace",
"license": "MIT",
@@ -8,7 +9,7 @@
"dependencies": [
{
"name": "libdwarf",
- "platform": "!windows | mingw"
+ "platform": "(!windows | mingw) & !emscripten"
},
{
"name": "vcpkg-cmake",
@@ -18,5 +19,17 @@
"name": "vcpkg-cmake-config",
"host": true
}
- ]
+ ],
+ "features": {
+ "libunwind": {
+ "description": "Use libunwind for stack unwinding",
+ "supports": "linux",
+ "dependencies": [
+ {
+ "name": "libunwind",
+ "platform": "linux"
+ }
+ ]
+ }
+ }
}
diff --git a/vcpkg.json b/vcpkg.json
index a4ecd1591a6..1095d18c006 100644
--- a/vcpkg.json
+++ b/vcpkg.json
@@ -258,7 +258,7 @@
},
{
"name": "cpptrace",
- "version": "1.0.2#0"
+ "version": "1.0.4#2"
},
{
"name": "curl",