# Maintainer: Natanael Copa pkgname=strace pkgver=4.8 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 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 /include /g' \ configure } build() { cd "$_builddir" case "$CLIBC" in musl) export CFLAGS="$CFLAGS -Dsigcontext_struct=sigcontext" ;; esac ./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 fc85884e1534d30fa9f1e40d7d4cea3a strace-musl.patch" sha256sums="f492291f07a7c805c07a8395cce1ea054a6401ad414f4cc12185672215e1d7f8 strace-4.8.tar.xz 40415d739a86b300f93deead48fe08e0cc79bc7af9f3575b151c5b84b6619848 strace-musl.patch" sha512sums="c3316382f60cd4d02eec1eef46a0ef2d000afbccf2c176a6fec652e1b3391685f0e33f184497cb3ccf54d72d460471a4945d3a864fb5bce1f45f32fdf132cfe3 strace-4.8.tar.xz e8b1d7eb5be1779492a3633d8559d7c17bb1fb185068a0ec21c3d451ba048ca9813a93a46d1abadbc4231ef00feb72b6b72c56dd0621ede2d64a9789c5e74507 strace-musl.patch"