git: 7c1ed24b5828 - main - editors/imhex: Update to 1.22.0

From: MANTANI Nobutaka <nobutaka_at_FreeBSD.org>
Date: Sat, 10 Sep 2022 05:32:36 UTC
The branch main has been updated by nobutaka:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7c1ed24b5828fd553836d8e1677cf44e957092ac

commit 7c1ed24b5828fd553836d8e1677cf44e957092ac
Author:     MANTANI Nobutaka <nobutaka@FreeBSD.org>
AuthorDate: 2022-09-10 05:30:25 +0000
Commit:     MANTANI Nobutaka <nobutaka@FreeBSD.org>
CommitDate: 2022-09-10 05:31:33 +0000

    editors/imhex: Update to 1.22.0
---
 editors/imhex/Makefile                               | 10 +++++++---
 editors/imhex/distinfo                               | 16 +++++++++-------
 editors/imhex/files/patch-CMakeLists.txt             |  4 ++--
 editors/imhex/files/patch-cmake_build__helpers.cmake |  6 +++---
 ...l_pattern__language_lib_include_pl_core_token.hpp |  6 +++---
 editors/imhex/files/patch-main_source_init_tasks.cpp | 20 --------------------
 ...lugins_builtin_source_content_data__inspector.cpp |  8 ++++----
 ...uiltin_source_content_views_view__hex__editor.cpp |  6 +++---
 ...in_source_content_views_view__pattern__editor.cpp | 11 -----------
 .../patch-plugins_builtin_source_pattern__drawer.cpp | 11 -----------
 editors/imhex/pkg-plist                              | 12 +++++++++++-
 11 files changed, 42 insertions(+), 68 deletions(-)

diff --git a/editors/imhex/Makefile b/editors/imhex/Makefile
index d159f8127f5c..316c3a256064 100644
--- a/editors/imhex/Makefile
+++ b/editors/imhex/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	imhex
-PORTVERSION=	1.21.2
+PORTVERSION=	1.22.0
 DISTVERSIONPREFIX=	v
 CATEGORIES=	editors
 MASTER_SITES=	https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg
@@ -18,6 +18,7 @@ NOT_FOR_ARCHS_REASON=	__uint128_t and __int128_t are not supported
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX} \
 		btzy-nativefiledialog-extended-${GH_TAG_NATIVEFILEDIALOG}_GH0${EXTRACT_SUFX} \
 		capstone-engine-capstone-${GH_TAG_CAPSTONE}_GH0${EXTRACT_SUFX} \
+		CLIUtils-CLI11-${GH_TAG_CLI11}_GH0${EXTRACT_SUFX} \
 		fmtlib-fmt-${GH_TAG_FMT}_GH0${EXTRACT_SUFX} \
 		VirusTotal-yara-${GH_TAG_YARA}_GH0${EXTRACT_SUFX} \
 		WerWolv-libromfs-${GH_TAG_LIBROMFS}_GH0${EXTRACT_SUFX} \
@@ -44,6 +45,7 @@ GH_ACCOUNT=	WerWolv
 GH_PROJECT=	ImHex
 GH_TUPLE=	btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledialog \
 		capstone-engine:capstone:${GH_TAG_CAPSTONE}:capstone \
+		CLIUtils:CLI11:${GH_TAG_CLI11}:cli11 \
 		fmtlib:fmt:${GH_TAG_FMT}:fmt \
 		VirusTotal:yara:${GH_TAG_YARA}:yara \
 		WerWolv:ImHex-Patterns:${GH_TAG_IMHEX_PATTERNS}:imhex_patterns \
@@ -51,11 +53,12 @@ GH_TUPLE=	btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledi
 		WerWolv:libromfs:${GH_TAG_LIBROMFS}:libromfs
 
 GH_TAG_CAPSTONE=	d5141c0
+GH_TAG_CLI11=	faea921
 GH_TAG_FMT=	c4ee726
-GH_TAG_IMHEX_PATTERNS=	15548b9
+GH_TAG_IMHEX_PATTERNS=	befd6ef
 GH_TAG_LIBROMFS=	8c8556d
 GH_TAG_NATIVEFILEDIALOG=	6967d28
