aboutsummaryrefslogtreecommitdiffstats
path: root/main/strace/APKBUILD
blob: eba6401d9ee0d9e6a652496eb17220100d17ea1a (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=strace
pkgver=4.11
pkgrel=0
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"

_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="a15d2555a7febb56d00c6e1a51c655dc  strace-4.11.tar.xz"
sha256sums="e86a5f6cd8f941f67f3e4b28f4e60f3d9185c951cf266404533210a2e5cd8152  strace-4.11.tar.xz"
sha512sums="e1e07ed427f504f53bcd117b61bb96a780b0f531010856ed157e4d8c2090371bf320ab59a02b88e67bf2afd443fba67e12f90e53afeab795188c89c6496daecd  strace-4.11.tar.xz"