From c7e393ef9105a3afb0c8b24d14f736badfceaed8 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Fri, 20 Aug 2021 10:36:46 +0200 Subject: [PATCH] dev-util/strace: move to portage-stable, update to 5.12 Now that we have dev-util/pkgconfig 0.29.2, there is no need to keep third-party patch for avoiding cross-build issues in dev-util/strace. Let's simply drop the patch, and move strace to portage-stable. Sync with Gentoo, so update strace to 5.12. --- .../portage-stable/dev-util/strace/Manifest | 3 + .../strace/files/strace-5.11-static.patch | 178 ++++++++++++++++++ .../dev-util/strace/metadata.xml | 23 +++ .../dev-util/strace/strace-5.11.ebuild | 105 +++++++++++ .../dev-util/strace/strace-5.12.ebuild | 105 +++++++++++ .../dev-util/strace/strace-5.13.ebuild | 105 +++++++++++ .../dev-util/strace/strace-9999.ebuild | 105 +++++++++++ 7 files changed, 624 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/dev-util/strace/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/dev-util/strace/files/strace-5.11-static.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-util/strace/metadata.xml create mode 100644 sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.11.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.12.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.13.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-util/strace/strace-9999.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-util/strace/Manifest b/sdk_container/src/third_party/portage-stable/dev-util/strace/Manifest new file mode 100644 index 0000000000..dce8cafc85 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/strace/Manifest @@ -0,0 +1,3 @@ +DIST strace-5.11.tar.xz 1926632 BLAKE2B df47612c0928466f8b5788c4a7dc74208fe76c6967d3219b0eb753131fba315e715626c2cd1ed56d3e8ba0eb9a338589a8cbd6205fe876123ac26fdf0fab8d31 SHA512 688bec8d620c7ca701561ed7479e42687cc30737f944b82201731d827775cd2864787ecca7c93ba149b06d5d654d9f6bd109a977f8138bab34339cd5930828f0 +DIST strace-5.12.tar.xz 2009060 BLAKE2B 9a7a07e5d2d38c8b456f54d0e1d7c776066b20327fa08d562e426a7096f708dffa00f0c2121683fa71f7029db958d450c5a6abf5ae5970dc02732f5aa7cef591 SHA512 289cf82da4c69270458953b45d09c8eb05a6624898d3ac493c3ec293cd5ad07205084ad0af021dab2be9c0dc53f0301816113a746d96c78780b79231a185e7c9 +DIST strace-5.13.tar.xz 2040116 BLAKE2B a604342d68f504b42ff1cb4918aa9ced6575f589caeb62f53e0b125f24cfaf0423f1911f352f21ecea0d702197d65edc85d3e97ffca3561f619f9c4c80386cdc SHA512 ba8b0eae396fa2b762bf17cbcdcd84b0660b2a5d5e7e9caf098ef3414a87fd28d4140dd10136483f35904560e5044e40be2bf6117462868a360306d62887c8ed diff --git a/sdk_container/src/third_party/portage-stable/dev-util/strace/files/strace-5.11-static.patch b/sdk_container/src/third_party/portage-stable/dev-util/strace/files/strace-5.11-static.patch new file mode 100644 index 0000000000..146ace0dd2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/strace/files/strace-5.11-static.patch @@ -0,0 +1,178 @@ +--- strace-5.11/configure.ac ++++ strace-5.11/configure.ac +@@ -47,6 +47,15 @@ + AC_DEFINE([MANPAGE_DATE], "[manpage_date]", [Date]) + AC_SUBST([MANPAGE_DATE], [manpage_date]) + ++AC_ARG_ENABLE([static], ++ [AS_HELP_STRING([--enable-static], ++ [link strace statically])], ++ [], [enable_static=no]) ++if test "$enable_static" = "yes"; then ++ # Add -pthread since strace wants -lrt for timer_create, and -lrt uses -lpthread. ++ LDFLAGS="$LDFLAGS -pthread -static" ++fi ++ + AC_C_BIGENDIAN + + dnl arch-specific default for --enable-gcc-Werror +--- strace-5.11/m4/st_libdw.m4 ++++ strace-5.11/m4/st_libdw.m4 +@@ -8,7 +8,6 @@ + AC_DEFUN([st_ARG_LIBDW], [dnl + + : ${libdw_CPPFLAGS=} +-: ${libdw_CFLAGS=} + : ${libdw_LDFLAGS=} + : ${libdw_LIBS=} + +@@ -34,48 +33,14 @@ + have_libdw= + + AS_IF([test "x$with_libdw" != xno && test "x$use_unwinder" = x], +- [saved_CPPFLAGS="$CPPFLAGS" +- saved_CFLAGS="$CFLAGS" +- CPPFLAGS="$CPPFLAGS $libdw_CPPFLAGS" +- CFLAGS="$CFLAGS $libdw_CFLAGS" +- +- AC_CHECK_HEADERS([elfutils/libdwfl.h], +- [AC_CHECK_LIB([dw], [dwfl_linux_proc_attach], +- [libdw_LIBS="-ldw $libdw_LIBS" +- AC_CACHE_CHECK([for elfutils version], +- [st_cv_ELFUTILS_VERSION], +- [[st_cv_ELFUTILS_VERSION="$(echo _ELFUTILS_VERSION | +- $CPP $CPPFLAGS -P -imacros elfutils/version.h - | +- grep '^[0-9]')" +- test -n "$st_cv_ELFUTILS_VERSION" || +- st_cv_ELFUTILS_VERSION=0 +- ]] +- ) +- AS_IF([test "$st_cv_ELFUTILS_VERSION" -ge 164], +- [have_libdw=yes], +- [AS_IF([test "x$with_libdw" = xyes], +- [AC_MSG_ERROR([elfutils version >= 164 is required for stack tracing support])], +- [AC_MSG_WARN([elfutils version >= 164 is required for stack tracing support])] +- ) +- ] +- ) +- ], +- [AS_IF([test "x$with_libdw" = xyes], +- [AC_MSG_FAILURE([failed to find dwfl_linux_proc_attach in libdw])], +- ) +- ], +- [$libdw_LDFLAGS $libdw_LIBS] +- ) +- ], +- [AS_IF([test "x$with_libdw" = xyes], +- [AC_MSG_FAILURE([failed to find elfutils/libdwfl.h])] +- ) +- ] +- ) +- +- CFLAGS="$saved_CFLAGS" +- CPPFLAGS="$saved_CPPFLAGS" +- ] ++ [if test "$enable_static" = "yes"; then ++ PKG_CHECK_MODULES_STATIC([LIBDW], [libdw >= 0.164]) ++ else ++ PKG_CHECK_MODULES([LIBDW], [libdw >= 0.164]) ++ fi ++ have_libdw=yes ++ libdw_CPPFLAGS="$LIBDW_CFLAGS" ++ libdw_LIBS="$LIBDW_LIBS"] + ) + + AS_IF([test "x$have_libdw" = xyes], +@@ -84,7 +49,6 @@ + [Whether to use libdw for stack tracing] + ) + AC_SUBST(libdw_CPPFLAGS) +- AC_SUBST(libdw_CFLAGS) + AC_SUBST(libdw_LDFLAGS) + AC_SUBST(libdw_LIBS) + ] +--- strace-5.11/m4/st_libunwind.m4 ++++ strace-5.11/m4/st_libunwind.m4 +@@ -28,64 +28,14 @@ + AC_DEFUN([st_LIBUNWIND], [dnl + + AS_IF([test "x$with_libunwind" != xno && test "x$use_unwinder" = x], +- [saved_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS" +- +- AC_CHECK_HEADERS([libunwind-ptrace.h], +- [saved_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS $libunwind_LDFLAGS" +- +- AC_CHECK_LIB([unwind], [backtrace], +- [libunwind_LIBS="-lunwind $libunwind_LIBS" +- +- AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic]) +- saved_LIBS="$LIBS" +- LIBS="-lunwind-generic $libunwind_LIBS $LIBS" +- +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([[#include ]], +- [[return !unw_create_addr_space(0, 0)]]) +- ], +- [AC_MSG_RESULT([yes]) +- libunwind_LIBS="-lunwind-generic $libunwind_LIBS" +- +- AC_CHECK_LIB([unwind-ptrace], [_UPT_create], +- [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS" +- use_unwinder=libunwind +- ], +- [if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace]) +- fi +- ], +- [$libunwind_LIBS] +- ) +- ], +- [AC_MSG_RESULT([no]) +- if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic]) +- fi +- ] +- ) +- +- LIBS="$saved_LIBS" +- ], +- [if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find libunwind]) +- fi +- ], +- [$libunwind_LIBS] +- ) +- +- LDFLAGS="$saved_LDFLAGS" +- ], +- [if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find libunwind-ptrace.h]) +- fi +- ] +- ) +- +- CPPFLAGS="$saved_CPPFLAGS" +- ] ++ [if test "$enable_static" = "yes"; then ++ PKG_CHECK_MODULES_STATIC([LIBUNWIND], [libunwind libunwind-generic libunwind-ptrace]) ++ else ++ PKG_CHECK_MODULES([LIBUNWIND], [libunwind libunwind-generic libunwind-ptrace]) ++ fi ++ use_unwinder="libunwind" ++ libunwind_CPPFLAGS="$LIBUNWIND_CFLAGS" ++ libunwind_LIBS="$LIBUNWIND_LIBS"] + ) + + if test "x$use_unwinder" = xlibunwind; then +--- strace-5.11/src/Makefile.am ++++ strace-5.11/src/Makefile.am +@@ -393,7 +393,6 @@ + if USE_LIBDW + libstrace_a_SOURCES += unwind-libdw.c + strace_CPPFLAGS += $(libdw_CPPFLAGS) +-strace_CFLAGS += $(libdw_CFLAGS) + strace_LDFLAGS += $(libdw_LDFLAGS) + strace_LDADD += $(libdw_LIBS) + endif diff --git a/sdk_container/src/third_party/portage-stable/dev-util/strace/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-util/strace/metadata.xml new file mode 100644 index 0000000000..7aa6b81780 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/strace/metadata.xml @@ -0,0 +1,23 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + + Enable dev-libs/libaio support for tracing Asynchronous I/O operations + + + Enable stack backtraces (-k flag) via sys-libs/libunwind + + + Enable stack backtraces (-k flag) via dev-libs/elfutils + + + + strace/strace + strace + + diff --git a/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.11.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.11.ebuild new file mode 100644 index 0000000000..d71516e9a0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.11.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic toolchain-funcs + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/strace/strace.git" + inherit git-r3 autotools +else + SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="A useful diagnostic, instructional, and debugging tool" +HOMEPAGE="https://strace.io/" + +LICENSE="BSD" +SLOT="0" +IUSE="aio perl static unwind elfutils" + +REQUIRED_USE="?? ( unwind elfutils )" + +BDEPEND=" + virtual/pkgconfig +" +LIB_DEPEND=" + unwind? ( sys-libs/libunwind[static-libs(+)] ) + elfutils? ( dev-libs/elfutils[static-libs(+)] ) +" +# strace only uses the header from libaio to decode structs +DEPEND=" + static? ( ${LIB_DEPEND} ) + aio? ( >=dev-libs/libaio-0.3.106 ) + sys-kernel/linux-headers +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + perl? ( dev-lang/perl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.11-static.patch" +) + +src_prepare() { + default + + eautoreconf + + if [[ ! -e configure ]] ; then + # git generation + sed /autoreconf/d -i bootstrap || die + ./bootstrap || die + eautoreconf + [[ ! -e CREDITS ]] && cp CREDITS{.in,} + fi + + filter-lfs-flags # configure handles this sanely + + export ac_cv_header_libaio_h=$(usex aio) + use elibc_musl && export ac_cv_header_stdc=no + + # Stub out the -k test since it's known to be flaky. #545812 + sed -i '1iexit 77' tests*/strace-k.test || die +} + +src_configure() { + # Set up the default build settings, and then use the names strace expects. + tc-export_build_env BUILD_{CC,CPP} + local v bv + for v in CC CPP {C,CPP,LD}FLAGS ; do + bv="BUILD_${v}" + export "${v}_FOR_BUILD=${!bv}" + done + + # Don't require mpers support on non-multilib systems. #649560 + local myeconfargs=( + --disable-gcc-Werror + --enable-mpers=check + $(use_enable static) + $(use_with unwind libunwind) + $(use_with elfutils libdw) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + if has usersandbox ${FEATURES} ; then + ewarn "Test suite is known to fail with FEATURES=usersandbox -- skipping ..." #643044 + return 0 + fi + + default +} + +src_install() { + default + if use perl ; then + exeinto /usr/bin + doexe src/strace-graph + fi + dodoc CREDITS +} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.12.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.12.ebuild new file mode 100644 index 0000000000..d71516e9a0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.12.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic toolchain-funcs + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/strace/strace.git" + inherit git-r3 autotools +else + SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="A useful diagnostic, instructional, and debugging tool" +HOMEPAGE="https://strace.io/" + +LICENSE="BSD" +SLOT="0" +IUSE="aio perl static unwind elfutils" + +REQUIRED_USE="?? ( unwind elfutils )" + +BDEPEND=" + virtual/pkgconfig +" +LIB_DEPEND=" + unwind? ( sys-libs/libunwind[static-libs(+)] ) + elfutils? ( dev-libs/elfutils[static-libs(+)] ) +" +# strace only uses the header from libaio to decode structs +DEPEND=" + static? ( ${LIB_DEPEND} ) + aio? ( >=dev-libs/libaio-0.3.106 ) + sys-kernel/linux-headers +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + perl? ( dev-lang/perl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.11-static.patch" +) + +src_prepare() { + default + + eautoreconf + + if [[ ! -e configure ]] ; then + # git generation + sed /autoreconf/d -i bootstrap || die + ./bootstrap || die + eautoreconf + [[ ! -e CREDITS ]] && cp CREDITS{.in,} + fi + + filter-lfs-flags # configure handles this sanely + + export ac_cv_header_libaio_h=$(usex aio) + use elibc_musl && export ac_cv_header_stdc=no + + # Stub out the -k test since it's known to be flaky. #545812 + sed -i '1iexit 77' tests*/strace-k.test || die +} + +src_configure() { + # Set up the default build settings, and then use the names strace expects. + tc-export_build_env BUILD_{CC,CPP} + local v bv + for v in CC CPP {C,CPP,LD}FLAGS ; do + bv="BUILD_${v}" + export "${v}_FOR_BUILD=${!bv}" + done + + # Don't require mpers support on non-multilib systems. #649560 + local myeconfargs=( + --disable-gcc-Werror + --enable-mpers=check + $(use_enable static) + $(use_with unwind libunwind) + $(use_with elfutils libdw) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + if has usersandbox ${FEATURES} ; then + ewarn "Test suite is known to fail with FEATURES=usersandbox -- skipping ..." #643044 + return 0 + fi + + default +} + +src_install() { + default + if use perl ; then + exeinto /usr/bin + doexe src/strace-graph + fi + dodoc CREDITS +} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.13.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.13.ebuild new file mode 100644 index 0000000000..73df00d83e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-5.13.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic toolchain-funcs + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/strace/strace.git" + inherit git-r3 autotools +else + SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="A useful diagnostic, instructional, and debugging tool" +HOMEPAGE="https://strace.io/" + +LICENSE="BSD" +SLOT="0" +IUSE="aio perl static unwind elfutils" + +REQUIRED_USE="?? ( unwind elfutils )" + +BDEPEND=" + virtual/pkgconfig +" +LIB_DEPEND=" + unwind? ( sys-libs/libunwind[static-libs(+)] ) + elfutils? ( dev-libs/elfutils[static-libs(+)] ) +" +# strace only uses the header from libaio to decode structs +DEPEND=" + static? ( ${LIB_DEPEND} ) + aio? ( >=dev-libs/libaio-0.3.106 ) + sys-kernel/linux-headers +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + perl? ( dev-lang/perl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.11-static.patch" +) + +src_prepare() { + default + + eautoreconf + + if [[ ! -e configure ]] ; then + # git generation + sed /autoreconf/d -i bootstrap || die + ./bootstrap || die + eautoreconf + [[ ! -e CREDITS ]] && cp CREDITS{.in,} + fi + + filter-lfs-flags # configure handles this sanely + + export ac_cv_header_libaio_h=$(usex aio) + use elibc_musl && export ac_cv_header_stdc=no + + # Stub out the -k test since it's known to be flaky. #545812 + sed -i '1iexit 77' tests*/strace-k.test || die +} + +src_configure() { + # Set up the default build settings, and then use the names strace expects. + tc-export_build_env BUILD_{CC,CPP} + local v bv + for v in CC CPP {C,CPP,LD}FLAGS ; do + bv="BUILD_${v}" + export "${v}_FOR_BUILD=${!bv}" + done + + # Don't require mpers support on non-multilib systems. #649560 + local myeconfargs=( + --disable-gcc-Werror + --enable-mpers=check + $(use_enable static) + $(use_with unwind libunwind) + $(use_with elfutils libdw) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + if has usersandbox ${FEATURES} ; then + ewarn "Test suite is known to fail with FEATURES=usersandbox -- skipping ..." #643044 + return 0 + fi + + default +} + +src_install() { + default + if use perl ; then + exeinto /usr/bin + doexe src/strace-graph + fi + dodoc CREDITS +} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-9999.ebuild new file mode 100644 index 0000000000..73df00d83e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/strace/strace-9999.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic toolchain-funcs + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/strace/strace.git" + inherit git-r3 autotools +else + SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="A useful diagnostic, instructional, and debugging tool" +HOMEPAGE="https://strace.io/" + +LICENSE="BSD" +SLOT="0" +IUSE="aio perl static unwind elfutils" + +REQUIRED_USE="?? ( unwind elfutils )" + +BDEPEND=" + virtual/pkgconfig +" +LIB_DEPEND=" + unwind? ( sys-libs/libunwind[static-libs(+)] ) + elfutils? ( dev-libs/elfutils[static-libs(+)] ) +" +# strace only uses the header from libaio to decode structs +DEPEND=" + static? ( ${LIB_DEPEND} ) + aio? ( >=dev-libs/libaio-0.3.106 ) + sys-kernel/linux-headers +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + perl? ( dev-lang/perl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.11-static.patch" +) + +src_prepare() { + default + + eautoreconf + + if [[ ! -e configure ]] ; then + # git generation + sed /autoreconf/d -i bootstrap || die + ./bootstrap || die + eautoreconf + [[ ! -e CREDITS ]] && cp CREDITS{.in,} + fi + + filter-lfs-flags # configure handles this sanely + + export ac_cv_header_libaio_h=$(usex aio) + use elibc_musl && export ac_cv_header_stdc=no + + # Stub out the -k test since it's known to be flaky. #545812 + sed -i '1iexit 77' tests*/strace-k.test || die +} + +src_configure() { + # Set up the default build settings, and then use the names strace expects. + tc-export_build_env BUILD_{CC,CPP} + local v bv + for v in CC CPP {C,CPP,LD}FLAGS ; do + bv="BUILD_${v}" + export "${v}_FOR_BUILD=${!bv}" + done + + # Don't require mpers support on non-multilib systems. #649560 + local myeconfargs=( + --disable-gcc-Werror + --enable-mpers=check + $(use_enable static) + $(use_with unwind libunwind) + $(use_with elfutils libdw) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + if has usersandbox ${FEATURES} ; then + ewarn "Test suite is known to fail with FEATURES=usersandbox -- skipping ..." #643044 + return 0 + fi + + default +} + +src_install() { + default + if use perl ; then + exeinto /usr/bin + doexe src/strace-graph + fi + dodoc CREDITS +}