public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/, app-editors/imhex/
@ 2021-07-05 15:48 Haelwenn Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Haelwenn Monnier @ 2021-07-05 15:48 UTC (permalink / raw
  To: gentoo-commits

commit:     c277f9004f24cd056df72790b26ec78b6ce3e3c9
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun Jul  4 10:57:29 2021 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Sun Jul  4 10:57:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c277f900

app-editors/imhex: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 app-editors/imhex/Manifest                         |   1 +
 .../imhex/files/imhex-1.8.1-fix-yara-linking.patch |  11 +++
 app-editors/imhex/files/imhex-1.8.1-gcc11.patch    |  11 +++
 .../imhex-1.8.1-system-nativefiledialog.patch      |  19 ++++
 .../imhex/files/imhex-1.8.1-system-xdgpp.patch     |  11 +++
 app-editors/imhex/imhex-1.8.1.ebuild               | 106 +++++++++++++++++++++
 app-editors/imhex/metadata.xml                     |  77 +++++++++++++++
 7 files changed, 236 insertions(+)

diff --git a/app-editors/imhex/Manifest b/app-editors/imhex/Manifest
new file mode 100644
index 000000000..aae2af6f2
--- /dev/null
+++ b/app-editors/imhex/Manifest
@@ -0,0 +1 @@
+DIST imhex-1.8.1.tar.gz 1758664 BLAKE2B 62c58358810bd4f1192495001d01fc6c6fe8f28a35adc1478c8b2d0dab0fd929c0f46018c9afd51c1094cbae0c04002f4887fb2fb9377b6c645abaee006b9a03 SHA512 c6ec73a282c9eb90b58d164c29abbef3dceba09aa706a8295cecdcb429d5efa4015fac0dd0a3111eae3efe667f5b16f063624bf188a00a400fc06b008e3b51f8

diff --git a/app-editors/imhex/files/imhex-1.8.1-fix-yara-linking.patch b/app-editors/imhex/files/imhex-1.8.1-fix-yara-linking.patch
new file mode 100644
index 000000000..54754d241
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.8.1-fix-yara-linking.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -93,7 +93,7 @@
+ if (WIN32)
+     target_link_libraries(imhex magic ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} wsock32 ws2_32 libyara)
+ else ()
+-    target_link_libraries(imhex magic ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} dl pthread libyara)
++    target_link_libraries(imhex magic ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} dl pthread yara)
+ endif ()
+ 
+ createPackage()

diff --git a/app-editors/imhex/files/imhex-1.8.1-gcc11.patch b/app-editors/imhex/files/imhex-1.8.1-gcc11.patch
new file mode 100644
index 000000000..7c62768ea
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.8.1-gcc11.patch
@@ -0,0 +1,11 @@
+--- a/plugins/libimhex/include/hex/helpers/utils.hpp
++++ b/plugins/libimhex/include/hex/helpers/utils.hpp
+@@ -25,7 +25,7 @@
+     #define fopen64 fopen
+     #define fseeko64 fseek
+     #define ftello64 ftell
+-#else
++#elif __cplusplus < 201703L
+     template<>
+     struct std::is_integral<u128> : public std::true_type { };
+     template<>

diff --git a/app-editors/imhex/files/imhex-1.8.1-system-nativefiledialog.patch b/app-editors/imhex/files/imhex-1.8.1-system-nativefiledialog.patch
new file mode 100644
index 000000000..185b35469
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.8.1-system-nativefiledialog.patch
@@ -0,0 +1,19 @@
+--- a/plugins/libimhex/CMakeLists.txt
++++ b/plugins/libimhex/CMakeLists.txt
+@@ -12,7 +12,6 @@
+   find_package(nlohmann_json REQUIRED)
+ endif()
+ 
+-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nativefiledialog ${CMAKE_CURRENT_BINARY_DIR}/external/nativefiledialog EXCLUDE_FROM_ALL)
+ if(NOT USE_SYSTEM_FMT)
+   add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/fmt ${CMAKE_CURRENT_BINARY_DIR}/external/fmt)
+ else()
+@@ -32,7 +31,7 @@
+   pkg_check_modules(LIBCURL REQUIRED IMPORTED_TARGET libcurl)
+ endif()
+ 
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -lnfd")
+ 
+ set(CMAKE_SHARED_LIBRARY_PREFIX "")
+ 

