59 lines
1.9 KiB
Bash
59 lines
1.9 KiB
Bash
# Template file for 'imhex'
|
|
pkgname=imhex
|
|
version=1.35.4
|
|
revision=2
|
|
build_wrksrc="ImHex"
|
|
build_style=cmake
|
|
build_helper=qemu
|
|
configure_args="-DIMHEX_OFFLINE_BUILD=ON -DIMHEX_STRIP_RELEASE=OFF
|
|
-DUSE_SYSTEM_FMT=ON -DUSE_SYSTEM_LLVM=ON -DUSE_SYSTEM_CAPSTONE=ON
|
|
-DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON
|
|
-DIMHEX_ENABLE_UNIT_TESTS=ON -DIMHEX_COMPRESS_DEBUG_INFO=OFF
|
|
-DIMHEX_STRICT_WARNINGS=OFF -DIMHEX_ENABLE_LTO=OFF"
|
|
hostmakedepends="pkg-config clang-tools-extra18"
|
|
makedepends="libcurl-devel fmt-devel llvm18-devel jansson-devel yara-devel json-c++
|
|
freetype-devel glfw-devel gtk+3-devel python3-devel file-devel mbedtls-devel
|
|
capstone-devel"
|
|
short_desc="Hex editor for reverse engineers and programmers"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://imhex.werwolv.net/"
|
|
changelog="https://github.com/WerWolv/ImHex/releases"
|
|
distfiles="https://github.com/WerWolv/ImHex/releases/download/v${version}/Full.Sources.tar.gz>imhex-${version}.tar.gz
|
|
https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v${version}.tar.gz>imhex-patterns-${version}.tar.gz"
|
|
checksum="987188df511a01dca407c4fd398a9dbc805ef82cdf044ea27da57ec343c7d6df
|
|
10df85b64b4c14945e43ad14b3ff95cda9ba23e47f4559b5429c2dc733fe23ed"
|
|
patch_args="-Np1 -d $build_wrksrc"
|
|
python_version=3
|
|
|
|
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
|
|
broken="uses i128"
|
|
fi
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
|
configure_args+=" -DIMHEX_DISABLE_STACKTRACE=ON"
|
|
fi
|
|
|
|
do_check() {
|
|
cd build
|
|
ninja ${makejobs} unit_tests
|
|
# StoreAPI, TipsAPI, ContentAPI tests are flaky
|
|
ctest ${makejobs} -E '^.*API$'
|
|
}
|
|
|
|
post_install() {
|
|
rm ${DESTDIR}/usr/bin/imhex-updater
|
|
vmkdir usr/share/imhex
|
|
for d in constants encodings includes magic patterns yara; do
|
|
vcopy ../ImHex-Patterns-ImHex-v${version}/$d usr/share/imhex
|
|
done
|
|
}
|
|
|
|
imhex-patterns_package() {
|
|
short_desc+=" - patterns and magic files"
|
|
depends="imhex"
|
|
pkg_install() {
|
|
vmove usr/share/imhex
|
|
}
|
|
}
|