aboutsummaryrefslogtreecommitdiffstats
path: root/community/pev/APKBUILD
blob: 3b7765c2de82215bceccc736046000b8c990e973 (plain) (blame)
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
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=pev
pkgver=0.81
pkgrel=0
pkgdesc="PE file analysis toolkit"
url="http://pev.sourceforge.net/"
arch="all"
license="GPL-2.0-or-later AND MIT AND BSD-2-Clause"
makedepends="bsd-compat-headers linux-headers openssl-dev"
checkdepends="bash python3-wininst"
subpackages="$pkgname-doc"
source="https://sourceforge.net/projects/pev/files/pev-$pkgver/pev-$pkgver.tar.gz"

case "$CARCH" in
	s390x)
	mips64)
		# s390x - Testing pepack /usr/lib/python3.8/distutils/command/wininst-10.0-amd64.exe... ERROR [-18]: not a PE file ((null))
		# mips64 - R [-18]: not a PE file ((null))
		options="!check" ;;
esac

build() {
	make
}

# Check() code from
# https://github.com/void-linux/void-packages/blob/master/srcpkgs/pev/template#L37
_real_check() {
	local py3_ver="3.8"
	local f
	for f in /usr/lib/python"$py3_ver"/distutils/command/*.exe; do
		tests/run.sh pe32 "$f"
	done
}

check() {
	export LD_LIBRARY_PATH=$(pwd)/src/build
	ln -sf ../../lib/libpe/libpe.so src/build/libpe.so.1
	! _real_check | tee /dev/stderr | grep -q 'NOK$'
}

package() {
	make prefix=/usr DESTDIR="$pkgdir" install
}

sha512sums="d8ac24e4160a2aba6a0c788c2933fc8dac6e19d4446cfb45efd5ced939596453ed0fc4734f9669b3943d916201f913b5a363ecfb9419f4b30ed33baf62e2db90  pev-0.81.tar.gz"