diff --git a/app-editors/imhex/files/imhex-1.8.1-system-xdgpp.patch b/app-editors/imhex/files/imhex-1.8.1-system-xdgpp.patch
new file mode 100644
index 000000000..511fe67ea
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.8.1-system-xdgpp.patch
@@ -0,0 +1,11 @@
+--- a/plugins/libimhex/CMakeLists.txt
++++ b/plugins/libimhex/CMakeLists.txt
+@@ -19,7 +19,7 @@
+   find_package(fmt REQUIRED)
+ endif()
+ 
+-set(XDGPP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../external/xdgpp")
++set(XDGPP_INCLUDE_DIRS "/usr/include")
+ set(CMAKE_USE_MBEDTLS ON)
+ set(BUILD_CURL_EXE OFF)
+ set(FPHSA_NAME_MISMATCHED ON CACHE BOOL "")

diff --git a/app-editors/imhex/imhex-1.8.1.ebuild b/app-editors/imhex/imhex-1.8.1.ebuild
new file mode 100644
index 000000000..8f9fd4480
--- /dev/null
+++ b/app-editors/imhex/imhex-1.8.1.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_BUILD_TYPE="Release"
+CMAKE_MAKEFILE_GENERATOR="emake"
+LLVM_MAX_SLOT=12
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake desktop llvm python-single-r1 xdg-utils
+
+DESCRIPTION="A hex editor for reverse engineers, programmers, and eyesight"
+HOMEPAGE="https://github.com/WerWolv/ImHex"
+SRC_URI="https://github.com/WerWolv/ImHex/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/ImHex-${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+	${PYTHON_DEPS}
+	app-forensics/yara
+	dev-cpp/nlohmann_json
+	dev-cpp/xdgpp
+	dev-libs/capstone
+	<dev-libs/libfmt-8.0.0
+	dev-libs/nativefiledialog-extended
+	dev-libs/openssl
+	dev-libs/tre
+	media-libs/freetype
+	media-libs/glfw
+	media-libs/glm
+	net-libs/mbedtls
+	net-misc/curl
+	sys-apps/file
+	sys-devel/llvm:${LLVM_MAX_SLOT}
+	virtual/libiconv
+	virtual/libintl
+"
+RDEPEND="${DEPEND}"
+BDEPEND="app-admin/chrpath"
+
+PATCHES=(
+	"${FILESDIR}/${P}-gcc11.patch"
+	"${FILESDIR}/${P}-system-xdgpp.patch"
+	"${FILESDIR}/${P}-system-nativefiledialog.patch"
+	"${FILESDIR}/${P}-fix-yara-linking.patch"
+)
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+	rm -r external/{curl,fmt,llvm,nativefiledialog,nlohmann_json,xdgpp,yara} || die
+	cmake_src_prepare
+}
+
+src_configure() {
+	python_setup
+	local mycmakeargs=(
+		-DPROJECT_VERSION="${PV}"
+		-DUSE_SYSTEM_CURL=ON
+		-DUSE_SYSTEM_FMT=ON
+		-DUSE_SYSTEM_LLVM=ON
+		-DUSE_SYSTEM_NLOHMANN_JSON=ON
+		-DUSE_SYSTEM_YARA=ON
+	)
+	cmake_src_configure
+}
+
+src_install() {
+	# can't use cmake_src_install, doing it manual
+	dobin "${BUILD_DIR}/${PN}"
+	insinto "/usr/$(get_libdir)"
+	doins "${BUILD_DIR}/plugins/builtin/builtin.hexplug"
+	dolib.so "${BUILD_DIR}/plugins/lib${PN}/lib${PN}.so"
+	insinto "/usr/share/${PN}"
+	doins "${S}/res/icon.ico"
+	doins -r "${S}/res/resources"
+	insinto "/usr/share/${PN}/magic"
+	newins "${BUILD_DIR}/magic_dbs.mgc" "magic.mgc"
+
+	chrpath -d "${ED}/usr/bin/imhex"
+	chrpath -d "${ED}/usr/$(get_libdir)/builtin.hexplug"
+
+	mypythondir="${D}/$(python_get_sitedir)/imhex"
+	mkdir -p "${mypythondir}" || die
+	mv "${S}"/python_libs/lib/* "${mypythondir}" || die
+	python_optimize "${mypythondir}"
+
+	# create desktop icon
+	make_desktop_entry "imhex" "ImHex" "/usr/share/${PN}/icon.ico" "X-Editor"
+
+	# install docs
+	einstalldocs
+}
+
+pkg_postinst() {
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+}

diff --git a/app-editors/imhex/metadata.xml b/app-editors/imhex/metadata.xml
new file mode 100644
index 000000000..03dbc45fc
--- /dev/null
+++ b/app-editors/imhex/metadata.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<description>co-maintainers welcome</description>
+		<email>lssndrbarbieri@gmail.com</email>
+		<name>Alessandro Barbieri</name>
+	</maintainer>
+	<upstream>
+		<changelog>https://github.com/WerWolv/ImHex/releases</changelog>
+		<bugs-to>https://github.com/WerWolv/ImHex/issues</bugs-to>
+	</upstream>
+	<longdescription lang="en">
+Features
+
+Featureful hex view
+Byte patching
+Patch management
+Copy bytes as feature
+Bytes
+Hex string
+C, C++, C sharp, Rust, Python, Java and JavaScript array
+ASCII-Art hex view
+HTML self contained div
+String and hex search
+Colorful highlighting
+Goto from start, end and current cursor position
+Custom C++-like pattern language for parsing highlighting a file's content
+Automatic loading based on MIME type
+arrays, pointers, structs, unions, enums, bitfields, using declarations, little and big endian support, conditionals and much more!
+Useful error messages, syntax highlighting and error marking
+Data importing
+Base64 files
+IPS and IPS32 patches
+Data exporting
+IPS and IPS32 patches
+Data inspector allowing interpretation of data as many different types (little and big endian)
+Huge file support with fast and efficient loading
+String search
+Copying of strings
+Copying of demangled strings
+File hashing support
+CRC16 and CRC32 with custom initial values and polynomials
+MD4, MD5
+SHA-1, SHA-224, SHA-256, SHA-384, SHA-512
+Disassembler supporting many different architectures
+ARM32 (ARM, Thumb, Cortex-M, AArch32)
+ARM64
+MIPS (MIPS32, MIPS64, MIPS32R6, Micro)
+x86 (16-bit, 32-bit, 64-bit)
+PowerPC (32-bit, 64-bit)
+SPARC
+IBM SystemZ
+xCORE
+M68K
+TMS320C64X
+M680X
+Ethereum
+Bookmarks
+Region highlighting
+Comments
+Data Analyzer
+File magic-based file parser and MIME type database
+Byte distribution graph
+Entropy graph
+Highest and average entropy
+Encrypted / Compressed file detection
+Helpful tools
+Itanium and MSVC demangler
+ASCII table
+Regex replacer
+Mathematical expression evaluator (Calculator)
+Hexadecimal Color picker
+Built-in cheat sheet for pattern language and Math evaluator
+Doesn't burn out your retinas when used in late-night sessions
+	</longdescription>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/, app-editors/imhex/
@ 2022-08-24 15:52 Ronny Gutbrod
  0 siblings, 0 replies; 9+ messages in thread
From: Ronny Gutbrod @ 2022-08-24 15:52 UTC (permalink / raw
  To: gentoo-commits

commit:     4ae434e1de980cd13e2ed22df4966a9523286cb8
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Sat Aug 20 11:21:23 2022 +0000
Commit:     Ronny Gutbrod <gentoo <AT> tastytea <DOT> de>
CommitDate: Sat Aug 20 11:21:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4ae434e1

app-editors/imhex: add 1.21.2

Signed-off-by: Huang Rui <vowstar <AT> gmail.com>

 app-editors/imhex/Manifest                         |   2 +
 .../files/imhex-1.21.2-fix-build-with-clang.patch  |  26 +++++
 .../files/imhex-1.21.2-fix-compiler-check.patch    |  44 ++++++++
 ...mhex-1.21.2-fix-copy-elision-not-applying.patch |  25 +++++
 ...ex-1.21.2-fix-dedup-resources-directories.patch |  64 +++++++++++
 .../files/imhex-1.21.2-fix-llvmdemangle.patch      |  20 ++++
 .../files/imhex-1.21.2-fix-use-c-23-standard.patch |  26 +++++
 app-editors/imhex/imhex-1.21.2.ebuild              | 124 +++++++++++++++++++++
 8 files changed, 331 insertions(+)

diff --git a/app-editors/imhex/Manifest b/app-editors/imhex/Manifest
index d07eb6afc..e5404a712 100644
--- a/app-editors/imhex/Manifest
+++ b/app-editors/imhex/Manifest
@@ -1,3 +1,5 @@
 DIST imhex-1.10.0.tar.gz 8509953 BLAKE2B e258693f44d5524a86c88e29152bfe9777a149236f146a16b88bc7a49d3450f1b46138649a830c7164175afaea3c0d5e76c998e3e65020627b3c978c504431bb SHA512 03d84e30d5ee064ef2c3faf5cb40965f2c94b41e4d8b3e2e3e800f079d0710f0660b4c751dc0c4516b9b19bbf57df44a102ae61fa41d56606ce1f37c9aa8313c
 DIST imhex-1.10.1.tar.gz 8523483 BLAKE2B 7d73a06cfe83fdd9fa8723f1c64a752212f8e2f0dbf902f2d1da1349e53e580684263b168569f092d32c129eddba40131d8f8bd3148d6d59340dcd67bcdc8b6e SHA512 0542ce5db530989367dfc98932bd09e3020c955e2bd666122644612e1c41e2bc3d6a6374c60e7afbb4bae86c75930dfbc7a48f37a8cd8a0d85a550231f470b91
+DIST imhex-1.21.2.tar.gz 23473112 BLAKE2B 5e1dbcf246fc2b2ac57636efee71574eb38ee2d04678a6e09b4d8c2d61da01021bb169fa40a18725d609a3daae1bf9a4ca8aacbb21b6d381c3ff1345d9f788c6 SHA512 e5dd9c5b81f739ee37cc51cf37aa6b866b1af8b28f06e0731612612c5a56d5d68d9d50c20ebb9304a51efb88c07fde72656dcc7d6c249dd827d5d15e44de9698
 DIST imhex-1.8.1.tar.gz 1758664 BLAKE2B 62c58358810bd4f1192495001d01fc6c6fe8f28a35adc1478c8b2d0dab0fd929c0f46018c9afd51c1094cbae0c04002f4887fb2fb9377b6c645abaee006b9a03 SHA512 c6ec73a282c9eb90b58d164c29abbef3dceba09aa706a8295cecdcb429d5efa4015fac0dd0a3111eae3efe667f5b16f063624bf188a00a400fc06b008e3b51f8
+DIST imhex-patterns-1.21.2.tar.gz 4672663 BLAKE2B a0c4a9917ad44a4af0e01e67210bb025a01e6775b327248ba9259d36ea0596b2be74aed758d478b3f5c0d0aea669ed333c8aca2b7e43e275abc833bbdcef2490 SHA512 c5694bd5cc6a609dd8133f0566fbf3bfd4669cf4a20523d10afddbc39e4b7a8d52d8fdecff95883e40b6f06f858e1373c8dbe0713fd7f54380dac5ee3105b9ce

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
new file mode 100644
index 000000000..86dc4ffce
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.21.2-fix-build-with-clang.patch
@@ -0,0 +1,26 @@
+From 63d0b8a6e2abe14f4d1947cc9ef9b2905f117801 Mon Sep 17 00:00:00 2001
+From: KokaKiwi <kokakiwi+git@kokakiwi.net>
+Date: Sun, 14 Aug 2022 23:59:30 +0200
+Subject: [PATCH 2/3] makepkg: Fix build with clang
+
+clang does not support some C++20 features
+---
+ lib/libimhex/include/hex/data_processor/node.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/libimhex/include/hex/data_processor/node.hpp b/lib/libimhex/include/hex/data_processor/node.hpp
+index c5fcde80..1a5d9fde 100644
+--- a/lib/libimhex/include/hex/data_processor/node.hpp
++++ b/lib/libimhex/include/hex/data_processor/node.hpp
+@@ -90,7 +90,7 @@ namespace hex::dp {
+ 
+     protected:
+         [[noreturn]] void throwNodeError(const std::string &message) {
+-            throw NodeError(this, message);
++            throw NodeError { this, message };
+         }
+ 
+         std::vector<u8> getBufferOnInput(u32 index);
+-- 
+2.37.2
+

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
new file mode 100644
index 000000000..57a04849a
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.21.2-fix-compiler-check.patch
@@ -0,0 +1,44 @@
+From c5e69f9670f8b6e5d6f223c312807f2ecd204493 Mon Sep 17 00:00:00 2001
+From: KokaKiwi <kokakiwi+git@kokakiwi.net>
+Date: Sun, 14 Aug 2022 23:01:45 +0200
+Subject: [PATCH 1/3] makepkg: Fix compiler check
+
+---
+ cmake/build_helpers.cmake | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
+index e46ffa5e..c7aa712c 100644
+--- a/cmake/build_helpers.cmake
++++ b/cmake/build_helpers.cmake
+@@ -344,7 +344,7 @@ function(verifyCompiler)
+         message(FATAL_ERROR "ImHex requires GCC 12.0.0 or newer. Please use the latest GCC version.")
+     elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "14.0.0")
+         message(FATAL_ERROR "ImHex requires Clang 14.0.0 or newer. Please use the latest Clang version.")
+-    elseif (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
++    elseif (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
+         message(FATAL_ERROR "ImHex can only be compiled with GCC or Clang. ${CMAKE_CXX_COMPILER_ID} is not supported.")
+     endif()
+ endfunction()
+@@ -384,10 +384,14 @@ function(downloadImHexPatternsFiles dest)
+ endfunction()
+ 
+ macro(setupCompilerWarnings target)
+-    set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Werror")
+-    set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread")
++    set(IMHEX_COMMON_FLAGS "")
++    set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS}")
++
++    if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
++        set(IMHEX_C_FLAGS "${IMHEX_C_FLAGS} -Wno-restrict -Wno-stringop-overread")
++    endif()
+ 
+     set(CMAKE_C_FLAGS    "${CMAKE_C_FLAGS}    ${IMHEX_C_FLAGS}")
+     set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS}  ${IMHEX_C_FLAGS}")
+     set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${IMHEX_COMMON_FLAGS}")
+-endmacro()
+\ No newline at end of file
++endmacro()
+-- 
+2.37.2
+

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
new file mode 100644
index 000000000..e4606a626
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.21.2-fix-copy-elision-not-applying.patch
@@ -0,0 +1,25 @@
+From 90241ef46d52fb00f3941b526a9b4d20d9170ef0 Mon Sep 17 00:00:00 2001
+From: WerWolv <werwolv98@gmail.com>
+Date: Thu, 18 Aug 2022 00:23:31 +0200
+Subject: [PATCH 1/2] fix: Copy elision not applying
+
+---
+ lib/source/pl/core/evaluator.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/source/pl/core/evaluator.cpp b/lib/source/pl/core/evaluator.cpp
+index 37e7168..0bc9133 100644
+--- a/lib/external/pattern_language/lib/source/pl/core/evaluator.cpp
++++ b/lib/external/pattern_language/lib/source/pl/core/evaluator.cpp
+@@ -59,7 +59,7 @@ namespace pl::core {
+ 
+         pattern->setVariableName(name);
+ 
+-        variables.push_back(std::move(std::unique_ptr<ptrn::Pattern>(pattern)));
++        variables.push_back(std::unique_ptr<ptrn::Pattern>(pattern));
+     }
+ 
+     void Evaluator::createVariable(const std::string &name, ast::ASTNode *type, const std::optional<Token::Literal> &value, bool outVariable) {
+-- 
+2.37.2
+

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
new file mode 100644
index 000000000..30fb38235
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.21.2-fix-dedup-resources-directories.patch
@@ -0,0 +1,64 @@
+From 013aed0e9131461157c199edfd9565a82657f293 Mon Sep 17 00:00:00 2001
+From: KokaKiwi <kokakiwi+git@kokakiwi.net>
+Date: Sat, 11 Jun 2022 23:08:31 +0200
+Subject: [PATCH 3/3] fix: Deduplicate resources directories
+
+It seems to actually happens despite xdgpp already doing that...
+---
+ lib/libimhex/include/hex/helpers/utils.hpp | 11 +++++++++++
+ lib/libimhex/source/helpers/fs.cpp         |  5 +++++
+ 2 files changed, 16 insertions(+)
+
+diff --git a/lib/libimhex/include/hex/helpers/utils.hpp b/lib/libimhex/include/hex/helpers/utils.hpp
+index f5666254..5d86768a 100644
+--- a/lib/libimhex/include/hex/helpers/utils.hpp
++++ b/lib/libimhex/include/hex/helpers/utils.hpp
+@@ -189,6 +189,17 @@ namespace hex {
+         return result;
+     }
+ 
++    template<typename T>
++    void deduplicateVector(std::vector<T> &items) {
++        auto end = items.end();
++
++        for (auto it = items.begin(); it != end; ++it) {
++            end = std::remove(it + 1, end, *it);
++        }
++
++        items.erase(end, items.end());
++    }
++
+     std::vector<std::string> splitString(const std::string &string, const std::string &delimiter);
+     std::string combineStrings(const std::vector<std::string> &strings, const std::string &delimiter = "");
+ 
+diff --git a/lib/libimhex/source/helpers/fs.cpp b/lib/libimhex/source/helpers/fs.cpp
+index dc58ced3..5c346ec8 100644
+--- a/lib/libimhex/source/helpers/fs.cpp
++++ b/lib/libimhex/source/helpers/fs.cpp
+@@ -1,4 +1,5 @@
+ #include <hex/helpers/fs.hpp>
++#include <hex/helpers/utils.hpp>
+ 
+ #include <hex/api/content_registry.hpp>
+ #include <hex/helpers/fs_macos.hpp>
+@@ -156,6 +157,8 @@ namespace hex::fs {
+         auto additionalDirs = ImHexApi::System::getAdditionalFolderPaths();
+         std::copy(additionalDirs.begin(), additionalDirs.end(), std::back_inserter(paths));
+ 
++        hex::deduplicateVector(paths);
++
+         return paths;
+     }
+ 
+@@ -175,6 +178,8 @@ namespace hex::fs {
+             for (auto &path : paths)
+                 path = path / "imhex";
+ 
++            hex::deduplicateVector(paths);
++
+             return paths;
+         #endif
+     }
+-- 
+2.37.2
+

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
new file mode 100644
index 000000000..eaa1d9b8e
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.21.2-fix-llvmdemangle.patch
@@ -0,0 +1,20 @@
+Date: Thu, 19 Aug 2022 17:57:02 +0800
+Subject: [PATCH 1/1] Remove LLVMDemangle
+
+---
+ lib/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/builtin/CMakeLists.txt b/plugins/builtin/CMakeLists.txt
+index 1822efa..1141abf 100644
+--- a/plugins/builtin/CMakeLists.txt	2022-08-19 17:02:46.348471178 +0800
++++ b/plugins/builtin/CMakeLists.txt	2022-08-19 17:03:24.748001036 +0800
+@@ -69,7 +69,7 @@
+ target_include_directories(${PROJECT_NAME} PRIVATE include)
+ 
+ # Add additional libraries here #
+-target_link_libraries(${PROJECT_NAME} PRIVATE libimhex LLVMDemangle)
++target_link_libraries(${PROJECT_NAME} PRIVATE libimhex)
+ 
+ # ---- No need to change anything from here downwards unless you know what you're doing ---- #
+ 

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
new file mode 100644
index 000000000..2b76128bb
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.21.2-fix-use-c-23-standard.patch
@@ -0,0 +1,26 @@
+From 5a5a97b49ff7fb6dc3786917f59322df67e42816 Mon Sep 17 00:00:00 2001
+From: KokaKiwi <kokakiwi+git@kokakiwi.net>
+Date: Thu, 18 Aug 2022 00:57:02 +0200
+Subject: [PATCH 2/2] Use C++23 standard
+
+---
+ lib/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
+index 5822e0a..11511ba 100644
+--- a/lib/external/pattern_language/lib/CMakeLists.txt
++++ b/lib/external/pattern_language/lib/CMakeLists.txt
+@@ -1,7 +1,7 @@
+-cmake_minimum_required(VERSION 3.16)
++cmake_minimum_required(VERSION 3.20)
+ project(libpl)
+ 
+-set(CMAKE_CXX_STANDARD 20)
++set(CMAKE_CXX_STANDARD 23)
+ 
+ if (LIBPL_SHARED_LIBRARY)
+     set(LIBRARY_TYPE SHARED)
+-- 
+2.37.2
+

diff --git a/app-editors/imhex/imhex-1.21.2.ebuild b/app-editors/imhex/imhex-1.21.2.ebuild
new file mode 100644
index 000000000..980671dc4
--- /dev/null
+++ b/app-editors/imhex/imhex-1.21.2.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_BUILD_TYPE="Release"
+CMAKE_MAKEFILE_GENERATOR="emake"
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit cmake desktop llvm python-r1 xdg
+
+DESCRIPTION="A hex editor for reverse engineers, programmers, and eyesight"
+HOMEPAGE="https://github.com/WerWolv/ImHex"
+SRC_URI="
+	https://github.com/WerWolv/ImHex/releases/download/v${PV}/Full.Sources.tar.gz -> ${P}.tar.gz
+	https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v${PV}.tar.gz -> ${PN}-patterns-${PV}.tar.gz
+"
+S="${WORKDIR}/ImHex"
+S_PATTERNS="${WORKDIR}/ImHex-Patterns-ImHex-v${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+	python? ( ${PYTHON_DEPS} )
+	app-forensics/yara
+	dev-libs/capstone
+	>=dev-libs/libfmt-8.0.0
+	dev-libs/openssl
+	dev-libs/tre
+	media-libs/freetype
+	media-libs/glfw
+	media-libs/glm
+	net-libs/libssh2
+	net-libs/mbedtls
+	net-misc/curl
+	sys-apps/dbus
+	sys-apps/file
+	sys-apps/xdg-desktop-portal
+	virtual/libiconv
+	virtual/libintl
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	app-admin/chrpath
+	>=dev-cpp/nlohmann_json-3.10.2
+	gnome-base/librsvg
+	sys-devel/llvm
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-1.21.2-fix-compiler-check.patch"
+	"${FILESDIR}/${PN}-1.21.2-fix-build-with-clang.patch"
+	"${FILESDIR}/${PN}-1.21.2-fix-dedup-resources-directories.patch"
+	"${FILESDIR}/${PN}-1.21.2-fix-copy-elision-not-applying.patch"
+	"${FILESDIR}/${PN}-1.21.2-fix-use-c-23-standard.patch"
+	"${FILESDIR}/${PN}-1.21.2-fix-llvmdemangle.patch"
+)
+
+src_configure() {
+	use python && python_setup
+
+	local mycmakeargs=(
+		-D CMAKE_SKIP_RPATH=ON \
+		-D IMHEX_IGNORE_BAD_CLONE=ON \
+		-D IMHEX_OFFLINE_BUILD=ON \
+		-D IMHEX_STRIP_RELEASE=OFF \
+		-D IMHEX_VERSION="${PV}" \
+		-D PROJECT_VERSION="${PV}" \
+		-D USE_SYSTEM_CAPSTONE=ON \
+		-D USE_SYSTEM_CURL=ON \
+		-D USE_SYSTEM_FMT=ON \
+		-D USE_SYSTEM_LLVM=ON \
+		-D USE_SYSTEM_NLOHMANN_JSON=ON \
+		-D USE_SYSTEM_YARA=ON
+	)
+	if use python; then
+		mycmakeargs+=( -D PYTHON_VERSION_MAJOR_MINOR="\"${EPYTHON/python/}\"" )
+	fi
+	cmake_src_configure
+}
+
+src_install() {
+	# Can't use cmake_src_install, doing it manual
+	# Executable
+	dobin "${BUILD_DIR}/${PN}"
+	chrpath -d "${ED}/usr/bin/${PN}"
+	# Shared lib and plugins
+	dolib.so "${BUILD_DIR}"/lib/lib"${PN}"/lib"${PN}".so*
+	chrpath -d "${ED}"/usr/bin/lib"${PN}"/lib"${PN}".so*
+	exeinto "/usr/$(get_libdir)/${PN}/plugins"
+	for plugin in builtin; do
+		doexe "${BUILD_DIR}/plugins/${plugin}.hexplug"
+		chrpath -d "${ED}/usr/$(get_libdir)/${PN}/plugins/${plugin}.hexplug"
+	done
+	# Desktop and icon files
+	domenu "${S}/dist/${PN}.desktop"
+	newicon -s scalable "${S}/resources/icon.svg" "${PN}.svg"
+	for i in 16 22 24 32 36 48 64 72 96 128 192 256 512; do
+		mkdir "${T}/${i}x${i}" || die
+		rsvg-convert -a -f png -w "${i}" -o "${T}/${i}x${i}/${PN}.png" "${S}/resources/icon.svg" || die
+		doicon -s "${i}" "${T}/${i}x${i}/${PN}.png"
+	done
+
+	if use python; then
+		installation() {
+			mypythondir="${D}/$(python_get_sitedir)/${PN}"
+			mkdir -p "${mypythondir}" || die
+			cp -r "${S}"/resources/lib/python/lib/* "${mypythondir}" || die
+			python_optimize "${mypythondir}"
+		}
+		python_foreach_impl installation
+	fi
+
+	# Install docs
+	einstalldocs
+
+	# Install patterns
+	insinto /usr/share/imhex
+	doins -r "${S_PATTERNS}"/*
+}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/, app-editors/imhex/
@ 2023-10-10  6:32 Rui Huang
  0 siblings, 0 replies; 9+ messages in thread
From: Rui Huang @ 2023-10-10  6:32 UTC (permalink / raw
  To: gentoo-commits

commit:     c169e2e8f87bb192603e2cbee910290d81caae26
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Mon Oct  9 15:37:25 2023 +0000
Commit:     Rui Huang <vowstar <AT> gmail <DOT> com>
CommitDate: Mon Oct  9 15:38:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c169e2e8

app-editors/imhex: add 1.31.0, drop 1.30.1

Closes: https://bugs.gentoo.org/915471
Closes: https://bugs.gentoo.org/909290
Closes: https://bugs.gentoo.org/909291
Signed-off-by: Henri Gasc <gasc <AT> eurecom.fr>

 app-editors/imhex/Manifest                         |  4 +--
 app-editors/imhex/files/llvm-16.patch              | 13 ++++++++++
 .../{imhex-1.30.1.ebuild => imhex-1.31.0.ebuild}   | 29 +++++++++-------------
 app-editors/imhex/metadata.xml                     |  3 +++
 4 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/app-editors/imhex/Manifest b/app-editors/imhex/Manifest
index 0d45767258..5765ebdb4c 100644
--- a/app-editors/imhex/Manifest
+++ b/app-editors/imhex/Manifest
@@ -1,2 +1,2 @@
-DIST imhex-1.30.1.tar.gz 25920970 BLAKE2B 03a651134bda5814dc4e989a763f148b3a03694640d1baaa4be6e075ad9c5e798959bc477484f8214423e15836cc01de033e10606ee04dc375521101b4c75f13 SHA512 04c71f15fdbe17443b0f98cef2c2562b7d360f14065e4fab2c2dc1eaf9bbd0d8aa9a267dd1eab208d77cf00622edf6b5126b2d266b817f301a2281aae82eed45
-DIST imhex-patterns-1.30.1.tar.gz 3377742 BLAKE2B 4fa9475f7b04f5765f0a81258e9d01bf814b7b7a0b318c096fdc3ba728938f3f782c9c30fde7ced79626b70b550649d883eda6cf5bbc4b3d8d3a9ad8ac1c5364 SHA512 d734c7fe1c31c9b7845422047a9b9d1289c432cfe98d2b08ca5fe22b82262e3ae41ec14e93d3c62d24c87294fcdf439719cef6bc2ee5b2b54b45377addb9f06a
+DIST imhex-1.31.0.tar.gz 25062606 BLAKE2B 9db337f5aa54ccefd925175f8b4869ece873a7c466d6ddded88c26d6f4fd7ba73a7789964ad2ae6a902d2ec653980ef2482434ddcbbbc224aaac8906b16e92c5 SHA512 483a89e84746ba74eb968f84140ae52edb7046d1074160a97eb6ebad6eac0284beccaf39004141cbe1eebcd8ca92d1fd486c45790880503bbcc40c7bdd586cb8
+DIST imhex-patterns-1.31.0.tar.gz 4448476 BLAKE2B 0bace799f0d2280ccd11a1fcafa9d22620a74691f6b5622d3ad0e260143792c8239158ba021de8e775d5d8589f6dfee990d25beab4288c053d9a5b138b8cc252 SHA512 aaeb2028bbc8235fb49ba75bdca71acf725da0035395c86df97c3976bb70f33ad34f9ce3089d72141de6767cc511c575cc3ac85b66ee4eeba8caa252fc874dba

diff --git a/app-editors/imhex/files/llvm-16.patch b/app-editors/imhex/files/llvm-16.patch
new file mode 100644
index 0000000000..5c7efa5faa
--- /dev/null
+++ b/app-editors/imhex/files/llvm-16.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
+index 624e401..cfd30c3 100644
+--- a/cmake/build_helpers.cmake
++++ b/cmake/build_helpers.cmake
+@@ -503,7 +503,7 @@ macro(addBundledLibraries)
+         add_subdirectory(${EXTERN_LIBS_FOLDER}/llvm-demangle EXCLUDE_FROM_ALL)
+         set_target_properties(LLVMDemangle PROPERTIES POSITION_INDEPENDENT_CODE ON)
+     else()
+-        find_package(LLVM REQUIRED Demangle)
++        find_package(LLVM 16 REQUIRED Demangle)
+     endif()
+ 
+     if (NOT USE_SYSTEM_YARA)

diff --git a/app-editors/imhex/imhex-1.30.1.ebuild b/app-editors/imhex/imhex-1.31.0.ebuild
similarity index 79%
rename from app-editors/imhex/imhex-1.30.1.ebuild
rename to app-editors/imhex/imhex-1.31.0.ebuild
index 1ea5d0cef7..ccbb9ef59a 100644
--- a/app-editors/imhex/imhex-1.30.1.ebuild
+++ b/app-editors/imhex/imhex-1.31.0.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 CMAKE_BUILD_TYPE="Release"
 CMAKE_MAKEFILE_GENERATOR="emake"
 
-inherit cmake llvm toolchain-funcs
+inherit cmake llvm toolchain-funcs desktop
 
 DESCRIPTION="A hex editor for reverse engineers, programmers, and eyesight"
 HOMEPAGE="https://github.com/WerWolv/ImHex"
@@ -20,6 +20,11 @@ S_PATTERNS="${WORKDIR}/ImHex-Patterns-ImHex-v${PV}"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64"
+IUSE="+system-llvm"
+
+PATCHES=(
+	"${FILESDIR}/llvm-16.patch"
+)
 
 DEPEND="
 	app-forensics/yara
@@ -41,6 +46,7 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 BDEPEND="
+	system-llvm? ( <sys-devel/llvm-17 )
 	app-admin/chrpath
 	gnome-base/librsvg
 	sys-devel/lld
@@ -53,19 +59,6 @@ pkg_pretend() {
 	fi
 }
 
-src_prepare() {
-	default
-	# We are removing all tests altogether
-	# The tests need ImHex installed to succeed (see https://bugs.gentoo.org/attachment.cgi?id=860683), so we remove them
-	# We could use `ln "${BUILD_DIR}/lib/libimhex.so.${PV}" "/lib64/libimhex.so.${PV}"` and  circumvent sandboxing
-	sed -i \
-		-e 's/enable_testing/#enable_testing/' \
-		-e 's/add_subdirectory(tests/#add_subdirectory(tests/' \
-		"${S}/CMakeLists.txt" || die
-
-	cmake_src_prepare
-}
-
 src_configure() {
 	local mycmakeargs=(
 		-D CMAKE_BUILD_TYPE="Release" \
@@ -76,7 +69,6 @@ src_configure() {
 		-D CMAKE_OBJC_COMPILER_LAUNCHER=ccache \
 		-D CMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
 		-D CMAKE_SKIP_RPATH=ON \
-		-D IMHEX_USE_BUNDLED_CA=OFF \
 		-D IMHEX_PLUGINS_IN_SHARE=OFF \
 		-D IMHEX_STRIP_RELEASE=OFF \
 		-D IMHEX_OFFLINE_BUILD=ON \
@@ -85,12 +77,13 @@ src_configure() {
 		-D IMHEX_IGNORE_BAD_COMPILER=OFF \
 		-D IMHEX_USE_GTK_FILE_PICKER=OFF \
 		-D IMHEX_DISABLE_STACKTRACE=OFF \
+		-D IMHEX_USE_DEFAULT_BUILD_SETTINGS=OFF \
+		-D IMHEX_STRICT_WARNINGS=OFF \
 		-D IMHEX_VERSION="${PV}" \
 		-D PROJECT_VERSION="${PV}" \
 		-D USE_SYSTEM_CAPSTONE=ON \
-		-D USE_SYSTEM_CURL=ON \
 		-D USE_SYSTEM_FMT=ON \
-		-D USE_SYSTEM_LLVM=ON \
+		-D USE_SYSTEM_LLVM=$(use system-llvm) \
 		-D USE_SYSTEM_NFD=ON \
 		-D USE_SYSTEM_NLOHMANN_JSON=ON \
 		-D USE_SYSTEM_YARA=ON
@@ -102,6 +95,8 @@ src_configure() {
 src_install() {
 	cmake_src_install
 
+	domenu "${S}/dist/${PN}.desktop"
+
 	# Install patterns
 	insinto /usr/share/imhex
 	rm -rf "${S_PATTERNS}/tests"

diff --git a/app-editors/imhex/metadata.xml b/app-editors/imhex/metadata.xml
index 51ae868323..276772b0cc 100644
--- a/app-editors/imhex/metadata.xml
+++ b/app-editors/imhex/metadata.xml
@@ -10,6 +10,9 @@
 		<bugs-to>https://github.com/WerWolv/ImHex/issues</bugs-to>
 		<remote-id type="github">WerWolv/ImHex</remote-id>
 	</upstream>
+	<use>
+		<flag name="system-llvm">Use the system LLVM installation</flag>
+	</use>
 	<longdescription lang="en">
 		Features
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/, app-editors/imhex/
@ 2023-10-12  3:41 Rui Huang
  0 siblings, 0 replies; 9+ messages in thread
From: Rui Huang @ 2023-10-12  3:41 UTC (permalink / raw
  To: gentoo-commits

commit:     4ff61553ace74522dfed1aa0bb812a440e922676
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Wed Oct 11 08:24:36 2023 +0000
Commit:     Rui Huang <vowstar <AT> gmail <DOT> com>
CommitDate: Wed Oct 11 08:25:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4ff61553

app-editors/imhex: add patches

Closes: https://bugs.gentoo.org/915572
Signed-off-by: Henri Gasc <gasc <AT> eurecom.fr>

 app-editors/imhex/files/remove-Werror.patch        | 44 ++++++++++++++++++++++
 .../files/{llvm-16.patch => require-llvm-16.patch} |  8 +++-
 app-editors/imhex/imhex-1.31.0.ebuild              |  3 +-
 3 files changed, 52 insertions(+), 3 deletions(-)

diff --git a/app-editors/imhex/files/remove-Werror.patch b/app-editors/imhex/files/remove-Werror.patch
new file mode 100644
index 0000000000..e00aad7371
--- /dev/null
+++ b/app-editors/imhex/files/remove-Werror.patch
@@ -0,0 +1,44 @@
+From 94126d5ff7e5a6d6cdd7f515097383619725953b Mon Sep 17 00:00:00 2001
+From: Leoriem-code <henrigasc@duck.com>
+Subject: [PATCH] remove -Werror
+
+diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
+index da078878..3848fbeb 100644
+--- a/cmake/build_helpers.cmake
++++ b/cmake/build_helpers.cmake
+@@ -435,7 +435,7 @@ endfunction()
+ macro(setupCompilerFlags target)
+     if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+         if (IMHEX_STRICT_WARNINGS)
+-            set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic -Werror")
++            set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic")
+         endif()
+ 
+         set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-array-bounds")
+
+diff --git a/lib/external/pattern_language/cli/CMakeLists.txt b/lib/external/pattern_language/cli/CMakeLists.txt
+index 39e6f90..01b5e87 100644
+--- a/lib/external/pattern_language/cli/CMakeLists.txt
++++ b/lib/external/pattern_language/cli/CMakeLists.txt
+@@ -28,7 +28,7 @@ if(NOT CLI11_FOUND)
+     set(CLI11_LIBRARIES CLI11::CLI11)
+ 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)
+ target_link_libraries(plcli PUBLIC ${CLI11_LIBRARIES} libpl libpl-gen fmt::fmt-header-only)
+ 
+diff --git a/lib/external/pattern_language/lib/CMakeLists.txt b/lib/external/pattern_language/lib/CMakeLists.txt
+index dab1499..0bfac35 100644
+--- a/lib/external/pattern_language/lib/CMakeLists.txt
++++ b/lib/external/pattern_language/lib/CMakeLists.txt
+@@ -71,7 +71,7 @@ add_library(libpl ${LIBRARY_TYPE}
+ )
+ 
+ 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/files/llvm-16.patch b/app-editors/imhex/files/require-llvm-16.patch
similarity index 66%
rename from app-editors/imhex/files/llvm-16.patch
rename to app-editors/imhex/files/require-llvm-16.patch
index 5c7efa5faa..7642e7654d 100644
--- a/app-editors/imhex/files/llvm-16.patch
+++ b/app-editors/imhex/files/require-llvm-16.patch
@@ -1,8 +1,12 @@
+From 8d86cd22a743c39a04d34d4cf1a104952cf7fbac Mon Sep 17 00:00:00 2001
+From: xiaoming <xiangluoming2015@outlook.com>
+Subject: [PATCH] require llvm 16
+
 diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
-index 624e401..cfd30c3 100644
+index 0d4839e7..da078878 100644
 --- a/cmake/build_helpers.cmake
 +++ b/cmake/build_helpers.cmake
-@@ -503,7 +503,7 @@ macro(addBundledLibraries)
+@@ -525,7 +525,7 @@ macro(addBundledLibraries)
          add_subdirectory(${EXTERN_LIBS_FOLDER}/llvm-demangle EXCLUDE_FROM_ALL)
          set_target_properties(LLVMDemangle PROPERTIES POSITION_INDEPENDENT_CODE ON)
      else()

diff --git a/app-editors/imhex/imhex-1.31.0.ebuild b/app-editors/imhex/imhex-1.31.0.ebuild
index ccbb9ef59a..3d29199d1f 100644
--- a/app-editors/imhex/imhex-1.31.0.ebuild
+++ b/app-editors/imhex/imhex-1.31.0.ebuild
@@ -23,7 +23,8 @@ KEYWORDS="~amd64"
 IUSE="+system-llvm"
 
 PATCHES=(
-	"${FILESDIR}/llvm-16.patch"
+	"${FILESDIR}/require-llvm-16.patch"
+	"${FILESDIR}/remove-Werror.patch"
 )
 
 DEPEND="


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/, app-editors/imhex/
@ 2024-01-09 12:03 David Roman
  0 siblings, 0 replies; 9+ messages in thread
From: David Roman @ 2024-01-09 12:03 UTC (permalink / raw
  To: gentoo-commits

commit:     878fd82c672644ba411c2f525996bc8e884968ca
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Mon Jan  8 20:00:02 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Jan  8 20:00:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=878fd82c

app-editors/imhex: add 1.32.2, drop 1.31.0

Closes: https://bugs.gentoo.org/915541
Signed-off-by: Henri Gasc <gasc <AT> eurecom.fr>

 app-editors/imhex/Manifest                         |  4 +-
 app-editors/imhex/files/remove-Werror.patch        | 44 ----------------------
 app-editors/imhex/files/require-llvm-16.patch      | 17 ---------
 .../{imhex-1.31.0.ebuild => imhex-1.32.2.ebuild}   | 17 +++++----
 4 files changed, 11 insertions(+), 71 deletions(-)

diff --git a/app-editors/imhex/Manifest b/app-editors/imhex/Manifest
index 5765ebdb4c..132a5445db 100644
--- a/app-editors/imhex/Manifest
+++ b/app-editors/imhex/Manifest
@@ -1,2 +1,2 @@
-DIST imhex-1.31.0.tar.gz 25062606 BLAKE2B 9db337f5aa54ccefd925175f8b4869ece873a7c466d6ddded88c26d6f4fd7ba73a7789964ad2ae6a902d2ec653980ef2482434ddcbbbc224aaac8906b16e92c5 SHA512 483a89e84746ba74eb968f84140ae52edb7046d1074160a97eb6ebad6eac0284beccaf39004141cbe1eebcd8ca92d1fd486c45790880503bbcc40c7bdd586cb8
-DIST imhex-patterns-1.31.0.tar.gz 4448476 BLAKE2B 0bace799f0d2280ccd11a1fcafa9d22620a74691f6b5622d3ad0e260143792c8239158ba021de8e775d5d8589f6dfee990d25beab4288c053d9a5b138b8cc252 SHA512 aaeb2028bbc8235fb49ba75bdca71acf725da0035395c86df97c3976bb70f33ad34f9ce3089d72141de6767cc511c575cc3ac85b66ee4eeba8caa252fc874dba
+DIST imhex-1.32.2.tar.gz 26875075 BLAKE2B 75d595e5acb05429b114f4d4c61981080797f7b88d41a219c93f6512c4b204dd164a8886c00af4ee539cb7d6f7baaa49084b349806357fb872a1ebb30e82cfba SHA512 72e3fda050220fa9098f4ad9ed1777db565c81549daf09a5d113e35036d26780ab50c5a45ddf97ec6daa22e832a0d0b916097082706bd7314d56c2f97abcbb11
+DIST imhex-patterns-1.32.2.tar.gz 4556923 BLAKE2B b171669c17c0a7aef0ba65b66c2f68f7581a8e11d61365363fd28cfedfa2658c8833181d5e8a4c789ff011c5afadafec8149b43852319cae161c9bb5c26be2ec SHA512 3f6d1c874e1d6bc4e2e035361c5c7c1da4374cfcaeb6123f187302cacf91ce781db3f4fbe74e259e1bdb18418987fe48067365dcc3324190fbadcaf0b5ab9333

diff --git a/app-editors/imhex/files/remove-Werror.patch b/app-editors/imhex/files/remove-Werror.patch
deleted file mode 100644
index e00aad7371..0000000000
--- a/app-editors/imhex/files/remove-Werror.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 94126d5ff7e5a6d6cdd7f515097383619725953b Mon Sep 17 00:00:00 2001
-From: Leoriem-code <henrigasc@duck.com>
-Subject: [PATCH] remove -Werror
-
-diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
-index da078878..3848fbeb 100644
---- a/cmake/build_helpers.cmake
-+++ b/cmake/build_helpers.cmake
-@@ -435,7 +435,7 @@ endfunction()
- macro(setupCompilerFlags target)
-     if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
-         if (IMHEX_STRICT_WARNINGS)
--            set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic -Werror")
-+            set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic")
-         endif()
- 
-         set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-array-bounds")
-
-diff --git a/lib/external/pattern_language/cli/CMakeLists.txt b/lib/external/pattern_language/cli/CMakeLists.txt
-index 39e6f90..01b5e87 100644
---- a/lib/external/pattern_language/cli/CMakeLists.txt
-+++ b/lib/external/pattern_language/cli/CMakeLists.txt
-@@ -28,7 +28,7 @@ if(NOT CLI11_FOUND)
-     set(CLI11_LIBRARIES CLI11::CLI11)
- 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)
- target_link_libraries(plcli PUBLIC ${CLI11_LIBRARIES} libpl libpl-gen fmt::fmt-header-only)
- 
-diff --git a/lib/external/pattern_language/lib/CMakeLists.txt b/lib/external/pattern_language/lib/CMakeLists.txt
-index dab1499..0bfac35 100644
---- a/lib/external/pattern_language/lib/CMakeLists.txt
-+++ b/lib/external/pattern_language/lib/CMakeLists.txt
-@@ -71,7 +71,7 @@ add_library(libpl ${LIBRARY_TYPE}
- )
- 
- 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/files/require-llvm-16.patch b/app-editors/imhex/files/require-llvm-16.patch
deleted file mode 100644
index 7642e7654d..0000000000
--- a/app-editors/imhex/files/require-llvm-16.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-From 8d86cd22a743c39a04d34d4cf1a104952cf7fbac Mon Sep 17 00:00:00 2001
-From: xiaoming <xiangluoming2015@outlook.com>
-Subject: [PATCH] require llvm 16
-
-diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
-index 0d4839e7..da078878 100644
---- a/cmake/build_helpers.cmake
-+++ b/cmake/build_helpers.cmake
-@@ -525,7 +525,7 @@ macro(addBundledLibraries)
-         add_subdirectory(${EXTERN_LIBS_FOLDER}/llvm-demangle EXCLUDE_FROM_ALL)
-         set_target_properties(LLVMDemangle PROPERTIES POSITION_INDEPENDENT_CODE ON)
-     else()
--        find_package(LLVM REQUIRED Demangle)
-+        find_package(LLVM 16 REQUIRED Demangle)
-     endif()
- 
-     if (NOT USE_SYSTEM_YARA)

diff --git a/app-editors/imhex/imhex-1.31.0.ebuild b/app-editors/imhex/imhex-1.32.2.ebuild
similarity index 89%
rename from app-editors/imhex/imhex-1.31.0.ebuild
rename to app-editors/imhex/imhex-1.32.2.ebuild
index 3d29199d1f..e9aabc2313 100644
--- a/app-editors/imhex/imhex-1.31.0.ebuild
+++ b/app-editors/imhex/imhex-1.32.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -20,14 +20,11 @@ S_PATTERNS="${WORKDIR}/ImHex-Patterns-ImHex-v${PV}"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="+system-llvm"
-
-PATCHES=(
-	"${FILESDIR}/require-llvm-16.patch"
-	"${FILESDIR}/remove-Werror.patch"
-)
+IUSE="+system-llvm test"
+RESTRICT="test" # the tests need the shared library to work
 
 DEPEND="
+	app-arch/zstd[zlib]
 	app-forensics/yara
 	>=dev-cpp/nlohmann_json-3.10.2
 	dev-libs/capstone
@@ -47,7 +44,7 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 BDEPEND="
-	system-llvm? ( <sys-devel/llvm-17 )
+	system-llvm? ( sys-devel/llvm )
 	app-admin/chrpath
 	gnome-base/librsvg
 	sys-devel/lld
@@ -61,6 +58,10 @@ pkg_pretend() {
 }
 
 src_configure() {
+	if use test; then
+		sed -ie "s/tests EXCLUDE_FROM_ALL/tests ALL/" "${S}/CMakeLists.txt"
+	fi
+
 	local mycmakeargs=(
 		-D CMAKE_BUILD_TYPE="Release" \
 		-D CMAKE_C_COMPILER_LAUNCHER=ccache \


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/, app-editors/imhex/
@ 2024-03-17 15:12 Julien Roy
  0 siblings, 0 replies; 9+ messages in thread
From: Julien Roy @ 2024-03-17 15:12 UTC (permalink / raw
  To: gentoo-commits

commit:     928a994d26249670789b80de68370d24e3179e57
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Sun Mar 17 10:57:01 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Sun Mar 17 11:04:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=928a994d

app-editors/imhex: corrected small things

Add patch to remove dotnet from the build
Corrected name of sources
Usage of "usex" and not "use" for cmake flags

Closes: https://bugs.gentoo.org/926761
Signed-off-by: Henri Gasc <gasc <AT> eurecom.fr>

 app-editors/imhex/Manifest                               |  4 ++--
 app-editors/imhex/files/remove_dotnet.patch              | 16 ++++++++++++++++
 .../{imhex-1.33.1-r1.ebuild => imhex-1.33.1-r2.ebuild}   | 16 ++++++++++------
 3 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/app-editors/imhex/Manifest b/app-editors/imhex/Manifest
index 2bffb61f57..47c450a5f6 100644
--- a/app-editors/imhex/Manifest
+++ b/app-editors/imhex/Manifest
@@ -1,2 +1,2 @@
-DIST imhex-1.33.1.tar.gz 32286361 BLAKE2B 6c53172db4a0f3a599bf648d5cf2e4a56ab477896d216b6dcb81dd7559cc05d48a213dbd3161e71e060ce6256cd9b15335d1376dd63f3a79bf23c960c59e91e2 SHA512 9b92d5a7d1664fbb6251cf07450f4aa052da6a4828cae904696d96a54d2895b124afded85005f2bf421cb10129b3ef464b2d36a832c66214140d503109f615e5
-DIST imhex-patterns-1.33.1.tar.gz 4657125 BLAKE2B 3070d06dd5ead76bf0643b551464a24e5dcac2e9aa20bd7f19d3296df87cdfb659e80e432fcbef33c4de5c8e7e97b848e0e5e386ff5db85d7564de4d5fcdd08c SHA512 e4f36ffa82df8d4d97b418c9b6a25a76d99d1649bbda9f0969480518335f4449d91e227ca02ccaab2248e2c95dfe05a33a1687cb16c4428aae57c638da44e262
+DIST imhex-1.33.1.gh.tar.gz 32286361 BLAKE2B 6c53172db4a0f3a599bf648d5cf2e4a56ab477896d216b6dcb81dd7559cc05d48a213dbd3161e71e060ce6256cd9b15335d1376dd63f3a79bf23c960c59e91e2 SHA512 9b92d5a7d1664fbb6251cf07450f4aa052da6a4828cae904696d96a54d2895b124afded85005f2bf421cb10129b3ef464b2d36a832c66214140d503109f615e5
+DIST imhex-patterns-1.33.1.gh.tar.gz 4657125 BLAKE2B 3070d06dd5ead76bf0643b551464a24e5dcac2e9aa20bd7f19d3296df87cdfb659e80e432fcbef33c4de5c8e7e97b848e0e5e386ff5db85d7564de4d5fcdd08c SHA512 e4f36ffa82df8d4d97b418c9b6a25a76d99d1649bbda9f0969480518335f4449d91e227ca02ccaab2248e2c95dfe05a33a1687cb16c4428aae57c638da44e262

diff --git a/app-editors/imhex/files/remove_dotnet.patch b/app-editors/imhex/files/remove_dotnet.patch
new file mode 100644
index 0000000000..d4c4883c0b
--- /dev/null
+++ b/app-editors/imhex/files/remove_dotnet.patch
@@ -0,0 +1,16 @@
+diff --git a/plugins/script_loader/CMakeLists.txt b/plugins/script_loader/CMakeLists.txt
+index af0f6c79..cbb323e3 100644
+--- a/plugins/script_loader/CMakeLists.txt
++++ b/plugins/script_loader/CMakeLists.txt
+@@ -46,7 +46,7 @@ if (CoreClrEmbed_FOUND)
+         install(FILES ${CoreClrEmbed_SHARED_LIBRARIES} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+     endif ()
+ 
+-    add_subdirectory(dotnet)
+-    add_dependencies(script_loader AssemblyLoader)
++	#add_subdirectory(dotnet)
++	#add_dependencies(script_loader AssemblyLoader)
+ 
+-endif ()
+\ No newline at end of file
++endif ()

diff --git a/app-editors/imhex/imhex-1.33.1-r1.ebuild b/app-editors/imhex/imhex-1.33.1-r2.ebuild
similarity index 88%
rename from app-editors/imhex/imhex-1.33.1-r1.ebuild
rename to app-editors/imhex/imhex-1.33.1-r2.ebuild
index c6050d00ba..be797d6b78 100644
--- a/app-editors/imhex/imhex-1.33.1-r1.ebuild
+++ b/app-editors/imhex/imhex-1.33.1-r2.ebuild
@@ -11,8 +11,8 @@ inherit cmake llvm toolchain-funcs desktop
 DESCRIPTION="A hex editor for reverse engineers, programmers, and eyesight"
 HOMEPAGE="https://github.com/WerWolv/ImHex"
 SRC_URI="
-	https://github.com/WerWolv/ImHex/releases/download/v${PV}/Full.Sources.tar.gz -> ${P}.tar.gz
-	https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v${PV}.tar.gz -> ${PN}-patterns-${PV}.tar.gz
+	https://github.com/WerWolv/ImHex/releases/download/v${PV}/Full.Sources.tar.gz -> ${P}.gh.tar.gz
+	https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v${PV}.tar.gz -> ${PN}-patterns-${PV}.gh.tar.gz
 "
 S="${WORKDIR}/ImHex"
 S_PATTERNS="${WORKDIR}/ImHex-Patterns-ImHex-v${PV}"
@@ -23,6 +23,10 @@ KEYWORDS="~amd64"
 IUSE="+system-llvm test lto"
 RESTRICT="!test? ( test )"
 
+PATCHES=(
+	"${FILESDIR}/remove_dotnet.patch"
+)
+
 DEPEND="
 	app-arch/zstd[zlib]
 	app-forensics/yara
@@ -69,17 +73,17 @@ src_configure() {
 		-D IMHEX_IGNORE_BAD_COMPILER=OFF \
 		-D IMHEX_USE_GTK_FILE_PICKER=OFF \
 		-D IMHEX_DISABLE_STACKTRACE=ON \
-		-D IMHEX_BUNDLE_DOTNET=ON \
-		-D IMHEX_ENABLE_LTO=$(use lto) \
+		-D IMHEX_BUNDLE_DOTNET=OFF \
+		-D IMHEX_ENABLE_LTO=$(usex lto) \
 		-D IMHEX_USE_DEFAULT_BUILD_SETTINGS=OFF \
 		-D IMHEX_STRICT_WARNINGS=OFF \
-		-D IMHEX_ENABLE_UNIT_TESTS=$(use test) \
+		-D IMHEX_ENABLE_UNIT_TESTS=$(usex test) \
 		-D IMHEX_ENABLE_PRECOMPILED_HEADERS=OFF \
 		-D IMHEX_VERSION="${PV}" \
 		-D PROJECT_VERSION="${PV}" \
 		-D USE_SYSTEM_CAPSTONE=ON \
 		-D USE_SYSTEM_FMT=ON \
-		-D USE_SYSTEM_LLVM=$(use system-llvm) \
+		-D USE_SYSTEM_LLVM=$(usex system-llvm) \
 		-D USE_SYSTEM_NFD=ON \
 		-D USE_SYSTEM_NLOHMANN_JSON=ON \
 		-D USE_SYSTEM_YARA=ON


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/, app-editors/imhex/
@ 2024-03-17 18:02 Julien Roy
  0 siblings, 0 replies; 9+ messages in thread
From: Julien Roy @ 2024-03-17 18:02 UTC (permalink / raw
  To: gentoo-commits

commit:     6fcbb888e8cea698945873b81d1e9f8ccf2eaea1
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Sun Mar 17 15:35:17 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Sun Mar 17 15:36:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6fcbb888

app-editors/imhex: Add note as to why patch

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

 app-editors/imhex/files/remove_dotnet.patch | 8 +++-----
 app-editors/imhex/imhex-1.33.1-r2.ebuild    | 3 +++
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/app-editors/imhex/files/remove_dotnet.patch b/app-editors/imhex/files/remove_dotnet.patch
index d4c4883c0b..30ab50f642 100644
--- a/app-editors/imhex/files/remove_dotnet.patch
+++ b/app-editors/imhex/files/remove_dotnet.patch
@@ -1,16 +1,14 @@
 diff --git a/plugins/script_loader/CMakeLists.txt b/plugins/script_loader/CMakeLists.txt
-index af0f6c79..cbb323e3 100644
+index af0f6c79..cddc0e14 100644
 --- a/plugins/script_loader/CMakeLists.txt
 +++ b/plugins/script_loader/CMakeLists.txt
-@@ -46,7 +46,7 @@ if (CoreClrEmbed_FOUND)
+@@ -46,7 +46,4 @@ if (CoreClrEmbed_FOUND)
          install(FILES ${CoreClrEmbed_SHARED_LIBRARIES} DESTINATION ${CMAKE_INSTALL_LIBDIR})
      endif ()
  
 -    add_subdirectory(dotnet)
 -    add_dependencies(script_loader AssemblyLoader)
-+	#add_subdirectory(dotnet)
-+	#add_dependencies(script_loader AssemblyLoader)
- 
+-
 -endif ()
 \ No newline at end of file
 +endif ()

diff --git a/app-editors/imhex/imhex-1.33.1-r2.ebuild b/app-editors/imhex/imhex-1.33.1-r2.ebuild
index be797d6b78..56309f1696 100644
--- a/app-editors/imhex/imhex-1.33.1-r2.ebuild
+++ b/app-editors/imhex/imhex-1.33.1-r2.ebuild
@@ -24,6 +24,9 @@ IUSE="+system-llvm test lto"
 RESTRICT="!test? ( test )"
 
 PATCHES=(
+	# If virtual/dotnet-sdk is installed on your system, then cmake
+	# 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"
 )
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/, app-editors/imhex/
@ 2024-07-10 23:52 Haelwenn Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Haelwenn Monnier @ 2024-07-10 23:52 UTC (permalink / raw
  To: gentoo-commits

commit:     eab0472a57f9ecdd85eecd42cec9446e6adcb211
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Tue Jul  9 14:58:13 2024 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Tue Jul  9 14:59:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=eab0472a

app-editors/imhex: add 1.35.3, drop 1.33.2-r1

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

 app-editors/imhex/Manifest                         |  4 ++--
 app-editors/imhex/files/remove_Werror.patch        | 21 +++++++++++++++--
 app-editors/imhex/files/remove_dotnet.patch        | 26 +++++++++++++---------
 ...{imhex-1.33.2-r1.ebuild => imhex-1.35.3.ebuild} |  0
 4 files changed, 36 insertions(+), 15 deletions(-)

diff --git a/app-editors/imhex/Manifest b/app-editors/imhex/Manifest
index 39350d82f..2190fce9d 100644
--- a/app-editors/imhex/Manifest
+++ b/app-editors/imhex/Manifest
@@ -1,2 +1,2 @@
-DIST imhex-1.33.2.gh.tar.gz 32292253 BLAKE2B 97d8b0f5c7b9621bfa36dbd85f24040c7d8d7dffca154cd85ff128160428d8d590b42e348aa8dbd48b4a21f747d6a0d6c3e74fe9ee484a77f061d5ea28661e70 SHA512 393719670019d7fa11d3f67a6b5ef8d2ae75812078a8beaba6b9b3091a283fc9790161c018073933c1b4a8cbcedf8ff7534aacac20ef4d210f10632db6e487ec
-DIST imhex-patterns-1.33.2.gh.tar.gz 7603711 BLAKE2B 17eb5aaa9bec2418f3ca9fe23e9e3cb5443ce1a5624c3dbcece9bcbe2ca7a95a2498d7fd713bbed78854b136b9884d7f4cb0d8453ded262b6fb6efb377219a96 SHA512 e6b6409b5f5e64de339f5a493c33c06e6033c8f4a1fc594f8f23d3ecd9b6d8a66e712e06649f0312e55860a682e532db000d1f1534d6fdd88181b6738c9201e0
+DIST imhex-1.35.3.gh.tar.gz 33023289 BLAKE2B ebafcda5c873f87945f3d0135615932f545717988920086dd2f09e6ca1c62fda88f272f9ab6a2dae43db49083c9c0c5b6842c55d0c2d2ff667e3f49b84a01097 SHA512 711f98710b00da3ed826367a208678fa3231b02abc61b33d05034cefef3617f6641da78df88ba354a02a16c5d119ee8560fc66d95295214dcd0bdeaab9967c0c
+DIST imhex-patterns-1.35.3.gh.tar.gz 8114314 BLAKE2B 5f89d35c375d5dbe4d1e52ea5c41d86225aa6b5c76a960f430a5a32f94dd68e7ed8cc2fffdd7a3e7dec11f740ef3e226bd52ac3b1d461c0cc9af074a5b44f63d SHA512 6452bad26072dd178bdad2291e717749df361a098a5be7503c7c00e8e8486d2e465fd585d7fa82fe1927848efdcc681cf81e35255cb437231552816cf67ac568

diff --git a/app-editors/imhex/files/remove_Werror.patch b/app-editors/imhex/files/remove_Werror.patch
index 1a35f9e92..891d61a48 100644
--- a/app-editors/imhex/files/remove_Werror.patch
+++ b/app-editors/imhex/files/remove_Werror.patch
@@ -1,5 +1,21 @@
-Remove the different Werror flags we can find used
-Should fix https://bugs.gentoo.org/921663
+--- a/cmake/build_helpers.cmake
++++ b/cmake/build_helpers.cmake
+@@ -563,7 +563,7 @@ macro(setupCompilerFlags target)
+     if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+         # Define strict compilation flags
+         if (IMHEX_STRICT_WARNINGS)
+-            set(IMHEX_COMMON_FLAGS "${IMHEX_COMMON_FLAGS} -Wall -Wextra -Wpedantic -Werror")
++            set(IMHEX_COMMON_FLAGS "${IMHEX_COMMON_FLAGS} -Wall -Wextra -Wpedantic")
+         endif()
+ 
+         if (UNIX AND NOT APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+@@ -871,4 +871,4 @@ function(precompileHeaders target includeFolder)
+             PUBLIC
+             "$<$<COMPILE_LANGUAGE:CXX>:${INCLUDES}>"
+     )
+-endfunction()
+\ No newline at end of file
++endfunction()
 --- a/lib/external/pattern_language/cli/CMakeLists.txt
 +++ b/lib/external/pattern_language/cli/CMakeLists.txt
 @@ -29,7 +29,7 @@ else()
@@ -22,3 +38,4 @@ Should fix https://bugs.gentoo.org/921663
      if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
          target_compile_options(libpl PRIVATE -Wno-stringop-overflow)
      endif()
+

diff --git a/app-editors/imhex/files/remove_dotnet.patch b/app-editors/imhex/files/remove_dotnet.patch
index 88d5c9700..5f241cf8d 100644
--- a/app-editors/imhex/files/remove_dotnet.patch
+++ b/app-editors/imhex/files/remove_dotnet.patch
@@ -1,14 +1,18 @@
-Remove the compilation step that needs dotnet
-https://bugs.gentoo.org/926761
 --- a/plugins/script_loader/CMakeLists.txt
 +++ b/plugins/script_loader/CMakeLists.txt
-@@ -45,8 +45,4 @@ if (CoreClrEmbed_FOUND)
-     if (IMHEX_BUNDLE_DOTNET)
-         install(FILES ${CoreClrEmbed_SHARED_LIBRARIES} DESTINATION ${CMAKE_INSTALL_LIBDIR})
-     endif ()
--
--    add_subdirectory(dotnet)
--    add_dependencies(script_loader AssemblyLoader)
--
- endif ()
+@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.16)
+ 
+ include(ImHexPlugin)
+ 
+-find_package(CoreClrEmbed)
+ if (CoreClrEmbed_FOUND)
+     set(IMHEX_DOTNET_SCRIPT_SUPPORT ON)
+ 
+@@ -56,4 +55,4 @@ if (IMHEX_DOTNET_SCRIPT_SUPPORT)
+ 
+     add_subdirectory(support/dotnet)
+     add_dependencies(script_loader AssemblyLoader)
+-endif()
 \ No newline at end of file
++endif()
+

diff --git a/app-editors/imhex/imhex-1.33.2-r1.ebuild b/app-editors/imhex/imhex-1.35.3.ebuild
similarity index 100%
rename from app-editors/imhex/imhex-1.33.2-r1.ebuild
rename to app-editors/imhex/imhex-1.35.3.ebuild


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/, app-editors/imhex/
@ 2025-02-22 22:36 David Roman
  0 siblings, 0 replies; 9+ messages in thread
From: David Roman @ 2025-02-22 22:36 UTC (permalink / raw
  To: gentoo-commits

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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-02-22 22:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10 23:52 [gentoo-commits] repo/proj/guru:master commit in: app-editors/imhex/files/, app-editors/imhex/ Haelwenn Monnier
  -- strict thread matches above, loose matches on Subject: below --
2025-02-22 22:36 David Roman
2024-03-17 18:02 Julien Roy
2024-03-17 15:12 Julien Roy
2024-01-09 12:03 David Roman
2023-10-12  3:41 Rui Huang
2023-10-10  6:32 Rui Huang
2022-08-24 15:52 Ronny Gutbrod
2021-07-05 15:48 Haelwenn Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox