git: 5a620617c709 - main - editors/imhex: Update 1.23.0

From: MANTANI Nobutaka <nobutaka_at_FreeBSD.org>
Date: Sat, 17 Sep 2022 02:24:56 UTC
The branch main has been updated by nobutaka:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5a620617c709d772d710d0e0eeb016470d9b78bc

commit 5a620617c709d772d710d0e0eeb016470d9b78bc
Author:     MANTANI Nobutaka <nobutaka@FreeBSD.org>
AuthorDate: 2022-09-17 02:22:43 +0000
Commit:     MANTANI Nobutaka <nobutaka@FreeBSD.org>
CommitDate: 2022-09-17 02:23:46 +0000

    editors/imhex: Update 1.23.0
---
 editors/imhex/Makefile                             | 10 ++++----
 editors/imhex/distinfo                             | 18 +++++++--------
 .../imhex/files/patch-cmake_build__helpers.cmake   | 18 +++++++++++----
 ...ern__language_lib_include_pl_core_evaluator.hpp | 10 ++++++++
 ...pattern__language_lib_include_pl_core_token.hpp | 27 ++++++++++++++--------
 ...ins_builtin_source_content_views_view__find.cpp |  6 ++---
 editors/imhex/pkg-plist                            | 21 +++++++++++++----
 7 files changed, 75 insertions(+), 35 deletions(-)

diff --git a/editors/imhex/Makefile b/editors/imhex/Makefile
index 316c3a256064..67c70489ed06 100644
--- a/editors/imhex/Makefile
+++ b/editors/imhex/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	imhex
-PORTVERSION=	1.22.0
+PORTVERSION=	1.23.0
 DISTVERSIONPREFIX=	v
 CATEGORIES=	editors
 MASTER_SITES=	https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg
@@ -55,13 +55,15 @@ GH_TUPLE=	btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledi
 GH_TAG_CAPSTONE=	d5141c0
 GH_TAG_CLI11=	faea921
 GH_TAG_FMT=	c4ee726
-GH_TAG_IMHEX_PATTERNS=	befd6ef
+GH_TAG_IMHEX_PATTERNS=	5481c2f
 GH_TAG_LIBROMFS=	8c8556d
 GH_TAG_NATIVEFILEDIALOG=	6967d28
-GH_TAG_PATTERN_LANGUAGE=	912af51
+GH_TAG_PATTERN_LANGUAGE=	143628a
 GH_TAG_YARA=	d5a7565
 
-CMAKE_ARGS=	-DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON -DIMHEX_STRIP_RELEASE=OFF -DIMHEX_PLUGINS_IN_SHARE=ON
+CMAKE_ARGS=	-DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON \
+		-DIMHEX_STRIP_RELEASE=OFF -DIMHEX_PLUGINS_IN_SHARE=ON \
+		-DIMHEX_OFFLINE_BUILD=ON
 
 PORTDOCS=	README.md
 
diff --git a/editors/imhex/distinfo b/editors/imhex/distinfo
index b171f3b15268..4cdb63a115e0 100644
--- a/editors/imhex/distinfo
+++ b/editors/imhex/distinfo
@@ -1,21 +1,21 @@
-TIMESTAMP = 1662299909
+TIMESTAMP = 1663342027
 SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec
 SIZE (imhex/xdg.hpp) = 7674
-SHA256 (imhex/WerWolv-ImHex-v1.22.0_GH0.tar.gz) = 0b35b83e08e7e08314e3fb3da95aa139f260ed3e390ba6926fc69d86af6f644f
-SIZE (imhex/WerWolv-ImHex-v1.22.0_GH0.tar.gz) = 10752839
+SHA256 (imhex/WerWolv-ImHex-v1.23.0_GH0.tar.gz) = 0e5da0f5061b0370c527ad11cca196fbf9264d5f996bb1d79a8d15549062af39
+SIZE (imhex/WerWolv-ImHex-v1.23.0_GH0.tar.gz) = 10927565
 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/CLIUtils-CLI11-faea921_GH0.tar.gz) = 84773ee9577e6b719e5a84ad62cc381cf3027756690e1db839eaa50bcafc6c78
+SIZE (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 299718
 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-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-ImHex-Patterns-5481c2f_GH0.tar.gz) = cfa2c76fb0986e406a3541202df4b7e2e5b8cf6bcf5fb14d6605efb1ca32f6bc
+SIZE (imhex/WerWolv-ImHex-Patterns-5481c2f_GH0.tar.gz) = 5171762
+SHA256 (imhex/WerWolv-PatternLanguage-143628a_GH0.tar.gz) = 4d284923d1fec8bb942145365cd57e0b33e786c5db2cd7d3d133be417a516070
+SIZE (imhex/WerWolv-PatternLanguage-143628a_GH0.tar.gz) = 288257
 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-cmake_build__helpers.cmake b/editors/imhex/files/patch-cmake_build__helpers.cmake
