void-packages/srcpkgs/imhex/template

55 lines
1.8 KiB
Bash

# Template file for 'imhex'
pkgname=imhex
version=1.30.1
revision=2
build_wrksrc="ImHex"
build_style=cmake
build_helper=qemu
configure_args="-DIMHEX_OFFLINE_BUILD=ON -DIMHEX_STRIP_RELEASE=OFF
-DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_FMT=ON -DUSE_SYSTEM_LLVM=ON -DUSE_SYSTEM_CAPSTONE=ON
-DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON -DIMHEX_DISABLE_UPDATE_CHECK=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 capstone-devel"
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="edf164996ba3a960b7b022acb1441aef2960c60e7a46409b01d9ff164cd99e7a
8f38ca5ea73298e104231276026f50d350f350626bcefc11a3935528be34581c"
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
}
}