Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/strace/
Date: Tue, 29 Sep 2015 19:16:11
Message-Id: 1443554117.ae5dc52c91c6085a54a3454e218a088dcfe39c95.vapier@gentoo
1 commit: ae5dc52c91c6085a54a3454e218a088dcfe39c95
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 29 19:12:19 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 29 19:15:17 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae5dc52c
7
8 dev-util/strace: add USE=unwind to control libunwind usage
9
10 dev-util/strace/metadata.xml | 3 +++
11 dev-util/strace/strace-4.10.ebuild | 13 ++++++++++---
12 dev-util/strace/strace-4.9.ebuild | 12 +++++++++---
13 dev-util/strace/strace-9999.ebuild | 13 ++++++++++---
14 4 files changed, 32 insertions(+), 9 deletions(-)
15
16 diff --git a/dev-util/strace/metadata.xml b/dev-util/strace/metadata.xml
17 index 392a501..0ca954d 100644
18 --- a/dev-util/strace/metadata.xml
19 +++ b/dev-util/strace/metadata.xml
20 @@ -6,6 +6,9 @@
21 <flag name="aio">
22 Enable <pkg>dev-libs/libaio</pkg> support for tracing Asynchronous I/O operations
23 </flag>
24 + <flag name="unwind">
25 + Enable stack backtraces (-k flag) via <pkg>sys-libs/libunwind</pkg>
26 + </flag>
27 </use>
28 <upstream>
29 <remote-id type="sourceforge">strace</remote-id>
30
31 diff --git a/dev-util/strace/strace-4.10.ebuild b/dev-util/strace/strace-4.10.ebuild
32 index dba2a1e..59e215b 100644
33 --- a/dev-util/strace/strace-4.10.ebuild
34 +++ b/dev-util/strace/strace-4.10.ebuild
35 @@ -19,12 +19,15 @@ HOMEPAGE="http://sourceforge.net/projects/strace/"
36
37 LICENSE="BSD"
38 SLOT="0"
39 -IUSE="aio perl static"
40 +IUSE="aio perl static unwind"
41
42 +LIB_DEPEND="unwind? ( sys-libs/libunwind[static-libs(+)] )"
43 # strace only uses the header from libaio to decode structs
44 -DEPEND="aio? ( >=dev-libs/libaio-0.3.106 )
45 +DEPEND="static? ( ${LIB_DEPEND} )
46 + aio? ( >=dev-libs/libaio-0.3.106 )
47 sys-kernel/linux-headers"
48 -RDEPEND="perl? ( dev-lang/perl )"
49 +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
50 + perl? ( dev-lang/perl )"
51
52 src_prepare() {
53 if epatch_user || [[ ! -e configure ]] ; then
54 @@ -43,6 +46,10 @@ src_prepare() {
55 sed -i '1iexit 77' tests*/strace-k.test || die
56 }
57
58 +src_configure() {
59 + econf $(use_with unwind libunwind)
60 +}
61 +
62 src_install() {
63 default
64 use perl || rm "${ED}"/usr/bin/strace-graph
65
66 diff --git a/dev-util/strace/strace-4.9.ebuild b/dev-util/strace/strace-4.9.ebuild
67 index 287aa8b..5fd2fd6 100644
68 --- a/dev-util/strace/strace-4.9.ebuild
69 +++ b/dev-util/strace/strace-4.9.ebuild
70 @@ -19,12 +19,14 @@ HOMEPAGE="http://sourceforge.net/projects/strace/"
71
72 LICENSE="BSD"
73 SLOT="0"
74 -IUSE="aio +perl static"
75 +IUSE="aio +perl static unwind"
76
77 +LIB_DEPEND="unwind? ( sys-libs/libunwind[static-libs(+)] )"
78 # strace only uses the header from libaio to decode structs
79 -DEPEND="aio? ( >=dev-libs/libaio-0.3.106 )
80 +DEPEND="static? ( ${LIB_DEPEND} )
81 + aio? ( >=dev-libs/libaio-0.3.106 )
82 sys-kernel/linux-headers"
83 -RDEPEND=""
84 +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
85
86 src_prepare() {
87 if epatch_user || [[ ! -e configure ]] ; then
88 @@ -40,6 +42,10 @@ src_prepare() {
89 export ac_cv_header_libaio_h=$(usex aio)
90 }
91
92 +src_configure() {
93 + econf $(use_with unwind libunwind)
94 +}
95 +
96 src_install() {
97 default
98 use perl || rm "${ED}"/usr/bin/strace-graph
99
100 diff --git a/dev-util/strace/strace-9999.ebuild b/dev-util/strace/strace-9999.ebuild
101 index 8a1e0d6..9a70150 100644
102 --- a/dev-util/strace/strace-9999.ebuild
103 +++ b/dev-util/strace/strace-9999.ebuild
104 @@ -19,12 +19,15 @@ HOMEPAGE="http://sourceforge.net/projects/strace/"
105
106 LICENSE="BSD"
107 SLOT="0"
108 -IUSE="aio perl static"
109 +IUSE="aio perl static unwind"
110
111 +LIB_DEPEND="unwind? ( sys-libs/libunwind[static-libs(+)] )"
112 # strace only uses the header from libaio to decode structs
113 -DEPEND="aio? ( >=dev-libs/libaio-0.3.106 )
114 +DEPEND="static? ( ${LIB_DEPEND} )
115 + aio? ( >=dev-libs/libaio-0.3.106 )
116 sys-kernel/linux-headers"
117 -RDEPEND="perl? ( dev-lang/perl )"
118 +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
119 + perl? ( dev-lang/perl )"
120
121 src_prepare() {
122 if epatch_user || [[ ! -e configure ]] ; then
123 @@ -44,6 +47,10 @@ src_prepare() {
124 sed -i '1iexit 77' tests*/strace-k.test || die
125 }
126
127 +src_configure() {
128 + econf $(use_with unwind libunwind)
129 +}
130 +
131 src_install() {
132 default
133 use perl || rm "${ED}"/usr/bin/strace-graph