aboutsummaryrefslogtreecommitdiffstats
path: root/main/strace/APKBUILD
blob: 329ba7f5f4bc982dda52e394ec6cf06d7291b819 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=strace
pkgver=4.8
pkgrel=2
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
	strace-musl.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="c575ef43829586801f514fd91bfe7575  strace-4.8.tar.xz
5b712a014ae68e6c3de4b6c0d0429a10  strace-musl.patch"
sha256sums="f492291f07a7c805c07a8395cce1ea054a6401ad414f4cc12185672215e1d7f8  strace-4.8.tar.xz
b244c17727758aff25a21675828cbbc2a662329985c8bd8ee770c222435aa115  strace-musl.patch"
sha512sums="c3316382f60cd4d02eec1eef46a0ef2d000afbccf2c176a6fec652e1b3391685f0e33f184497cb3ccf54d72d460471a4945d3a864fb5bce1f45f32fdf132cfe3  strace-4.8.tar.xz
3cb76721e34c8412955c4533a4ba6ce1a7d17941f968db710233017dffce3ae793a888cf1e81a9d4301f79cfdfe2f9c510b31e042536aa930bfd47f4ca37ad28  strace-musl.patch"