11# Template file for 'imhex'
22pkgname=imhex
3- version=1.37.4
4- revision=2
3+ version=1.38.1
4+ revision=1
55build_wrksrc="ImHex"
66build_style=cmake
77build_helper=qemu
@@ -21,11 +21,13 @@ homepage="https://imhex.werwolv.net/"
2121changelog="https://github.com/WerWolv/ImHex/releases"
2222distfiles="https://github.com/WerWolv/ImHex/releases/download/v${version}/Full.Sources.tar.gz>imhex-${version}.tar.gz
2323 https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v${version}.tar.gz>imhex-patterns-${version}.tar.gz"
24- checksum="711481cc8dfc368d1b88f5d3e8a44d65f23fa43eb9db092599924f3a4cf1aaa2
25- 541eddc8cc427d1aeb749bc455911fccc87f64a7784bd4bbc35ecb7b56c03ad5 "
24+ checksum="cd3531066a41dde1f0751e5d3146a936897df35ad5ba1fa49a9f3ace88e6901d
25+ 3aae4c0970bc1b85bf4dc566bdf31de33c7dce593375645600549643ce6f9841 "
2626patch_args="-Np1 -d $build_wrksrc"
2727python_version=3
2828
29+ subpackages="imhex-plugin-sdk imhex-patterns"
30+
2931if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
3032 broken="uses i128"
3133fi
@@ -34,6 +36,10 @@ if [ "$XBPS_TARGET_LIBC" = musl ]; then
3436 configure_args+=" -DIMHEX_DISABLE_STACKTRACE=ON"
3537fi
3638
39+ post_extract() {
40+ mv ImHex-Patterns-ImHex-v${version} ImHex-Patterns
41+ }
42+
3743do_check() {
3844 cd build
3945 ninja ${makejobs} unit_tests
@@ -42,16 +48,25 @@ do_check() {
4248}
4349
4450post_install() {
45- rm ${DESTDIR}/usr/bin/imhex-updater
46- vmkdir usr/share/imhex
47- for d in constants encodings includes magic patterns yara; do
48- vcopy ../ImHex-Patterns-ImHex-v${version}/$d usr/share/imhex
51+ rm -f ${DESTDIR}/usr/bin/imhex-updater
52+
53+ # Extras from ImHex-Patterns that upstream does not install by default
54+ for d in disassemblers plugins scripts themes tips; do
55+ vcopy "../ImHex-Patterns/${d}" usr/share/imhex
4956 done
5057}
5158
59+ imhex-plugin-sdk_package() {
60+ short_desc+=" - plugin SDK"
61+ depends="imhex>=${version}_${revision}"
62+ pkg_install() {
63+ vmove usr/share/imhex/sdk
64+ }
65+ }
66+
5267imhex-patterns_package() {
5368 short_desc+=" - patterns and magic files"
54- depends="imhex"
69+ depends="imhex>=${version}_${revision} "
5570 pkg_install() {
5671 vmove usr/share/imhex
5772 }
0 commit comments