Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/
Date: Thu, 08 Sep 2022 09:31:58
Message-Id: 1662610433.cfebd162461cfd7abc2998e4a91db32a07e3c234.andrewammerlaan@gentoo
1 commit: cfebd162461cfd7abc2998e4a91db32a07e3c234
2 Author: Huang Rui <vowstar <AT> gmail <DOT> com>
3 AuthorDate: Thu Sep 8 04:13:53 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 8 04:13:53 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cfebd162
7
8 app-editors/imhex/files: tree clean patches
9
10 Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
11
12 .../files/imhex-1.21.2-fix-build-with-clang.patch | 26 ---------
13 .../files/imhex-1.21.2-fix-compiler-check.patch | 44 ---------------
14 ...mhex-1.21.2-fix-copy-elision-not-applying.patch | 25 ---------
15 ...ex-1.21.2-fix-dedup-resources-directories.patch | 64 ----------------------
16 .../files/imhex-1.21.2-fix-llvmdemangle.patch | 20 -------
17 .../files/imhex-1.21.2-fix-use-c-23-standard.patch | 26 ---------
18 6 files changed, 205 deletions(-)
19
20 diff --git a/app-editors/imhex/files/imhex-1.21.2-fix-build-with-clang.patch b/app-editors/imhex/files/imhex-1.21.2-fix-build-with-clang.patch
21 deleted file mode 100644
22 index 86dc4ffce..000000000
23 --- a/app-editors/imhex/files/imhex-1.21.2-fix-build-with-clang.patch
24 +++ /dev/null
25 @@ -1,26 +0,0 @@
26 -From 63d0b8a6e2abe14f4d1947cc9ef9b2905f117801 Mon Sep 17 00:00:00 2001
27 -From: KokaKiwi <kokakiwi+git@××××××××.net>
28 -Date: Sun, 14 Aug 2022 23:59:30 +0200
29 -Subject: [PATCH 2/3] makepkg: Fix build with clang
30 -
31 -clang does not support some C++20 features
32 ----
33 - lib/libimhex/include/hex/data_processor/node.hpp | 2 +-
34 - 1 file changed, 1 insertion(+), 1 deletion(-)
35 -
36 -diff --git a/lib/libimhex/include/hex/data_processor/node.hpp b/lib/libimhex/include/hex/data_processor/node.hpp
37 -index c5fcde80..1a5d9fde 100644
38 ---- a/lib/libimhex/include/hex/data_processor/node.hpp
39 -+++ b/lib/libimhex/include/hex/data_processor/node.hpp
40 -@@ -90,7 +90,7 @@ namespace hex::dp {
41 -
42 - protected:
43 - [[noreturn]] void throwNodeError(const std::string &message) {
44 -- throw NodeError(this, message);
45 -+ throw NodeError { this, message };
46 - }
47 -
48 - std::vector<u8> getBufferOnInput(u32 index);
49 ---
50 -2.37.2
51 -
52
53 diff --git a/app-editors/imhex/files/imhex-1.21.2-fix-compiler-check.patch b/app-editors/imhex/files/imhex-1.21.2-fix-compiler-check.patch
54 deleted file mode 100644
55 index 57a04849a..000000000
56 --- a/app-editors/imhex/files/imhex-1.21.2-fix-compiler-check.patch
57 +++ /dev/null
58 @@ -1,44 +0,0 @@
59 -From c5e69f9670f8b6e5d6f223c312807f2ecd204493 Mon Sep 17 00:00:00 2001
60 -From: KokaKiwi <kokakiwi+git@××××××××.net>
61 -Date: Sun, 14 Aug 2022 23:01:45 +0200
62 -Subject: [PATCH 1/3] makepkg: Fix compiler check
63 -
64 ----
65 - cmake/build_helpers.cmake | 12 ++++++++----
66 - 1 file changed, 8 insertions(+), 4 deletions(-)
67 -
68 -diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
69 -index e46ffa5e..c7aa712c 100644
70 ---- a/cmake/build_helpers.cmake
71 -+++ b/cmake/build_helpers.cmake
72 -@@ -344,7 +344,7 @@ function(verifyCompiler)
73 - message(FATAL_ERROR "ImHex requires GCC 12.0.0 or newer. Please use the latest GCC version.")
74 - elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "14.0.0")
75 - message(FATAL_ERROR "ImHex requires Clang 14.0.0 or newer. Please use the latest Clang version.")
76 -- elseif (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
77 -+ elseif (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
78 - message(FATAL_ERROR "ImHex can only be compiled with GCC or Clang. ${CMAKE_CXX_COMPILER_ID} is not supported.")
79 - endif()
80 - endfunction()
81 -@@ -384,10 +384,14 @@ function(downloadImHexPatternsFiles dest)
82 - endfunction()
83 -
84 - macro(setupCompilerWarnings target)
85 -- set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Werror")
86 -- set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread")
87 -+ set(IMHEX_COMMON_FLAGS "")
88 -+ set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS}")
89 -+
90 -+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
91 -+ set(IMHEX_C_FLAGS "${IMHEX_C_FLAGS} -Wno-restrict -Wno-stringop-overread")
92 -+ endif()
93 -
94 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IMHEX_C_FLAGS}")
95 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IMHEX_C_FLAGS}")
96 - set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${IMHEX_COMMON_FLAGS}")
97 --endmacro()
98 -\ No newline at end of file
99 -+endmacro()
100 ---
101 -2.37.2
102 -
103
104 diff --git a/app-editors/imhex/files/imhex-1.21.2-fix-copy-elision-not-applying.patch b/app-editors/imhex/files/imhex-1.21.2-fix-copy-elision-not-applying.patch
105 deleted file mode 100644
106 index e4606a626..000000000
107 --- a/app-editors/imhex/files/imhex-1.21.2-fix-copy-elision-not-applying.patch
108 +++ /dev/null
109 @@ -1,25 +0,0 @@
110 -From 90241ef46d52fb00f3941b526a9b4d20d9170ef0 Mon Sep 17 00:00:00 2001
111 -From: WerWolv <werwolv98@×××××.com>
112 -Date: Thu, 18 Aug 2022 00:23:31 +0200
113 -Subject: [PATCH 1/2] fix: Copy elision not applying
114 -
115 ----
116 - lib/source/pl/core/evaluator.cpp | 2 +-
117 - 1 file changed, 1 insertion(+), 1 deletion(-)
118 -
119 -diff --git a/lib/source/pl/core/evaluator.cpp b/lib/source/pl/core/evaluator.cpp
120 -index 37e7168..0bc9133 100644
121 ---- a/lib/external/pattern_language/lib/source/pl/core/evaluator.cpp
122 -+++ b/lib/external/pattern_language/lib/source/pl/core/evaluator.cpp
123 -@@ -59,7 +59,7 @@ namespace pl::core {
124 -
125 - pattern->setVariableName(name);
126 -
127 -- variables.push_back(std::move(std::unique_ptr<ptrn::Pattern>(pattern)));
128 -+ variables.push_back(std::unique_ptr<ptrn::Pattern>(pattern));
129 - }
130 -
131 - void Evaluator::createVariable(const std::string &name, ast::ASTNode *type, const std::optional<Token::Literal> &value, bool outVariable) {
132 ---
133 -2.37.2
134 -
135
136 diff --git a/app-editors/imhex/files/imhex-1.21.2-fix-dedup-resources-directories.patch b/app-editors/imhex/files/imhex-1.21.2-fix-dedup-resources-directories.patch
137 deleted file mode 100644
138 index 30fb38235..000000000
139 --- a/app-editors/imhex/files/imhex-1.21.2-fix-dedup-resources-directories.patch
140 +++ /dev/null
141 @@ -1,64 +0,0 @@
142 -From 013aed0e9131461157c199edfd9565a82657f293 Mon Sep 17 00:00:00 2001
143 -From: KokaKiwi <kokakiwi+git@××××××××.net>
144 -Date: Sat, 11 Jun 2022 23:08:31 +0200
145 -Subject: [PATCH 3/3] fix: Deduplicate resources directories
146 -
147 -It seems to actually happens despite xdgpp already doing that...
148 ----
149 - lib/libimhex/include/hex/helpers/utils.hpp | 11 +++++++++++
150 - lib/libimhex/source/helpers/fs.cpp | 5 +++++
151 - 2 files changed, 16 insertions(+)
152 -
153 -diff --git a/lib/libimhex/include/hex/helpers/utils.hpp b/lib/libimhex/include/hex/helpers/utils.hpp
154 -index f5666254..5d86768a 100644
155 ---- a/lib/libimhex/include/hex/helpers/utils.hpp
156 -+++ b/lib/libimhex/include/hex/helpers/utils.hpp
157 -@@ -189,6 +189,17 @@ namespace hex {
158 - return result;
159 - }
160 -
161 -+ template<typename T>
162 -+ void deduplicateVector(std::vector<T> &items) {
163 -+ auto end = items.end();
164 -+
165 -+ for (auto it = items.begin(); it != end; ++it) {
166 -+ end = std::remove(it + 1, end, *it);
167 -+ }
168 -+
169 -+ items.erase(end, items.end());
170 -+ }
171 -+
172 - std::vector<std::string> splitString(const std::string &string, const std::string &delimiter);
173 - std::string combineStrings(const std::vector<std::string> &strings, const std::string &delimiter = "");
174 -
175 -diff --git a/lib/libimhex/source/helpers/fs.cpp b/lib/libimhex/source/helpers/fs.cpp
176 -index dc58ced3..5c346ec8 100644
177 ---- a/lib/libimhex/source/helpers/fs.cpp
178 -+++ b/lib/libimhex/source/helpers/fs.cpp
179 -@@ -1,4 +1,5 @@
180 - #include <hex/helpers/fs.hpp>
181 -+#include <hex/helpers/utils.hpp>
182 -
183 - #include <hex/api/content_registry.hpp>
184 - #include <hex/helpers/fs_macos.hpp>
185 -@@ -156,6 +157,8 @@ namespace hex::fs {
186 - auto additionalDirs = ImHexApi::System::getAdditionalFolderPaths();
187 - std::copy(additionalDirs.begin(), additionalDirs.end(), std::back_inserter(paths));
188 -
189 -+ hex::deduplicateVector(paths);
190 -+
191 - return paths;
192 - }
193 -
194 -@@ -175,6 +178,8 @@ namespace hex::fs {
195 - for (auto &path : paths)
196 - path = path / "imhex";
197 -
198 -+ hex::deduplicateVector(paths);
199 -+
200 - return paths;
201 - #endif
202 - }
203 ---
204 -2.37.2
205 -
206
207 diff --git a/app-editors/imhex/files/imhex-1.21.2-fix-llvmdemangle.patch b/app-editors/imhex/files/imhex-1.21.2-fix-llvmdemangle.patch
208 deleted file mode 100644
209 index eaa1d9b8e..000000000
210 --- a/app-editors/imhex/files/imhex-1.21.2-fix-llvmdemangle.patch
211 +++ /dev/null
212 @@ -1,20 +0,0 @@
213 -Date: Thu, 19 Aug 2022 17:57:02 +0800
214 -Subject: [PATCH 1/1] Remove LLVMDemangle
215 -
216 ----
217 - lib/CMakeLists.txt | 4 ++--
218 - 1 file changed, 2 insertions(+), 2 deletions(-)
219 -
220 -diff --git a/plugins/builtin/CMakeLists.txt b/plugins/builtin/CMakeLists.txt
221 -index 1822efa..1141abf 100644
222 ---- a/plugins/builtin/CMakeLists.txt 2022-08-19 17:02:46.348471178 +0800
223 -+++ b/plugins/builtin/CMakeLists.txt 2022-08-19 17:03:24.748001036 +0800
224 -@@ -69,7 +69,7 @@
225 - target_include_directories(${PROJECT_NAME} PRIVATE include)
226 -
227 - # Add additional libraries here #
228 --target_link_libraries(${PROJECT_NAME} PRIVATE libimhex LLVMDemangle)
229 -+target_link_libraries(${PROJECT_NAME} PRIVATE libimhex)
230 -
231 - # ---- No need to change anything from here downwards unless you know what you're doing ---- #
232 -
233
234 diff --git a/app-editors/imhex/files/imhex-1.21.2-fix-use-c-23-standard.patch b/app-editors/imhex/files/imhex-1.21.2-fix-use-c-23-standard.patch
235 deleted file mode 100644
236 index 2b76128bb..000000000
237 --- a/app-editors/imhex/files/imhex-1.21.2-fix-use-c-23-standard.patch
238 +++ /dev/null
239 @@ -1,26 +0,0 @@
240 -From 5a5a97b49ff7fb6dc3786917f59322df67e42816 Mon Sep 17 00:00:00 2001
241 -From: KokaKiwi <kokakiwi+git@××××××××.net>
242 -Date: Thu, 18 Aug 2022 00:57:02 +0200
243 -Subject: [PATCH 2/2] Use C++23 standard
244 -
245 ----
246 - lib/CMakeLists.txt | 4 ++--
247 - 1 file changed, 2 insertions(+), 2 deletions(-)
248 -
249 -diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
250 -index 5822e0a..11511ba 100644
251 ---- a/lib/external/pattern_language/lib/CMakeLists.txt
252 -+++ b/lib/external/pattern_language/lib/CMakeLists.txt
253 -@@ -1,7 +1,7 @@
254 --cmake_minimum_required(VERSION 3.16)
255 -+cmake_minimum_required(VERSION 3.20)
256 - project(libpl)
257 -
258 --set(CMAKE_CXX_STANDARD 20)
259 -+set(CMAKE_CXX_STANDARD 23)
260 -
261 - if (LIBPL_SHARED_LIBRARY)
262 - set(LIBRARY_TYPE SHARED)
263 ---
264 -2.37.2
265 -