git: 188c3e34477c - main - editors/imhex: Update to 1.9.0
MANTANI Nobutaka
nobutaka at FreeBSD.org
Sat Sep 18 15:40:18 UTC 2021
The branch main has been updated by nobutaka:
URL: https://cgit.FreeBSD.org/ports/commit/?id=188c3e34477c755af49b6ed5145232b3c5ce89f6
commit 188c3e34477c755af49b6ed5145232b3c5ce89f6
Author: MANTANI Nobutaka <nobutaka at FreeBSD.org>
AuthorDate: 2021-09-18 15:38:48 +0000
Commit: MANTANI Nobutaka <nobutaka at FreeBSD.org>
CommitDate: 2021-09-18 15:38:48 +0000
editors/imhex: Update to 1.9.0
---
editors/imhex/Makefile | 25 ++++++-----
editors/imhex/distinfo | 18 ++++----
editors/imhex/files/patch-CMakeLists.txt | 11 +++++
.../imhex/files/patch-cmake_build__helpers.cmake | 28 ++++++------
.../imhex/files/patch-external_fmt_CMakeLists.txt | 18 --------
.../patch-external_nativefiledialog_CMakeLists.txt | 11 -----
.../files/patch-plugins_libimhex_CMakeLists.txt | 11 +++++
.../patch-plugins_libimhex_source_helpers_file.cpp | 50 ++++++++++++++++++++++
...patch-plugins_libimhex_source_helpers_paths.cpp | 18 ++++++++
.../files/patch-source_helpers_encoding__file.cpp | 19 ++++++++
.../files/patch-source_views_view__bookmarks.cpp | 10 +++++
editors/imhex/files/patch-source_window_window.cpp | 10 +++++
editors/imhex/pkg-plist | 2 -
13 files changed, 164 insertions(+), 67 deletions(-)
diff --git a/editors/imhex/Makefile b/editors/imhex/Makefile
index 455822232b26..0d5a8e15a030 100644
--- a/editors/imhex/Makefile
+++ b/editors/imhex/Makefile
@@ -1,5 +1,5 @@
PORTNAME= imhex
-PORTVERSION= 1.8.1
+PORTVERSION= 1.9.0
DISTVERSIONPREFIX= v
CATEGORIES= editors
MASTER_SITES= https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg
@@ -16,20 +16,22 @@ 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} \
- fmtlib-fmt-${GH_TAG_FMT}_GH0${EXTRACT_SUFX} \
- VirusTotal-yara-${GH_TAG_YARA}_GH0${EXTRACT_SUFX}
+ fmtlib-fmt-${GH_TAG_FMT}_GH0${EXTRACT_SUFX}
BUILD_DEPENDS= glm>0:math/glm \
- nlohmann-json>0:devel/nlohmann-json
+ nlohmann-json>0:devel/nlohmann-json \
+ ${LOCALBASE}/include/range/v3/range.hpp:devel/range-v3
LIB_DEPENDS= libcapstone.so:devel/capstone4 \
libcurl.so:ftp/curl \
libfreetype.so:print/freetype2 \
libglfw.so:graphics/glfw \
libharfbuzz.so:print/harfbuzz \
libmbedtls.so:security/mbedtls \
- libtre.so:textproc/libtre
+ libtre.so:textproc/libtre \
+ libyara.so:security/yara
-USES= cmake gnome pkgconfig python:3.8+ xorg
+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
@@ -37,13 +39,11 @@ USE_GITHUB= yes
GH_ACCOUNT= WerWolv
GH_PROJECT= ImHex
GH_TUPLE= btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledialog \
- fmtlib:fmt:${GH_TAG_FMT}:fmt \
- VirusTotal:yara:${GH_TAG_YARA}:yara
-GH_TAG_FMT= 6271406
-GH_TAG_NATIVEFILEDIALOG= 300203a
-GH_TAG_YARA= 1842271
+ fmtlib:fmt:${GH_TAG_FMT}:fmt
+GH_TAG_FMT= d141cdb
+GH_TAG_NATIVEFILEDIALOG= 322d1bc
-CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON
+CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_YARA=ON
PORTDOCS= README.md
@@ -54,7 +54,6 @@ post-extract:
${CP} ${DISTDIR}/${DIST_SUBDIR}/xdg.hpp ${WRKSRC}/external/xdgpp
${CP} -R ${WRKSRC_fmt}/* ${WRKSRC}/external/fmt
${CP} -R ${WRKSRC_nativefiledialog}/* ${WRKSRC}/external/nativefiledialog
- ${CP} -R ${WRKSRC_yara}/* ${WRKSRC}/external/yara/yara
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/editors/imhex/distinfo b/editors/imhex/distinfo
index f25932b43bde..83a47dc351cd 100644
--- a/editors/imhex/distinfo
+++ b/editors/imhex/distinfo
@@ -1,11 +1,11 @@
-TIMESTAMP = 1621959882
+TIMESTAMP = 1631340168
SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec
SIZE (imhex/xdg.hpp) = 7674
-SHA256 (imhex/WerWolv-ImHex-v1.8.1_GH0.tar.gz) = f70cb238d3db75530e30b72cac586ffad975123e9478dae967be0086e57f9edd
-SIZE (imhex/WerWolv-ImHex-v1.8.1_GH0.tar.gz) = 1758664
-SHA256 (imhex/btzy-nativefiledialog-extended-300203a_GH0.tar.gz) = 5db23b09fb098fa44cae663a5f2b38fc679dbf0a7acf9a8425500c9942478624
-SIZE (imhex/btzy-nativefiledialog-extended-300203a_GH0.tar.gz) = 400036
-SHA256 (imhex/fmtlib-fmt-6271406_GH0.tar.gz) = f07b01d4f092318f3da39d404f7cafbca311e7b576f09121adb1a54927826410
-SIZE (imhex/fmtlib-fmt-6271406_GH0.tar.gz) = 778679
-SHA256 (imhex/VirusTotal-yara-1842271_GH0.tar.gz) = a7148c3ddbc80746f60d56e0ecbbecc05c5f5401263ba95571aaf65dcaa75175
-SIZE (imhex/VirusTotal-yara-1842271_GH0.tar.gz) = 935600
+SHA256 (imhex/WerWolv-ImHex-v1.9.0_GH0.tar.gz) = 070ec1acfa3182fd539b636ad55350f91b6667e29054729c308e78ff6dc6dcb3
+SIZE (imhex/WerWolv-ImHex-v1.9.0_GH0.tar.gz) = 8391190
+SHA256 (imhex/btzy-nativefiledialog-extended-322d1bc_GH0.tar.gz) = 1950e8870068b64f862da0dcaebabaeae9a8d0edacae80ec2208a2df9c1e360f
+SIZE (imhex/btzy-nativefiledialog-extended-322d1bc_GH0.tar.gz) = 400379
+SHA256 (imhex/fmtlib-fmt-d141cdb_GH0.tar.gz) = 06dc2fa0236b1b334b93f7e272cbb29554b05a19fd0a9b52039976e8b5dcd725
+SIZE (imhex/fmtlib-fmt-d141cdb_GH0.tar.gz) = 805703
+SHA256 (imhex/VirusTotal-yara-f844881_GH0.tar.gz) = 26fe609f2e8fb9036647cd90fffa12a5354f804aaa802c0c30c94bc703a5620b
+SIZE (imhex/VirusTotal-yara-f844881_GH0.tar.gz) = 936341
diff --git a/editors/imhex/files/patch-CMakeLists.txt b/editors/imhex/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..036ca4612839
--- /dev/null
+++ b/editors/imhex/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig 2021-09-12 06:27:55 UTC
++++ CMakeLists.txt
+@@ -101,7 +101,7 @@ target_link_directories(imhex PRIVATE ${CAPSTONE_LIBRA
+ if (WIN32)
+ target_link_libraries(imhex ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} wsock32 ws2_32 libyara Dwmapi.lib dl)
+ else ()
+- target_link_libraries(imhex ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} dl pthread libyara)
++ target_link_libraries(imhex ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} dl pthread yara)
+ endif ()
+
+ createPackage()
diff --git a/editors/imhex/files/patch-cmake_build__helpers.cmake b/editors/imhex/files/patch-cmake_build__helpers.cmake
index 5ecc6be04967..7da70ba6cbdc 100644
--- a/editors/imhex/files/patch-cmake_build__helpers.cmake
+++ b/editors/imhex/files/patch-cmake_build__helpers.cmake
@@ -1,20 +1,20 @@
---- cmake/build_helpers.cmake.orig 2021-05-18 19:25:59 UTC
+--- cmake/build_helpers.cmake.orig 2021-09-10 13:54:59 UTC
+++ cmake/build_helpers.cmake
-@@ -49,6 +49,8 @@ macro(findLibraries)
+@@ -37,7 +37,7 @@ macro(findLibraries)
+ # Find packages
+ find_package(PkgConfig REQUIRED)
+
+- find_package(mbedTLS REQUIRED)
++ find_library(mbedTLS mbedtls REQUIRED)
+
+ pkg_search_module(CAPSTONE REQUIRED capstone)
+
+@@ -48,6 +48,8 @@ macro(findLibraries)
+ message(STATUS ${PYTHON_VERSION_MAJOR_MINOR})
message(FATAL_ERROR "No valid version of Python 3 was found.")
endif()
-
-+ find_package(CURL REQUIRED)
+
- string(REPLACE "." ";" PYTHON_VERSION_MAJOR_MINOR ${Python_VERSION})
++ find_package(CURL REQUIRED)
- list(LENGTH PYTHON_VERSION_MAJOR_MINOR PYTHON_VERSION_COMPONENT_COUNT)
-@@ -162,7 +164,7 @@ macro(createPackage)
- foreach (plugin IN LISTS PLUGINS)
- add_subdirectory("plugins/${plugin}")
- set_target_properties(${plugin} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
-- install(TARGETS ${plugin} RUNTIME DESTINATION ${PLUGINS_INSTALL_LOCATION})
-+ install(TARGETS ${plugin} LIBRARY DESTINATION ${PLUGINS_INSTALL_LOCATION})
- add_dependencies(imhex ${plugin})
- endforeach()
+ string(REPLACE "." ";" PYTHON_VERSION_MAJOR_MINOR ${Python_VERSION})
diff --git a/editors/imhex/files/patch-external_fmt_CMakeLists.txt b/editors/imhex/files/patch-external_fmt_CMakeLists.txt
deleted file mode 100644
index 4b48b620ac43..000000000000
--- a/editors/imhex/files/patch-external_fmt_CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
---- external/fmt/CMakeLists.txt.orig 2021-05-19 16:12:27 UTC
-+++ external/fmt/CMakeLists.txt
-@@ -195,7 +195,6 @@ else()
- endif ()
-
- add_library(fmt ${FMT_SOURCES} ${FMT_HEADERS} README.rst ChangeLog.rst)
--add_library(fmt::fmt ALIAS fmt)
-
- if (HAVE_STRTOD_L)
- target_compile_definitions(fmt PUBLIC FMT_LOCALE)
-@@ -248,7 +247,6 @@ if (FMT_SAFE_DURATION_CAST)
- endif()
-
- add_library(fmt-header-only INTERFACE)
--add_library(fmt::fmt-header-only ALIAS fmt-header-only)
-
- target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1)
- target_compile_features(fmt-header-only INTERFACE ${FMT_REQUIRED_FEATURES})
diff --git a/editors/imhex/files/patch-external_nativefiledialog_CMakeLists.txt b/editors/imhex/files/patch-external_nativefiledialog_CMakeLists.txt
deleted file mode 100644
index 093cfdf021d8..000000000000
--- a/editors/imhex/files/patch-external_nativefiledialog_CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- external/nativefiledialog/CMakeLists.txt.orig 2021-05-19 15:40:32 UTC
-+++ external/nativefiledialog/CMakeLists.txt
-@@ -23,6 +23,8 @@ message("nfd Compiler: ${nfd_COMPILER}")
-
- set (CMAKE_CXX_STANDARD 17)
-
-+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
-+
- add_subdirectory(src)
-
- option(NFD_BUILD_TESTS "Build tests for nfd" OFF)
diff --git a/editors/imhex/files/patch-plugins_libimhex_CMakeLists.txt b/editors/imhex/files/patch-plugins_libimhex_CMakeLists.txt
new file mode 100644
index 000000000000..bf21af11510f
--- /dev/null
+++ b/editors/imhex/files/patch-plugins_libimhex_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- plugins/libimhex/CMakeLists.txt.orig 2021-09-11 13:07:05 UTC
++++ plugins/libimhex/CMakeLists.txt
+@@ -98,7 +98,7 @@ if (APPLE)
+ find_library(FOUNDATION NAMES Foundation)
+ target_link_libraries(libimhex PUBLIC imgui nlohmann_json mbedcrypto ${FOUNDATION} nfd fmt-header-only libcurl magic)
+ else ()
+- target_link_libraries(libimhex PUBLIC imgui nlohmann_json mbedcrypto nfd magic)
++ target_link_libraries(libimhex PUBLIC imgui nlohmann_json mbedcrypto mbedtls mbedx509 nfd magic)
+
+ if (NOT USE_SYSTEM_FMT)
+ target_link_libraries(libimhex PUBLIC fmt-header-only)
diff --git a/editors/imhex/files/patch-plugins_libimhex_source_helpers_file.cpp b/editors/imhex/files/patch-plugins_libimhex_source_helpers_file.cpp
new file mode 100644
index 000000000000..d0568bf88d82
--- /dev/null
+++ b/editors/imhex/files/patch-plugins_libimhex_source_helpers_file.cpp
@@ -0,0 +1,50 @@
+--- plugins/libimhex/source/helpers/file.cpp.orig 2021-09-11 12:12:38 UTC
++++ plugins/libimhex/source/helpers/file.cpp
+@@ -5,12 +5,12 @@ namespace hex {
+
+ File::File(const std::string &path, Mode mode) {
+ if (mode == File::Mode::Read)
+- this->m_file = fopen64(path.c_str(), "rb");
++ this->m_file = fopen(path.c_str(), "rb");
+ else if (mode == File::Mode::Write)
+- this->m_file = fopen64(path.c_str(), "r+b");
++ this->m_file = fopen(path.c_str(), "r+b");
+
+ if (mode == File::Mode::Create || this->m_file == nullptr)
+- this->m_file = fopen64(path.c_str(), "w+b");
++ this->m_file = fopen(path.c_str(), "w+b");
+ }
+
+ File::~File() {
+@@ -19,7 +19,7 @@ namespace hex {
+ }
+
+ void File::seek(u64 offset) {
+- fseeko64(this->m_file, offset, SEEK_SET);
++ fseeko(this->m_file, offset, SEEK_SET);
+ }
+
+ std::vector<u8> File::readBytes(size_t numBytes) {
+@@ -44,16 +44,16 @@ namespace hex {
+ }
+
+ size_t File::getSize() {
+- auto startPos = ftello64(this->m_file);
+- fseeko64(this->m_file, 0, SEEK_END);
+- size_t 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);
++ size_t size = ftello(this->m_file);
++ fseeko(this->m_file, startPos, SEEK_SET);
+
+ return size;
+ }
+
+ void File::setSize(u64 size) {
+- ftruncate64(fileno(this->m_file), size);
++ ftruncate(fileno(this->m_file), size);
+ }
+
+ }
+\ No newline at end of file
diff --git a/editors/imhex/files/patch-plugins_libimhex_source_helpers_paths.cpp b/editors/imhex/files/patch-plugins_libimhex_source_helpers_paths.cpp
new file mode 100644
index 000000000000..d6a8420fa66c
--- /dev/null
+++ b/editors/imhex/files/patch-plugins_libimhex_source_helpers_paths.cpp
@@ -0,0 +1,18 @@
+--- plugins/libimhex/source/helpers/paths.cpp.orig 2021-09-10 13:54:59 UTC
++++ plugins/libimhex/source/helpers/paths.cpp
+@@ -6,10 +6,15 @@
+ #include <shlobj.h>
+ #elif defined(OS_LINUX)
+ #include <xdg.hpp>
++# if defined(__FreeBSD__)
++ #include <sys/syslimits.h>
++# else
+ #include <linux/limits.h>
++# endif
+ #endif
+
+ #include <algorithm>
++#include <array>
+ #include <filesystem>
+ #include <string>
+ #include <vector>
diff --git a/editors/imhex/files/patch-source_helpers_encoding__file.cpp b/editors/imhex/files/patch-source_helpers_encoding__file.cpp
new file mode 100644
index 000000000000..1e3371855b28
--- /dev/null
+++ b/editors/imhex/files/patch-source_helpers_encoding__file.cpp
@@ -0,0 +1,19 @@
+--- source/helpers/encoding_file.cpp.orig 2021-09-12 05:41:36 UTC
++++ source/helpers/encoding_file.cpp
+@@ -1,6 +1,6 @@
+ #include "helpers/encoding_file.hpp"
+
+-#include <ranges>
++#include <range/v3/view.hpp>
+ #include <hex/helpers/utils.hpp>
+
+ #include <fstream>
+@@ -17,7 +17,7 @@ namespace hex {
+ }
+
+ std::pair<std::string_view, size_t> EncodingFile::getEncodingFor(const std::vector<u8> &buffer) const {
+- for (const auto &[size, mapping] : this->m_mapping | std::views::reverse) {
++ for (const auto &[size, mapping] : this->m_mapping | ranges::views::reverse) {
+ if (size > buffer.size()) continue;
+
+ auto key = std::vector<u8>(buffer.begin(), buffer.begin() + size);
diff --git a/editors/imhex/files/patch-source_views_view__bookmarks.cpp b/editors/imhex/files/patch-source_views_view__bookmarks.cpp
new file mode 100644
index 000000000000..1a26325d7042
--- /dev/null
+++ b/editors/imhex/files/patch-source_views_view__bookmarks.cpp
@@ -0,0 +1,10 @@
+--- source/views/view_bookmarks.cpp.orig 2021-09-12 06:22:00 UTC
++++ source/views/view_bookmarks.cpp
+@@ -5,6 +5,7 @@
+
+ #include "helpers/project_file_handler.hpp"
+
++#include <array>
+ #include <cstring>
+
+ namespace hex {
diff --git a/editors/imhex/files/patch-source_window_window.cpp b/editors/imhex/files/patch-source_window_window.cpp
new file mode 100644
index 000000000000..0e98c317c077
--- /dev/null
+++ b/editors/imhex/files/patch-source_window_window.cpp
@@ -0,0 +1,10 @@
+--- source/window/window.cpp.orig 2021-09-18 14:15:40 UTC
++++ source/window/window.cpp
+@@ -243,7 +243,6 @@ namespace hex {
+ std::signal(SIGSEGV, signalHandler);
+ std::signal(SIGINT, signalHandler);
+ std::signal(SIGILL, signalHandler);
+- std::signal(SIGABRT, signalHandler);
+ std::signal(SIGFPE, signalHandler);
+
+ this->m_logoTexture = ImGui::LoadImageFromMemory(imhex_logo, imhex_logo_size);
diff --git a/editors/imhex/pkg-plist b/editors/imhex/pkg-plist
index 6eb577fb95ce..b3b6c176f610 100644
--- a/editors/imhex/pkg-plist
+++ b/editors/imhex/pkg-plist
@@ -2,5 +2,3 @@ bin/imhex
lib/libimhex.so
%%DATADIR%%/magic/imhex.mgc
%%DATADIR%%/plugins/builtin.hexplug
-%%DATADIR%%/resources/cacert.pem
-%%DATADIR%%/resources/splash.png
More information about the dev-commits-ports-all
mailing list