aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rizin/APKBUILD
blob: 95a469039301ccaf9119eec59b617dff2d572cf1 (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
67
68
69
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=rizin
pkgver=0.1.0
pkgrel=0
pkgdesc="UNIX-like reverse engineering framework and command-line toolset"
url="https://rizin.re/"
# 32bit - 15/75 big	FAIL 0.59s (exit status 1)
# s390x:
# 49/75 pdb FAIL 0.97s (exit status 1)
# 55/75 serialize_analysis FAIL 0.03s (exit status 1)
arch="all !x86 !armv7 !armhf !s390x !mips64"
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
	tree-sitter-dev
	xxhash-dev
	zlib-dev
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
_testbins_commit=f0bbaa9c90acac376f09c5293386022fadc634d9
source="$pkgname-$pkgver.tar.xz::https://github.com/rizinorg/rizin/releases/download/v$pkgver/rizin-src-v$pkgver.tar.xz
	testbins.tar.gz::https://github.com/rizinorg/rizin-testbins/archive/$_testbins_commit.tar.gz
	"

prepare() {
	default_prepare

	# bins used for testing
	mv "$srcdir/rizin-testbins-$_testbins_commit" "$builddir/test/bins"
}

build() {
	abuild-meson \
		-Duse_sys_capstone=true    \
		-Duse_sys_magic=true       \
		-Duse_sys_zip=true         \
		-Duse_sys_zlib=true        \
		-Duse_sys_lz4=true         \
		-Duse_sys_xxhash=true      \
		-Duse_sys_openssl=true     \
		-Duse_sys_tree_sitter=true \
		-Duse_libuv=true \
		. 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="3c6949df261f6fad66ebc801b3ffa2f42879e1ac4b3a043ad887f9dc4a411605c4271dc46330a1a0d8610416de3419a0cf99c70337d5e2d2071ff761b7c0a2b9  rizin-0.1.0.tar.xz
33ecc1e8386e5e10ffce1eb7d0fd609f3965db5285e5a64a4ef3d6f91f080a9d2d5e658f7eb7643c8488ec6cce8215f37924384c4f3d283aa0921ada9478401e  testbins.tar.gz"