git: 68f30db45ae4 - main - editors/imhex: Update to 1.30.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Jul 2023 16:06:22 UTC
The branch main has been updated by nobutaka:
URL: https://cgit.FreeBSD.org/ports/commit/?id=68f30db45ae42726f5f3c1a57562366983c92e7d
commit 68f30db45ae42726f5f3c1a57562366983c92e7d
Author: MANTANI Nobutaka <nobutaka@FreeBSD.org>
AuthorDate: 2023-07-09 16:04:05 +0000
Commit: MANTANI Nobutaka <nobutaka@FreeBSD.org>
CommitDate: 2023-07-09 16:05:53 +0000
editors/imhex: Update to 1.30.1
---
editors/imhex/Makefile | 22 +++++++----
editors/imhex/distinfo | 26 ++++++------
editors/imhex/files/patch-CMakeLists.txt | 2 +-
.../imhex/files/patch-cmake_build__helpers.cmake | 16 ++------
...al_libwolv_libs_hash_include_wolv_hash_uuid.hpp | 21 ++++++++++
...ternal_libwolv_libs_io_include_wolv_io_file.hpp | 10 +++++
...lib_external_libwolv_libs_io_source_io_file.cpp | 46 +++++++++++++---------
...al_libwolv_libs_net_include_wolv_net_common.hpp | 11 ++++++
...b_external_pattern__language_lib_CMakeLists.txt | 16 ++++----
..._language_lib_include_pl_core_ast_ast__node.hpp | 18 ++++-----
...lude_pl_core_ast_ast__node__bitfield__field.hpp | 10 +++++
...nclude_pl_core_ast_ast__node__builtin__type.hpp | 11 ------
...attern__language_lib_include_pl_core_parser.hpp | 10 ++---
...pattern__language_lib_include_pl_core_token.hpp | 8 ++--
...n__language_lib_include_pl_patterns_pattern.hpp | 11 ------
.../imhex/files/patch-lib_libimhex_CMakeLists.txt | 8 ++++
..._libimhex_include_hex_api_content__registry.hpp | 10 +++++
.../patch-lib_libimhex_source_api_imhex__api.cpp | 10 ++---
..._libimhex_source_api_project__file__manager.cpp | 11 ------
.../files/patch-lib_libimhex_source_helpers_fs.cpp | 6 +--
...atch-lib_libimhex_source_helpers_stacktrace.cpp | 11 ++++++
editors/imhex/files/patch-main_CMakeLists.txt | 4 +-
.../patch-main_source_window_linux__window.cpp | 38 ++++++++++++++++++
.../files/patch-main_source_window_window.cpp | 4 +-
...include_content_views_view__pattern__editor.hpp | 6 +--
...gins_builtin_source_content_pl__visualizers.cpp | 6 +--
...ugins_builtin_source_content_tools__entries.cpp | 25 ++++++++++++
...ins_builtin_source_content_views_view__find.cpp | 18 ++++-----
...ltin_source_content_views_view__hex__editor.cpp | 4 +-
..._source_content_views_view__pattern__editor.cpp | 42 ++++++++++----------
...h-plugins_builtin_source_ui_pattern__drawer.cpp | 8 ++--
editors/imhex/pkg-plist | 12 +++++-
32 files changed, 294 insertions(+), 167 deletions(-)
diff --git a/editors/imhex/Makefile b/editors/imhex/Makefile
index 52b93c03f187..dd72a64bc076 100644
--- a/editors/imhex/Makefile
+++ b/editors/imhex/Makefile
@@ -1,5 +1,5 @@
PORTNAME= imhex
-PORTVERSION= 1.28.0
+PORTVERSION= 1.30.1
DISTVERSIONPREFIX= v
CATEGORIES= editors
MASTER_SITES= https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg
@@ -36,6 +36,7 @@ LIB_DEPENDS= libcurl.so:ftp/curl \
libglfw.so:graphics/glfw \
libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz \
+ libinotify.so:devel/libinotify \
libmbedtls.so:security/mbedtls \
libtre.so:textproc/libtre
@@ -60,16 +61,22 @@ GH_TUPLE= btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledi
GH_TAG_CAPSTONE= d5141c0
GH_TAG_CLI11= faea921
-GH_TAG_FMT= a337011
-GH_TAG_IMHEX_PATTERNS= 2ffa4e0
+GH_TAG_FMT= a0b8a92
+GH_TAG_IMHEX_PATTERNS= 759708d
GH_TAG_JTHREAD= 0fa8d39
-GH_TAG_LIBROMFS= 40cd303
-GH_TAG_LIBWOLV= bcd987c
+GH_TAG_LIBROMFS= 80b9ade
+GH_TAG_LIBWOLV= 128bed6
GH_TAG_NATIVEFILEDIALOG= 7909f55
-GH_TAG_PATTERN_LANGUAGE= 68210bd
+GH_TAG_PATTERN_LANGUAGE= 57dc02b
GH_TAG_YARA= 96790e5
-CXX= ${LOCALBASE}/bin/clang++${LLVM_VERSION}
+CC= ${LOCALBASE}/bin/clang16
+CXX= ${LOCALBASE}/bin/clang++16
+CFLAGS+= -I${LOCALBASE}/include
+CXXFLAGS+= -I${LOCALBASE}/include \
+ -I${WRKSRC}/lib/external/pattern_language/generators/include \
+ -Wno-error=deprecated-declarations \
+ -Wno-error=literal-conversion
CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON \
-DIMHEX_STRIP_RELEASE=OFF -DIMHEX_PLUGINS_IN_SHARE=ON \
@@ -87,6 +94,7 @@ post-extract:
${CP} -R ${WRKSRC_jthread}/source/*.hpp ${WRKSRC}/lib/libimhex/include
${CP} -R ${WRKSRC_libromfs}/* ${WRKSRC}/lib/external/libromfs
${CP} -R ${WRKSRC_libwolv}/* ${WRKSRC}/lib/external/libwolv
+ ${CP} -R ${WRKSRC_jthread}/source/*.hpp ${WRKSRC}/lib/external/libwolv/libs/io/include/wolv/io
${CP} -R ${WRKSRC_nativefiledialog}/* ${WRKSRC}/lib/external/nativefiledialog
${CP} -R ${WRKSRC_pattern_language}/* ${WRKSRC}/lib/external/pattern_language
${CP} -R ${WRKSRC_cli11}/* ${WRKSRC}/lib/external/pattern_language/external/cli11
diff --git a/editors/imhex/distinfo b/editors/imhex/distinfo
index dae5dd2ce553..2d5d9ec9eaf8 100644
--- a/editors/imhex/distinfo
+++ b/editors/imhex/distinfo
@@ -1,25 +1,25 @@
-TIMESTAMP = 1680967037
+TIMESTAMP = 1688829700
SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec
SIZE (imhex/xdg.hpp) = 7674
-SHA256 (imhex/WerWolv-ImHex-v1.28.0_GH0.tar.gz) = 6d6d716b6fd785bfb11929ec33fdcbfced25e735519c1bf451c64ddd13b3383f
-SIZE (imhex/WerWolv-ImHex-v1.28.0_GH0.tar.gz) = 11741032
+SHA256 (imhex/WerWolv-ImHex-v1.30.1_GH0.tar.gz) = 8dee5bec767e96031a6949286107222716455fa4ece90e1276f2734bfc6f41ea
+SIZE (imhex/WerWolv-ImHex-v1.30.1_GH0.tar.gz) = 11802597
SHA256 (imhex/btzy-nativefiledialog-extended-7909f55_GH0.tar.gz) = eb6c9376ab32dfa1b3f40f197f04d2d3dbe07c8555d57df3945121e843c98a97
SIZE (imhex/btzy-nativefiledialog-extended-7909f55_GH0.tar.gz) = 412738
SHA256 (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 435d40757928fa73dec19c6d0fbf171bd76341391c8525ce1286927dab44c3e7
SIZE (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 5761632
SHA256 (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 84773ee9577e6b719e5a84ad62cc381cf3027756690e1db839eaa50bcafc6c78
SIZE (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 299718
-SHA256 (imhex/fmtlib-fmt-a337011_GH0.tar.gz) = ba190d69d8b7994ef2ceb533c56bc34feec296fef2f87efab4cfb981a04601cf
-SIZE (imhex/fmtlib-fmt-a337011_GH0.tar.gz) = 837936
+SHA256 (imhex/fmtlib-fmt-a0b8a92_GH0.tar.gz) = 370d03ac94a7ad90d3924667f83bd2bb08e3dc60df6263dc04492b4081a4b7e1
+SIZE (imhex/fmtlib-fmt-a0b8a92_GH0.tar.gz) = 851621
SHA256 (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = ccd9c871dc2da9611e6d0cba5fc859cec9b233541be7501e5cef9eaa367e1280
SIZE (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = 4450456
SHA256 (imhex/VirusTotal-yara-96790e5_GH0.tar.gz) = f58a3e8e7fa6bec3b5d8631d4bfbd48da801ebf4b5f8e1b26fea4a1115708a1c
SIZE (imhex/VirusTotal-yara-96790e5_GH0.tar.gz) = 2179144
-SHA256 (imhex/WerWolv-ImHex-Patterns-2ffa4e0_GH0.tar.gz) = 733697f5444c9622f79b47f9b0e83483a1d50e27da93e894ce83402615887038
-SIZE (imhex/WerWolv-ImHex-Patterns-2ffa4e0_GH0.tar.gz) = 3065433
-SHA256 (imhex/WerWolv-PatternLanguage-68210bd_GH0.tar.gz) = dd1404eda3627ed2426cbb50ca68fb5b8af8399b46dabfde8b91dacda975b869
-SIZE (imhex/WerWolv-PatternLanguage-68210bd_GH0.tar.gz) = 223467
-SHA256 (imhex/WerWolv-libromfs-40cd303_GH0.tar.gz) = e785499616e1dfc2644be61706cf1fba49a8d8282c6aecf78efee02c6fbbca13
-SIZE (imhex/WerWolv-libromfs-40cd303_GH0.tar.gz) = 4301
-SHA256 (imhex/WerWolv-libwolv-bcd987c_GH0.tar.gz) = d170a887ba3d07efabc6180b5b6f077d5b5d261a0144cfe281aa0f04e05f3991
-SIZE (imhex/WerWolv-libwolv-bcd987c_GH0.tar.gz) = 20301
+SHA256 (imhex/WerWolv-ImHex-Patterns-759708d_GH0.tar.gz) = abc623f6441910bcfe05b6aadedbb8c82d2c192bd8706b5523a352e36f7ca6bd
+SIZE (imhex/WerWolv-ImHex-Patterns-759708d_GH0.tar.gz) = 3377254
+SHA256 (imhex/WerWolv-PatternLanguage-57dc02b_GH0.tar.gz) = 55d93dd36d776dc7a3d8085904ebe9fc3c2802d904616c4e8f1e79da3f8c49ae
+SIZE (imhex/WerWolv-PatternLanguage-57dc02b_GH0.tar.gz) = 228358
+SHA256 (imhex/WerWolv-libromfs-80b9ade_GH0.tar.gz) = 0825f9f80f62bc3c20e1b35efde0f224779402b313d31362537d5273fdee84a7
+SIZE (imhex/WerWolv-libromfs-80b9ade_GH0.tar.gz) = 4527
+SHA256 (imhex/WerWolv-libwolv-128bed6_GH0.tar.gz) = b1e023d17707d95feb01f2f161b18b95adbdf6f4cddf4d9be92dd481e0f96553
+SIZE (imhex/WerWolv-libwolv-128bed6_GH0.tar.gz) = 29336
diff --git a/editors/imhex/files/patch-CMakeLists.txt b/editors/imhex/files/patch-CMakeLists.txt
index ba76e857d734..e36ee360d92f 100644
--- a/editors/imhex/files/patch-CMakeLists.txt
+++ b/editors/imhex/files/patch-CMakeLists.txt
@@ -1,4 +1,4 @@
---- CMakeLists.txt.orig 2023-04-04 10:04:22 UTC
+--- CMakeLists.txt.orig 2023-06-24 10:07:39 UTC
+++ CMakeLists.txt
@@ -29,8 +29,6 @@ project(imhex
diff --git a/editors/imhex/files/patch-cmake_build__helpers.cmake b/editors/imhex/files/patch-cmake_build__helpers.cmake
index 2791ff6dd58b..976765cb2b41 100644
--- a/editors/imhex/files/patch-cmake_build__helpers.cmake
+++ b/editors/imhex/files/patch-cmake_build__helpers.cmake
@@ -1,6 +1,6 @@
---- cmake/build_helpers.cmake.orig 2023-04-04 10:04:22 UTC
+--- cmake/build_helpers.cmake.orig 2023-06-24 10:07:39 UTC
+++ cmake/build_helpers.cmake
-@@ -378,13 +378,13 @@ function(downloadImHexPatternsFiles dest)
+@@ -392,13 +392,13 @@ function(downloadImHexPatternsFiles dest)
else ()
# Maybe patterns are cloned to a subdirectory
@@ -11,16 +11,8 @@
if (EXISTS ${imhex_patterns_SOURCE_DIR})
set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic)
foreach (FOLDER ${PATTERNS_FOLDERS_TO_INSTALL})
-- install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION ${dest})
-+ install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "share/imhex/")
+- install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION ${dest} PATTERN "**/_schema.json" EXCLUDE)
++ install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "share/imhex/" PATTERN "**/_schema.json" EXCLUDE)
endforeach ()
endif ()
-@@ -392,7 +392,6 @@ endfunction()
-
- macro(setupCompilerWarnings target)
- set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic -Werror")
-- set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread -Wno-stringop-overflow -Wno-array-bounds")
-
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IMHEX_C_FLAGS}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IMHEX_C_FLAGS}")
diff --git a/editors/imhex/files/patch-lib_external_libwolv_libs_hash_include_wolv_hash_uuid.hpp b/editors/imhex/files/patch-lib_external_libwolv_libs_hash_include_wolv_hash_uuid.hpp
new file mode 100644
index 000000000000..4a8523bcb189
--- /dev/null
+++ b/editors/imhex/files/patch-lib_external_libwolv_libs_hash_include_wolv_hash_uuid.hpp
@@ -0,0 +1,21 @@
+--- lib/external/libwolv/libs/hash/include/wolv/hash/uuid.hpp.orig 2023-06-24 12:12:43 UTC
++++ lib/external/libwolv/libs/hash/include/wolv/hash/uuid.hpp
+@@ -11,15 +11,15 @@ namespace wolv::hash {
+ std::random_device randomDevice;
+ std::mt19937 generator(randomDevice());
+
+- std::uniform_int_distribution<char> distribution(0, 15);
++ std::uniform_int_distribution<int> distribution(0, 15);
+
+ std::string uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
+ for (char &c : uuid) {
+ if (c == 'x') {
+- c = distribution(generator);
++ c = static_cast<char>(distribution(generator));
+ c = c < 10 ? char('0' + c) : char('a' + c - 10);
+ } else if (c == 'y') {
+- c = distribution(generator);
++ c = static_cast<char>(distribution(generator));
+ c = char(char(c & u8(0x03)) | char(0x08));
+ c = c < 10 ? char('0' + c) : char('a' + c - 10);
+ }
diff --git a/editors/imhex/files/patch-lib_external_libwolv_libs_io_include_wolv_io_file.hpp b/editors/imhex/files/patch-lib_external_libwolv_libs_io_include_wolv_io_file.hpp
new file mode 100644
index 000000000000..700380ec30fc
--- /dev/null
+++ b/editors/imhex/files/patch-lib_external_libwolv_libs_io_include_wolv_io_file.hpp
@@ -0,0 +1,10 @@
+--- lib/external/libwolv/libs/io/include/wolv/io/file.hpp.orig 2023-05-21 12:25:30 UTC
++++ lib/external/libwolv/libs/io/include/wolv/io/file.hpp
+@@ -10,6 +10,7 @@
+ #include <vector>
+
+ #include <sys/stat.h>
++#include "jthread.hpp"
+
+ #if defined(OS_MACOS)
+
diff --git a/editors/imhex/files/patch-lib_external_libwolv_libs_io_source_io_file.cpp b/editors/imhex/files/patch-lib_external_libwolv_libs_io_source_io_file.cpp
index 45ee30862e05..fe05c1b2285c 100644
--- a/editors/imhex/files/patch-lib_external_libwolv_libs_io_source_io_file.cpp
+++ b/editors/imhex/files/patch-lib_external_libwolv_libs_io_source_io_file.cpp
@@ -1,6 +1,6 @@
---- lib/external/libwolv/libs/io/source/io/file.cpp.orig 2023-04-08 15:55:46 UTC
+--- lib/external/libwolv/libs/io/source/io/file.cpp.orig 2023-07-09 11:32:49 UTC
+++ lib/external/libwolv/libs/io/source/io/file.cpp
-@@ -21,12 +21,12 @@ namespace wolv::io {
+@@ -39,12 +39,12 @@ namespace wolv::io {
#else
if (mode == File::Mode::Read)
@@ -15,8 +15,8 @@
+ this->m_file = fopen(util::toUTF8String(path).c_str(), "w+b");
#endif
- }
-@@ -63,7 +63,7 @@ namespace wolv::io {
+
+@@ -82,7 +82,7 @@ namespace wolv::io {
}
void File::seek(u64 offset) {
@@ -25,27 +25,37 @@
}
void File::close() {
-@@ -148,10 +148,10 @@ namespace wolv::io {
- size_t File::getSize() const {
- if (!isValid()) return 0;
+@@ -114,8 +114,7 @@ namespace wolv::io {
+ auto fd = fileno(this->m_file);
+ auto size = getSize();
-- auto startPos = ftello64(this->m_file);
-- fseeko64(this->m_file, 0, SEEK_END);
-- auto size = ftello64(this->m_file);
-- fseeko64(this->m_file, startPos, SEEK_SET);
-+ auto startPos = ftello(this->m_file);
-+ fseeko(this->m_file, 0, SEEK_END);
-+ auto size = ftello(this->m_file);
-+ fseeko(this->m_file, startPos, SEEK_SET);
+- this->m_map = reinterpret_cast<u8*>(mmap(nullptr, size, this->m_mode == Mode::Read ? PROT_READ : PROT_WRITE, MAP_SHARED, fd, 0));
+-
++ this->m_map = reinterpret_cast<u8*>(mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0));
+ #endif
+ }
- if (size < 0)
- return 0;
-@@ -162,7 +162,7 @@ namespace wolv::io {
+@@ -214,7 +213,7 @@ namespace wolv::io {
void File::setSize(u64 size) {
if (!isValid()) return;
- auto result = ftruncate64(fileno(this->m_file), size);
+ auto result = ftruncate(fileno(this->m_file), size);
util::unused(result);
+ this->updateSize();
}
+@@ -225,10 +224,10 @@ namespace wolv::io {
+ return;
+ }
+
+- auto startPos = ftello64(this->m_file);
+- fseeko64(this->m_file, 0, SEEK_END);
+- auto size = ftello64(this->m_file);
+- fseeko64(this->m_file, startPos, SEEK_SET);
++ auto startPos = ftello(this->m_file);
++ fseeko(this->m_file, 0, SEEK_END);
++ auto size = ftello(this->m_file);
++ fseeko(this->m_file, startPos, SEEK_SET);
+ if (this->m_map != nullptr && size != this->m_fileSize) {
+ this->unmap();
diff --git a/editors/imhex/files/patch-lib_external_libwolv_libs_net_include_wolv_net_common.hpp b/editors/imhex/files/patch-lib_external_libwolv_libs_net_include_wolv_net_common.hpp
new file mode 100644
index 000000000000..871b2d494616
--- /dev/null
+++ b/editors/imhex/files/patch-lib_external_libwolv_libs_net_include_wolv_net_common.hpp
@@ -0,0 +1,11 @@
+--- lib/external/libwolv/libs/net/include/wolv/net/common.hpp.orig 2023-07-09 14:37:57 UTC
++++ lib/external/libwolv/libs/net/include/wolv/net/common.hpp
+@@ -16,6 +16,8 @@
+
+ #endif
+
++#include <iterator>
++
+ namespace wolv::net {
+
+ #if defined(OS_WINDOWS)
diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_CMakeLists.txt b/editors/imhex/files/patch-lib_external_pattern__language_lib_CMakeLists.txt
index 21819240ed2f..c315fdccd068 100644
--- a/editors/imhex/files/patch-lib_external_pattern__language_lib_CMakeLists.txt
+++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_CMakeLists.txt
@@ -1,11 +1,11 @@
---- lib/external/pattern_language/lib/CMakeLists.txt.orig 2023-04-08 15:28:11 UTC
+--- lib/external/pattern_language/lib/CMakeLists.txt.orig 2023-06-20 14:11:25 UTC
+++ lib/external/pattern_language/lib/CMakeLists.txt
-@@ -34,7 +34,7 @@ add_library(libpl ${LIBRARY_TYPE}
- source/pl/lib/std/random.cpp
+@@ -69,7 +69,7 @@ add_library(libpl ${LIBRARY_TYPE}
)
--target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-unknown-pragmas)
-+target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-unknown-pragmas -Wno-error=deprecated-declarations)
-
- target_include_directories(libpl PUBLIC include)
- target_link_libraries(libpl PRIVATE fmt::fmt-header-only)
+ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+- target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-unknown-pragmas -Wno-array-bounds)
++ target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-unknown-pragmas -Wno-array-bounds -Wno-error=deprecated-declarations)
+ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ target_compile_options(libpl PRIVATE -Wno-stringop-overflow)
+ endif()
diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node.hpp
index 89b9ea1731aa..35e2e1ecf4b3 100644
--- a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node.hpp
+++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node.hpp
@@ -1,17 +1,15 @@
---- lib/external/pattern_language/lib/include/pl/core/ast/ast_node.hpp.orig 2023-04-08 15:28:11 UTC
+--- lib/external/pattern_language/lib/include/pl/core/ast/ast_node.hpp.orig 2023-06-20 14:11:25 UTC
+++ lib/external/pattern_language/lib/include/pl/core/ast/ast_node.hpp
-@@ -16,11 +16,11 @@ namespace pl::core::ast {
-
- class ASTNode : public Cloneable<ASTNode> {
+@@ -18,9 +18,9 @@ namespace pl::core::ast {
public:
-- constexpr ASTNode() = default;
-+ ASTNode() = default;
+ using FunctionResult = std::optional<Token::Literal>;
+- constexpr ASTNode() = default;
- constexpr virtual ~ASTNode() = default;
-+ virtual ~ASTNode() = default;
-
- constexpr ASTNode(const ASTNode &) = default;
++ ASTNode() = default;
++ virtual ~ASTNode() = default;
+ ASTNode(const ASTNode &) = default;
- [[nodiscard]] constexpr u32 getLine() const { return this->m_line; }
- [[nodiscard]] constexpr u32 getColumn() const { return this->m_column; }
+ [[nodiscard]] u32 getLine() const;
+ [[nodiscard]] u32 getColumn() const;
diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node__bitfield__field.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node__bitfield__field.hpp
new file mode 100644
index 000000000000..e9cf789b593e
--- /dev/null
+++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node__bitfield__field.hpp
@@ -0,0 +1,10 @@
+--- lib/external/pattern_language/lib/include/pl/core/ast/ast_node_bitfield_field.hpp.orig 2023-07-09 14:52:20 UTC
++++ lib/external/pattern_language/lib/include/pl/core/ast/ast_node_bitfield_field.hpp
+@@ -2,6 +2,7 @@
+
+ #include <pl/core/ast/ast_node.hpp>
+ #include <pl/core/ast/ast_node_attribute.hpp>
++#include <pl/core/ast/ast_node_type_decl.hpp>
+
+ #include <pl/patterns/pattern_bitfield.hpp>
+
diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node__builtin__type.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node__builtin__type.hpp
deleted file mode 100644
index 28714214c03e..000000000000
--- a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node__builtin__type.hpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/external/pattern_language/lib/include/pl/core/ast/ast_node_builtin_type.hpp.orig 2023-01-05 15:12:35 UTC
-+++ lib/external/pattern_language/lib/include/pl/core/ast/ast_node_builtin_type.hpp
-@@ -15,7 +15,7 @@ namespace pl::core::ast {
-
- class ASTNodeBuiltinType : public ASTNode {
- public:
-- constexpr explicit ASTNodeBuiltinType(Token::ValueType type)
-+ explicit ASTNodeBuiltinType(Token::ValueType type)
- : ASTNode(), m_type(type) { }
-
- [[nodiscard]] constexpr const auto &getType() const { return this->m_type; }
diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_parser.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_parser.hpp
index 4881cecc95c8..d8205e6ffc90 100644
--- a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_parser.hpp
+++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_parser.hpp
@@ -1,6 +1,6 @@
---- lib/external/pattern_language/lib/include/pl/core/parser.hpp.orig 2023-04-08 16:22:09 UTC
+--- lib/external/pattern_language/lib/include/pl/core/parser.hpp.orig 2023-05-21 11:04:34 UTC
+++ lib/external/pattern_language/lib/include/pl/core/parser.hpp
-@@ -233,7 +233,7 @@ namespace pl::core {
+@@ -234,7 +234,7 @@ namespace pl::core {
else if constexpr (S == Not)
return false;
else
@@ -9,7 +9,7 @@
}
template<Setting S = Normal>
-@@ -264,7 +264,7 @@ namespace pl::core {
+@@ -265,7 +265,7 @@ namespace pl::core {
partReset();
return false;
} else
@@ -18,7 +18,7 @@
}
template<Setting S = Normal>
-@@ -279,7 +279,7 @@ namespace pl::core {
+@@ -280,7 +280,7 @@ namespace pl::core {
else if constexpr (S == Not)
return true;
else
@@ -27,7 +27,7 @@
}
template<Setting S = Normal>
-@@ -289,7 +289,7 @@ namespace pl::core {
+@@ -290,7 +290,7 @@ namespace pl::core {
else if constexpr (S == Not)
return sequenceImpl<Not>(token) && oneOfImpl(args...);
else
diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp
index 515b59369fe1..f772aefef49e 100644
--- a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp
+++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp
@@ -1,6 +1,6 @@
---- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2023-04-08 15:28:11 UTC
+--- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2023-06-24 11:43:14 UTC
+++ lib/external/pattern_language/lib/include/pl/core/token.hpp
-@@ -157,7 +157,7 @@ namespace pl::core {
+@@ -161,7 +161,7 @@ namespace pl::core {
bool global;
std::string comment;
@@ -8,8 +8,8 @@
+ bool operator==(const DocComment &) const = default;
};
- struct Literal : public std::variant<char, bool, u128, i128, double, std::string, ptrn::Pattern *> {
-@@ -185,7 +185,7 @@ namespace pl::core {
+ struct Literal : public std::variant<char, bool, u128, i128, double, std::string, std::shared_ptr<ptrn::Pattern>> {
+@@ -189,7 +189,7 @@ namespace pl::core {
using ValueTypes = std::variant<Keyword, Identifier, Operator, Literal, ValueType, Separator, DocComment>;
diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_patterns_pattern.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_patterns_pattern.hpp
deleted file mode 100644
index 604dfcad4a70..000000000000
--- a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_patterns_pattern.hpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/external/pattern_language/lib/include/pl/patterns/pattern.hpp.orig 2023-04-08 16:10:41 UTC
-+++ lib/external/pattern_language/lib/include/pl/patterns/pattern.hpp
-@@ -336,7 +336,7 @@ namespace pl::ptrn {
- auto startOffset = child->getOffset();
-
- child->setOffset(offset);
-- ON_SCOPE_EXIT { child->setOffset(startOffset); };
-+ [[maybe_unused]] auto WOLV_ANONYMOUS_VARIABLE(SCOPE_EXIT_) = ::wolv::util::scope_guard::ScopeGuardOnExit() + [&, child=child]() { child->setOffset(startOffset); };
-
- auto bytes = child->getBytes();
- std::copy(bytes.begin(), bytes.end(), std::back_inserter(result));
diff --git a/editors/imhex/files/patch-lib_libimhex_CMakeLists.txt b/editors/imhex/files/patch-lib_libimhex_CMakeLists.txt
new file mode 100644
index 000000000000..15ecad5e6abb
--- /dev/null
+++ b/editors/imhex/files/patch-lib_libimhex_CMakeLists.txt
@@ -0,0 +1,8 @@
+--- lib/libimhex/CMakeLists.txt.orig 2023-06-24 10:07:39 UTC
++++ lib/libimhex/CMakeLists.txt
+@@ -70,4 +70,4 @@ elseif (APPLE)
+ endif ()
+
+ target_link_libraries(libimhex PRIVATE ${FMT_LIBRARIES})
+-target_link_libraries(libimhex PUBLIC dl imgui ${NFD_LIBRARIES} magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${LIBBACKTRACE_LIBRARIES} libpl libpl-gen ${MINIAUDIO_LIBRARIES} libwolv-utils libwolv-io libwolv-hash libwolv-net libwolv-containers)
++target_link_libraries(libimhex PUBLIC dl imgui ${NFD_LIBRARIES} magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${LIBBACKTRACE_LIBRARIES} libpl ${MINIAUDIO_LIBRARIES} libwolv-utils libwolv-io libwolv-hash libwolv-net libwolv-containers inotify)
diff --git a/editors/imhex/files/patch-lib_libimhex_include_hex_api_content__registry.hpp b/editors/imhex/files/patch-lib_libimhex_include_hex_api_content__registry.hpp
new file mode 100644
index 000000000000..646984ea768b
--- /dev/null
+++ b/editors/imhex/files/patch-lib_libimhex_include_hex_api_content__registry.hpp
@@ -0,0 +1,10 @@
+--- lib/libimhex/include/hex/api/content_registry.hpp.orig 2023-05-21 12:30:36 UTC
++++ lib/libimhex/include/hex/api/content_registry.hpp
+@@ -17,6 +17,7 @@
+ #include <vector>
+
+ #include <nlohmann/json_fwd.hpp>
++#include <jthread.hpp>
+
+ using ImGuiDataType = int;
+ using ImGuiInputTextFlags = int;
diff --git a/editors/imhex/files/patch-lib_libimhex_source_api_imhex__api.cpp b/editors/imhex/files/patch-lib_libimhex_source_api_imhex__api.cpp
index 483fdddc1daf..620ee3a6bb2d 100644
--- a/editors/imhex/files/patch-lib_libimhex_source_api_imhex__api.cpp
+++ b/editors/imhex/files/patch-lib_libimhex_source_api_imhex__api.cpp
@@ -1,14 +1,14 @@
---- lib/libimhex/source/api/imhex_api.cpp.orig 2023-04-04 10:04:22 UTC
+--- lib/libimhex/source/api/imhex_api.cpp.orig 2023-06-24 10:07:39 UTC
+++ lib/libimhex/source/api/imhex_api.cpp
-@@ -4,6 +4,7 @@
- #include <hex/api/event.hpp>
- #include <hex/providers/provider.hpp>
+@@ -8,6 +8,7 @@
+
+ #include <wolv/io/file.hpp>
+#include <range/v3/algorithm.hpp>
#include <utility>
#include <unistd.h>
-@@ -259,7 +260,7 @@ namespace hex {
+@@ -269,7 +270,7 @@ namespace hex {
}
bool isDirty() {
diff --git a/editors/imhex/files/patch-lib_libimhex_source_api_project__file__manager.cpp b/editors/imhex/files/patch-lib_libimhex_source_api_project__file__manager.cpp
deleted file mode 100644
index b5600b88cdf8..000000000000
--- a/editors/imhex/files/patch-lib_libimhex_source_api_project__file__manager.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/libimhex/source/api/project_file_manager.cpp.orig 2023-04-04 10:04:22 UTC
-+++ lib/libimhex/source/api/project_file_manager.cpp
-@@ -46,7 +46,7 @@ namespace hex {
- return false;
- }
-
-- auto providers = auto(ImHexApi::Provider::getProviders());
-+ auto providers = ImHexApi::Provider::getProviders();
- for (const auto &provider : providers) {
- ImHexApi::Provider::remove(provider);
- }
diff --git a/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp b/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp
index 71a5ad974e02..bd925367ce9e 100644
--- a/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp
+++ b/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp
@@ -1,6 +1,6 @@
---- lib/libimhex/source/helpers/fs.cpp.orig 2023-04-04 10:04:22 UTC
+--- lib/libimhex/source/helpers/fs.cpp.orig 2023-06-24 10:07:39 UTC
+++ lib/libimhex/source/helpers/fs.cpp
-@@ -11,10 +11,15 @@
+@@ -12,10 +12,15 @@
#include <shlobj.h>
#elif defined(OS_LINUX)
#include <xdg.hpp>
@@ -16,7 +16,7 @@
#include <filesystem>
#include <wolv/io/file.hpp>
-@@ -54,7 +59,7 @@ namespace hex::fs {
+@@ -120,7 +125,7 @@ namespace hex::fs {
result = NFD::PickFolder(outPath, defaultPath.empty() ? nullptr : defaultPath.c_str());
break;
default:
diff --git a/editors/imhex/files/patch-lib_libimhex_source_helpers_stacktrace.cpp b/editors/imhex/files/patch-lib_libimhex_source_helpers_stacktrace.cpp
new file mode 100644
index 000000000000..0027dae3b29c
--- /dev/null
+++ b/editors/imhex/files/patch-lib_libimhex_source_helpers_stacktrace.cpp
@@ -0,0 +1,11 @@
+--- lib/libimhex/source/helpers/stacktrace.cpp.orig 2023-06-24 11:58:12 UTC
++++ lib/libimhex/source/helpers/stacktrace.cpp
+@@ -119,7 +119,7 @@
+ auto count = backtrace(addresses.data(), addresses.size());
+ auto functions = backtrace_symbols(addresses.data(), count);
+
+- for (i32 i = 0; i < count; i++)
++ for (size_t i = 0; i < count; i++)
+ result.push_back(StackFrame { "", functions[i], 0 });
+
+ return result;
diff --git a/editors/imhex/files/patch-main_CMakeLists.txt b/editors/imhex/files/patch-main_CMakeLists.txt
index 47e20ae36dda..de956606b3a8 100644
--- a/editors/imhex/files/patch-main_CMakeLists.txt
+++ b/editors/imhex/files/patch-main_CMakeLists.txt
@@ -1,6 +1,6 @@
---- main/CMakeLists.txt.orig 2023-02-13 15:50:24 UTC
+--- main/CMakeLists.txt.orig 2023-06-24 10:07:39 UTC
+++ main/CMakeLists.txt
-@@ -30,7 +30,7 @@ set_target_properties(main PROPERTIES
+@@ -31,7 +31,7 @@ set_target_properties(main PROPERTIES
add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}")
diff --git a/editors/imhex/files/patch-main_source_window_linux__window.cpp b/editors/imhex/files/patch-main_source_window_linux__window.cpp
new file mode 100644
index 000000000000..aa1ef665b55d
--- /dev/null
+++ b/editors/imhex/files/patch-main_source_window_linux__window.cpp
@@ -0,0 +1,38 @@
+--- main/source/window/linux_window.cpp.orig 2023-07-08 16:57:04 UTC
++++ main/source/window/linux_window.cpp
+@@ -19,8 +19,26 @@
+ #include <imgui_impl_glfw.h>
+ #include <string.h>
+ #include <ranges>
++ #include <string_view>
++ #include <sstream>
+
+ namespace hex {
++ // Brought from lib/external/pattern_language/external/cli11/include/CLI/impl/StringTools_inl.hpp
++ std::vector<std::string> split(const std::string &s, char delim) {
++ std::vector<std::string> elems;
++ // Check to see if empty string, give consistent result
++ if(s.empty()) {
++ elems.emplace_back();
++ } else {
++ std::stringstream ss;
++ ss.str(s);
++ std::string item;
++ while(std::getline(ss, item, delim)) {
++ elems.push_back(item);
++ }
++ }
++ return elems;
++ }
+
+ bool isFileInPath(const std::fs::path &filename) {
+ auto optPathVar = hex::getEnvironmentVariable("PATH");
+@@ -29,7 +47,7 @@ namespace hex {
+ return false;
+ }
+
+- for (auto dir : std::views::split(optPathVar.value(), ':')) {
++ for (auto dir : split(optPathVar.value(), ':')) {
+ if (std::fs::exists(std::fs::path(std::string_view(dir)) / filename)) {
+ return true;
+ }
diff --git a/editors/imhex/files/patch-main_source_window_window.cpp b/editors/imhex/files/patch-main_source_window_window.cpp
index 986dbccce8f7..14b266d3d7e1 100644
--- a/editors/imhex/files/patch-main_source_window_window.cpp
+++ b/editors/imhex/files/patch-main_source_window_window.cpp
@@ -1,6 +1,6 @@
---- main/source/window/window.cpp.orig 2023-04-09 06:24:47 UTC
+--- main/source/window/window.cpp.orig 2023-06-24 10:07:39 UTC
+++ main/source/window/window.cpp
-@@ -272,7 +272,7 @@ namespace hex {
+@@ -220,7 +220,7 @@ namespace hex {
}
}
diff --git a/editors/imhex/files/patch-plugins_builtin_include_content_views_view__pattern__editor.hpp b/editors/imhex/files/patch-plugins_builtin_include_content_views_view__pattern__editor.hpp
index ccb254965155..2a25fa1ec85a 100644
--- a/editors/imhex/files/patch-plugins_builtin_include_content_views_view__pattern__editor.hpp
+++ b/editors/imhex/files/patch-plugins_builtin_include_content_views_view__pattern__editor.hpp
@@ -1,6 +1,6 @@
---- plugins/builtin/include/content/views/view_pattern_editor.hpp.orig 2023-04-04 10:04:22 UTC
+--- plugins/builtin/include/content/views/view_pattern_editor.hpp.orig 2023-06-24 14:40:57 UTC
+++ plugins/builtin/include/content/views/view_pattern_editor.hpp
-@@ -16,6 +16,7 @@
+@@ -19,6 +19,7 @@
#include <thread>
#include <vector>
#include <functional>
@@ -8,7 +8,7 @@
#include <TextEditor.h>
-@@ -65,7 +66,7 @@ namespace hex::plugin::builtin {
+@@ -151,7 +152,7 @@ namespace hex::plugin::builtin {
bool m_syncPatternSourceCode = false;
bool m_autoLoadPatterns = true;
diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_pl__visualizers.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_pl__visualizers.cpp
index 5639a0159ade..cd27742eb021 100644
--- a/editors/imhex/files/patch-plugins_builtin_source_content_pl__visualizers.cpp
+++ b/editors/imhex/files/patch-plugins_builtin_source_content_pl__visualizers.cpp
@@ -1,6 +1,6 @@
---- plugins/builtin/source/content/pl_visualizers.cpp.orig 2023-04-08 16:59:02 UTC
+--- plugins/builtin/source/content/pl_visualizers.cpp.orig 2023-06-24 10:07:39 UTC
+++ plugins/builtin/source/content/pl_visualizers.cpp
-@@ -303,11 +303,11 @@ namespace hex::plugin::builtin {
+@@ -307,11 +307,11 @@ namespace hex::plugin::builtin {
ImGui::TableNextColumn();
ImGui::TextUnformatted("hex.builtin.pl_visualizer.3d.rotation"_lang);
@@ -15,7 +15,7 @@
ImGui::TableNextRow();
ImGui::TableNextColumn();
-@@ -319,10 +319,10 @@ namespace hex::plugin::builtin {
+@@ -323,10 +323,10 @@ namespace hex::plugin::builtin {
ImGui::PopItemWidth();
for (u8 i = 0; i < 3; i++) {
diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_tools__entries.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_tools__entries.cpp
new file mode 100644
index 000000000000..4392233ab87e
--- /dev/null
+++ b/editors/imhex/files/patch-plugins_builtin_source_content_tools__entries.cpp
@@ -0,0 +1,25 @@
+--- plugins/builtin/source/content/tools_entries.cpp.orig 2023-05-21 08:44:41 UTC
++++ plugins/builtin/source/content/tools_entries.cpp
+@@ -1501,9 +1501,6 @@ namespace hex::plugin::builtin {
+ enum class InputType { infinity, notANumber, quietNotANumber, signalingNotANumber, regular, invalid };
+ std::string specialNumbers[] = {"inf", "Inf", "INF", "nan", "Nan", "NAN", "qnan", "Qnan", "QNAN", "snan", "Snan", "SNAN"};
+
+- // We allow any input in order to accept infinities and NaNs, all invalid entries
+- // are detected by from_chars. You can also enter -0 or -inf.
+- std::from_chars_result res;
+ if (ImGui::InputText("##resultFloat", decimalFloatingPointNumberString, flags)) {
+ // Always obtain sign first.
+ if (decimalFloatingPointNumberString[0] == '-') {
+@@ -1531,11 +1528,7 @@ namespace hex::plugin::builtin {
+
+ if (inputType == InputType::regular) {
+ decimalStrView = decimalFloatingPointNumberString;
+- res = std::from_chars(decimalStrView.data(), decimalStrView.data() + decimalStrView.size(), resultFloat);
+- // this is why we use from_chars
+- if (res.ec != std::errc()) {
+- inputType = InputType::invalid;
+- }
++ resultFloat = std::strtold(decimalStrView.data(), nullptr);
+ } else if (inputType == InputType::infinity) {
+ resultFloat = std::numeric_limits<long double>::infinity();
+ resultFloat *= (signBits == 1 ? -1 : 1);
diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp
index 94b040b8b8f5..ece991fcbe70 100644
--- a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp
+++ b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp
@@ -1,6 +1,6 @@
---- plugins/builtin/source/content/views/view_find.cpp.orig 2023-04-04 10:04:22 UTC
+--- plugins/builtin/source/content/views/view_find.cpp.orig 2023-06-24 10:07:39 UTC
+++ plugins/builtin/source/content/views/view_find.cpp
-@@ -314,7 +314,7 @@ namespace hex::plugin::builtin {
+@@ -265,7 +265,7 @@ namespace hex::plugin::builtin {
while (true) {
task.update(progress);
@@ -9,12 +9,12 @@
if (occurrence == reader.end())
break;
-@@ -423,7 +423,7 @@ namespace hex::plugin::builtin {
+@@ -391,7 +391,7 @@ namespace hex::plugin::builtin {
+ for (u64 address = searchRegion.getStartAddress(); address < searchRegion.getEndAddress(); address += advance) {
+ task.update(address);
- task.update(address);
+- auto result = std::visit([&](auto tag) {
++ auto result = std::visit([&, min=min, max=max](auto tag) {
+ using T = std::remove_cvref_t<std::decay_t<decltype(tag)>>;
-- auto result = std::visit([&](auto tag) {
-+ auto result = std::visit([&, min=min, max=max](auto tag) {
- using T = std::remove_cvref_t<std::decay_t<decltype(tag)>>;
-
- auto minValue = std::get<T>(min);
+ auto minValue = std::get<T>(min);
diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp
index ec2e8357c7dc..4dc2628bfc41 100644
--- a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp
+++ b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp
@@ -1,6 +1,6 @@
---- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2023-04-04 10:04:22 UTC
+--- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2023-06-24 10:07:39 UTC
+++ plugins/builtin/source/content/views/view_hex_editor.cpp
-@@ -298,7 +298,7 @@ namespace hex::plugin::builtin {
+@@ -300,7 +300,7 @@ namespace hex::plugin::builtin {
reader.seek(this->m_searchPosition.value_or(provider->getBaseAddress()));
constexpr static auto searchFunction = [](const auto &haystackBegin, const auto &haystackEnd, const auto &needleBegin, const auto &needleEnd) {
diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp
index e6d2be7ebd87..76a87920b3d8 100644
--- a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp
+++ b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp
@@ -1,32 +1,32 @@
---- plugins/builtin/source/content/views/view_pattern_editor.cpp.orig 2023-04-04 10:04:22 UTC
+--- plugins/builtin/source/content/views/view_pattern_editor.cpp.orig 2023-06-24 10:07:39 UTC
+++ plugins/builtin/source/content/views/view_pattern_editor.cpp
-@@ -440,9 +440,9 @@ namespace hex::plugin::builtin {
- dataProvider->writeRaw(0x00, section.data.data(), section.data.size());
- dataProvider->setReadOnly(true);
+@@ -494,9 +494,9 @@ namespace hex::plugin::builtin {
+ dataProvider->writeRaw(0x00, section.data.data(), section.data.size());
+ dataProvider->setReadOnly(true);
-- auto hexEditor = auto(this->m_sectionHexEditor);
-+ auto hexEditor = this->m_sectionHexEditor;
+- auto hexEditor = auto(this->m_sectionHexEditor);
++ auto hexEditor = this->m_sectionHexEditor;
-- hexEditor.setBackgroundHighlightCallback([this, id](u64 address, const u8 *, size_t) -> std::optional<color_t> {
-+ hexEditor.setBackgroundHighlightCallback([this, id=id](u64 address, const u8 *, size_t) -> std::optional<color_t> {
- if (this->m_runningEvaluators != 0)
- return std::nullopt;
- if (!ImHexApi::Provider::isValid())
-@@ -465,7 +465,7 @@ namespace hex::plugin::builtin {
- auto patternProvider = ImHexApi::Provider::get();
+- hexEditor.setBackgroundHighlightCallback([this, id, &runtime](u64 address, const u8 *, size_t) -> std::optional<color_t> {
++ hexEditor.setBackgroundHighlightCallback([this, id=id, &runtime](u64 address, const u8 *, size_t) -> std::optional<color_t> {
+ if (this->m_runningEvaluators != 0)
+ return std::nullopt;
+ if (!ImHexApi::Provider::isValid())
+@@ -519,7 +519,7 @@ namespace hex::plugin::builtin {
+ auto patternProvider = ImHexApi::Provider::get();
-- this->m_sectionWindowDrawer[patternProvider] = [id, patternProvider, dataProvider = std::move(dataProvider), hexEditor = std::move(hexEditor), patternDrawer = ui::PatternDrawer()] mutable {
-+ this->m_sectionWindowDrawer[patternProvider] = [id=id, patternProvider, dataProvider = std::move(dataProvider), hexEditor = std::move(hexEditor), patternDrawer = ui::PatternDrawer()] mutable {
- hexEditor.setProvider(dataProvider.get());
- hexEditor.draw(480_scaled);
- patternDrawer.setSelectionCallback([&](const auto ®ion) {
-@@ -952,7 +952,7 @@ namespace hex::plugin::builtin {
+- this->m_sectionWindowDrawer[patternProvider] = [this, id, patternProvider, dataProvider = std::move(dataProvider), hexEditor, patternDrawer = ui::PatternDrawer(), &runtime] mutable {
++ this->m_sectionWindowDrawer[patternProvider] = [this, id=id, patternProvider, dataProvider = std::move(dataProvider), hexEditor, patternDrawer = ui::PatternDrawer(), &runtime] mutable {
+ hexEditor.setProvider(dataProvider.get());
+ hexEditor.draw(480_scaled);
+ patternDrawer.setSelectionCallback([&](const auto ®ion) {
+@@ -1138,7 +1138,7 @@ namespace hex::plugin::builtin {
if (type->isTemplateType())
continue;
-- createNestedMenu(hex::splitString(typeName, "::"), [&] {
-+ createNestedMenu(hex::splitString(typeName, "::"), [&, typeName=typeName] {
+- createNestedMenu(hex::splitString(typeName, "::"), [&, this] {
++ createNestedMenu(hex::splitString(typeName, "::"), [&, this, typeName=typeName] {
std::string variableName;
for (char &c : hex::replaceStrings(typeName, "::", "_"))
variableName += static_cast<char>(std::tolower(c));
diff --git a/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp b/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp
index 3ac0ae00d22f..9f53cdcce3dd 100644
--- a/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp
+++ b/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp
@@ -1,12 +1,12 @@
---- plugins/builtin/source/ui/pattern_drawer.cpp.orig 2023-04-04 10:04:22 UTC
+--- plugins/builtin/source/ui/pattern_drawer.cpp.orig 2023-06-24 14:40:57 UTC
+++ plugins/builtin/source/ui/pattern_drawer.cpp
-@@ -155,7 +155,8 @@ namespace hex::plugin::builtin::ui {
+@@ -234,7 +234,8 @@ namespace hex::plugin::builtin::ui {
ImGui::TextUnformatted("hex.builtin.pattern_drawer.visualizer.invalid_parameter_count"_lang);
} else {
try {
-- visualizer.callback(pattern, iteratable, reset, { arguments.begin() + 1, arguments.end() });
+- visualizer.callback(pattern, iterable, reset, { arguments.begin() + 1, arguments.end() });
+ const std::vector<pl::core::Token::Literal> args = { arguments.begin() + 1, arguments.end() };
-+ visualizer.callback(pattern, iteratable, reset, args);
++ visualizer.callback(pattern, iterable, reset, args);
} catch (std::exception &e) {
this->m_lastVisualizerError = e.what();
}
diff --git a/editors/imhex/pkg-plist b/editors/imhex/pkg-plist
index 5172463a5756..02c7d66cd8e9 100644
--- a/editors/imhex/pkg-plist
+++ b/editors/imhex/pkg-plist
@@ -1,7 +1,6 @@
bin/imhex
-lib/libimhex.so.1.28.0
+lib/libimhex.so.1.30.1
share/applications/imhex.desktop
-%%DATADIR%%/constants/_schema.json
%%DATADIR%%/constants/crc16.json
%%DATADIR%%/constants/crc32.json
%%DATADIR%%/constants/http_status.json
@@ -65,6 +64,7 @@ share/applications/imhex.desktop
%%DATADIR%%/includes/std/sys.pat
%%DATADIR%%/includes/std/time.pat
%%DATADIR%%/includes/type/base.pat
+%%DATADIR%%/includes/type/base64.pat
%%DATADIR%%/includes/type/bcd.pat
%%DATADIR%%/includes/type/byte.pat
%%DATADIR%%/includes/type/color.pat
@@ -84,6 +84,8 @@ share/applications/imhex.desktop
%%DATADIR%%/includes/type/types/win32.pat
%%DATADIR%%/magic/nintendo_switch_magic
%%DATADIR%%/magic/portable_executable_magic
+%%DATADIR%%/patterns/7z.hexpat
+%%DATADIR%%/patterns/Crashlvl.hexpat
%%DATADIR%%/patterns/afe2.hexpat
%%DATADIR%%/patterns/ar.hexpat
%%DATADIR%%/patterns/arm_cm_vtor.hexpat
@@ -94,6 +96,7 @@ share/applications/imhex.desktop
%%DATADIR%%/patterns/cchva.hexpat
%%DATADIR%%/patterns/ccpal.hexpat
%%DATADIR%%/patterns/ccvxl.hexpat
+%%DATADIR%%/patterns/cda.hexpat
%%DATADIR%%/patterns/chm.hexpat
%%DATADIR%%/patterns/coff.hexpat
%%DATADIR%%/patterns/cpio.pat
@@ -106,6 +109,7 @@ share/applications/imhex.desktop
%%DATADIR%%/patterns/fdt.pat
%%DATADIR%%/patterns/flac.hexpat
%%DATADIR%%/patterns/fs.hexpat
+%%DATADIR%%/patterns/gb.hexpat
%%DATADIR%%/patterns/gif.hexpat
%%DATADIR%%/patterns/gzip.hexpat
%%DATADIR%%/patterns/ico.hexpat
@@ -118,8 +122,10 @@ share/applications/imhex.desktop
%%DATADIR%%/patterns/lnk.hexpat
%%DATADIR%%/patterns/lua54.hexpat
%%DATADIR%%/patterns/macho.hexpat
+%%DATADIR%%/patterns/max_v104.hexpat
%%DATADIR%%/patterns/midi.hexpat
%%DATADIR%%/patterns/minidump.hexpat
+%%DATADIR%%/patterns/mp4.hexpat
%%DATADIR%%/patterns/msgpack.hexpat
%%DATADIR%%/patterns/nacp.hexpat
%%DATADIR%%/patterns/nbt.hexpat
@@ -143,6 +149,7 @@ share/applications/imhex.desktop
%%DATADIR%%/patterns/stl.hexpat
%%DATADIR%%/patterns/tar.hexpat
%%DATADIR%%/patterns/tga.hexpat
+%%DATADIR%%/patterns/tiff.hexpat
%%DATADIR%%/patterns/uefi.hexpat
%%DATADIR%%/patterns/uf2.hexpat
%%DATADIR%%/patterns/usb.hexpat
@@ -154,6 +161,7 @@ share/applications/imhex.desktop
%%DATADIR%%/patterns/xci.hexpat
%%DATADIR%%/patterns/xilinx_bit.hexpat
%%DATADIR%%/patterns/zip.hexpat
+%%DATADIR%%/patterns/zlib.hexpat
%%DATADIR%%/patterns/zstd.hexpat
%%DATADIR%%/plugins/builtin.hexplug
share/metainfo/net.werwolv.imhex.appdata.xml