From 40bc7286eab73f28113bd422dd2c1c929f34eda9 Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Fri, 27 Dec 2019 19:11:01 -0600 Subject: [PATCH] EternalTerminal: Remove manual compile flag Re-edited CMakeLists.txt and sources to compile with or without libexecinfo if system supports it Signed-off-by: Nathan Owens --- .../EternalTerminal/patches/execinfo.patch | 40 +++++++++---------- srcpkgs/EternalTerminal/template | 6 +-- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/srcpkgs/EternalTerminal/patches/execinfo.patch b/srcpkgs/EternalTerminal/patches/execinfo.patch index 376ae6ed9ab..5e50259cb25 100644 --- a/srcpkgs/EternalTerminal/patches/execinfo.patch +++ b/srcpkgs/EternalTerminal/patches/execinfo.patch @@ -1,22 +1,22 @@ diff --git CMakeLists.txt CMakeLists.txt -index b277dff..9ee989c 100644 +index b277dff..ad24b56 100644 --- CMakeLists.txt +++ CMakeLists.txt -@@ -12,6 +12,12 @@ endif() +@@ -125,6 +125,12 @@ include_directories( + ${UTEMPTER_INCLUDE_DIR} + ) - option(CODE_COVERAGE "Enable code coverage" OFF) - option(DISABLE_CRASH_LOG "Disable installing easylogging crash handler" OFF) -+option(ENABLE_EXECINFO "Enable execinfo support" OFF) -+ -+if(ENABLE_EXECINFO) -+ SET(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -lexecinfo") -+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_EXECINFO") ++include(CheckIncludeFileCXX) ++check_include_file("execinfo.h" HAVE_EXECINFO_H) ++if (HAVE_EXECINFO_H) ++ add_definitions(-DHAVE_EXECINFO_H) +endif() - - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DET_VERSION='\"${PROJECT_VERSION}\"'") - # For easylogging, disable default log file, enable crash log, ensure thread safe, and catch c++ exceptions ++ + add_library( + et-lib + STATIC diff --git external_imported/easyloggingpp/src/easylogging++.cc external_imported/easyloggingpp/src/easylogging++.cc -index d763ee7..1237d9c 100644 +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) { @@ -24,24 +24,20 @@ index d763ee7..1237d9c 100644 void StackTrace::generateNew(void) { -#if ELPP_STACKTRACE -+#ifdef ENABLE_EXECINFO ++#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..b4d754e 100644 +index 688d537..0b16966 100644 --- external_imported/easyloggingpp/src/easylogging++.h +++ external_imported/easyloggingpp/src/easylogging++.h -@@ -360,10 +360,10 @@ ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStre +@@ -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 ENABLE_EXECINFO ++#ifdef HAVE_EXECINFO_H # include # include --#endif // ELPP_STACKTRACE -+#endif // ENABLE_EXECINFO - #if ELPP_OS_ANDROID - # include - #endif // ELPP_OS_ANDROID + #endif // ELPP_STACKTRACE diff --git a/srcpkgs/EternalTerminal/template b/srcpkgs/EternalTerminal/template index d5c6ef58283..e234e5ee896 100644 --- a/srcpkgs/EternalTerminal/template +++ b/srcpkgs/EternalTerminal/template @@ -1,7 +1,7 @@ # Template file for 'EternalTerminal' pkgname=EternalTerminal version=6.0.5 -revision=1 +revision=2 wrksrc="${pkgname}-et-v${version}" build_style=cmake hostmakedepends="protobuf" @@ -16,10 +16,6 @@ system_accounts="_eternal" LDFLAGS="-lgflags" -case "$XBPS_TARGET_LIBC" in - glibc) configure_args="-DENABLE_EXECINFO=ON";; -esac - post_install() { vsv etserver }