1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Guillermo Ramos <0xwille at gmail dot com>
7 pkgdesc='Open-source tools to disasm, debug, analyze and manipulate binary files'
8 url='https://radare.org'
10 license=('GPL3' 'LGPL3')
11 depends=('sh' 'capstone' 'libcapstone.so' 'openssl' 'libzip' 'zlib'
12 'lz4' 'xxhash' 'libxxhash.so' 'file' 'libuv'
13 'libzip.so' 'libmagic.so')
15 optdepends=('r2ghidra: ghidra decompiler plugin')
16 options=('!emptydirs')
17 source=(https://github.com/radare/radare2/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
19 sha512sums=('cd53ed7519d485253182d8d7d414b8d0927e65dd4d0c9716d0d8819e739c8e5e39deb702d93cb5a2a9425804d9798e6eb0acb58a4b904e25a9ba4fcad2315f47'
20 '77728bc0d2cd0eb383ea845923e02bed7e8ce19e2cd7d7170d40eb91a37f85ed8582bf3331dd85be441131c68663782b2acd53192dd2d3dc6e1866c1c916b666')
21 b2sums=('da53500982894a84de0a60640622b6498d3a6cc5236d7141cbd400b76448dc53535c74eef620e13531965c855124065a7f8ccfc3d8622c4e366100dc777e5274'
22 'bbe9118239735e513beab1c8ebc01c2e5330b0f6aba033e25f2e139a21b4c6188690a22cd7742b4e89bc750b309ec27ddb80b33933bb64e0fd704ef36d59989f')
25 cd ${pkgname}-${pkgver}
26 # Add wasm to the default plugin list. There is currently no way to append a single plugin to the default list via the meson command line
27 # https://github.com/radareorg/radare2/discussions/21712#discussioncomment-5826108
28 patch -p1 -i ../wasm.patch
32 cd ${pkgname}-${pkgver}
35 -D use_sys_capstone=true \
36 -D use_capstone_version=v4 \
37 -D use_sys_magic=true \
39 -D use_sys_zlib=true \
41 -D use_sys_xxhash=true \
42 -D use_sys_openssl=true \
51 cd ${pkgname}-${pkgver}
52 DESTDIR="${pkgdir}" ninja -C build install
53 cp -r doc/* "${pkgdir}/usr/share/doc/radare2"
54 ln -s /usr/share/man/man1/radare2.1.gz "${pkgdir}/usr/share/man/man1/r2.1.gz"
55 # Install missing header
56 install -Dm644 shlr/sdb/include/sdb/rangstr.h -t "$pkgdir"/usr/include/libr/sdb