-GH_TAG_PATTERN_LANGUAGE=	fd6bb38
+GH_TAG_PATTERN_LANGUAGE=	912af51
 GH_TAG_YARA=	d5a7565
 
 CMAKE_ARGS=	-DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON -DIMHEX_STRIP_RELEASE=OFF -DIMHEX_PLUGINS_IN_SHARE=ON
@@ -82,6 +85,7 @@ post-extract:
 	${CP} -R ${WRKSRC_libromfs}/* ${WRKSRC}/lib/external/libromfs
 	${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
 	${CP} -R ${WRKSRC_yara}/* ${WRKSRC}/lib/external/yara/yara
 	${MKDIR} ${WRKDIR}/.build/_deps/imhex_patterns_src
 	${CP} -R ${WRKSRC_imhex_patterns}/* ${WRKDIR}/.build/_deps/imhex_patterns_src
diff --git a/editors/imhex/distinfo b/editors/imhex/distinfo
index ac034b341dc7..b171f3b15268 100644
--- a/editors/imhex/distinfo
+++ b/editors/imhex/distinfo
@@ -1,19 +1,21 @@
-TIMESTAMP = 1661008814
+TIMESTAMP = 1662299909
 SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec
 SIZE (imhex/xdg.hpp) = 7674
-SHA256 (imhex/WerWolv-ImHex-v1.21.2_GH0.tar.gz) = 621f569ca105b7567ae076b2d6764413e6ac3619833172d7506f994101b86108
-SIZE (imhex/WerWolv-ImHex-v1.21.2_GH0.tar.gz) = 10738148
+SHA256 (imhex/WerWolv-ImHex-v1.22.0_GH0.tar.gz) = 0b35b83e08e7e08314e3fb3da95aa139f260ed3e390ba6926fc69d86af6f644f
+SIZE (imhex/WerWolv-ImHex-v1.22.0_GH0.tar.gz) = 10752839
 SHA256 (imhex/btzy-nativefiledialog-extended-6967d28_GH0.tar.gz) = 67575871aca25f6b448831183851656d95cee5af773ac7b2a1f7f887f6d874d6
 SIZE (imhex/btzy-nativefiledialog-extended-6967d28_GH0.tar.gz) = 412145
+SHA256 (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 84773ee9577e6b719e5a84ad62cc381cf3027756690e1db839eaa50bcafc6c78
+SIZE (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 299718
 SHA256 (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 435d40757928fa73dec19c6d0fbf171bd76341391c8525ce1286927dab44c3e7
 SIZE (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 5761632
 SHA256 (imhex/fmtlib-fmt-c4ee726_GH0.tar.gz) = 05ba66b0a9ed040e5cfb07e845a0aa61fdbbb9a0cbd22a1860a303e8cbf343e4
 SIZE (imhex/fmtlib-fmt-c4ee726_GH0.tar.gz) = 833672
 SHA256 (imhex/VirusTotal-yara-d5a7565_GH0.tar.gz) = 1c908b160f2432a25aefc1e94147949d24bcb79c1412a2be840f767531f3ff7e
 SIZE (imhex/VirusTotal-yara-d5a7565_GH0.tar.gz) = 1287317
-SHA256 (imhex/WerWolv-ImHex-Patterns-15548b9_GH0.tar.gz) = 0e9abdd115eb9919bc5526f829110c0f31765cb2576eb1e64d9754c1aefda423
-SIZE (imhex/WerWolv-ImHex-Patterns-15548b9_GH0.tar.gz) = 4673034
-SHA256 (imhex/WerWolv-PatternLanguage-fd6bb38_GH0.tar.gz) = acb0721f2c43e0f0e909955fee2e3e8ff9894fedcb945d256edfd56c25a68137
-SIZE (imhex/WerWolv-PatternLanguage-fd6bb38_GH0.tar.gz) = 277785
+SHA256 (imhex/WerWolv-ImHex-Patterns-befd6ef_GH0.tar.gz) = 246a1173ac77a0cf084044f4d4a71e86345dfb942f2a436276b43d7683de0e39
+SIZE (imhex/WerWolv-ImHex-Patterns-befd6ef_GH0.tar.gz) = 5163202
+SHA256 (imhex/WerWolv-PatternLanguage-912af51_GH0.tar.gz) = 9bb0a56a567d26d4f13b2b47dea55a61d4db2c10cca71a195c9fcbb53f00f320
+SIZE (imhex/WerWolv-PatternLanguage-912af51_GH0.tar.gz) = 282718
 SHA256 (imhex/WerWolv-libromfs-8c8556d_GH0.tar.gz) = 46364edcf21a4cbe7c48094e755751aa03704a9c1efe3be5add5f52a15690474
 SIZE (imhex/WerWolv-libromfs-8c8556d_GH0.tar.gz) = 3868
diff --git a/editors/imhex/files/patch-CMakeLists.txt b/editors/imhex/files/patch-CMakeLists.txt
index 01f5b9277ce1..9ad03de1dafd 100644
--- a/editors/imhex/files/patch-CMakeLists.txt
+++ b/editors/imhex/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
---- CMakeLists.txt.orig	2022-08-05 10:52:34 UTC
+--- CMakeLists.txt.orig	2022-09-03 22:05:27 UTC
 +++ CMakeLists.txt
-@@ -21,8 +21,6 @@ project(imhex VERSION ${IMHEX_VERSION})
+@@ -22,8 +22,6 @@ project(imhex VERSION ${IMHEX_VERSION})
  
  # Make sure project is configured correctly
  setDefaultBuiltTypeIfUnset()
diff --git a/editors/imhex/files/patch-cmake_build__helpers.cmake b/editors/imhex/files/patch-cmake_build__helpers.cmake
index 658333ed0c52..07ee0f97de15 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	2022-08-14 12:54:20 UTC
+--- cmake/build_helpers.cmake.orig	2022-09-03 22:05:27 UTC
 +++ cmake/build_helpers.cmake
-@@ -367,17 +367,9 @@ function(downloadImHexPatternsFiles dest)
+@@ -374,17 +374,9 @@ function(downloadImHexPatternsFiles dest)
              set(PATTERNS_BRANCH ImHex-v${IMHEX_VERSION})
          endif ()
  
@@ -19,7 +19,7 @@
          endforeach ()
      endif ()
  
-@@ -385,7 +377,6 @@ endfunction()
+@@ -392,7 +384,6 @@ endfunction()
  
  macro(setupCompilerWarnings target)
      set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Werror")
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 3ea7d313dc01..9127b98bda28 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	2022-08-20 15:51:46 UTC
+--- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig	2022-09-04 13:52:32 UTC
 +++ lib/external/pattern_language/lib/include/pl/core/token.hpp
-@@ -153,9 +153,9 @@ namespace pl::core {
+@@ -152,9 +152,9 @@ namespace pl::core {
  
          using Literal    = std::variant<char, bool, u128, i128, double, std::string, ptrn::Pattern *>;
          using ValueTypes = std::variant<Keyword, Identifier, Operator, Literal, ValueType, Separator>;
@@ -12,7 +12,7 @@
          [[nodiscard]] constexpr static inline bool isInteger(const ValueType &type) {
              return isUnsigned(type) || isSigned(type);
          }
-@@ -431,128 +431,128 @@ namespace pl::core {
+@@ -198,128 +198,128 @@ namespace pl::core {
  
      namespace tkn {
  
diff --git a/editors/imhex/files/patch-main_source_init_tasks.cpp b/editors/imhex/files/patch-main_source_init_tasks.cpp
deleted file mode 100644
index 97f2f64982b8..000000000000
--- a/editors/imhex/files/patch-main_source_init_tasks.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- main/source/init/tasks.cpp.orig	2022-08-20 13:59:16 UTC
-+++ main/source/init/tasks.cpp
-@@ -4,6 +4,7 @@
- #include <imgui_freetype.h>
- 
- #include <hex/api/content_registry.hpp>
-+#include <hex/api/project_file_manager.hpp>
- #include <hex/ui/view.hpp>
- #include <hex/helpers/net.hpp>
- #include <hex/helpers/fs.hpp>
-@@ -228,6 +229,9 @@ namespace hex::init {
-                 delete visualizer;
-             visualizers.clear();
-         }
-+
-+        ProjectFile::getHandlers().clear();
-+        ProjectFile::getProviderHandlers().clear();
- 
-         return true;
-     }
diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_data__inspector.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_data__inspector.cpp
index 0516ec735415..f5bcbad9ec53 100644
--- a/editors/imhex/files/patch-plugins_builtin_source_content_data__inspector.cpp
+++ b/editors/imhex/files/patch-plugins_builtin_source_content_data__inspector.cpp
@@ -1,7 +1,7 @@
---- plugins/builtin/source/content/data_inspector.cpp.orig	2022-08-05 19:30:19 UTC
+--- plugins/builtin/source/content/data_inspector.cpp.orig	2022-09-03 22:05:27 UTC
 +++ plugins/builtin/source/content/data_inspector.cpp
-@@ -102,7 +102,7 @@ namespace hex::plugin::builtin {
-         auto number   = hex::signExtend(Size * 8, hex::changeEndianess(value, Size, endian));
+@@ -105,7 +105,7 @@ namespace hex::plugin::builtin {
+ 
          bool negative = number < 0;
  
 -        return hex::format(format, negative ? "-" : "", std::abs(number));
@@ -9,7 +9,7 @@
      }
  
      template<std::integral T, size_t Size = sizeof(T)>
-@@ -282,7 +282,7 @@ namespace hex::plugin::builtin {
+@@ -285,7 +285,7 @@ namespace hex::plugin::builtin {
  
                  auto number   = hex::crypt::decodeSleb128(buffer);
                  bool negative = number < 0;
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 211e587b0096..46ef7fe6c59b 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,7 +1,7 @@
---- plugins/builtin/source/content/views/view_hex_editor.cpp.orig	2022-08-17 21:25:52 UTC
+--- plugins/builtin/source/content/views/view_hex_editor.cpp.orig	2022-09-03 22:05:27 UTC
 +++ plugins/builtin/source/content/views/view_hex_editor.cpp
-@@ -250,7 +250,7 @@ namespace hex::plugin::builtin {
-                 reader.seek(this->m_searchPosition.value_or(editor->getSelection().getStartAddress()));
+@@ -288,7 +288,7 @@ namespace hex::plugin::builtin {
+             reader.seek(this->m_searchPosition.value_or(0x00));
  
              constexpr static auto searchFunction = [](const auto &haystackBegin, const auto &haystackEnd, const auto &needleBegin, const auto &needleEnd) {
 -                return std::search(haystackBegin, haystackEnd, std::boyer_moore_horspool_searcher(needleBegin, 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
deleted file mode 100644
index 59dc184fb2d7..000000000000
--- a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- plugins/builtin/source/content/views/view_pattern_editor.cpp.orig	2022-08-20 15:52:06 UTC
-+++ plugins/builtin/source/content/views/view_pattern_editor.cpp
-@@ -741,7 +741,7 @@ namespace hex::plugin::builtin {
-                     ImGui::TableNextColumn();
-                     ImGui::TextFormatted("{}", pattern->getEndian() == std::endian::little ? "hex.builtin.common.little"_lang : "hex.builtin.common.big"_lang);
- 
--                    if (const auto &comment = pattern->getComment(); comment.has_value()) {
-+                    if (const auto &comment = pattern->getComment(); comment != nullptr) {
-                         ImGui::TableNextRow();
-                         ImGui::TableNextColumn();
-                         ImGui::TextFormatted("{}: ", "hex.builtin.common.comment"_lang);
diff --git a/editors/imhex/files/patch-plugins_builtin_source_pattern__drawer.cpp b/editors/imhex/files/patch-plugins_builtin_source_pattern__drawer.cpp
deleted file mode 100644
index 73a8ad7e7f02..000000000000
--- a/editors/imhex/files/patch-plugins_builtin_source_pattern__drawer.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- plugins/builtin/source/pattern_drawer.cpp.orig	2022-08-20 15:51:56 UTC
-+++ plugins/builtin/source/pattern_drawer.cpp
-@@ -277,7 +277,7 @@ namespace hex {
- 
- 
-     void PatternDrawer::drawCommentTooltip(const pl::ptrn::Pattern &pattern) const {
--        if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem) && pattern.getComment().has_value()) {
-+        if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem) && pattern.getComment() != nullptr) {
-             ImGui::BeginTooltip();
-             ImGui::TextUnformatted(pattern.getComment()->c_str());
-             ImGui::EndTooltip();
diff --git a/editors/imhex/pkg-plist b/editors/imhex/pkg-plist
index d04fe16cc826..8a1287c227e8 100644
--- a/editors/imhex/pkg-plist
+++ b/editors/imhex/pkg-plist
@@ -1,5 +1,5 @@
 bin/imhex
-lib/libimhex.so.1.21.2
+lib/libimhex.so.1.22.0
 share/applications/imhex.desktop
 %%DATADIR%%/constants/_schema.json
 %%DATADIR%%/constants/crc16.json
@@ -13,6 +13,7 @@ share/applications/imhex.desktop
 %%DATADIR%%/encodings/ascii_oem.tbl
 %%DATADIR%%/encodings/baltic_iso.tbl
 %%DATADIR%%/encodings/baltic_windows.tbl
+%%DATADIR%%/encodings/cyrillic_cp866.tbl
 %%DATADIR%%/encodings/cyrillic_iso.tbl
 %%DATADIR%%/encodings/cyrillic_koi8_r.tbl
 %%DATADIR%%/encodings/cyrillic_koi8_u.tbl
@@ -21,6 +22,7 @@ share/applications/imhex.desktop
 %%DATADIR%%/encodings/eastern_europe_windows.tbl
 %%DATADIR%%/encodings/ebcdic.tbl
 %%DATADIR%%/encodings/euc_jp.tbl
+%%DATADIR%%/encodings/euc_kr.tbl
 %%DATADIR%%/encodings/greek_iso.tbl
 %%DATADIR%%/encodings/greek_windows.tbl
 %%DATADIR%%/encodings/hebrew_iso.tbl
@@ -63,12 +65,14 @@ share/applications/imhex.desktop
 %%DATADIR%%/includes/type/leb128.pat
 %%DATADIR%%/includes/type/mac.pat
 %%DATADIR%%/includes/type/path.pat
+%%DATADIR%%/includes/type/size.pat
 %%DATADIR%%/includes/type/time.pat
 %%DATADIR%%/magic/nintendo_switch_magic
 %%DATADIR%%/magic/portable_executable_magic
 %%DATADIR%%/patterns/afe2.hexpat
 %%DATADIR%%/patterns/ar.hexpat
 %%DATADIR%%/patterns/arm_cm_vtor.hexpat
+%%DATADIR%%/patterns/bencode.hexpat
 %%DATADIR%%/patterns/bmp.hexpat
 %%DATADIR%%/patterns/dds.hexpat
 %%DATADIR%%/patterns/elf.hexpat
@@ -78,17 +82,23 @@ share/applications/imhex.desktop
 %%DATADIR%%/patterns/ip.hexpat
 %%DATADIR%%/patterns/iso.hexpat
 %%DATADIR%%/patterns/java_class.hexpat
+%%DATADIR%%/patterns/lnk.hexpat
 %%DATADIR%%/patterns/midi.hexpat
 %%DATADIR%%/patterns/nacp.hexpat
 %%DATADIR%%/patterns/nro.hexpat
+%%DATADIR%%/patterns/ntag.hexpat
+%%DATADIR%%/patterns/ogg.hexpat
 %%DATADIR%%/patterns/pcap.hexpat
 %%DATADIR%%/patterns/pe.hexpat
 %%DATADIR%%/patterns/png.hexpat
 %%DATADIR%%/patterns/prodinfo.hexpat
+%%DATADIR%%/patterns/protobuf.hexpat
 %%DATADIR%%/patterns/spirv.hexpat
+%%DATADIR%%/patterns/stl.hexpat
 %%DATADIR%%/patterns/tga.hexpat
 %%DATADIR%%/patterns/uf2.hexpat
 %%DATADIR%%/patterns/vdf.hexpat
+%%DATADIR%%/patterns/vhdx.hexpat
 %%DATADIR%%/patterns/wav.hexpat
 %%DATADIR%%/patterns/zip.hexpat
 %%DATADIR%%/plugins/builtin.hexplug