49 lines
1.6 KiB
Bash
49 lines
1.6 KiB
Bash
# Template file for 'strace'
|
|
pkgname=strace
|
|
version=5.15
|
|
revision=1
|
|
build_style=gnu-configure
|
|
configure_args="--enable-silent-rules $(vopt_with libunwind)"
|
|
makedepends="$(vopt_if libunwind libunwind-devel)"
|
|
short_desc="System Call Tracer"
|
|
maintainer="Anthony Iliopoulos <ailiop@altatus.com>"
|
|
license="LGPL-2.1-or-later"
|
|
homepage="https://strace.io/"
|
|
changelog="https://raw.githubusercontent.com/strace/strace/master/NEWS"
|
|
distfiles="https://github.com/strace/strace/releases/download/v${version}/strace-${version}.tar.xz"
|
|
checksum=ebcac22f297335294dc654425cbc3ce013343bece6da2699e3aec86aee8d72dc
|
|
|
|
build_options="static libunwind"
|
|
build_options_default="libunwind"
|
|
vopt_conflict static libunwind # configure fails
|
|
desc_option_static="Build static strace binary"
|
|
desc_option_libunwind="Support printing backtraces for every syscall"
|
|
|
|
if [ "$build_option_static" ]; then
|
|
LDFLAGS=-static
|
|
fi
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
aarch64*|ppc64*) configure_args+=" --enable-mpers=no" ;;
|
|
# work around https://github.com/strace/strace/issues/133
|
|
i686-musl) configure_args+=" --enable-mpers=no"; makedepends+=" libucontext-devel" ;;
|
|
x86_64-musl) configure_args+=" --enable-mpers=no" ;;
|
|
esac
|
|
|
|
pre_configure() {
|
|
if [ "$XBPS_TARGET_MACHINE" = "i686-musl" ]; then
|
|
vsed -i configure -e "s;libunwind_LIBS=$;&-lucontext;"
|
|
fi
|
|
}
|
|
|
|
do_check() {
|
|
if [ "$XBPS_CHECK_PKGS" = full ]; then
|
|
# XXX: Some tests may fail inside of containers or if they are missing
|
|
# sufficient capabilities
|
|
make check
|
|
else
|
|
make check \
|
|
TESTS="bpf.gen epoll_pwait.gen getcpu.gen open.gen read-write.gen readlink.gen seccomp-filter.gen mmap ioctl caps readv"
|
|
fi
|
|
}
|