void-packages/srcpkgs/imhex/template

51 lines
1.7 KiB
Bash

# Template file for 'imhex'
pkgname=imhex
version=1.26.2
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 llvm12 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 <dev@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="3cafd153c8b2c3d283242b13d73a87494acff40194bb160077af4f9493facda8
bf7222495ea595b1eb1350196da1dd1f720e7cd5544542fa8cd7a48dc0b4d562"
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
broken="uses i128"
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
}
}