56 lines
1.8 KiB
Bash
56 lines
1.8 KiB
Bash
# Template file for 'imhex'
|
|
pkgname=imhex
|
|
version=1.28.0
|
|
revision=1
|
|
build_wrksrc="ImHex"
|
|
build_style=cmake
|
|
build_helper=qemu
|
|
# XXX: when capstone v5 is out, -DUSE_SYSTEM_CAPSTONE=ON
|
|
configure_args="-DIMHEX_OFFLINE_BUILD=ON -DIMHEX_STRIP_RELEASE=OFF
|
|
-DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_FMT=ON -DUSE_SYSTEM_LLVM=ON
|
|
-DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON"
|
|
hostmakedepends="pkg-config clang-tools-extra"
|
|
makedepends="libcurl-devel fmt-devel llvm jansson-devel yara-devel json-c++
|
|
freetype-devel glfw-devel gtk+3-devel python3-devel file-devel mbedtls-devel
|
|
clang-tools-extra"
|
|
short_desc="Hex editor for reverse engineers and programmers"
|
|
maintainer="classabbyamp <void@placeviolette.net>"
|
|
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="6ee6f85dfa58e8bfb8008d1b9794cf38fed0bcc975df24bef3674abbda609d98
|
|
bccfb8fbaa1dfcef8b38a132fa540be672fcaaadef7e5e97aabddfa620e87f1c"
|
|
patch_args="-Np1 -d $build_wrksrc"
|
|
|
|
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() {
|
|
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
|
|
}
|
|
}
|