dev-util/strace: Add use flag for elfutils.
authorYmrDtnJu <YmrDtnJu@users.noreply.github.com>
Sat, 16 Jun 2018 18:36:52 +0000 (20:36 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Mon, 18 Jun 2018 11:38:53 +0000 (13:38 +0200)
strace can use libdw to implement stack tracing support and will use it
automatically if it is installed on the system. The commit makes this
configurable.

Closes: https://github.com/gentoo/gentoo/pull/8860

dev-util/strace/metadata.xml
dev-util/strace/strace-4.23-r1.ebuild [moved from dev-util/strace/strace-4.23.ebuild with 88% similarity]

index 869980f0195f30807170f314d29b234a6ab12640..ed202ff2ec683144ca1db251b3a6f9114d272bfc 100644 (file)
@@ -12,6 +12,9 @@
     <flag name="unwind">
       Enable stack backtraces (-k flag) via <pkg>sys-libs/libunwind</pkg>
     </flag>
+    <flag name="elfutils">
+      Enable stack backtraces (-k flag) via <pkg>dev-libs/elfutils</pkg>
+    </flag>
   </use>
   <upstream>
     <remote-id type="sourceforge">strace</remote-id>
similarity index 88%
rename from dev-util/strace/strace-4.23.ebuild
rename to dev-util/strace/strace-4.23-r1.ebuild
index 216395c678c1dcfb732ef54dadaccc37b0a8e9b9..a16ee1f785c0b8194eac964df7c039e453ed2e4c 100644 (file)
@@ -18,9 +18,14 @@ HOMEPAGE="https://strace.io/"
 
 LICENSE="BSD"
 SLOT="0"
-IUSE="aio perl static unwind"
+IUSE="aio perl static unwind elfutils"
 
-LIB_DEPEND="unwind? ( sys-libs/libunwind[static-libs(+)] )"
+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} )
@@ -66,7 +71,8 @@ src_configure() {
        # Don't require mpers support on non-multilib systems. #649560
        econf \
                --enable-mpers=check \
-               $(use_with unwind libunwind)
+               $(use_with unwind libunwind) \
+               $(use_with elfutils libdw)
 }
 
 src_test() {