mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
EternalTerminal: use external libexecinfo on musl
This commit is contained in:
parent
3cdac25482
commit
a26eb37285
2 changed files with 8 additions and 48 deletions
|
@ -1,43 +0,0 @@
|
||||||
diff --git CMakeLists.txt CMakeLists.txt
|
|
||||||
index b277dff..ad24b56 100644
|
|
||||||
--- CMakeLists.txt 2020-07-31 18:06:43.000000000 -0400
|
|
||||||
+++ CMakeLists.txt 2020-08-16 08:10:46.101626299 -0400
|
|
||||||
@@ -143,6 +143,12 @@
|
|
||||||
${UTEMPTER_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
+include(CheckIncludeFileCXX)
|
|
||||||
+check_include_file("execinfo.h" HAVE_EXECINFO_H)
|
|
||||||
+if (HAVE_EXECINFO_H)
|
|
||||||
+ add_definitions(-DHAVE_EXECINFO_H)
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
add_library(
|
|
||||||
et-lib
|
|
||||||
STATIC
|
|
||||||
diff --git external_imported/easyloggingpp/src/easylogging++.cc external_imported/easyloggingpp/src/easylogging++.cc
|
|
||||||
index d763ee7..02e8b75 100644
|
|
||||||
--- external_imported/easyloggingpp/src/easylogging++.cc
|
|
||||||
+++ external_imported/easyloggingpp/src/easylogging++.cc
|
|
||||||
@@ -2786,7 +2786,7 @@ std::ostream& operator<<(std::ostream& os, const StackTrace& st) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void StackTrace::generateNew(void) {
|
|
||||||
-#if ELPP_STACKTRACE
|
|
||||||
+#ifdef HAVE_EXECINFO_H
|
|
||||||
m_stack.clear();
|
|
||||||
void* stack[kMaxStack];
|
|
||||||
unsigned int size = backtrace(stack, kMaxStack);
|
|
||||||
diff --git external_imported/easyloggingpp/src/easylogging++.h external_imported/easyloggingpp/src/easylogging++.h
|
|
||||||
index 688d537..0b16966 100644
|
|
||||||
--- external_imported/easyloggingpp/src/easylogging++.h
|
|
||||||
+++ external_imported/easyloggingpp/src/easylogging++.h
|
|
||||||
@@ -360,7 +360,7 @@ ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStre
|
|
||||||
# include <codecvt>
|
|
||||||
# endif // ELPP_OS_WINDOWS
|
|
||||||
#endif // defined(ELPP_UNICODE)
|
|
||||||
-#if ELPP_STACKTRACE
|
|
||||||
+#ifdef HAVE_EXECINFO_H
|
|
||||||
# include <cxxabi.h>
|
|
||||||
# include <execinfo.h>
|
|
||||||
#endif // ELPP_STACKTRACE
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'EternalTerminal'
|
# Template file for 'EternalTerminal'
|
||||||
pkgname=EternalTerminal
|
pkgname=EternalTerminal
|
||||||
version=6.0.11
|
version=6.0.11
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="${pkgname}-et-v${version}"
|
wrksrc="${pkgname}-et-v${version}"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
hostmakedepends="protobuf"
|
hostmakedepends="protobuf"
|
||||||
|
@ -16,12 +16,15 @@ system_accounts="_eternal"
|
||||||
|
|
||||||
LDFLAGS="-lgflags"
|
LDFLAGS="-lgflags"
|
||||||
|
|
||||||
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||||
|
makedepends+=" libexecinfo-devel"
|
||||||
|
fi
|
||||||
|
|
||||||
post_patch() {
|
post_patch() {
|
||||||
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||||
# musl does not support backtrace and backtrace_symbols
|
# Use external libexecinfo
|
||||||
# used by the ust::generate function
|
vsed -i CMakeLists.txt \
|
||||||
vsed -i src/base/Headers.hpp -e '/^#include "ust.hpp"/d' \
|
-e '/execinfo/!s/CORE_LIBRARIES util resolv/& execinfo/'
|
||||||
-e 's/ust::generate()/"(Unsupported on musl)" << endl/'
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue