aboutsummaryrefslogtreecommitdiffstats
path: root/main/strace/APKBUILD
blob: c048e27d56740d5d63423df453f8d9bcc9f84ff2 (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.14
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() {
	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
}

md5sums="1e39b5f7583256d7dc21170b9da529ae  strace-4.14.tar.xz"
sha256sums="5bed5110b243dce6864bedba269446c18c8c63f553cdd7fd4f808d89a764712f  strace-4.14.tar.xz"
sha512sums="e0040a0a0f7bf8537c9dd4ca42f514be0caa40475673522cce7f02ca608b7c0fdf4653dad049c4a6323740579926061f90e8522b6378d4c57c2a7732197a0950  strace-4.14.tar.xz"