1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Maintainer: KokaKiwi <kokakiwi+aur@kokakiwi.net>
# Contributor: George Rawlinson <george@rawlinson.net.nz>
_pkgname=ImHex
pkgname=${_pkgname,,}
pkgver=1.35.4
pkgrel=1
pkgdesc='A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM'
url='https://imhex.werwolv.net'
license=('GPL-2.0-or-later')
arch=('x86_64')
depends=('glfw' 'mbedtls' 'curl' 'dbus'
'freetype2' 'file' 'hicolor-icon-theme' 'xdg-desktop-portal'
'fmt' 'yara' 'capstone')
makedepends=('cmake'
'llvm' 'librsvg' 'nlohmann-json' 'libxrandr'
'python' 'cli11' 'dotnet-runtime')
optdepends=('dotnet-runtime: support for .NET scripts')
provides=('imhex-patterns')
conflicts=('imhex-patterns-git')
source=("$pkgname-$pkgver.tar.gz::https://github.com/WerWolv/ImHex/releases/download/v$pkgver/Full.Sources.tar.gz"
"imhex-patterns-$pkgver.tar.gz::https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v$pkgver.tar.gz")
sha256sums=('987188df511a01dca407c4fd398a9dbc805ef82cdf044ea27da57ec343c7d6df'
'10df85b64b4c14945e43ad14b3ff95cda9ba23e47f4559b5429c2dc733fe23ed')
b2sums=('1e65a332a810af2884c6cf14dafa46cd2d09fc18891c48c7cb1007cab041b293e96db69db068b20d97fb5b51b16c3dbded38a679b65a8d7fd85ce705ae95d6d8'
'ac79ed6bf919917323909b34f285d2bb48c2a1dadf9270ac09a41f627a07b726bd50751da00b6af1f7478c02c8e8de05d44f678840bf9aab377d96049e70d1fd')
options=(!lto !strip)
build() {
export CXXFLAGS="$CXXFLAGS -Wno-inconsistent-missing-override"
cmake -B build -S "$_pkgname" \
-Wno-dev \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_SKIP_RPATH=ON \
-D IMHEX_OFFLINE_BUILD=ON \
-D IMHEX_IGNORE_BAD_CLONE=ON \
-D IMHEX_STRIP_RELEASE=OFF \
-D IMHEX_STRICT_WARNINGS=OFF \
-D IMHEX_BUNDLE_DOTNET=OFF \
-D USE_SYSTEM_LLVM=ON \
-D USE_SYSTEM_YARA=ON \
-D USE_SYSTEM_FMT=ON \
-D USE_SYSTEM_NLOHMANN_JSON=ON \
-D USE_SYSTEM_CAPSTONE=ON \
-D USE_SYSTEM_CLI11=ON \
-D IMHEX_VERSION="$pkgver"
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
# Remove updater
rm "$pkgdir/usr/bin/imhex-updater"
# Patterns
install -dm0755 "$pkgdir/usr/share/imhex"
cp -r -t "$pkgdir/usr/share/imhex" \
"$srcdir/ImHex-Patterns-ImHex-v$pkgver"/{constants,encodings,includes,magic,nodes,patterns,plugins,scripts,tests,themes,tips,yara}
# Desktop file(s)
install -Dm0644 "$_pkgname/resources/icon.png" "$pkgdir/usr/share/pixmaps/imhex.png"
# Documentation
install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname" \
"$_pkgname/README.md"
}
|