1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00

editors/imhex: Update to 1.25.0

This commit is contained in:
MANTANI Nobutaka 2022-11-23 22:35:50 +09:00
parent 5616c284b3
commit 086e94d318
11 changed files with 103 additions and 41 deletions

View File

@ -1,5 +1,5 @@
PORTNAME= imhex
PORTVERSION= 1.24.3
PORTVERSION= 1.25.0
DISTVERSIONPREFIX= v
CATEGORIES= editors
MASTER_SITES= https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg
@ -28,7 +28,8 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \
BUILD_DEPENDS= glm>0:math/glm \
nlohmann-json>0:devel/nlohmann-json \
${LOCALBASE}/include/range/v3/range.hpp:devel/range-v3
${LOCALBASE}/include/range/v3/range.hpp:devel/range-v3 \
${LOCALBASE}/include/hpx/functional.hpp:devel/hpx
LIB_DEPENDS= libcurl.so:ftp/curl \
libglfw.so:graphics/glfw \
libfreetype.so:print/freetype2 \
@ -57,11 +58,11 @@ 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= 8e70a55
GH_TAG_IMHEX_PATTERNS= a9ada89
GH_TAG_JTHREAD= 0fa8d39
GH_TAG_LIBROMFS= 8efe4c4
GH_TAG_LIBROMFS= 53a6bf5
GH_TAG_NATIVEFILEDIALOG= d4df2b6
GH_TAG_PATTERN_LANGUAGE= ab7d738
GH_TAG_PATTERN_LANGUAGE= 7aeac4a
GH_TAG_YARA= ba94b4f
CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON \

View File

@ -1,8 +1,8 @@
TIMESTAMP = 1665857378
TIMESTAMP = 1669206632
SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec
SIZE (imhex/xdg.hpp) = 7674
SHA256 (imhex/WerWolv-ImHex-v1.24.3_GH0.tar.gz) = 5d6780b2d4c3b92bbe7619dcae34138072a8ed9c540523d25760da237f01d279
SIZE (imhex/WerWolv-ImHex-v1.24.3_GH0.tar.gz) = 11126282
SHA256 (imhex/WerWolv-ImHex-v1.25.0_GH0.tar.gz) = c2d730df224252159f9be3d2a3cbf3a592bfe38101414e06f64b0ac1776ec2c2
SIZE (imhex/WerWolv-ImHex-v1.25.0_GH0.tar.gz) = 11001840
SHA256 (imhex/btzy-nativefiledialog-extended-d4df2b6_GH0.tar.gz) = a0440e52bd25b8f85cb25ef68fe19ca39b4b0fad39358d5a501b317cad9d0f69
SIZE (imhex/btzy-nativefiledialog-extended-d4df2b6_GH0.tar.gz) = 412249
SHA256 (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 435d40757928fa73dec19c6d0fbf171bd76341391c8525ce1286927dab44c3e7
@ -15,9 +15,9 @@ SHA256 (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = ccd9c871dc2da9611e6d0cba5fc
SIZE (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = 4450456
SHA256 (imhex/VirusTotal-yara-ba94b4f_GH0.tar.gz) = 4c81120bff451a55deaa23b48155d3eb35955ce11a1d76fbfcbbe2c2e33770b9
SIZE (imhex/VirusTotal-yara-ba94b4f_GH0.tar.gz) = 1288534
SHA256 (imhex/WerWolv-ImHex-Patterns-8e70a55_GH0.tar.gz) = 8d283e8806412d4083f9da9c7b1ff499bc7374394397bd7f270ba11277cd6df2
SIZE (imhex/WerWolv-ImHex-Patterns-8e70a55_GH0.tar.gz) = 5176390
SHA256 (imhex/WerWolv-PatternLanguage-ab7d738_GH0.tar.gz) = d7b5844a21622265a1ecd5184650177595cfa40a7bb17cb44f2104f29dc38ac5
SIZE (imhex/WerWolv-PatternLanguage-ab7d738_GH0.tar.gz) = 415301
SHA256 (imhex/WerWolv-libromfs-8efe4c4_GH0.tar.gz) = cc538b4add2a451c7c9be4237717b3231171cce56db51a956eaffd85d7f5af5b
SIZE (imhex/WerWolv-libromfs-8efe4c4_GH0.tar.gz) = 4078
SHA256 (imhex/WerWolv-ImHex-Patterns-a9ada89_GH0.tar.gz) = fd1be6d54d1dfdeeb94cc3cb9789e6079cee80a0a3dc409b8d0c961eee747f17
SIZE (imhex/WerWolv-ImHex-Patterns-a9ada89_GH0.tar.gz) = 5180991
SHA256 (imhex/WerWolv-PatternLanguage-7aeac4a_GH0.tar.gz) = 170f3852353c28858fa3756b03f55a4a9bbd69561da071c36834bc00a56f19ca
SIZE (imhex/WerWolv-PatternLanguage-7aeac4a_GH0.tar.gz) = 420016
SHA256 (imhex/WerWolv-libromfs-53a6bf5_GH0.tar.gz) = 2caa05a847665ebff301dd7e684b4c7a1a9cc903a3bc0a83d4dccfdc1ea616de
SIZE (imhex/WerWolv-libromfs-53a6bf5_GH0.tar.gz) = 3799

View File

@ -1,5 +1,14 @@
--- CMakeLists.txt.orig 2022-10-08 08:03:47 UTC
--- CMakeLists.txt.orig 2022-11-14 09:07:21 UTC
+++ CMakeLists.txt
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.20)
# Options
option(IMHEX_USE_BUNDLED_CA "Use the CA bundle in romfs instead of the system one" OFF)
option(IMHEX_PLUGINS_IN_SHARE "Put the plugins in share/imhex/plugins instead of lib[..]/imhex/plugins" OFF)
-option(IMHEX_STRIP_RELEASE "Strip the release builds" ON)
+option(IMHEX_STRIP_RELEASE "Strip the release builds" OFF)
option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF)
option(IMHEX_IGNORE_BAD_CLONE "Disable the bad clone prevention checks" OFF)
option(IMHEX_PATTERNS_PULL_MASTER "Download latest files from master branch of the ImHex-Patterns repo" OFF)
@@ -23,8 +23,6 @@ project(imhex VERSION ${IMHEX_VERSION})
# Make sure project is configured correctly

View File

@ -0,0 +1,11 @@
--- lib/external/libromfs/generator/source/main.cpp.orig 2022-11-23 12:47:55 UTC
+++ lib/external/libromfs/generator/source/main.cpp
@@ -87,7 +87,7 @@ int main() {
for (std::uint64_t i = 0; i < identifierCount; i++) {
std::printf("libromfs: Bundling resource: %s\n", paths[i].string().c_str());
- outputFile << " " << "{ \"" << paths[i].string() << "\", romfs::Resource({ reinterpret_cast<std::byte*>(resource_" LIBROMFS_PROJECT_NAME "_" << i << ".data()), " << "resource_" LIBROMFS_PROJECT_NAME "_" << i << ".size() }) " << "},\n";
+ outputFile << " " << "{ \"" << paths[i].string() << "\", romfs::Resource({ reinterpret_cast<std::byte*>(resource_" LIBROMFS_PROJECT_NAME "_" << i << ".data()), " << "resource_" LIBROMFS_PROJECT_NAME "_" << i << ".size() - 1 }) " << "},\n";
}
outputFile << "};";
}

View File

@ -1,4 +1,4 @@
--- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2022-10-15 20:26:43 UTC
--- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2022-11-19 17:06:38 UTC
+++ lib/external/pattern_language/lib/include/pl/core/token.hpp
@@ -148,9 +148,9 @@ namespace pl::core {
@ -17,7 +17,7 @@
namespace tkn {
- constexpr inline Token createToken(const core::Token::Type type, const core::Token::ValueTypes &value) {
+ inline Token createToken(const core::Token::Type type, const core::Token::ValueTypes &value) {
+ inline pl::core::Token createToken(const core::Token::Type type, const core::Token::ValueTypes &value) {
return { type, value, 1, 1 };
}

View File

@ -1,22 +1,15 @@
--- lib/external/pattern_language/lib/source/pl/helpers/file.cpp.orig 2022-08-14 15:37:26 UTC
--- lib/external/pattern_language/lib/source/pl/helpers/file.cpp.orig 2022-11-16 14:22:38 UTC
+++ lib/external/pattern_language/lib/source/pl/helpers/file.cpp
@@ -19,12 +19,12 @@ namespace pl::hlp::fs {
this->m_file = _wfopen(path.c_str(), L"w+b");
#else
if (mode == File::Mode::Read)
- this->m_file = fopen64(path.string().c_str(), "rb");
+ this->m_file = fopen(path.string().c_str(), "rb");
else if (mode == File::Mode::Write)
- this->m_file = fopen64(path.string().c_str(), "r+b");
+ this->m_file = fopen(path.string().c_str(), "r+b");
@@ -8,7 +8,7 @@
if (mode == File::Mode::Create || (mode == File::Mode::Write && this->m_file == nullptr))
- this->m_file = fopen64(path.string().c_str(), "w+b");
+ this->m_file = fopen(path.string().c_str(), "w+b");
#endif
}
namespace pl::hlp::fs {
@@ -52,7 +52,7 @@ namespace pl::hlp::fs {
-#if defined(OS_MACOS)
+#if defined(OS_MACOS) || defined(__FreeBSD__)
#define fopen64 fopen
#define ftruncate64 ftruncate
#endif
@@ -57,7 +57,7 @@ namespace pl::hlp::fs {
void File::seek(u64 offset) {
@ -25,7 +18,7 @@
}
void File::close() {
@@ -137,10 +137,10 @@ namespace pl::hlp::fs {
@@ -142,10 +142,10 @@ namespace pl::hlp::fs {
size_t File::getSize() const {
if (!isValid()) return 0;
@ -40,7 +33,7 @@
if (size < 0)
return 0;
@@ -151,7 +151,7 @@ namespace pl::hlp::fs {
@@ -156,7 +156,7 @@ namespace pl::hlp::fs {
void File::setSize(u64 size) {
if (!isValid()) return;

View File

@ -1,4 +1,4 @@
--- lib/libimhex/source/api/imhex_api.cpp.orig 2022-10-08 08:03:47 UTC
--- lib/libimhex/source/api/imhex_api.cpp.orig 2022-11-14 09:07:21 UTC
+++ lib/libimhex/source/api/imhex_api.cpp
@@ -4,6 +4,7 @@
#include <hex/api/event.hpp>
@ -8,7 +8,7 @@
#include <utility>
#include <unistd.h>
@@ -266,7 +267,7 @@ namespace hex {
@@ -272,7 +273,7 @@ namespace hex {
}
bool isDirty() {

View File

@ -0,0 +1,19 @@
--- plugins/builtin/include/content/views/view_pattern_editor.hpp.orig 2022-11-14 09:07:21 UTC
+++ plugins/builtin/include/content/views/view_pattern_editor.hpp
@@ -16,6 +16,7 @@
#include <thread>
#include <vector>
#include <functional>
+#include <hpx/functional.hpp>
#include <TextEditor.h>
@@ -65,7 +66,7 @@ namespace hex::plugin::builtin {
bool m_syncPatternSourceCode = false;
bool m_autoLoadPatterns = true;
- std::map<prv::Provider*, std::move_only_function<void()>> m_sectionWindowDrawer;
+ std::map<prv::Provider*, hpx::move_only_function<void()>> m_sectionWindowDrawer;
private:
void drawConsole(ImVec2 size, const std::vector<std::pair<pl::core::LogConsole::Level, std::string>> &console);
void drawEnvVars(ImVec2 size, std::list<PlData::EnvVar> &envVars);

View File

@ -1,7 +1,7 @@
--- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2022-10-12 10:48:50 UTC
--- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2022-11-14 09:07:21 UTC
+++ plugins/builtin/source/content/views/view_hex_editor.cpp
@@ -290,7 +290,7 @@ namespace hex::plugin::builtin {
reader.seek(this->m_searchPosition.value_or(0x00));
@@ -296,7 +296,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) {
- return std::search(haystackBegin, haystackEnd, std::boyer_moore_horspool_searcher(needleBegin, needleEnd));

View File

@ -0,0 +1,29 @@
--- plugins/builtin/source/content/views/view_pattern_editor.cpp.orig 2022-11-23 07:51:06 UTC
+++ plugins/builtin/source/content/views/view_pattern_editor.cpp
@@ -461,7 +461,7 @@ namespace hex::plugin::builtin {
dataProvider->setReadOnly(true);
auto hexEditor = ui::HexEditor();
- 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())
@@ -483,7 +483,7 @@ namespace hex::plugin::builtin {
auto patternProvider = ImHexApi::Provider::get();
- this->m_sectionWindowDrawer[patternProvider] = [id, patternProvider, dataProvider = std::move(dataProvider), hexEditor, patternDrawer = ui::PatternDrawer()] mutable {
+ this->m_sectionWindowDrawer[patternProvider] = [id=id, patternProvider, dataProvider = std::move(dataProvider), hexEditor, patternDrawer = ui::PatternDrawer()] mutable {
hexEditor.setProvider(dataProvider.get());
hexEditor.draw(480_scaled);
@@ -944,7 +944,7 @@ namespace hex::plugin::builtin {
if (type->isTemplateType())
continue;
- createNestedMenu(hex::splitString(typeName, "::"), [&] {
+ createNestedMenu(hex::splitString(typeName, "::"), [&, typeName=typeName] {
std::string variableName;
for (char &c : hex::replaceStrings(typeName, "::", "_"))
variableName += static_cast<char>(std::tolower(c));

View File

@ -1,5 +1,5 @@
bin/imhex
lib/libimhex.so.1.24.3
lib/libimhex.so.1.25.0
share/applications/imhex.desktop
%%DATADIR%%/constants/_schema.json
%%DATADIR%%/constants/crc16.json