aboutsummaryrefslogtreecommitdiffstats
path: root/main/strace/APKBUILD
blob: ed0ec1d74a444f176716293e80cc02773c350a56 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=strace
pkgver=4.9
pkgrel=1
pkgdesc="A useful diagnositic, instructional, and debugging tool"
url="http://sourceforge.net/projects/strace/"
arch="all"
license="BSD"
depends=
makedepends=
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.xz
	sysinfo.patch
	arm.patch
	"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg "$i"; patch -p1 -i "$srcdir"/$i || return 1
		esac
	done
	sed -i -e 's/include <linux\/socket.h>/include <sys\/socket.h>/g' \
		configure
}

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 \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make -j1 DESTDIR="$pkgdir" install
}
md5sums="885eafadb10f6c60464a266d3929a2a4  strace-4.9.tar.xz
ed853f7bc7b87cc598f1a2c65ca09165  sysinfo.patch
26c267d25d7f706749773d6acfd0cd3f  arm.patch"
sha256sums="095bfea5c540b91d297ccac73b21b92fd54a24599fd70395db87ff9eb7fd6f65  strace-4.9.tar.xz
727b2d56ebf4941726c21ea77bbde5b841581f4a5bde8c2954937032ee05b93b  sysinfo.patch
71391bea26114bd260e2bbab1b4248cf061a9a6f0cce53f4cb320e88cd8fd122  arm.patch"
sha512sums="70d03b74067ad03940cda72dc057a44a8a33fc55790a8a3bfffb1c4d7442c2de7f3e975a01dc7c7b0430342e492579b2f3a007242d13c8a0feba1a1989f42b7b  strace-4.9.tar.xz
d0da5ed3eb1cee04d07297253445725c86abb55f0f4b80e3e1b7587c581a8c252e895dd7d8a32f410e457c5382194d1b27682215d0304e1dd7ebc8d69cb8e4e7  sysinfo.patch
3fc4cc562ec26c664c2e7134d3148044a8b71683a670f9f50f900cc87fd627edb5146aed424fe7f232d7b6022bc56f76752c5964354728b9847d5f77da54c541  arm.patch"