public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: app-editors/imhex/, app-editors/imhex/files/
@ 2021-07-04 10:58 Alessandro Barbieri
  0 siblings, 0 replies; 6+ messages in thread
From: Alessandro Barbieri @ 2021-07-04 10:58 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:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
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] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: app-editors/imhex/, app-editors/imhex/files/
@ 2021-10-06 22:15 Alessandro Barbieri
  0 siblings, 0 replies; 6+ messages in thread
From: Alessandro Barbieri @ 2021-10-06 22:15 UTC (permalink / raw
  To: gentoo-commits

commit:     f1e18cfe047ee8a885eafb6c04ede61da4e4120e
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Oct  6 20:51:30 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed Oct  6 22:15:38 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f1e18cfe

app-editors/imhex: fix patches

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

 .../imhex/files/imhex-1.10.1-no-lLLVMDemangle.patch    | 18 ++++++++++++++++++
 .../files/imhex-1.10.1-system-nativefiledialog.patch   | 10 ++++++++++
 app-editors/imhex/imhex-1.10.1.ebuild                  |  6 ++----
 3 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/app-editors/imhex/files/imhex-1.10.1-no-lLLVMDemangle.patch b/app-editors/imhex/files/imhex-1.10.1-no-lLLVMDemangle.patch
new file mode 100644
index 000000000..3aa487ed1
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.10.1-no-lLLVMDemangle.patch
@@ -0,0 +1,18 @@
+--- a/plugins/builtin/CMakeLists.txt
++++ b/plugins/builtin/CMakeLists.txt
+@@ -25,7 +25,7 @@
+ # Add additional include directories here #
+ 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)
+ 
+ 
+ 
+@@ -43,4 +43,4 @@
+ 
+ if (NOT TARGET libimhex)
+     add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libimhex ${CMAKE_CURRENT_BINARY_DIR}/plugins/libimhex)
+-endif()
+\ Manca newline alla fine del file
++endif()

diff --git a/app-editors/imhex/files/imhex-1.10.1-system-nativefiledialog.patch b/app-editors/imhex/files/imhex-1.10.1-system-nativefiledialog.patch
new file mode 100644
index 000000000..7e6f8d1dc
--- /dev/null
+++ b/app-editors/imhex/files/imhex-1.10.1-system-nativefiledialog.patch
@@ -0,0 +1,10 @@
+--- a/plugins/libimhex/CMakeLists.txt
++++ b/plugins/libimhex/CMakeLists.txt
+@@ -5,7 +5,6 @@
+ 
+ set(BUILD_SHARED_LIBS OFF)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/ImGui ${CMAKE_CURRENT_BINARY_DIR}/external/ImGui)
+-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nativefiledialog ${CMAKE_CURRENT_BINARY_DIR}/external/nativefiledialog EXCLUDE_FROM_ALL)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/microtar ${CMAKE_CURRENT_BINARY_DIR}/external/microtar EXCLUDE_FROM_ALL)
+ 
+ set(XDGPP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../external/xdgpp") 

diff --git a/app-editors/imhex/imhex-1.10.1.ebuild b/app-editors/imhex/imhex-1.10.1.ebuild
index 511463ff0..baed85f99 100644
--- a/app-editors/imhex/imhex-1.10.1.ebuild
+++ b/app-editors/imhex/imhex-1.10.1.ebuild
@@ -43,11 +43,9 @@ RDEPEND="${DEPEND}"
 BDEPEND="app-admin/chrpath"
 
 PATCHES=(
+	"${FILESDIR}/${P}-no-lLLVMDemangle.patch"
 	"${FILESDIR}/${PN}-1.8.1-system-xdgpp.patch"
-	"${FILESDIR}/${PN}-1.8.1-system-nativefiledialog.patch"
-	"${FILESDIR}/${P}-fix-yara-linking.patch"
-	"${FILESDIR}/${P}-no-lnlohmann_json.patch"
-	"${FILESDIR}/${P}-link-mbedtls.patch"
+	"${FILESDIR}/${P}-system-nativefiledialog.patch"
 )
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 


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

* [gentoo-commits] repo/proj/guru:dev commit in: app-editors/imhex/, app-editors/imhex/files/
@ 2022-08-20 11:23 Rui Huang
  0 siblings, 0 replies; 6+ messages in thread
From: Rui Huang @ 2022-08-20 11:23 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:     Rui Huang <vowstar <AT> gmail <DOT> com>
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] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: app-editors/imhex/, app-editors/imhex/files/
@ 2024-01-08 20:00 Henri Gasc
  0 siblings, 0 replies; 6+ messages in thread
From: Henri Gasc @ 2024-01-08 20:00 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:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
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] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: app-editors/imhex/, app-editors/imhex/files/
@ 2024-03-17 15:36 Henri Gasc
  0 siblings, 0 replies; 6+ messages in thread
From: Henri Gasc @ 2024-03-17 15:36 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:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
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] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: app-editors/imhex/, app-editors/imhex/files/
@ 2024-07-28 22:45 Henri Gasc
  0 siblings, 0 replies; 6+ messages in thread
