aboutsummaryrefslogtreecommitdiffstats
path: root/main/strace/APKBUILD
blob: c1ad52f12ae4789ab0a9f18f0a8c092078afe41e (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=strace
pkgver=4.16
pkgrel=1
pkgdesc="A useful diagnositic, instructional, and debugging tool"
url="http://sourceforge.net/projects/strace/"
arch="all"
license="BSD"
depends=
makedepends="linux-headers"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.xz
	fix-ppc-pt-regs-collision.patch
	s390x-signal-framesize.patch"

builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	default_prepare || return 1
	sed -i -e 's/include <linux\/socket.h>/include <sys\/socket.h>/g' \
		"$builddir"/configure || return 1
}

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

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

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

sha512sums="d1a7b782cb8196eb95b431b66f9b0eff7886869a7e3a4618d985f73b2eed7590ba73150b9c33e55ee5c65fc8f863588b64c5611dca7b5d7a4183110eaf4451d5  strace-4.16.tar.xz
b70cee89dd49a2b5a69dc2a56c3a11169d3306e1a73981155188b574486965c034aa52b4ac1c6edff5ef55c9d52f27750acb242fac095a8a9f69689b51b3fad1  fix-ppc-pt-regs-collision.patch
37bd35111f902b3785ee006b3e6e3a7b064125c411277c659c5f4e8e7b3c9b4249feaf4616cacff368616beed3414778f0e0e3592a524d890917681004885d6b  s390x-signal-framesize.patch"