summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKokaKiwi2023-06-15 12:13:19 +0200
committerKokaKiwi2023-06-15 12:13:19 +0200
commit92271a41a255a913103260fa246f1bf2c5bd689b (patch)
tree13956ed9c3b45501e09553c313b7bf6c55094903
parent21417e2e4e83a245359fe8a69a2128f298d3844b (diff)
downloadaur-92271a41a255a913103260fa246f1bf2c5bd689b.tar.gz
upgpkg: imhex 1.29.0-3
- Incorporate fix
-rw-r--r--.SRCINFO17
-rw-r--r--0001-makepkg-Fix-compiler-check.patch4
-rw-r--r--0002-fix-Force-entropy-and-type-distribution-graphs-to-al.patch131
-rw-r--r--PKGBUILD20
-rw-r--r--pl-0001-Use-C-23-standard.patch2
-rw-r--r--pl-0002-makepkg-Remove-extraneous-compiler-flags.patch2
6 files changed, 157 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 470bc63233b4..4771fd0122ec 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = imhex
pkgdesc = A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM
pkgver = 1.29.0
- pkgrel = 2
+ pkgrel = 3
url = https://imhex.werwolv.net
arch = x86_64
license = GPL2
@@ -35,6 +35,7 @@ pkgbase = imhex
source = pattern_language::git+https://github.com/WerWolv/PatternLanguage#tag=ImHex-v1.29.0
source = imhex-patterns::git+https://github.com/WerWolv/ImHex-Patterns#tag=ImHex-v1.29.0
source = 0001-makepkg-Fix-compiler-check.patch
+ source = 0002-fix-Force-entropy-and-type-distribution-graphs-to-al.patch
source = pl-0001-Use-C-23-standard.patch
source = pl-0002-makepkg-Remove-extraneous-compiler-flags.patch
sha256sums = SKIP
@@ -45,9 +46,10 @@ pkgbase = imhex
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = e8696d29050d5dbf34b250d68c730e973fda88c342a801e2da36da804f4f1c45
- sha256sums = 6e1a6a914da49a3d9c20ffa5bc728e1901dc01e962f05f70ec60c97cba2dd0d0
- sha256sums = 9b5b3a5aac5297f7ca9c8fd94a37fc7c57e869c83f5874976a1256d0021f7618
+ sha256sums = 69c53a429d7b6bbe47c1602ff6cfaac6d28d495f96604b5395f0a0d12154c61b
+ sha256sums = 8429bf0b8f2b2631a21baccc094e85d0634941f3d8b818cbb4d75aef7529a2cd
+ sha256sums = 16316b5a6354156bc0ce53a3e81d80ef990af7e3626b7ea4348b866bb339ef13
+ sha256sums = ddbfeda031ccc161d3e3f3918207d6f7132cec72ff554ef82910da70214280ce
b2sums = SKIP
b2sums = SKIP
b2sums = SKIP
@@ -56,8 +58,9 @@ pkgbase = imhex
b2sums = SKIP
b2sums = SKIP
b2sums = SKIP
- b2sums = 28956371b44540ff27eaf21841196afad87d2d5f0c0bf426b4d5d6774ff58a9d012c0b0bd692b8e422f24196f8bf21ec18c97e5076ed139d84d5f4c4755fee77
- b2sums = 95658194c900d00877aa13fb206bdca5071070a7689676b1ddb4e607fb621a6d88ea994c789d02107c2864c28a08e73d21133705d059fcdf15cb3d05d344a309
- b2sums = d1d4e35b5dce8e6a257e2978821ed60bf9715bc703d00b2ec5823c234da3f4f862f7fd89a05cd89cb5a9b7eb00bb9a695bbfa6d5ff375853afd85df9e1785fa6
+ b2sums = a09884dea7ee74dc75abd9437e2329ee454cdc4cd90dbe388d671d73ed3f6dd56ef9992c4cd0dd2937cc8eb0b67539791bd64ec76c6bb6c25a959691ba1cfb41
+ b2sums = 34a08efbc1d3e78ab6d4babe49f3bb735f8a99ba03c1aa7a208abcd31f84576562f653ecc2057515468600f584d9d1ebc27071976f83fff989a75634b98efccf
+ b2sums = ed86730af8972c6b92408f8e829d0d16ab863b23ffcd51d234371f89ce8e2194083215a1a37b3cd324ddc1c767770a1c43369d90be49fc632b4917df7d542529
+ b2sums = 6ad02f4bcfe406b23ae724e20766dbf4d32b88d63e83663baad191390002907a04c7ccd86c3640a651a46aa6db2f0889e27c5c26f4851730dc2edccf914d2ba2
pkgname = imhex
diff --git a/0001-makepkg-Fix-compiler-check.patch b/0001-makepkg-Fix-compiler-check.patch
index 352e31f54c4a..570a4b3775da 100644
--- a/0001-makepkg-Fix-compiler-check.patch
+++ b/0001-makepkg-Fix-compiler-check.patch
@@ -1,7 +1,7 @@
From f9d65dc25c5446a144f2542b486bd72d2ff1320d Mon Sep 17 00:00:00 2001
From: KokaKiwi <kokakiwi+git@kokakiwi.net>
Date: Mon, 14 Nov 2022 11:58:59 +0100
-Subject: [PATCH] makepkg: Fix compiler check
+Subject: [PATCH 1/2] makepkg: Fix compiler check
---
cmake/build_helpers.cmake | 23 +++++++++++++----------
@@ -78,5 +78,5 @@ index 4acbeaab..c1c46bb2 100644
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
--
-2.40.1
+2.41.0
diff --git a/0002-fix-Force-entropy-and-type-distribution-graphs-to-al.patch b/0002-fix-Force-entropy-and-type-distribution-graphs-to-al.patch
new file mode 100644
index 000000000000..002e71a0bf80
--- /dev/null
+++ b/0002-fix-Force-entropy-and-type-distribution-graphs-to-al.patch
@@ -0,0 +1,131 @@
+From c5493dc877f33df2df44e12598d306da2bf6a032 Mon Sep 17 00:00:00 2001
+From: WerWolv <werwolv98@gmail.com>
+Date: Sun, 21 May 2023 13:46:14 +0200
+Subject: [PATCH 2/2] fix: Force entropy and type distribution graphs to always
+ span the entire plot
+
+---
+ .../include/content/helpers/diagrams.hpp | 35 +++++++++----------
+ 1 file changed, 17 insertions(+), 18 deletions(-)
+
+diff --git a/plugins/builtin/include/content/helpers/diagrams.hpp b/plugins/builtin/include/content/helpers/diagrams.hpp
+index 0afa6242..d5b6a70d 100644
+--- a/plugins/builtin/include/content/helpers/diagrams.hpp
++++ b/plugins/builtin/include/content/helpers/diagrams.hpp
+@@ -295,13 +295,14 @@ namespace hex {
+
+ // Set the axis limit to [first block : last block]
+ ImPlot::SetupAxesLimits(
+- this->m_startAddress / this->m_blockSize,
+- this->m_endAddress / this->m_blockSize,
+- -0.1F, 1.1F, ImGuiCond_Always
+- );
++ this->m_xBlockEntropy.empty() ? 0 : this->m_xBlockEntropy.front(),
++ this->m_xBlockEntropy.empty() ? 0 : this->m_xBlockEntropy.back(),
++ -0.1F,
++ 1.1F,
++ ImGuiCond_Always);
+
+ // Draw the plot
+- ImPlot::PlotLine("##ChunkBasedAnalysisLine", this->m_xBlockEntropy.data(), this->m_yBlockEntropy.data(), this->m_blockCount);
++ ImPlot::PlotLine("##ChunkBasedAnalysisLine", this->m_xBlockEntropy.data(), this->m_yBlockEntropy.data(), this->m_blockCount - 1);
+
+ // The parameter updateHandle is used when using the pattern language since we don't have a provider
+ // but just a set of bytes we won't be able to use the drag bar correctly.
+@@ -383,7 +384,6 @@ namespace hex {
+
+ // Reset and resize the array
+ this->m_yBlockEntropy.clear();
+- this->m_yBlockEntropy.resize(((this->m_endAddress - this->m_startAddress) / this->m_chunkSize) + 1);
+
+ this->m_byteCount = 0;
+ this->m_blockCount = 0;
+@@ -404,7 +404,7 @@ namespace hex {
+ this->m_byteCount++;
+ // Check if we processed one complete chunk, if so compute the entropy and start analysing the next chunk
+ if (((this->m_byteCount % this->m_chunkSize) == 0) || this->m_byteCount == (this->m_endAddress - this->m_startAddress)) [[unlikely]] {
+- this->m_yBlockEntropy[this->m_blockCount] = calculateEntropy(this->m_blockValueCounts, this->m_chunkSize);
++ this->m_yBlockEntropy.push_back(calculateEntropy(this->m_blockValueCounts, this->m_chunkSize));
+
+ this->m_blockCount += 1;
+ this->m_blockValueCounts = { 0 };
+@@ -488,7 +488,6 @@ namespace hex {
+
+ // Reset and resize the array
+ this->m_yBlockEntropy.clear();
+- this->m_yBlockEntropy.resize(std::ceil((this->m_endAddress - this->m_startAddress) / this->m_chunkSize));
+
+ this->m_byteCount = 0;
+ this->m_blockCount = 0;
+@@ -501,7 +500,7 @@ namespace hex {
+ this->m_byteCount++;
+ // Check if we processed one complete chunk, if so compute the entropy and start analysing the next chunk
+ if (((this->m_byteCount % this->m_chunkSize) == 0) || this->m_byteCount == bytes.size() * 8) [[unlikely]] {
+- this->m_yBlockEntropy[this->m_blockCount] = calculateEntropy(this->m_blockValueCounts, this->m_chunkSize);
++ this->m_yBlockEntropy.push_back(calculateEntropy(this->m_blockValueCounts, this->m_chunkSize));
+
+ this->m_blockCount += 1;
+ this->m_blockValueCounts = { 0 };
+@@ -664,7 +663,12 @@ namespace hex {
+ // Draw the result of the analysis
+ if (!this->m_processing && ImPlot::BeginPlot("##byte_types", size, flags)) {
+ ImPlot::SetupAxes("hex.builtin.common.address"_lang, "hex.builtin.common.percentage"_lang, ImPlotAxisFlags_Lock, ImPlotAxisFlags_Lock);
+- ImPlot::SetupAxesLimits(this->m_startAddress / this->m_blockSize, this->m_endAddress / this->m_blockSize, -0.1F, 100.1F, ImGuiCond_Always);
++ ImPlot::SetupAxesLimits(
++ this->m_xBlockTypeDistributions.empty() ? 0 : this->m_xBlockTypeDistributions.front(),
++ this->m_xBlockTypeDistributions.empty() ? 0 : this->m_xBlockTypeDistributions.back(),
++ -0.1F,
++ 100.1F,
++ ImGuiCond_Always);
+ ImPlot::SetupLegend(ImPlotLocation_South, ImPlotLegendFlags_Horizontal | ImPlotLegendFlags_Outside);
+
+ constexpr static std::array Names = { "iscntrl", "isprint", "isspace", "isblank",
+@@ -673,7 +677,7 @@ namespace hex {
+ };
+
+ for (u32 i = 0; i < Names.size(); i++) {
+- ImPlot::PlotLine(Names[i], this->m_xBlockTypeDistributions.data(), this->m_yBlockTypeDistributions[i].data(), this->m_blockCount);
++ ImPlot::PlotLine(Names[i], this->m_xBlockTypeDistributions.data(), this->m_yBlockTypeDistributions[i].data(), this->m_blockCount - 1);
+ }
+
+ // The parameter updateHandle is used when using the pattern language since we don't have a provider
+@@ -753,8 +757,6 @@ namespace hex {
+
+ // Reset and resize the array
+ this->m_yBlockTypeDistributions.fill({});
+- for (auto &blockDistribution : this->m_yBlockTypeDistributions)
+- blockDistribution.resize(((this->m_endAddress - this->m_startAddress) / this->m_blockSize) + 1);
+
+ // Set the diagram handle position to the start of the plot
+ this->m_handlePosition = this->m_startAddress / double(this->m_blockSize);
+@@ -772,7 +774,7 @@ namespace hex {
+ if (((this->m_byteCount % this->m_blockSize) == 0) || this->m_byteCount == (this->m_endAddress - this->m_startAddress)) [[unlikely]] {
+ auto typeDist = calculateTypeDistribution(this->m_blockValueCounts, this->m_blockSize);
+ for (size_t i = 0; i < typeDist.size(); i++)
+- this->m_yBlockTypeDistributions[i][this->m_blockCount] = typeDist[i] * 100;
++ this->m_yBlockTypeDistributions[i].push_back(typeDist[i] * 100);
+
+ this->m_blockCount += 1;
+ this->m_blockValueCounts = { 0 };
+@@ -845,9 +847,6 @@ namespace hex {
+ this->m_blockValueCounts = { 0 };
+
+ this->m_yBlockTypeDistributions.fill({});
+- for (auto &blockDistribution : this->m_yBlockTypeDistributions)
+- blockDistribution.resize(((this->m_endAddress - this->m_startAddress) / this->m_blockSize) + 1);
+-
+ this->m_byteCount = 0;
+ this->m_blockCount = 0;
+
+@@ -859,7 +858,7 @@ namespace hex {
+ if (((this->m_byteCount % this->m_blockSize) == 0) || this->m_byteCount == (this->m_endAddress - this->m_startAddress)) [[unlikely]] {
+ auto typeDist = calculateTypeDistribution(this->m_blockValueCounts, this->m_blockSize);
+ for (size_t i = 0; i < typeDist.size(); i++)
+- this->m_yBlockTypeDistributions[i][this->m_blockCount] = typeDist[i] * 100;
++ this->m_yBlockTypeDistributions[i].push_back(typeDist[i] * 100);
+
+ this->m_blockCount += 1;
+ this->m_blockValueCounts = { 0 };
+--
+2.41.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 693d2f4f9ce8..373f263d01fd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
_pkgname=ImHex
pkgname=${_pkgname,,}
pkgver=1.29.0
-pkgrel=2
+pkgrel=3
pkgdesc='A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM'
url='https://imhex.werwolv.net'
license=('GPL2')
@@ -24,6 +24,7 @@ source=("$pkgname::git+https://github.com/WerWolv/ImHex.git#tag=v$pkgver"
"pattern_language::git+https://github.com/WerWolv/PatternLanguage#tag=ImHex-v$pkgver"
"imhex-patterns::git+https://github.com/WerWolv/ImHex-Patterns#tag=ImHex-v$pkgver"
0001-makepkg-Fix-compiler-check.patch
+ 0002-fix-Force-entropy-and-type-distribution-graphs-to-al.patch
pl-0001-Use-C-23-standard.patch
pl-0002-makepkg-Remove-extraneous-compiler-flags.patch)
sha256sums=('SKIP'
@@ -34,9 +35,10 @@ sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- 'e8696d29050d5dbf34b250d68c730e973fda88c342a801e2da36da804f4f1c45'
- '6e1a6a914da49a3d9c20ffa5bc728e1901dc01e962f05f70ec60c97cba2dd0d0'
- '9b5b3a5aac5297f7ca9c8fd94a37fc7c57e869c83f5874976a1256d0021f7618')
+ '69c53a429d7b6bbe47c1602ff6cfaac6d28d495f96604b5395f0a0d12154c61b'
+ '8429bf0b8f2b2631a21baccc094e85d0634941f3d8b818cbb4d75aef7529a2cd'
+ '16316b5a6354156bc0ce53a3e81d80ef990af7e3626b7ea4348b866bb339ef13'
+ 'ddbfeda031ccc161d3e3f3918207d6f7132cec72ff554ef82910da70214280ce')
b2sums=('SKIP'
'SKIP'
'SKIP'
@@ -45,9 +47,10 @@ b2sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- '28956371b44540ff27eaf21841196afad87d2d5f0c0bf426b4d5d6774ff58a9d012c0b0bd692b8e422f24196f8bf21ec18c97e5076ed139d84d5f4c4755fee77'
- '95658194c900d00877aa13fb206bdca5071070a7689676b1ddb4e607fb621a6d88ea994c789d02107c2864c28a08e73d21133705d059fcdf15cb3d05d344a309'
- 'd1d4e35b5dce8e6a257e2978821ed60bf9715bc703d00b2ec5823c234da3f4f862f7fd89a05cd89cb5a9b7eb00bb9a695bbfa6d5ff375853afd85df9e1785fa6')
+ 'a09884dea7ee74dc75abd9437e2329ee454cdc4cd90dbe388d671d73ed3f6dd56ef9992c4cd0dd2937cc8eb0b67539791bd64ec76c6bb6c25a959691ba1cfb41'
+ '34a08efbc1d3e78ab6d4babe49f3bb735f8a99ba03c1aa7a208abcd31f84576562f653ecc2057515468600f584d9d1ebc27071976f83fff989a75634b98efccf'
+ 'ed86730af8972c6b92408f8e829d0d16ab863b23ffcd51d234371f89ce8e2194083215a1a37b3cd324ddc1c767770a1c43369d90be49fc632b4917df7d542529'
+ '6ad02f4bcfe406b23ae724e20766dbf4d32b88d63e83663baad191390002907a04c7ccd86c3640a651a46aa6db2f0889e27c5c26f4851730dc2edccf914d2ba2')
options=(!lto !strip)
prepare() {
@@ -70,7 +73,8 @@ prepare() {
submodule update
git apply \
- "$srcdir/0001-makepkg-Fix-compiler-check.patch"
+ "$srcdir/0001-makepkg-Fix-compiler-check.patch" \
+ "$srcdir/0002-fix-Force-entropy-and-type-distribution-graphs-to-al.patch"
git -C lib/external/pattern_language apply \
"$srcdir/pl-0001-Use-C-23-standard.patch" \
diff --git a/pl-0001-Use-C-23-standard.patch b/pl-0001-Use-C-23-standard.patch
index 32352611e8ba..97d8fedd0b93 100644
--- a/pl-0001-Use-C-23-standard.patch
+++ b/pl-0001-Use-C-23-standard.patch
@@ -18,5 +18,5 @@ index b1bad4e..c3bbdb9 100644
set(CMAKE_CXX_STANDARD 23)
--
-2.40.1
+2.41.0
diff --git a/pl-0002-makepkg-Remove-extraneous-compiler-flags.patch b/pl-0002-makepkg-Remove-extraneous-compiler-flags.patch
index 577e5c0c9bc2..64f40595cc30 100644
--- a/pl-0002-makepkg-Remove-extraneous-compiler-flags.patch
+++ b/pl-0002-makepkg-Remove-extraneous-compiler-flags.patch
@@ -21,5 +21,5 @@ index c3bbdb9..64c3306 100644
target_compile_options(libpl PRIVATE -Wno-stringop-overflow)
endif()
--
-2.40.1
+2.41.0