From: Henri Gasc @ 2024-07-28 22:45 UTC (permalink / raw
  To: gentoo-commits

commit:     6b1942c682a6dabb862bc00e2c13eeb440814b70
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Sun Jul 28 22:44:52 2024 +0000
Commit:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
CommitDate: Sun Jul 28 22:45:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6b1942c6

app-editors/imhex: add 1.35.4, drop 1.35.3

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

 app-editors/imhex/Manifest                         |  4 ++--
 app-editors/imhex/files/remove_Werror.patch        | 22 +++----------------
 app-editors/imhex/files/remove_dotnet.patch        | 18 +++++++++-------
 .../{imhex-1.35.3.ebuild => imhex-1.35.4.ebuild}   | 25 ++++++++++------------
 4 files changed, 26 insertions(+), 43 deletions(-)

diff --git a/app-editors/imhex/Manifest b/app-editors/imhex/Manifest
index 2190fce9d..a12c04ad1 100644
--- a/app-editors/imhex/Manifest
+++ b/app-editors/imhex/Manifest
@@ -1,2 +1,2 @@
-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
+DIST imhex-1.35.4.gh.tar.gz 32738551 BLAKE2B 1e65a332a810af2884c6cf14dafa46cd2d09fc18891c48c7cb1007cab041b293e96db69db068b20d97fb5b51b16c3dbded38a679b65a8d7fd85ce705ae95d6d8 SHA512 a18215a76d949cd4bb7395c57965d1ca04fccad37142d130c17d3edbf8c383875a4f7e11ee3244aa4f08a5a512f19bd5e3e8ab3cdfb59603e7df142876c43318
+DIST imhex-patterns-1.35.4.gh.tar.gz 8212739 BLAKE2B ac79ed6bf919917323909b34f285d2bb48c2a1dadf9270ac09a41f627a07b726bd50751da00b6af1f7478c02c8e8de05d44f678840bf9aab377d96049e70d1fd SHA512 1af5818468eb0cf8d8078cd57d0659d93cf6d59380b3fc7e4cb07442ebc4f90e33e401516d1adafef65a696b458e1738984f92a5a5052a945a84422eda5a6bea

diff --git a/app-editors/imhex/files/remove_Werror.patch b/app-editors/imhex/files/remove_Werror.patch
index 891d61a48..cfd65aa75 100644
--- a/app-editors/imhex/files/remove_Werror.patch
+++ b/app-editors/imhex/files/remove_Werror.patch
@@ -1,21 +1,6 @@
---- 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()
+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()
@@ -38,4 +23,3 @@
      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 5f241cf8d..fab61adf6 100644
--- a/app-editors/imhex/files/remove_dotnet.patch
+++ b/app-editors/imhex/files/remove_dotnet.patch
@@ -1,18 +1,20 @@
+Remove dotnet from the application
+https://bugs.gentoo.org/926761
 --- a/plugins/script_loader/CMakeLists.txt
 +++ b/plugins/script_loader/CMakeLists.txt
-@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.16)
+@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.16)
  
  include(ImHexPlugin)
  
 -find_package(CoreClrEmbed)
+-add_library(dotnet INTERFACE)
  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()
+@@ -55,5 +53,4 @@ add_imhex_plugin(
+         c_api
+         fonts
+         ui
+-        dotnet
+ )
 \ No newline at end of file
-+endif()
-

diff --git a/app-editors/imhex/imhex-1.35.3.ebuild b/app-editors/imhex/imhex-1.35.4.ebuild
similarity index 89%
rename from app-editors/imhex/imhex-1.35.3.ebuild
rename to app-editors/imhex/imhex-1.35.4.ebuild
index 93f9baee0..427ad0bc6 100644
--- a/app-editors/imhex/imhex-1.35.3.ebuild
+++ b/app-editors/imhex/imhex-1.35.4.ebuild
@@ -3,7 +3,9 @@
 
 EAPI=8
 
-inherit cmake llvm toolchain-funcs desktop
+LLVM_COMPAT=( {15..18} )
+
+inherit cmake llvm-r1 toolchain-funcs
 
 DESCRIPTION="A hex editor for reverse engineers, programmers, and eyesight"
 HOMEPAGE="https://github.com/WerWolv/ImHex"
@@ -36,10 +38,10 @@ DEPEND="
 	app-forensics/yara:=
 	>=dev-cpp/nlohmann_json-3.10.2
 	dev-libs/capstone:=
-	dev-libs/nativefiledialog-extended:=
+	>=dev-libs/nativefiledialog-extended-1.2.0:=
 	>=dev-libs/libfmt-8.0.0:=
 	media-libs/freetype
-	media-libs/glfw
+	>=media-libs/glfw-3.4[X]
 	media-libs/glm
 	media-libs/libglvnd
 	net-libs/mbedtls:=
@@ -63,6 +65,12 @@ pkg_pretend() {
 	fi
 }
 
+src_unpack() {
+	default
+
+	mv "${WORKDIR}/ImHex-Patterns-ImHex-v${PV}" "${S}/ImHex-Patterns"
+}
+
 src_configure() {
 	if use test; then
 		sed -ie "s/tests EXCLUDE_FROM_ALL/tests ALL/" "${S}/CMakeLists.txt"
@@ -95,14 +103,3 @@ src_configure() {
 
 	cmake_src_configure
 }
-
-src_install() {
-	cmake_src_install
-
-	domenu "${S}/dist/${PN}.desktop"
-
-	# Install patterns
-	insinto /usr/share/imhex
-	rm -rf "${S_PATTERNS}/tests"
-	doins -r "${S_PATTERNS}"/*
-}


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

end of thread, other threads:[~2024-07-28 22:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-04 10:58 [gentoo-commits] repo/proj/guru:dev commit in: app-editors/imhex/, app-editors/imhex/files/ Alessandro Barbieri
  -- strict thread matches above, loose matches on Subject: below --
2021-10-06 22:15 Alessandro Barbieri
2022-08-20 11:23 Rui Huang
2024-01-08 20:00 Henri Gasc
2024-03-17 15:36 Henri Gasc
2024-07-28 22:45 Henri Gasc

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