index 07ee0f97de15..0ebdb118cf2a 100644
--- a/editors/imhex/files/patch-cmake_build__helpers.cmake
+++ b/editors/imhex/files/patch-cmake_build__helpers.cmake
@@ -1,9 +1,10 @@
---- cmake/build_helpers.cmake.orig	2022-09-03 22:05:27 UTC
+--- cmake/build_helpers.cmake.orig	2022-09-15 12:40:14 UTC
 +++ cmake/build_helpers.cmake
-@@ -374,17 +374,9 @@ function(downloadImHexPatternsFiles dest)
+@@ -383,24 +383,15 @@ function(downloadImHexPatternsFiles dest)
+         else ()
              set(PATTERNS_BRANCH ImHex-v${IMHEX_VERSION})
          endif ()
- 
+-
 -        FetchContent_Declare(
 -            imhex_patterns
 -            GIT_REPOSITORY https://github.com/WerWolv/ImHex-Patterns.git
@@ -12,14 +13,21 @@
 -
 -        FetchContent_Populate(imhex_patterns)
 -
+     else ()
+         # Maybe patterns are cloned to a subdirectory
+-        set(imhex_patterns_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ImHex-Patterns")
++        set(imhex_patterns_SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/imhex_patterns_src")
+     endif ()
+ 
+     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 "${CMAKE_BINARY_DIR}/_deps/imhex_patterns_src/${FOLDER}" DESTINATION "share/imhex/")
++            install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "share/imhex/")
          endforeach ()
      endif ()
  
-@@ -392,7 +384,6 @@ endfunction()
+@@ -408,7 +399,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_evaluator.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_evaluator.hpp
new file mode 100644
index 000000000000..4a4690ac6ba2
--- /dev/null
+++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_evaluator.hpp
@@ -0,0 +1,10 @@
+--- lib/external/pattern_language/lib/include/pl/core/evaluator.hpp.orig	2022-09-16 15:53:53 UTC
++++ lib/external/pattern_language/lib/include/pl/core/evaluator.hpp
+@@ -6,6 +6,7 @@
+ #include <optional>
+ #include <vector>
+ #include <memory>
++#include <unordered_map>
+ 
+ #include <pl/core/log_console.hpp>
+ #include <pl/core/token.hpp>
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 9127b98bda28..674688dd1b86 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-09-04 13:52:32 UTC
+--- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig	2022-09-16 15:30:16 UTC
 +++ lib/external/pattern_language/lib/include/pl/core/token.hpp
-@@ -152,9 +152,9 @@ namespace pl::core {
+@@ -148,9 +148,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);
          }
