diff --git a/editors/imhex/Makefile b/editors/imhex/Makefile index 5e48b4f72f3d..017209b85998 100644 --- a/editors/imhex/Makefile +++ b/editors/imhex/Makefile @@ -1,94 +1,93 @@ PORTNAME= imhex -PORTVERSION= 1.17.0 +PORTVERSION= 1.18.1 DISTVERSIONPREFIX= v CATEGORIES= editors MASTER_SITES= https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg DISTFILES= xdg.hpp:xdg DIST_SUBDIR= imhex MAINTAINER= nobutaka@FreeBSD.org COMMENT= Hex editor for reverse engineers and programmers LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE NOT_FOR_ARCHS= i386 powerpc 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} \ fmtlib-fmt-${GH_TAG_FMT}_GH0${EXTRACT_SUFX} \ VirusTotal-yara-${GH_TAG_YARA}_GH0${EXTRACT_SUFX} \ WerWolv-libromfs-${GH_TAG_LIBROMFS}_GH0${EXTRACT_SUFX} \ WerWolv-ImHex-Patterns-${GH_TAG_IMHEX_PATTERNS}_GH0${EXTRACT_SUFX} \ WerWolv-PatternLanguage-${GH_TAG_PATTERN_LANGUAGE}_GH0${EXTRACT_SUFX} BUILD_DEPENDS= glm>0:math/glm \ - nlohmann-json>0:devel/nlohmann-json \ - ${LOCALBASE}/include/range/v3/range.hpp:devel/range-v3 + nlohmann-json>0:devel/nlohmann-json LIB_DEPENDS= libcurl.so:ftp/curl \ libfreetype.so:print/freetype2 \ libglfw.so:graphics/glfw \ libharfbuzz.so:print/harfbuzz \ libmbedtls.so:security/mbedtls \ libtre.so:textproc/libtre USES= cmake gl gnome pkgconfig python:3.8+ xorg USE_GL= gl USE_GNOME= cairo gdkpixbuf2 gtk30 USE_XORG= x11 xcb xau xdmcp USE_GITHUB= yes GH_ACCOUNT= WerWolv GH_PROJECT= ImHex GH_TUPLE= btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledialog \ capstone-engine:capstone:${GH_TAG_CAPSTONE}:capstone \ fmtlib:fmt:${GH_TAG_FMT}:fmt \ VirusTotal:yara:${GH_TAG_YARA}:yara \ WerWolv:ImHex-Patterns:${GH_TAG_IMHEX_PATTERNS}:imhex_patterns \ WerWolv:PatternLanguage:${GH_TAG_PATTERN_LANGUAGE}:pattern_language \ WerWolv:libromfs:${GH_TAG_LIBROMFS}:libromfs GH_TAG_CAPSTONE= d5141c0 GH_TAG_FMT= bc654fa GH_TAG_IMHEX_PATTERNS= 4ec37de GH_TAG_LIBROMFS= f14e88a GH_TAG_NATIVEFILEDIALOG= 28ade5a -GH_TAG_PATTERN_LANGUAGE= 49bafd8 +GH_TAG_PATTERN_LANGUAGE= 23ec4e4 GH_TAG_YARA= 1367943 CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON CXXFLAGS+= -fPIC PORTDOCS= README.md OPTIONS_DEFINE= DOCS NLS NLS_USES= gettext .include OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # Before LLVM13 import to the base system .if (${OSMAJOR} == 12 && ${OSVERSION} < 1203505) \ || (${OSMAJOR} == 13 && ${OSVERSION} < 1300523) \ || (${OSMAJOR} == 14 && ${OSVERSION} < 1400042) IGNORE= will not build due to C++20 API functions unavailable in old libc++ .endif post-extract: ${CP} ${DISTDIR}/${DIST_SUBDIR}/xdg.hpp ${WRKSRC}/lib/external/xdgpp ${CP} -R ${WRKSRC_capstone}/* ${WRKSRC}/lib/external/capstone ${CP} -R ${WRKSRC_fmt}/* ${WRKSRC}/lib/external/fmt ${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_yara}/* ${WRKSRC}/lib/external/yara/yara ${MKDIR} ${WRKDIR}/.build/_deps/imhex_patterns_src ${CP} -R ${WRKSRC_imhex_patterns}/* ${WRKDIR}/.build/_deps/imhex_patterns_src post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} .include diff --git a/editors/imhex/distinfo b/editors/imhex/distinfo index 2ed552024e28..84f1d1f63dd1 100644 --- a/editors/imhex/distinfo +++ b/editors/imhex/distinfo @@ -1,19 +1,19 @@ -TIMESTAMP = 1651665999 +TIMESTAMP = 1653792475 SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec SIZE (imhex/xdg.hpp) = 7674 -SHA256 (imhex/WerWolv-ImHex-v1.17.0_GH0.tar.gz) = 08e7c6c2b43708e71ad8a2de01d8f4b200e6fb7d17fd29cc9eba76f4f82e03c0 -SIZE (imhex/WerWolv-ImHex-v1.17.0_GH0.tar.gz) = 8723416 +SHA256 (imhex/WerWolv-ImHex-v1.18.1_GH0.tar.gz) = 55159316af07042d494570d0f6f8fcfdc9bbc0d3ebd35fe7d202d0f90d116b1e +SIZE (imhex/WerWolv-ImHex-v1.18.1_GH0.tar.gz) = 8726145 SHA256 (imhex/btzy-nativefiledialog-extended-28ade5a_GH0.tar.gz) = dcba95e4af561468fd30533882af0733a8e4df7a963c2a19eef9789c90807e28 SIZE (imhex/btzy-nativefiledialog-extended-28ade5a_GH0.tar.gz) = 409643 SHA256 (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 435d40757928fa73dec19c6d0fbf171bd76341391c8525ce1286927dab44c3e7 SIZE (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 5761632 SHA256 (imhex/fmtlib-fmt-bc654fa_GH0.tar.gz) = 90d5bbae46999d81510e671b49a356cd98a086ba8b7547f5065faa74f32fffad SIZE (imhex/fmtlib-fmt-bc654fa_GH0.tar.gz) = 826857 SHA256 (imhex/VirusTotal-yara-1367943_GH0.tar.gz) = 2afca72e2dd10a929d1341e69f1f6d170d421f04a3d6f3321bb8fb4b8982cf07 SIZE (imhex/VirusTotal-yara-1367943_GH0.tar.gz) = 1284035 SHA256 (imhex/WerWolv-ImHex-Patterns-4ec37de_GH0.tar.gz) = 59e81f8d4dbeb21da5ddf6c6dcbf404b79c32d583f59a9be6d01c3468effa4bd SIZE (imhex/WerWolv-ImHex-Patterns-4ec37de_GH0.tar.gz) = 217951 -SHA256 (imhex/WerWolv-PatternLanguage-49bafd8_GH0.tar.gz) = 48080776130cdf3bed27dda4fd8b9babbcf6e77bbb375ff1125cc7f71b78da7e -SIZE (imhex/WerWolv-PatternLanguage-49bafd8_GH0.tar.gz) = 168895 +SHA256 (imhex/WerWolv-PatternLanguage-23ec4e4_GH0.tar.gz) = f7b405bfc37a19bdd538e94df7eaa6f42524fd6806a65c564c41b684909a7b5f +SIZE (imhex/WerWolv-PatternLanguage-23ec4e4_GH0.tar.gz) = 170287 SHA256 (imhex/WerWolv-libromfs-f14e88a_GH0.tar.gz) = cb375ae5b5539d19f6a17af1690e0b3cbbd0ad2e4282ce3c33efb94960ebff4b SIZE (imhex/WerWolv-libromfs-f14e88a_GH0.tar.gz) = 3600 diff --git a/editors/imhex/files/patch-lib_libimhex_include_hex_api_keybinding.hpp b/editors/imhex/files/patch-lib_libimhex_include_hex_api_keybinding.hpp deleted file mode 100644 index dd14015b2fab..000000000000 --- a/editors/imhex/files/patch-lib_libimhex_include_hex_api_keybinding.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- lib/libimhex/include/hex/api/keybinding.hpp.orig 2022-01-16 14:56:46 UTC -+++ lib/libimhex/include/hex/api/keybinding.hpp -@@ -7,6 +7,8 @@ - #include - #include - -+#include -+ - struct ImGuiWindow; - - namespace hex { diff --git a/editors/imhex/files/patch-lib_libimhex_include_hex_helpers_utils.hpp b/editors/imhex/files/patch-lib_libimhex_include_hex_helpers_utils.hpp deleted file mode 100644 index 239e4d750c1f..000000000000 --- a/editors/imhex/files/patch-lib_libimhex_include_hex_helpers_utils.hpp +++ /dev/null @@ -1,24 +0,0 @@ ---- lib/libimhex/include/hex/helpers/utils.hpp.orig 2022-04-17 23:53:01 UTC -+++ lib/libimhex/include/hex/helpers/utils.hpp -@@ -94,6 +94,12 @@ namespace hex { - template - using SizeType = typename SizeTypeImpl::Type; - -+ // Workaround for FreeBSD versions that std::has_single_bit() is not available -+ template -+ constexpr bool has_single_bit(T x) { -+ return x != 0 && (((x & (x - 1)) == 0)); -+ } -+ - template - constexpr T changeEndianess(const T &value, std::endian endian) { - if (endian == std::endian::native) -@@ -106,7 +112,7 @@ namespace hex { - - SizeType swapped; - -- if constexpr (!std::has_single_bit(Size) || Size > 16) -+ if constexpr (!has_single_bit(Size) || Size > 16) - static_assert(always_false::value, "Invalid type provided!"); - - switch (Size) { diff --git a/editors/imhex/files/patch-main_source_window_window.cpp b/editors/imhex/files/patch-main_source_window_window.cpp index cd8164abd262..a7e0a5c9c081 100644 --- a/editors/imhex/files/patch-main_source_window_window.cpp +++ b/editors/imhex/files/patch-main_source_window_window.cpp @@ -1,19 +1,19 @@ ---- main/source/window/window.cpp.orig 2022-04-17 23:53:01 UTC +--- main/source/window/window.cpp.orig 2022-05-28 18:14:30 UTC +++ main/source/window/window.cpp @@ -148,7 +148,6 @@ namespace hex { std::signal(SIGSEGV, signalHandler); std::signal(SIGINT, signalHandler); std::signal(SIGILL, signalHandler); - std::signal(SIGABRT, signalHandler); std::signal(SIGFPE, signalHandler); auto imhexLogo = romfs::get("logo.png"); -@@ -597,7 +596,7 @@ namespace hex { +@@ -607,7 +606,7 @@ namespace hex { return; for (int i = 0; i < count; i++) { - auto path = std::fs::path(reinterpret_cast(paths[i])); + auto path = std::fs::path(paths[i]); bool handled = false; for (const auto &[extensions, handler] : ContentRegistry::FileHandler::getEntries()) { 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 new file mode 100644 index 000000000000..8f17b860c16f --- /dev/null +++ b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp @@ -0,0 +1,11 @@ +--- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2022-05-28 18:14:30 UTC ++++ plugins/builtin/source/content/views/view_hex_editor.cpp +@@ -199,7 +199,7 @@ namespace hex::plugin::builtin { + reader.seek(this->m_searchPosition.value_or(editor->getSelection().getEndAddress())); + + constexpr static auto searchFunction = [](const auto &haystackBegin, const auto &haystackEnd, const auto &needleBegin, const auto &needleEnd) { +- #if defined(OS_MACOS) ++ #if defined(OS_MACOS) || defined(__FreeBSD__) + return std::search(haystackBegin, haystackEnd, needleBegin, needleEnd); + #else + return std::search(haystackBegin, haystackEnd, std::boyer_moore_horspool_searcher(needleBegin, needleEnd));