commit:     ef0f69a77adde3b3648865703221f61715874f7b
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Sat Feb 22 14:19:57 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Sat Feb 22 19:43:25 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ef0f69a7

app-editors/imhex: add 1.37.1, drop 1.36.2

Signed-off-by: Henri Gasc <gasc <AT> eurecom.fr>

 app-editors/imhex/Manifest                         |  4 ++--
 app-editors/imhex/files/cmake_boost_regex.patch    | 11 ++++++++++
 app-editors/imhex/files/cmake_mbedtls.patch        | 20 +++++++++++++++++
 app-editors/imhex/files/remove_Werror.patch        | 25 ----------------------
 .../{imhex-1.36.2.ebuild => imhex-1.37.1.ebuild}   | 17 ++++++++++-----
 app-editors/imhex/metadata.xml                     |  1 +
 6 files changed, 46 insertions(+), 32 deletions(-)

diff --git a/app-editors/imhex/Manifest b/app-editors/imhex/Manifest
index f213b25da..46c10872e 100644
--- a/app-editors/imhex/Manifest
+++ b/app-editors/imhex/Manifest
@@ -1,2 +1,2 @@
-DIST imhex-1.36.2.gh.tar.gz 33211537 BLAKE2B 
e0c9c8ae8ce003a3115a239d89a660e7dd1c2c709c8aa1007463ddfc7861a5f10394cef1621a09ed9f7bd90fbfa5249a14aed619bd9f50c53500a1a9dc090aa0
 SHA512 
071bde53b20d68e9300922d507f20ee847bcb7c26e87c4a896126355cc9107dd0fd0226a6b74cc9792c1d1d1f6e75b50fa185f3556e490de96893cdce9e20031
-DIST imhex-patterns-1.36.2.gh.tar.gz 13564417 BLAKE2B 
891f8610f643616c5e7625a2a1ca6035038ef67aa6e425fe9fb997a2b18484800bc8caa0ebb52bdeadd61595409b1b768d4bedc22621622c5865143a663507a7
 SHA512 
d19ca8d9eaa56a6e3e10ffe70aa6df6df49ae008365c182d6c6f7ffda3eae0f41ff40ab6d7670132e753fc7723555064a7cc61122ad20f5b77a35c48119fea26
+DIST imhex-1.37.1.gh.tar.gz 33722261 BLAKE2B 
b6cd8c03fe058a2b30d12dfa6ee89ff69ec5baa9857c3c94ad0489364b646f616f133b03affbf4706dec40ddac27753d6ba4581c55b3150a519e640e0a2ad525
 SHA512 
2a57fcf6d38e533a4db1b007e1e5e74748db2b36dad9dd67880bbabdeb1d107b020673e1ee59befa225b7eed30bec093577c0c35f95427f49ded058e4cdfb44c
+DIST imhex-patterns-1.37.1.gh.tar.gz 13620614 BLAKE2B 
ab909571ef060b664db523e3258e7bfda58c96a2a126a9b8a4eed933c2f6bf8e21e4836d0997757b6d0aae9746a613599a351a12dd573ebb7283999be7954838
 SHA512 
1e7bcf6798597d1cb12b521ecbc646b200cb71fc4569d7d9da10b5432c8ae658f8bf2e78aabb27ebd2dc2b154153f2e9dab40af7396e57c682d76f5da8ff87a6

diff --git a/app-editors/imhex/files/cmake_boost_regex.patch 
b/app-editors/imhex/files/cmake_boost_regex.patch
new file mode 100644
index 000000000..be20b2c17
--- /dev/null
+++ b/app-editors/imhex/files/cmake_boost_regex.patch
@@ -0,0 +1,11 @@
+--- a/cmake/build_helpers.cmake
++++ b/cmake/build_helpers.cmake
+@@ -823,7 +823,7 @@ macro(addBundledLibraries)
+     endif()
+ 
+     if (USE_SYSTEM_BOOST)
+-        find_package(Boost REQUIRED)
++              find_package(Boost REQUIRED COMPONENTS regex)
+         set(BOOST_LIBRARIES Boost::regex)
+     else()
+         add_subdirectory(${THIRD_PARTY_LIBS_FOLDER}/boost 
${CMAKE_CURRENT_BINARY_DIR}/boost EXCLUDE_FROM_ALL)

diff --git a/app-editors/imhex/files/cmake_mbedtls.patch 
b/app-editors/imhex/files/cmake_mbedtls.patch
new file mode 100644
index 000000000..62263f1e7
--- /dev/null
+++ b/app-editors/imhex/files/cmake_mbedtls.patch
@@ -0,0 +1,20 @@
+--- a/cmake/modules/FindmbedTLS.cmake
++++ b/cmake/modules/FindmbedTLS.cmake
+@@ -19,13 +19,13 @@
+ # All rights reserved.
+ 
+ 
+-FIND_PATH(MBEDTLS_INCLUDE_DIR mbedtls/version.h)
++FIND_PATH(MBEDTLS_INCLUDE_DIR mbedtls/version.h PATH_SUFFIXES mbedtls3)
+ 
+ SET(MBEDTLS_FIND_QUIETLY TRUE)
+ 
+-FIND_LIBRARY(MBEDTLS_LIBRARY NAMES mbedtls libmbedtls libmbedx509)
+-FIND_LIBRARY(MBEDX509_LIBRARY NAMES mbedx509 libmbedx509)
+-FIND_LIBRARY(MBEDCRYPTO_LIBRARY NAMES mbedcrypto libmbedcrypto)
++FIND_LIBRARY(MBEDTLS_LIBRARY NAMES mbedtls mbedtls3 libmbedtls libmbedx509)
++FIND_LIBRARY(MBEDX509_LIBRARY NAMES mbedx509 mbedx5093 libmbedx509)
++FIND_LIBRARY(MBEDCRYPTO_LIBRARY NAMES mbedcrypto mbedcrypto3 libmbedcrypto)
+ 
+ IF(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARY AND MBEDX509_LIBRARY AND 
MBEDCRYPTO_LIBRARY)
+     SET(MBEDTLS_FOUND TRUE)