-@@ -198,128 +198,128 @@ namespace pl::core {
+@@ -194,133 +194,133 @@ namespace pl::core {
  
      namespace tkn {
  
@@ -43,6 +43,7 @@
 -            constexpr auto This         = createToken(core::Token::Type::Keyword, Token::Keyword::This);
 -            constexpr auto In           = createToken(core::Token::Type::Keyword, Token::Keyword::In);
 -            constexpr auto Out          = createToken(core::Token::Type::Keyword, Token::Keyword::Out);
+-            constexpr auto Reference    = createToken(core::Token::Type::Keyword, Token::Keyword::Reference);
 +            inline auto If           = createToken(core::Token::Type::Keyword, Token::Keyword::If);
 +            inline auto Else         = createToken(core::Token::Type::Keyword, Token::Keyword::Else);
 +            inline auto While        = createToken(core::Token::Type::Keyword, Token::Keyword::While);
@@ -63,17 +64,25 @@
 +            inline auto This         = createToken(core::Token::Type::Keyword, Token::Keyword::This);
 +            inline auto In           = createToken(core::Token::Type::Keyword, Token::Keyword::In);
 +            inline auto Out          = createToken(core::Token::Type::Keyword, Token::Keyword::Out);
++            inline auto Reference    = createToken(core::Token::Type::Keyword, Token::Keyword::Reference);
  
          }
  
          namespace Literal {
  
--            constexpr auto Identifier   = [](const std::string &name = { }) -> Token     { return createToken(core::Token::Type::Identifier, Token::Identifier(name)); };
--            constexpr auto Numeric      = [](const Token::Literal &value = { }) -> Token { return createToken(core::Token::Type::Integer, value); };
--            constexpr auto String       = [](const std::string &value = { }) -> Token    { return createToken(core::Token::Type::String, Token::Literal(value)); };
-+            inline auto Identifier   = [](const std::string &name = { }) -> Token     { return createToken(core::Token::Type::Identifier, Token::Identifier(name)); };
-+            inline auto Numeric      = [](const Token::Literal &value = { }) -> Token { return createToken(core::Token::Type::Integer, value); };
-+            inline auto String       = [](const std::string &value = { }) -> Token    { return createToken(core::Token::Type::String, Token::Literal(value)); };
+-            constexpr auto IdentifierValue   = [](const std::string &name = { }) -> Token     { return createToken(core::Token::Type::Identifier, Token::Identifier(name)); };
+-            constexpr auto NumericValue      = [](const Token::Literal &value = { }) -> Token { return createToken(core::Token::Type::Integer, value); };
+-            constexpr auto StringValue       = [](const std::string &value = { }) -> Token    { return createToken(core::Token::Type::String, Token::Literal(value)); };
++            inline auto IdentifierValue   = [](const std::string &name = { }) -> Token     { return createToken(core::Token::Type::Identifier, Token::Identifier(name)); };
++            inline auto NumericValue      = [](const Token::Literal &value = { }) -> Token { return createToken(core::Token::Type::Integer, value); };
++            inline auto StringValue       = [](const std::string &value = { }) -> Token    { return createToken(core::Token::Type::String, Token::Literal(value)); };
+ 
+-            constexpr auto Identifier = createToken(core::Token::Type::Identifier, { });
+-            constexpr auto Numeric = createToken(core::Token::Type::Integer, { });
+-            constexpr auto String = createToken(core::Token::Type::String, { });
++            inline auto Identifier = createToken(core::Token::Type::Identifier, { });
++            inline auto Numeric = createToken(core::Token::Type::Integer, { });
++            inline auto String = createToken(core::Token::Type::String, { });
  
          }
  
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 f05750165eea..1bdd6465fdb3 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,7 +1,7 @@
---- plugins/builtin/source/content/views/view_find.cpp.orig	2022-08-17 21:25:52 UTC
+--- plugins/builtin/source/content/views/view_find.cpp.orig	2022-09-15 12:40:14 UTC
 +++ plugins/builtin/source/content/views/view_find.cpp
-@@ -236,7 +236,7 @@ namespace hex::plugin::builtin {
-         auto sequence = hex::decodeByteString(settings.sequence);
+@@ -239,7 +239,7 @@ namespace hex::plugin::builtin {
+ 
          auto occurrence = reader.begin();
          while (true) {
 -            occurrence = std::search(reader.begin(), reader.end(), std::boyer_moore_horspool_searcher(sequence.begin(), sequence.end()));
diff --git a/editors/imhex/pkg-plist b/editors/imhex/pkg-plist
index 8a1287c227e8..7e87693511d9 100644
--- a/editors/imhex/pkg-plist
+++ b/editors/imhex/pkg-plist
@@ -1,11 +1,24 @@
 bin/imhex
-lib/libimhex.so.1.22.0
+lib/libimhex.so.1.23.0
 share/applications/imhex.desktop
 %%DATADIR%%/constants/_schema.json
 %%DATADIR%%/constants/crc16.json
 %%DATADIR%%/constants/crc32.json
 %%DATADIR%%/constants/http_status.json
 %%DATADIR%%/constants/linux_errors.json
+%%DATADIR%%/includes/hex/core.pat
+%%DATADIR%%/includes/hex/http.pat
+%%DATADIR%%/includes/hex/impl/imhex_check.pat
+%%DATADIR%%/includes/type/types/010.pat
+%%DATADIR%%/includes/type/types/c.pat
+%%DATADIR%%/includes/type/types/linux.pat
+%%DATADIR%%/includes/type/types/rust.pat
+%%DATADIR%%/includes/type/types/win32.pat
+%%DATADIR%%/patterns/bson.hexpat
+%%DATADIR%%/patterns/flac.hexpat
+%%DATADIR%%/patterns/minidump.hexpat
+%%DATADIR%%/patterns/msgpack.hexpat
+%%DATADIR%%/patterns/xilinx_bit.hexpat
 %%DATADIR%%/encodings/arabic_iso.tbl
 %%DATADIR%%/encodings/arabic_windows.tbl
 %%DATADIR%%/encodings/ascii.tbl
@@ -40,21 +53,17 @@ share/applications/imhex.desktop
 %%DATADIR%%/encodings/turkish_windows.tbl
 %%DATADIR%%/encodings/utf8.tbl
 %%DATADIR%%/encodings/vietnamese.tbl
-%%DATADIR%%/includes/cstdint.pat
 %%DATADIR%%/includes/std/bit.pat
-%%DATADIR%%/includes/std/cint.pat
 %%DATADIR%%/includes/std/core.pat
 %%DATADIR%%/includes/std/ctype.pat
 %%DATADIR%%/includes/std/file.pat
 %%DATADIR%%/includes/std/fxpt.pat
 %%DATADIR%%/includes/std/hash.pat
-%%DATADIR%%/includes/std/http.pat
 %%DATADIR%%/includes/std/io.pat
 %%DATADIR%%/includes/std/limits.pat
 %%DATADIR%%/includes/std/math.pat
 %%DATADIR%%/includes/std/mem.pat
 %%DATADIR%%/includes/std/ptr.pat
-%%DATADIR%%/includes/std/rustint.pat
 %%DATADIR%%/includes/std/string.pat
 %%DATADIR%%/includes/std/sys.pat
 %%DATADIR%%/includes/std/time.pat
@@ -102,4 +111,6 @@ share/applications/imhex.desktop
 %%DATADIR%%/patterns/wav.hexpat
 %%DATADIR%%/patterns/zip.hexpat
 %%DATADIR%%/plugins/builtin.hexplug
+share/metainfo/net.werwolv.imhex.appdata.xml
+share/metainfo/net.werwolv.imhex.metainfo.xml
 share/pixmaps/imhex.png