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.36.2
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=('git' '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=('29bed22dae537b83ac4cce905352b4a1c5342862a67cad5575c58ff41f5847f7'
'd1555d142347ddf576e5c0b1a19050ae168e8d174b206d269a9e84e07d2515c9')
b2sums=('e0c9c8ae8ce003a3115a239d89a660e7dd1c2c709c8aa1007463ddfc7861a5f10394cef1621a09ed9f7bd90fbfa5249a14aed619bd9f50c53500a1a9dc090aa0'
'891f8610f643616c5e7625a2a1ca6035038ef67aa6e425fe9fb997a2b18484800bc8caa0ebb52bdeadd61595409b1b768d4bedc22621622c5865143a663507a7')
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"
}
|