From 24910e65950dd127df7172e6228e193fe4647b87 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 4 Jun 2024 03:06:20 -0700 Subject: [PATCH 1/4] [sentry-native] Fix linux build error --- ports/sentry-native/fix-crashpad-pthread.patch | 17 +++++++++++++++++ ports/sentry-native/portfile.cmake | 1 + ports/sentry-native/vcpkg.json | 1 + 3 files changed, 19 insertions(+) create mode 100644 ports/sentry-native/fix-crashpad-pthread.patch diff --git a/ports/sentry-native/fix-crashpad-pthread.patch b/ports/sentry-native/fix-crashpad-pthread.patch new file mode 100644 index 00000000000000..ed7236a59d9810 --- /dev/null +++ b/ports/sentry-native/fix-crashpad-pthread.patch @@ -0,0 +1,17 @@ +diff --git a/external/crashpad/handler/CMakeLists.txt b/external/crashpad/handler/CMakeLists.txt +index be0e544..6241407 100644 +--- a/external/crashpad/handler/CMakeLists.txt ++++ b/external/crashpad/handler/CMakeLists.txt +@@ -89,12 +89,6 @@ if(NOT IOS) + main.cc + ) + +- if(LINUX) +- target_sources(crashpad_handler PRIVATE +- ../client/pthread_create_linux.cc +- ) +- endif() +- + target_link_libraries(crashpad_handler + PRIVATE + $ diff --git a/ports/sentry-native/portfile.cmake b/ports/sentry-native/portfile.cmake index 1e283420c39576..0bc669c2c9bc2f 100644 --- a/ports/sentry-native/portfile.cmake +++ b/ports/sentry-native/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_extract_source_archive( PATCHES fix-config-cmake.patch fix-crashpad-wer.patch + fix-crashpad-pthread.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/external/crashpad/third_party/zlib/zlib") diff --git a/ports/sentry-native/vcpkg.json b/ports/sentry-native/vcpkg.json index 95d3e8ea550945..7b7d281b282f5c 100644 --- a/ports/sentry-native/vcpkg.json +++ b/ports/sentry-native/vcpkg.json @@ -1,6 +1,7 @@ { "name": "sentry-native", "version": "0.7.5", + "port-version": 1, "description": "Sentry SDK for C, C++ and native applications.", "homepage": "https://sentry.io/", "license": "MIT", From e2b8ac92ad584477873cc8cbb17b0ce522809bd4 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 4 Jun 2024 03:18:31 -0700 Subject: [PATCH 2/4] update version --- versions/baseline.json | 2 +- versions/s-/sentry-native.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 7ec16c7d3336a9..b49024a4eb7709 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8026,7 +8026,7 @@ }, "sentry-native": { "baseline": "0.7.5", - "port-version": 0 + "port-version": 1 }, "septag-dmon": { "baseline": "2022-02-08", diff --git a/versions/s-/sentry-native.json b/versions/s-/sentry-native.json index 0bde3d3befe225..3467d1b7471c15 100644 --- a/versions/s-/sentry-native.json +++ b/versions/s-/sentry-native.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b938269bf936da1e91722e640e0a69a300b89458", + "version": "0.7.5", + "port-version": 1 + }, { "git-tree": "83ff49b00c2fd8159701cc2f8489a10a6959227c", "version": "0.7.5", From 254405cd397c1d2dcd1bd53f9f0a2b613e210142 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 5 Jun 2024 01:32:15 -0700 Subject: [PATCH 3/4] update patch --- .../sentry-native/fix-crashpad-pthread.patch | 17 ------------ ports/sentry-native/fix-usage-runtime.patch | 26 +++++++++++++++++++ ports/sentry-native/portfile.cmake | 2 +- 3 files changed, 27 insertions(+), 18 deletions(-) delete mode 100644 ports/sentry-native/fix-crashpad-pthread.patch create mode 100644 ports/sentry-native/fix-usage-runtime.patch diff --git a/ports/sentry-native/fix-crashpad-pthread.patch b/ports/sentry-native/fix-crashpad-pthread.patch deleted file mode 100644 index ed7236a59d9810..00000000000000 --- a/ports/sentry-native/fix-crashpad-pthread.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/external/crashpad/handler/CMakeLists.txt b/external/crashpad/handler/CMakeLists.txt -index be0e544..6241407 100644 ---- a/external/crashpad/handler/CMakeLists.txt -+++ b/external/crashpad/handler/CMakeLists.txt -@@ -89,12 +89,6 @@ if(NOT IOS) - main.cc - ) - -- if(LINUX) -- target_sources(crashpad_handler PRIVATE -- ../client/pthread_create_linux.cc -- ) -- endif() -- - target_link_libraries(crashpad_handler - PRIVATE - $ diff --git a/ports/sentry-native/fix-usage-runtime.patch b/ports/sentry-native/fix-usage-runtime.patch new file mode 100644 index 00000000000000..96a1e7bbbb76d6 --- /dev/null +++ b/ports/sentry-native/fix-usage-runtime.patch @@ -0,0 +1,26 @@ +diff --git a/external/crashpad/handler/CMakeLists.txt b/external/crashpad/handler/CMakeLists.txt +index be0e544..b0d44af 100644 +--- a/external/crashpad/handler/CMakeLists.txt ++++ b/external/crashpad/handler/CMakeLists.txt +@@ -89,7 +89,7 @@ if(NOT IOS) + main.cc + ) + +- if(LINUX) ++ if(LINUX AND BUILD_SHARED_LIBS) + target_sources(crashpad_handler PRIVATE + ../client/pthread_create_linux.cc + ) +diff --git a/sentry-config.cmake.in b/sentry-config.cmake.in +index 8840f5d..af3e84c 100644 +--- a/sentry-config.cmake.in ++++ b/sentry-config.cmake.in +@@ -9,7 +9,7 @@ set(SENTRY_LINK_PTHREAD @SENTRY_LINK_PTHREAD@) + + if(SENTRY_BACKEND STREQUAL "crashpad" AND NOT SENTRY_BUILD_SHARED_LIBS) + include("${CMAKE_CURRENT_LIST_DIR}/sentry_crashpad-targets.cmake") +- if(NOT MSVC AND NOT SENTRY_BUILD_SHARED_LIBS) ++ if(NOT SENTRY_BUILD_SHARED_LIBS) + find_dependency(ZLIB) + endif() + endif() diff --git a/ports/sentry-native/portfile.cmake b/ports/sentry-native/portfile.cmake index 0bc669c2c9bc2f..5e7b3641aa0f8d 100644 --- a/ports/sentry-native/portfile.cmake +++ b/ports/sentry-native/portfile.cmake @@ -11,7 +11,7 @@ vcpkg_extract_source_archive( PATCHES fix-config-cmake.patch fix-crashpad-wer.patch - fix-crashpad-pthread.patch + fix-usage-runtime.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/external/crashpad/third_party/zlib/zlib") From 42d8cfde4017197e7fc71c417349c8275bf2a6a7 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 5 Jun 2024 01:34:46 -0700 Subject: [PATCH 4/4] update version --- versions/s-/sentry-native.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/s-/sentry-native.json b/versions/s-/sentry-native.json index 3467d1b7471c15..97161fe9aa20ef 100644 --- a/versions/s-/sentry-native.json +++ b/versions/s-/sentry-native.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b938269bf936da1e91722e640e0a69a300b89458", + "git-tree": "b7ec5e8b622f2026bb79fd536c893742ff48afa0", "version": "0.7.5", "port-version": 1 },