diff --git a/app-editors/imhex/files/remove_Werror.patch 
b/app-editors/imhex/files/remove_Werror.patch
deleted file mode 100644
index cfd65aa75..000000000
--- a/app-editors/imhex/files/remove_Werror.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Remove -Werror where we can not control it using flags
-https://bugs.gentoo.org/921663
-Submodule lib/external/pattern_language contains modified content
---- a/lib/external/pattern_language/cli/CMakeLists.txt
-+++ b/lib/external/pattern_language/cli/CMakeLists.txt
-@@ -29,7 +29,7 @@ else()
-     find_package(CLI11 CONFIG QUIET)
- endif()
- 
--target_compile_options(plcli PRIVATE -Wall -Wextra -Werror 
-Wno-unknown-pragmas -Wno-array-bounds)
-+target_compile_options(plcli PRIVATE -Wall -Wextra -Wno-unknown-pragmas 
-Wno-array-bounds)
- target_include_directories(plcli PUBLIC include ${CLI11_INCLUDE_DIRS})
- target_link_libraries(plcli PRIVATE ${CLI11_LIBRARIES} 
${NLOHMANN_JSON_LIBRARIES} libpl libpl-gen ${FMT_LIBRARIES})
- 
---- a/lib/external/pattern_language/lib/CMakeLists.txt
-+++ b/lib/external/pattern_language/lib/CMakeLists.txt
-@@ -86,7 +86,7 @@ if (LIBPL_ENABLE_PRECOMPILED_HEADERS)
- endif ()
- 
- if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
--    target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic 
-Wno-unknown-pragmas -Wno-array-bounds)
-+    target_compile_options(libpl PRIVATE -Wall -Wextra -Wpedantic 
-Wno-unknown-pragmas -Wno-array-bounds)
-     if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
-         target_compile_options(libpl PRIVATE -Wno-stringop-overflow)
-     endif()

diff --git a/app-editors/imhex/imhex-1.36.2.ebuild 
b/app-editors/imhex/imhex-1.37.1.ebuild
similarity index 90%
rename from app-editors/imhex/imhex-1.36.2.ebuild
rename to app-editors/imhex/imhex-1.37.1.ebuild
index f8e2ee7d1..014eeff1b 100644
--- a/app-editors/imhex/imhex-1.36.2.ebuild
+++ b/app-editors/imhex/imhex-1.37.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -19,7 +19,7 @@ S_PATTERNS="${WORKDIR}/ImHex-Patterns-ImHex-v${PV}"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="+system-llvm test lto +desktop-portal"
+IUSE="+system-llvm test lto +desktop-portal lz4"
 RESTRICT="!test? ( test )"
 
 PATCHES=(
@@ -27,16 +27,21 @@ PATCHES=(
        # will use it at some point and try to access internet.
        # Because it did not cause any issue, we can disable it
        "${FILESDIR}/remove_dotnet.patch"
-       # Remove the different -Werror flags
-       "${FILESDIR}/remove_Werror.patch"
+       # Correct the cmake MbedTLS search call
+       "${FILESDIR}/cmake_mbedtls.patch"
+       # Set boost components to regex
+       "${FILESDIR}/cmake_boost_regex.patch"
 )
 
+DOCS+=( LICENSE PLUGINS.md )
+
 DEPEND="
        app-arch/bzip2
        app-arch/xz-utils
        app-arch/zstd:=
        app-forensics/yara:=
        >=dev-cpp/nlohmann_json-3.10.2
+       dev-libs/boost
        dev-libs/capstone:=
        >=dev-libs/nativefiledialog-extended-1.2.1[desktop-portal?]
        >=dev-libs/libfmt-8.0.0:=
@@ -54,9 +59,10 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 BDEPEND="
-       system-llvm? ( llvm-core/llvm )
        app-admin/chrpath
        gnome-base/librsvg
+       lz4? ( app-arch/lz4 )
+       system-llvm? ( llvm-core/llvm )
 "
 
 pkg_pretend() {
@@ -102,6 +108,7 @@ src_configure() {
                -D IMHEX_COMPRESS_DEBUG_INFO=OFF \
                -D IMHEX_VERSION="${PV}" \
                -D PROJECT_VERSION="${PV}" \
+               -D USE_SYSTEM_BOOST=ON \
                -D USE_SYSTEM_CAPSTONE=ON \
                -D USE_SYSTEM_FMT=ON \
                -D USE_SYSTEM_LLVM=$(usex system-llvm) \

diff --git a/app-editors/imhex/metadata.xml b/app-editors/imhex/metadata.xml
index 18ad0a756..4295c551b 100644
--- a/app-editors/imhex/metadata.xml
+++ b/app-editors/imhex/metadata.xml
@@ -13,6 +13,7 @@
        <use>
                <flag name="system-llvm">Use the system LLVM installation</flag>
                <flag name="desktop-portal">Use sys-apps/xdg-desktop-portal 
file picker instead of the GTK one</flag>
+               <flag name="lz4">Enable lz4 compression / decompression 
support</flag>
        </use>
        <longdescription lang="en">
                Features

Reply via email to