imhex: update to 1.27.1.

This commit is contained in:
classabbyamp 2023-02-17 12:29:43 -05:00
parent 086bf7c54f
commit 03500d7e10
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
3 changed files with 88 additions and 9 deletions

View File

@ -0,0 +1,74 @@
From 09b7794d7155d7c285ec8c0939a309a0221c9b34 Mon Sep 17 00:00:00 2001
From: WerWolv <werwolv98@gmail.com>
Date: Fri, 17 Feb 2023 17:52:10 +0100
Subject: [PATCH] build: Added option to disable stack traces
---
CMakeLists.txt | 1 +
cmake/build_helpers.cmake | 42 ++++++++++++++++++++-------------------
2 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94655a8fc698..fc5c0e73d3ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,7 @@ option(IMHEX_IGNORE_BAD_CLONE "Disable the bad clone prevention checks" OFF)
option(IMHEX_PATTERNS_PULL_MASTER "Download latest files from master branch of the ImHex-Patterns repo" OFF)
option(IMHEX_IGNORE_BAD_COMPILER "Allow compiling with an unsupported compiler" OFF)
option(IMHEX_USE_GTK_FILE_PICKER "Use GTK file picker instead of xdg-desktop-portals" OFF)
+option(IMHEX_DISABLE_STACKTRACE "Disables support for printing stack traces" OFF)
# Basic compiler and cmake configurations
set(CMAKE_CXX_STANDARD 23)
diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
index 13a08ecc7514..ec258a8e3439 100644
--- a/cmake/build_helpers.cmake
+++ b/cmake/build_helpers.cmake
@@ -515,25 +515,27 @@ macro(addBundledLibraries)
set(MAGIC_INCLUDE_DIRS ${MAGIC_INCLUDEDIR})
endif()
- if (WIN32)
- message(STATUS "StackWalk enabled!")
- set(LIBBACKTRACE_LIBRARIES DbgHelp.lib)
- else ()
- find_package(Backtrace)
- if (${Backtrace_FOUND})
- message(STATUS "Backtrace enabled! Header: ${Backtrace_HEADER}")
-
- if (Backtrace_HEADER STREQUAL "execinfo.h")
- set(LIBBACKTRACE_LIBRARIES)
- set(LIBBACKTRACE_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
- add_compile_definitions(BACKTRACE_HEADER=\"${Backtrace_HEADER}\")
- add_compile_definitions(HEX_HAS_EXECINFO)
- elseif (Backtrace_HEADER STREQUAL "backtrace.h")
- set(LIBBACKTRACE_LIBRARIES backtrace)
- set(LIBBACKTRACE_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
- add_compile_definitions(BACKTRACE_HEADER=\"${Backtrace_HEADER}\")
- add_compile_definitions(HEX_HAS_BACKTRACE)
- endif ()
- endif()
+ if (NOT IMHEX_DISABLE_STACKTRACE)
+ if (WIN32)
+ message(STATUS "StackWalk enabled!")
+ set(LIBBACKTRACE_LIBRARIES DbgHelp.lib)
+ else ()
+ find_package(Backtrace)
+ if (${Backtrace_FOUND})
+ message(STATUS "Backtrace enabled! Header: ${Backtrace_HEADER}")
+
+ if (Backtrace_HEADER STREQUAL "execinfo.h")
+ set(LIBBACKTRACE_LIBRARIES)
+ set(LIBBACKTRACE_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
+ add_compile_definitions(BACKTRACE_HEADER=\"${Backtrace_HEADER}\")
+ add_compile_definitions(HEX_HAS_EXECINFO)
+ elseif (Backtrace_HEADER STREQUAL "backtrace.h")
+ set(LIBBACKTRACE_LIBRARIES backtrace)
+ set(LIBBACKTRACE_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
+ add_compile_definitions(BACKTRACE_HEADER=\"${Backtrace_HEADER}\")
+ add_compile_definitions(HEX_HAS_BACKTRACE)
+ endif ()
+ endif()
+ endif ()
endif ()
endmacro()

View File

@ -1,7 +1,7 @@
running the internal update checker is pointless when updates are managed by xbps
--- a/ImHex/plugins/builtin/source/content/welcome_screen.cpp
+++ b/ImHex/plugins/builtin/source/content/welcome_screen.cpp
--- a/plugins/builtin/source/content/welcome_screen.cpp
+++ b/plugins/builtin/source/content/welcome_screen.cpp
@@ -517,20 +517,6 @@
loadDefaultLayout();
});
@ -23,8 +23,8 @@ running the internal update checker is pointless when updates are managed by xbp
ContentRegistry::Interface::addMenuItem("hex.builtin.menu.file", 1075, [&] {
if (ImGui::BeginMenu("hex.builtin.menu.file.open_recent"_lang, !s_recentProvidersUpdating && !s_recentProviders.empty())) {
--- a/ImHex/plugins/builtin/source/content/settings_entries.cpp
+++ b/ImHex/plugins/builtin/source/content/settings_entries.cpp
--- a/plugins/builtin/source/content/settings_entries.cpp
+++ b/plugins/builtin/source/content/settings_entries.cpp
@@ -35,21 +35,6 @@
/* General */
@ -47,8 +47,8 @@ running the internal update checker is pointless when updates are managed by xbp
ContentRegistry::Settings::add("hex.builtin.setting.general", "hex.builtin.setting.general.show_tips", 1, [](auto name, nlohmann::json &setting) {
static bool enabled = static_cast<int>(setting);
--- a/ImHex/main/source/init/tasks.cpp
+++ b/ImHex/main/source/init/tasks.cpp
--- a/main/source/init/tasks.cpp
+++ b/main/source/init/tasks.cpp
@@ -24,30 +24,6 @@
using namespace std::literals::string_literals;

View File

@ -1,6 +1,6 @@
# Template file for 'imhex'
pkgname=imhex
version=1.26.2
version=1.27.1
revision=1
build_wrksrc="ImHex"
build_style=cmake
@ -20,13 +20,18 @@ homepage="https://imhex.werwolv.net/"
changelog="https://github.com/WerWolv/ImHex/releases"
distfiles="https://github.com/WerWolv/ImHex/releases/download/v${version}/Full.Sources.tar.gz>imhex-${version}.tar.gz
https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v${version}.tar.gz>imhex-patterns-${version}.tar.gz"
checksum="3cafd153c8b2c3d283242b13d73a87494acff40194bb160077af4f9493facda8
bf7222495ea595b1eb1350196da1dd1f720e7cd5544542fa8cd7a48dc0b4d562"
checksum="66ce038024dbd5f0d09fd9359915340efd79bc8b51698e62277a8e88236965ca
0be0ab3d3cce35874a48aececc79af4136e32cf4c7eb3f45b1a1863264111229"
patch_args="-Np1 -d $build_wrksrc"
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
broken="uses i128"
fi
if [ "$XBPS_TARGET_LIBC" = musl ]; then
configure_args+=" -DIMHEX_DISABLE_STACKTRACE=ON"
fi
do_check() {
cd build
ninja ${makejobs} unit_tests