bump app-editors/imhex
This commit is contained in:
parent
0a2554c48b
commit
fc83b3dc87
3 changed files with 58 additions and 33 deletions
|
@ -1,5 +1,6 @@
|
|||
Remove the different Werror flags we can find used
|
||||
Should fix https://bugs.gentoo.org/921663
|
||||
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()
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
Remove the compilation step that needs dotnet
|
||||
Remove dotnet from the application
|
||||
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,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)
|
||||
|
||||
@@ -55,5 +53,4 @@ add_imhex_plugin(
|
||||
c_api
|
||||
fonts
|
||||
ui
|
||||
- dotnet
|
||||
)
|
||||
\ No newline at end of file
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake llvm toolchain-funcs desktop
|
||||
LLVM_COMPAT=( {15..19} )
|
||||
|
||||
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"
|
||||
|
@ -17,10 +19,14 @@ S_PATTERNS="${WORKDIR}/ImHex-Patterns-ImHex-v${PV}"
|
|||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="+system-llvm test lto"
|
||||
IUSE="+system-llvm test lto +desktop-portal"
|
||||
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"
|
||||
# Remove the different -Werror flags
|
||||
"${FILESDIR}/remove_Werror.patch"
|
||||
)
|
||||
|
@ -32,34 +38,45 @@ DEPEND="
|
|||
app-forensics/yara:=
|
||||
>=dev-cpp/nlohmann_json-3.10.2
|
||||
dev-libs/capstone:=
|
||||
dev-libs/nativefiledialog-extended:=
|
||||
>=dev-libs/nativefiledialog-extended-1.2.1[desktop-portal?]
|
||||
>=dev-libs/libfmt-8.0.0:=
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype
|
||||
media-libs/glfw
|
||||
>=media-libs/glfw-3.4[X]
|
||||
media-libs/glm
|
||||
media-libs/libglvnd
|
||||
net-libs/mbedtls:=
|
||||
net-misc/curl
|
||||
sys-apps/file
|
||||
sys-apps/xdg-desktop-portal
|
||||
sys-libs/zlib
|
||||
virtual/libiconv
|
||||
virtual/libintl
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="
|
||||
system-llvm? ( sys-devel/llvm )
|
||||
system-llvm? ( llvm-core/llvm )
|
||||
app-admin/chrpath
|
||||
gnome-base/librsvg
|
||||
"
|
||||
|
||||
pkg_pretend() {
|
||||
if tc-is-gcc && [[ $(gcc-major-version) -lt 12 ]]; then
|
||||
die "${PN} requires GCC 12 or newer"
|
||||
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
|
||||
|
@ -71,15 +88,18 @@ src_configure() {
|
|||
-D IMHEX_IGNORE_BAD_CLONE=ON \
|
||||
-D IMHEX_PATTERNS_PULL_MASTER=OFF \
|
||||
-D IMHEX_IGNORE_BAD_COMPILER=OFF \
|
||||
-D IMHEX_USE_GTK_FILE_PICKER=OFF \
|
||||
-D IMHEX_DISABLE_STACKTRACE=ON \
|
||||
-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_DOTNET_SCRIPT_SUPPORT=OFF \
|
||||
-D IMHEX_COMPRESS_DEBUG_INFO=OFF \
|
||||
-D IMHEX_VERSION="${PV}" \
|
||||
-D PROJECT_VERSION="${PV}" \
|
||||
-D USE_SYSTEM_CAPSTONE=ON \
|
||||
|
@ -87,19 +107,17 @@ src_configure() {
|
|||
-D USE_SYSTEM_LLVM=$(usex system-llvm) \
|
||||
-D USE_SYSTEM_NFD=ON \
|
||||
-D USE_SYSTEM_NLOHMANN_JSON=ON \
|
||||
-D USE_SYSTEM_YARA=ON
|
||||
-D USE_SYSTEM_YARA=ON \
|
||||
)
|
||||
|
||||
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}"/*
|
||||
pkg_postinst() {
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
||||
pkg_postrm() {
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue