summaryrefslogtreecommitdiff
path: root/testing/rizin/APKBUILD
blob: e4545633194eff0103107616ce9fac621b8e045e (plain)
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
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=rizin
pkgver=0.4.0
pkgrel=0
pkgdesc="UNIX-like reverse engineering framework and command-line toolset"
url="https://rizin.re/"
# 32bit - 15/78 big	FAIL 0.26s (exit status 1)
# Could be integer overflow
# s390x:
# 49/75 pdb FAIL 0.97s (exit status 1)
# 55/75 serialize_analysis FAIL 0.03s (exit status 1)
options="!check" # tests are unstable
arch="all"
license="GPL-3.0-or-later AND LGPL-3.0-or-later"
makedepends="
	cmake
	meson
	py3-yaml
	capstone-dev
	file-dev
	libuv-dev
	linux-headers
	libzip-dev
	lz4-dev
	openssl-dev
	pythonispython3
	tree-sitter-dev
	xxhash-dev
	zlib-dev
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="$pkgname-$pkgver.tar.xz::https://github.com/rizinorg/rizin/releases/download/v$pkgver/rizin-src-v$pkgver.tar.xz"
builddir="$srcdir/rizin-v$pkgver"

build() {
	abuild-meson \
		-Dpackager="alpinelinux" \
		-Dpackager_version="$pkgver-r$pkgrel" \
		-Duse_sys_capstone=enabled \
		-Duse_capstone_version="v4" \
		-Duse_sys_magic=enabled \
		-Duse_sys_libzip=enabled \
		-Duse_sys_zlib=enabled \
		-Duse_sys_lz4=enabled \
		-Duse_sys_xxhash=enabled \
		-Duse_sys_openssl=enabled \
		-Duse_sys_tree_sitter=enabled \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	# Include the build rizin otherwise
	# unit/test_rzpipe.c will fail
	export PATH="$PATH:$builddir/output/binrz/rizin/"
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
9d576bee48e5ceae46b4e309c53e01b82edf89a95046f576e1c38fefa73353d6d1f04e6d444332324387d4e115bc87659a358629f7277a41dfef44c82364547b  rizin-0.4.0.tar.xz
"