summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-util/strace/Manifest1
-rw-r--r--dev-util/strace/strace-4.26.ebuild93
2 files changed, 94 insertions, 0 deletions
diff --git a/dev-util/strace/Manifest b/dev-util/strace/Manifest
index b70fd8f6b428..fbd0715b6afa 100644
--- a/dev-util/strace/Manifest
+++ b/dev-util/strace/Manifest
@@ -1,3 +1,4 @@
DIST strace-4.23.tar.xz 1379128 BLAKE2B e1b680774172ba65190acc201a00f36ff608eb5a8239f8a6665b9f0eebfb7715eb3469d45c2333e4fac9a498ad3b448b1f39716b92cab91b035bc1e4125382eb SHA512 b54df972dc86e27668784ea4619e8c55230816b249e0a7fcca99a37b7f9ec37710742aca08c9e39b508522accb654a83c98207bab9ccac1197bb8e73e51ab116
DIST strace-4.24.tar.xz 1398252 BLAKE2B ca83adfb3ccd23a55976c2950ce5911203e1ad911147649127e49d815e4899b5fd72459c371c15aea701d0d30e994d0eca2b32aad240fccc4e8d1cecb3f97558 SHA512 69cbf8b2c32c7ea90ebe5955bc71b454316a3494ae6975203fe61ce1f42ec539438cec5ba8ee7f529f89661d964b4aa53656712706aacff6bf018304b7a09813
DIST strace-4.25.tar.xz 1425268 BLAKE2B 896685589686864316940b8493e481f5e37d1c2f536551f79193bc851d66614816abbc989dbff2b18e38f5bff535315ca732221d520f282227b74a4eab3ebb4f SHA512 1465ef5ebc77cee73ebae5e12c72ff1826f48cdb2b36bdd5116380fac3add73f3ede3ca2694358bfb0c3e3141be5b747b353749130a366c81d05709b2d7bb879
+DIST strace-4.26.tar.xz 1444216 BLAKE2B ea8ff5f863afa29a3a40e8d89ff5c3835c64adf7c34c8957bbe3d99a02998d61714437470293d1759e87c1ceb8ed42564632ef33dd9d5303452ec7505822d1ba SHA512 cce153246802fcdb1547bc11164784066101a2e672e2a264cb742593b559e579aa4bedc749d87fdd1fc2045f4f79b54d419bb50c823074d2cca6f3c75ccf2290
diff --git a/dev-util/strace/strace-4.26.ebuild b/dev-util/strace/strace-4.26.ebuild
new file mode 100644
index 000000000000..e0e68ced9e54
--- /dev/null
+++ b/dev-util/strace/strace-4.26.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit 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 ~s390 ~sh ~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 )"
+
+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 )
+"
+
+src_prepare() {
+ default
+
+ if [[ ! -e configure ]] ; then
+ # git generation
+ ./xlat/gen.sh || die
+ ./generate_mpers_am.sh || die
+ eautoreconf
+ [[ ! -e CREDITS ]] && cp CREDITS{.in,}
+ fi
+
+ filter-lfs-flags # configure handles this sanely
+ # Add -pthread since strace wants -lrt for timer_create, and -lrt uses -lpthread.
+ use static && append-ldflags -static -pthread
+
+ 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=(
+ --enable-mpers=check
+ $(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
+ use perl || rm "${ED%/}"/usr/bin/strace-graph
+ dodoc CREDITS
+}