summaryrefslogtreecommitdiff
path: root/system/strace/APKBUILD
blob: aecde405f170c4d5b3830b0781f8a65a118b9c1d (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=strace
pkgver=4.19
pkgrel=0
pkgdesc="A useful diagnositic, instructional, and debugging tool"
url="https://strace.io/"
arch="all"
license="BSD"
depends=""
makedepends="linux-headers autoconf automake"
subpackages="$pkgname-doc"
options="!checkroot"
source="$pkgname-$pkgver.tar.gz::https://github.com/strace/$pkgname/archive/v$pkgver.tar.gz
	disable-fortify.patch
	fix-ppc-pt-regs-collision.patch
	nlattr-fix.patch
	"

builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	case "$CLIBC" in
	musl) export CFLAGS="$CFLAGS -Dsigcontext_struct=sigcontext" ;;
	esac

	case "$CARCH" in
	s390x)
		# __SIGNAL_FRAMESIZE is defined in asm/sigcontext.h
		# but including it would make conflict with struct sigcontext
		# since we compile with it in musl.
		# Temporarily add this until musl upstream has a proper fix
		# for struct sigcontext.
		export CFLAGS="$CFLAGS -D__SIGNAL_FRAMESIZE=160"
		;;
	esac

	./bootstrap

	ac_cv_have_long_long_off_t=yes \
	st_cv_m32_mpers=no \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir" install
}

sha512sums="fbf953d64b43785648e2df0eb6beee409c6b6f6c6a4d227b54c02a049031c5ff3a3a6af52a68a2980d89eb06dcafc36be5f8784728e9a28348145cdb4a7764f9  strace-4.19.tar.gz
273b92ebf0069f19bef7ec26c7860e2af7ef01e782255c70ded1ae5e967f8f6bf031ecba96612c6083bf58f46278ba4ab3ec0fb35b08c8c8d668191f97adee52  disable-fortify.patch
b70cee89dd49a2b5a69dc2a56c3a11169d3306e1a73981155188b574486965c034aa52b4ac1c6edff5ef55c9d52f27750acb242fac095a8a9f69689b51b3fad1  fix-ppc-pt-regs-collision.patch
44b1872cf996caa4970fa6c2875a3a2cffe4a38455e328d968bd7855ef9a05cf41190794dc137bc8667576635f5271057cf0e6cde9a6c7aee66afd1dba9bdba0  nlattr-fix.patch"