app-editors/imhex: add 1.37.4

This commit is contained in:
TheK0tYaRa 2025-03-08 23:14:12 +02:00
parent fa95f37fe1
commit 1c8b2f5471
2 changed files with 132 additions and 0 deletions

View file

@ -1,2 +1,4 @@
DIST imhex-1.37.1.gh.tar.gz 33722261 BLAKE2B b6cd8c03fe058a2b30d12dfa6ee89ff69ec5baa9857c3c94ad0489364b646f616f133b03affbf4706dec40ddac27753d6ba4581c55b3150a519e640e0a2ad525 SHA512 2a57fcf6d38e533a4db1b007e1e5e74748db2b36dad9dd67880bbabdeb1d107b020673e1ee59befa225b7eed30bec093577c0c35f95427f49ded058e4cdfb44c
DIST imhex-1.37.4.gh.tar.gz 33717255 BLAKE2B 11f93ca310ddec8ec7d074d5450a02f3147d40aaa92387fbe7fce3be08445e129bbd7336d923e971a2f7f2b6df778a6210de73060cb91abe85161e7fd88588b7 SHA512 07ecc4776f3b82583f1137d1615ab8e73985a550203a127b084c0dfa1e6d7cdae4a558067968c726970c07bcd6fe85fb42302a18ed8b352e789becc5fa113768
DIST imhex-patterns-1.37.1.gh.tar.gz 13620614 BLAKE2B ab909571ef060b664db523e3258e7bfda58c96a2a126a9b8a4eed933c2f6bf8e21e4836d0997757b6d0aae9746a613599a351a12dd573ebb7283999be7954838 SHA512 1e7bcf6798597d1cb12b521ecbc646b200cb71fc4569d7d9da10b5432c8ae658f8bf2e78aabb27ebd2dc2b154153f2e9dab40af7396e57c682d76f5da8ff87a6
DIST imhex-patterns-1.37.4.gh.tar.gz 13620727 BLAKE2B c8699f9f26faeae784b4c4cb14b682d0f4d0c544ef8c9596b8688c19e6066d7101a7c32979ee807cd4a05225fe2548a8759b1fd0a07c578ea5c0fcdb9f104e69 SHA512 3d2f0dee58ad1e9261be71247dad41ed4437d65dc01fd37ff8b3a517ebf23e5a1123f51ae84f9c3b911d7c0b0c6044ffb580fc86f869f4c1ec1667a989125911

View file

@ -0,0 +1,130 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LLVM_COMPAT=( {15..20} )
inherit cmake llvm-r1 toolchain-funcs flag-o-matic 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/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}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+system-llvm test lto +desktop-portal lz4"
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"
# 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:=
media-libs/fontconfig
media-libs/freetype
>=media-libs/glfw-3.4[X]
media-libs/glm
media-libs/libglvnd
net-libs/mbedtls:=
net-misc/curl
sys-apps/file
sys-libs/zlib
virtual/libiconv
virtual/libintl
"
RDEPEND="${DEPEND}"
BDEPEND="
app-admin/chrpath
gnome-base/librsvg
lz4? ( app-arch/lz4 )
system-llvm? ( llvm-core/llvm )
"
pkg_pretend() {
if tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then
die "${PN} requires GCC 14 or newer"
fi
}
src_unpack() {
default
mv "${S_PATTERNS}" "${S}/ImHex-Patterns"
}
src_configure() {
# Building ImHex with -Werror=strict-aliasing gives a failed build
# for tests/algorithms/source/endian.cpp, and ImHex usually has pretty
# clean build (without warnings), so it should be safe to do
filter-flags -Werror=strict-aliasing
if use test; then
sed -ie "s/tests EXCLUDE_FROM_ALL/tests ALL/" "${S}/CMakeLists.txt"
fi
local mycmakeargs=(
-D IMHEX_PLUGINS_IN_SHARE=OFF \
-D IMHEX_STRIP_RELEASE=OFF \
-D IMHEX_OFFLINE_BUILD=ON \
-D IMHEX_IGNORE_BAD_CLONE=ON \
-D IMHEX_PATTERNS_PULL_MASTER=OFF \
-D IMHEX_IGNORE_BAD_COMPILER=OFF \
-D IMHEX_USE_GTK_FILE_PICKER=$(usex !desktop-portal) \
-D IMHEX_DISABLE_STACKTRACE=OFF \
-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_STATIC_LINK_PLUGINS=OFF \
-D IMHEX_ENABLE_UNITY_BUILD=OFF \
-D IMHEX_ENABLE_STD_ASSERTS=OFF \
-D IMHEX_ENABLE_UNIT_TESTS=$(usex test) \
-D IMHEX_ENABLE_PRECOMPILED_HEADERS=OFF \
-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) \
-D USE_SYSTEM_NFD=ON \
-D USE_SYSTEM_NLOHMANN_JSON=ON \
-D USE_SYSTEM_YARA=ON \
)
cmake_src_configure
}
pkg_postinst() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
}
pkg_postrm() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
}