diff --git a/srcpkgs/strace/template b/srcpkgs/strace/template index cfc17796a15..117a1cc9821 100644 --- a/srcpkgs/strace/template +++ b/srcpkgs/strace/template @@ -1,10 +1,10 @@ # Template file for 'strace' pkgname=strace version=5.12 -revision=1 +revision=2 build_style=gnu-configure -configure_args="--enable-silent-rules --with-libunwind" -makedepends="libunwind-devel" +configure_args="--enable-silent-rules $(vopt_with libunwind)" +makedepends="$(vopt_if libunwind libunwind-devel)" short_desc="System Call Tracer" maintainer="Anthony Iliopoulos " license="LGPL-2.1-or-later" @@ -13,6 +13,16 @@ changelog="https://raw.githubusercontent.com/strace/strace/master/NEWS" distfiles="https://github.com/strace/strace/releases/download/v${version}/strace-${version}.tar.xz" checksum=29171edf9d252f89c988a4c340dfdec662f458cb8c63d85431d64bab5911e7c4 +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