From a26eb372855752fe42fbc62fdee895135cc105db Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sun, 16 Aug 2020 11:35:40 -0400 Subject: [PATCH] EternalTerminal: use external libexecinfo on musl --- .../EternalTerminal/patches/execinfo.patch | 43 ------------------- srcpkgs/EternalTerminal/template | 13 +++--- 2 files changed, 8 insertions(+), 48 deletions(-) delete mode 100644 srcpkgs/EternalTerminal/patches/execinfo.patch diff --git a/srcpkgs/EternalTerminal/patches/execinfo.patch b/srcpkgs/EternalTerminal/patches/execinfo.patch deleted file mode 100644 index 3f566d68f3..0000000000 --- a/srcpkgs/EternalTerminal/patches/execinfo.patch +++ /dev/null @@ -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 - # endif // ELPP_OS_WINDOWS - #endif // defined(ELPP_UNICODE) --#if ELPP_STACKTRACE -+#ifdef HAVE_EXECINFO_H - # include - # include - #endif // ELPP_STACKTRACE diff --git a/srcpkgs/EternalTerminal/template b/srcpkgs/EternalTerminal/template index cceac3ea5e..277b8dad25 100644 --- a/srcpkgs/EternalTerminal/template +++ b/srcpkgs/EternalTerminal/template @@ -1,7 +1,7 @@ # Template file for 'EternalTerminal' pkgname=EternalTerminal version=6.0.11 -revision=1 +revision=2 wrksrc="${pkgname}-et-v${version}" build_style=cmake hostmakedepends="protobuf" @@ -16,12 +16,15 @@ system_accounts="_eternal" LDFLAGS="-lgflags" +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + makedepends+=" libexecinfo-devel" +fi + post_patch() { if [ "$XBPS_TARGET_LIBC" = "musl" ]; then - # musl does not support backtrace and backtrace_symbols - # used by the ust::generate function - vsed -i src/base/Headers.hpp -e '/^#include "ust.hpp"/d' \ - -e 's/ust::generate()/"(Unsupported on musl)" << endl/' + # Use external libexecinfo + vsed -i CMakeLists.txt \ + -e '/execinfo/!s/CORE_LIBRARIES util resolv/& execinfo/' fi }