aboutsummaryrefslogblamecommitdiffstats
path: root/testing/rizin/APKBUILD
blob: bb2a78993e6b3d190c574808becaf6020dbf2c9a (plain) (tree)
1
2
3
4
5
6
7
8
9


                                   
            


                                                                          

                                                  


                                                     
                                            
















                                                     
                                                         


                                                                                                                       
                                 




                               
                                                                              



                      










                                                       














                                                              



                                                                                                                                                    
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=rizin
pkgver=0.2.1
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)
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=d6cb8855f9ff83972334af95d4f59e751e78593a
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
	"
builddir="$srcdir/rizin-v$pkgver"

prepare() {
	default_prepare

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

build() {
	abuild-meson \
		-Dpackager="alpinelinux"              \
		-Dpackager-version="$pkgver-$pkgrel"  \
		-Duse_sys_capstone=enabled            \
		-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         \
		-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="
4d0a68971a8fe1de3860f8ee18197606f59c22d4c24f3fcce691c73b45c8fe8c356a9b411604e9c3d4e5bb01f695b6ead32cdc217134eb4ddfec76867c16c327  rizin-0.2.1.tar.xz
6abb7318f128cea88cd841e2e2240dec55f822630fa42e1df2c633be1934578df1c5b7e7d020b49859d30171e3a9a666878a634be9ea4ff991109389bca45194  testbins.tar.gz
"