forked from macports/macports-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PDAL: enable use of system libunwind, drop dependency of port
This doesn't solve the problem with Xcode 15, automatically linking to MacPorts' libunwind, but it makes it possible to some degree avoid installing the port in the first place. See https://trac.macports.org/ticket/68250 See https://trac.macports.org/ticket/66250
- Loading branch information
Showing
2 changed files
with
82 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
Committed 2023-09-29 upstreams to master: | ||
https://github.com/PDAL/PDAL/commit/a14f8648a2f43296e032901d75969ce9070dc563 | ||
|
||
--- cmake/modules/FindLibunwind.cmake.orig | ||
+++ cmake/modules/FindLibunwind.cmake | ||
@@ -2,14 +2,21 @@ | ||
# ~~~~~~~~~ | ||
# CMake module to search for LIBUNWIND | ||
# | ||
- | ||
-find_library(LIBUNWIND_LIBRARY unwind) | ||
+ | ||
find_path(LIBUNWIND_INCLUDE_DIR libunwind.h) | ||
|
||
-find_package_handle_standard_args(LIBUNWIND REQUIRED_VARS | ||
- LIBUNWIND_LIBRARY LIBUNWIND_INCLUDE_DIR) | ||
+if(NOT APPLE) | ||
+ find_library(LIBUNWIND_LIBRARY unwind) | ||
+ find_package_handle_standard_args( | ||
+ LIBUNWIND REQUIRED_VARS LIBUNWIND_LIBRARY LIBUNWIND_INCLUDE_DIR) | ||
+else() | ||
+ find_package_handle_standard_args(LIBUNWIND | ||
+ REQUIRED_VARS LIBUNWIND_INCLUDE_DIR) | ||
+endif() | ||
|
||
-if (LIBUNWIND_FOUND) | ||
- set(LIBUNWIND_LIBRARIES ${LIBUNWIND_LIBRARY}) | ||
+if(LIBUNWIND_FOUND) | ||
+ if(LIBUNWIND_LIBRARY) | ||
+ set(LIBUNWIND_LIBRARIES ${LIBUNWIND_LIBRARY}) | ||
+ endif() | ||
set(LIBUNWIND_INCLUDE_DIRS ${LIBUNWIND_INCLUDE_DIR}) | ||
endif() | ||
|
||
|
||
Make backtrace optional, committed 2023-10-02 upstreams to master: | ||
https://github.com/PDAL/PDAL/commit/95c5e378d6b31b88cbdbabcb75a71ffe9d6a1c10 | ||
|
||
--- cmake/options.cmake.orig | ||
+++ cmake/options.cmake | ||
@@ -109,6 +109,11 @@ | ||
"Choose if PDAL should be built with Abseil support for testing" FALSE) | ||
add_feature_info("Abseil debugging support " WITH_ABSEIL "unit tests") | ||
|
||
+option(WITH_BACKTRACE | ||
+ "Build with backtrace" ON) | ||
+add_feature_info("Backtrace" WITH_BACKTRACE | ||
+ "build with backtrace (Libunwind/Libexecinfo) support") | ||
+ | ||
# | ||
# Choose dependent options | ||
# | ||
|
||
|
||
--- pdal/util/CMakeLists.txt.orig | ||
+++ pdal/util/CMakeLists.txt | ||
@@ -11,10 +11,10 @@ | ||
include(${PDAL_CMAKE_DIR}/unwind.cmake) | ||
include(${PDAL_CMAKE_DIR}/utfcpp.cmake) | ||
|
||
-if(LIBUNWIND_FOUND) | ||
+if(LIBUNWIND_FOUND AND WITH_BACKTRACE) | ||
set(BACKTRACE_SOURCE BacktraceUnwind.cpp) | ||
set(BACKTRACE_LIBRARIES ${LIBUNWIND_LIBRARIES} ${CMAKE_DL_LIBS}) | ||
-elseif(LIBEXECINFO_FOUND) | ||
+elseif(LIBEXECINFO_FOUND AND WITH_BACKTRACE) | ||
set(BACKTRACE_SOURCE BacktraceExecinfo.cpp) | ||
set(BACKTRACE_LIBRARIES ${LIBEXECINFO_LIBRARIES} ${CMAKE_DL_LIBS}) | ||
else() | ||
|