1 |
commit: f670c8d44348e03d4d3f1e349aa39843cafb5608 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 28 17:48:17 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 28 17:48:17 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/ppc64le.git/commit/?id=f670c8d4 |
7 |
|
8 |
dev-utils/perf: copy from tree |
9 |
|
10 |
dev-utils/perf/Manifest | 10 ++ |
11 |
dev-utils/perf/files/perf-4.1.5-prefix.patch | 43 ++++++ |
12 |
dev-utils/perf/metadata.xml | 29 ++++ |
13 |
dev-utils/perf/perf-3.12.ebuild | 178 +++++++++++++++++++++++++ |
14 |
dev-utils/perf/perf-3.13.1-r1.ebuild | 183 +++++++++++++++++++++++++ |
15 |
dev-utils/perf/perf-3.15.5.ebuild | 183 +++++++++++++++++++++++++ |
16 |
dev-utils/perf/perf-3.8-r1.ebuild | 170 ++++++++++++++++++++++++ |
17 |
dev-utils/perf/perf-4.1.5-r1.ebuild | 191 +++++++++++++++++++++++++++ |
18 |
dev-utils/perf/perf-4.4.4.ebuild | 185 ++++++++++++++++++++++++++ |
19 |
9 files changed, 1172 insertions(+) |
20 |
|
21 |
diff --git a/dev-utils/perf/Manifest b/dev-utils/perf/Manifest |
22 |
new file mode 100644 |
23 |
index 0000000..e756632 |
24 |
--- /dev/null |
25 |
+++ b/dev-utils/perf/Manifest |
26 |
@@ -0,0 +1,10 @@ |
27 |
+DIST linux-3.12.tar.bz2 91111381 SHA256 43129defd9079c99cf5e57506d36b6b01614c734a5ed9e604d3a7c1510ab8b22 SHA512 bea14d044c8a0257d8312f45db6a39ca4f9dffe8ac32a11198e90762ee1735c8b6975bb81c635a4755d451793fa7c7e5b2d7d692c9e57133b15b4cdc941febf1 WHIRLPOOL 1889c3f689cf305856112f350e3901175b9f6c4f1e4143d62b40e502000685ade3e75b211a8a9fd948f6225e1c57a68cae10ceb649ff7976981089290d562926 |
28 |
+DIST linux-3.13.tar.xz 77187032 SHA256 4d5e5eee5f276424c32e9591f1b6c971baedc7b49f28ce03d1f48b1e5d6226a2 SHA512 1ba223bb4b885d691a67196d86a8aaf7b4a1c351bf2a762f50f1b0c32da00dd0c28895872a66b49e8d244498d996876609268e64861d28ac4048886ef9f79b87 WHIRLPOOL 2992257a17e85b3eb16fcaf21678fa6dbf31f80c2099fd1ad0ff9852ac1d16122ac8e2c0b46421d8895d4368253a724e439cd625307ee7af7bd1e50cb2c9b62a |
29 |
+DIST linux-3.15.tar.xz 79676484 SHA256 c3927e87be4040fa8aca1b58663dc0776aaf00485604ff88a623be2f3fb07794 SHA512 d5dc477cad4584e56e2e2ef9e0950c2b22e76e5cf5090a896ba099cb7c5e5db1853a4aeb96b199189653dc66d461557e95198e37516a619f7ddc01ba6b308e02 WHIRLPOOL 7f3dfde1a23aab75b7f40770ae2ca77c1b28f845e4abe6296b2aec9b56fe94f7afa76b00eb6cc7475305c31b726ebeb4643107dd48c12ac04c933cf1856b8e77 |
30 |
+DIST linux-3.8.tar.bz2 84623657 SHA256 fce774b5313e73949cb35f128e91e7b2ccd7fa2438abc5cff69267e504395a45 SHA512 966a3b08aecc4b135a48ea73ba3326e1710c455e6da29693479e9d1a56663fc10f569e2342fa861486d39d4ea5c2af406d1bd40613c15555acffdba160ef7ba9 WHIRLPOOL a83baa904c78f71fed5e4cf2607b8e6d1db70a4137b5c00b3cc5f60f04042724faa3cfec36a781417d483548ba0c811f559e82146806edacd1c2fe90bd398e64 |
31 |
+DIST linux-4.1.tar.xz 83017828 SHA256 caf51f085aac1e1cea4d00dbbf3093ead07b551fc07b31b2a989c05f8ea72d9f SHA512 168ef84a4e67619f9f53f3574e438542a5747f9b43443363cb83597fcdac9f40d201625c66e375a23226745eaada9176eb006ca023613cec089349e91751f3c0 WHIRLPOOL 85fcfdb67ea7f865272a85d3b4c3ec1f5a1267f4664bf073c562bb3875e9d96ad68486259d8866a9aced98c95de16840ec531d89745aec75b7315a64ebe650b8 |
32 |
+DIST linux-4.4.tar.xz 87295988 SHA256 401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2 SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e WHIRLPOOL 02abc203d867404b9934aaa4c1e5b5dcbb0b0021e91a03f3a7e7fd224eed106821d8b4949f32a590536db150e5a88c16fcde88538777a26d0c17900f0257b1bc |
33 |
+DIST patch-3.13.1.xz 2884 SHA256 74a093b2cacddac0a105e0989b7bf0e9829b9923e2d71ca10382e90324a17e74 SHA512 164235a15e6a984e9aeaf9fe475a8b2975d5e4c4b28dd4ecf99064b0f0c72eea766d925340f1a7232cabcbd23d26773527c300b6d995bf5cde18a276208fdccc WHIRLPOOL 0ea0118960970b7d6465445252e7a21a6aeb494c0afefec5f52a68c0b7e0d63fd2ed59a3877fbe9ebd282ac03812235b021534866efa8f46d549b6f70228e4b6 |
34 |
+DIST patch-3.15.5.xz 122232 SHA256 9b0d000e0bdec7a25ee6303afdab8d2af77439995876eadd6ce248e5c954037d SHA512 6831200503334e839c3cccdad29058aecc0205171cc5b75205d0a2aada8636633889ebff35d9677d4567bbaeea249efc83571e016104cd67554fe72b3b405755 WHIRLPOOL 56e1e817c08b4557e18b34d148d8ffd0f73bf8dec92f2339ca9413ca2143b65ec35f6d48c87e37f140226e57d7df33f06d6c53a48dafa7ddf090a839fdabe024 |
35 |
+DIST patch-4.1.5.xz 170056 SHA256 b495cf8a7b978986dd2b757b687751c62f635d15cc2228edb80934bc0d449dcc SHA512 1325cdb35ea1f277d513932af37804f788b96ae63b94cedeb3c9b916ee8963bbd6aca5d0e13279e36a81f1de06005c5f3666ecfc845609932686f261fa4250c5 WHIRLPOOL 291ddfcde395c3d201a8172f7281ac560167a8bce78d3196b47e4c7be759545282cc1104fc7b2edc95d90250a834cc23103199275bc8c6974bd4229dd530d1a3 |
36 |
+DIST patch-4.4.4.xz 200972 SHA256 9061d8f57cc25d760387c4e6b7d5cceacaa808e8784a3e478012e7c2949853c8 SHA512 c206af7803cb0915fbe2bd27ed33282452db3fbd3070c73e4c7147443efd3c7588fb3be12d0abc08742381fbe892190602b29147684630aa9e6ff5e9efa49dbc WHIRLPOOL e6a004e32eecca1507354f97d3de85a07c1b9512fe3d4d87173e6d39c02ef1c2411abd0c26b6a077cd5eaefde11dd201445f72b9a0cf185e76635bdcc36df8dd |
37 |
|
38 |
diff --git a/dev-utils/perf/files/perf-4.1.5-prefix.patch b/dev-utils/perf/files/perf-4.1.5-prefix.patch |
39 |
new file mode 100644 |
40 |
index 0000000..0c4dff0 |
41 |
--- /dev/null |
42 |
+++ b/dev-utils/perf/files/perf-4.1.5-prefix.patch |
43 |
@@ -0,0 +1,43 @@ |
44 |
+commit 75e84ab906ef8935cff3df3d8929f1bafea81599 |
45 |
+Author: Lukas Wunner <lukas@××××××.de> |
46 |
+Date: Thu Jun 18 13:00:32 2015 +0200 |
47 |
+ |
48 |
+ perf tools: Fix build breakage if prefix= is specified |
49 |
+ |
50 |
+ Invoking Makefile.perf with prefix= breaks the build since Makefile.perf |
51 |
+ hands that variable down to Makefile.build where it overrides |
52 |
+ |
53 |
+ prefix := $(subst ./,,$(OUTPUT)$(dir)/) |
54 |
+ |
55 |
+ leading to errors like this: |
56 |
+ |
57 |
+ No rule to make target '/usrabspath.o', needed by '/usrlibperf-in.o' |
58 |
+ |
59 |
+ Signed-off-by: Lukas Wunner <lukas@××××××.de> |
60 |
+ Acked-by: Jiri Olsa <jolsa@××××××.org> |
61 |
+ Cc: David Ahern <dsahern@×××××.com> |
62 |
+ Fixes: c819e2cf2eb6f65d3208d195d7a0edef6108d5 |
63 |
+ Link: http://lkml.kernel.org/r/5582c48a.84a22b0a.a918.5285SMTPIN_ADDED_MISSING@×××××××××.com |
64 |
+ Signed-off-by: Arnaldo Carvalho de Melo <acme@××××××.com> |
65 |
+ |
66 |
+diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build |
67 |
+index 10df572..98cfc38 100644 |
68 |
+--- a/tools/build/Makefile.build |
69 |
++++ b/tools/build/Makefile.build |
70 |
+@@ -94,12 +94,12 @@ obj-y := $(patsubst %/, %/$(obj)-in.o, $(obj-y)) |
71 |
+ subdir-obj-y := $(filter %/$(obj)-in.o, $(obj-y)) |
72 |
+ |
73 |
+ # '$(OUTPUT)/dir' prefix to all objects |
74 |
+-prefix := $(subst ./,,$(OUTPUT)$(dir)/) |
75 |
+-obj-y := $(addprefix $(prefix),$(obj-y)) |
76 |
+-subdir-obj-y := $(addprefix $(prefix),$(subdir-obj-y)) |
77 |
++objprefix := $(subst ./,,$(OUTPUT)$(dir)/) |
78 |
++obj-y := $(addprefix $(objprefix),$(obj-y)) |
79 |
++subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y)) |
80 |
+ |
81 |
+ # Final '$(obj)-in.o' object |
82 |
+-in-target := $(prefix)$(obj)-in.o |
83 |
++in-target := $(objprefix)$(obj)-in.o |
84 |
+ |
85 |
+ PHONY += $(subdir-y) |
86 |
+ |
87 |
|
88 |
diff --git a/dev-utils/perf/metadata.xml b/dev-utils/perf/metadata.xml |
89 |
new file mode 100644 |
90 |
index 0000000..ec35d2e |
91 |
--- /dev/null |
92 |
+++ b/dev-utils/perf/metadata.xml |
93 |
@@ -0,0 +1,29 @@ |
94 |
+<?xml version="1.0" encoding="UTF-8"?> |
95 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
96 |
+<pkgmetadata> |
97 |
+ <maintainer type="person"> |
98 |
+ <email>naota@g.o</email> |
99 |
+ </maintainer> |
100 |
+ <use> |
101 |
+ <flag name="demangle"> |
102 |
+ Enable C++ symbol name demangling, using libbfd from |
103 |
+ <pkg>sys-devel/binutils</pkg>. When this flag is enabled, the |
104 |
+ package will have to be rebuilt after every version bump of |
105 |
+ binutils. |
106 |
+ </flag> |
107 |
+ <flag name="doc"> |
108 |
+ Build documentation and man pages. With this USE flag disabled, |
109 |
+ the --help parameter for perf and its sub-tools will not be |
110 |
+ available. This is optional because it depends on a few |
111 |
+ documentation handling tools that are not always welcome on user |
112 |
+ systems. |
113 |
+ </flag> |
114 |
+ <flag name="numa">Enable NUMA support</flag> |
115 |
+ <flag name="perl"> |
116 |
+ Add support for Perl as a scripting language for perf tools. |
117 |
+ </flag> |
118 |
+ <flag name="unwind"> |
119 |
+ Use sys-libs/libunwind for frame unwinding support. |
120 |
+ </flag> |
121 |
+ </use> |
122 |
+</pkgmetadata> |
123 |
|
124 |
diff --git a/dev-utils/perf/perf-3.12.ebuild b/dev-utils/perf/perf-3.12.ebuild |
125 |
new file mode 100644 |
126 |
index 0000000..17af617 |
127 |
--- /dev/null |
128 |
+++ b/dev-utils/perf/perf-3.12.ebuild |
129 |
@@ -0,0 +1,178 @@ |
130 |
+# Copyright 1999-2015 Gentoo Foundation |
131 |
+# Distributed under the terms of the GNU General Public License v2 |
132 |
+# $Id$ |
133 |
+ |
134 |
+EAPI="5" |
135 |
+ |
136 |
+PYTHON_COMPAT=( python2_7 ) |
137 |
+inherit versionator eutils toolchain-funcs python-single-r1 linux-info |
138 |
+ |
139 |
+MY_PV="${PV/_/-}" |
140 |
+MY_PV="${MY_PV/-pre/-git}" |
141 |
+ |
142 |
+DESCRIPTION="Userland tools for Linux Performance Counters" |
143 |
+HOMEPAGE="https://perf.wiki.kernel.org/" |
144 |
+ |
145 |
+LINUX_V="${PV:0:1}.x" |
146 |
+if [[ ${PV/_rc} != ${PV} ]] ; then |
147 |
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
148 |
+ PATCH_VERSION=$(get_version_component_range 1-3) |
149 |
+ LINUX_PATCH=patch-${PV//_/-}.bz2 |
150 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} |
151 |
+ mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
152 |
+elif [[ $(get_version_component_count) == 4 ]] ; then |
153 |
+ # stable-release series |
154 |
+ LINUX_VER=$(get_version_component_range 1-3) |
155 |
+ LINUX_PATCH=patch-${PV}.bz2 |
156 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" |
157 |
+else |
158 |
+ LINUX_VER=${PV} |
159 |
+ SRC_URI="" |
160 |
+fi |
161 |
+ |
162 |
+LINUX_SOURCES="linux-${LINUX_VER}.tar.bz2" |
163 |
+SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" |
164 |
+ |
165 |
+LICENSE="GPL-2" |
166 |
+SLOT="0" |
167 |
+KEYWORDS="~amd64 ~arm ~ppc ~x86" |
168 |
+IUSE="audit +demangle +doc perl python slang unwind" |
169 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
170 |
+ |
171 |
+RDEPEND="audit? ( sys-process/audit ) |
172 |
+ demangle? ( sys-devel/binutils ) |
173 |
+ perl? ( dev-lang/perl ) |
174 |
+ slang? ( dev-libs/newt ) |
175 |
+ unwind? ( sys-libs/libunwind ) |
176 |
+ dev-libs/elfutils" |
177 |
+DEPEND="${RDEPEND} |
178 |
+ ${LINUX_PATCH+dev-util/patchutils} |
179 |
+ sys-devel/bison |
180 |
+ sys-devel/flex |
181 |
+ doc? ( |
182 |
+ app-text/asciidoc |
183 |
+ app-text/sgml-common |
184 |
+ app-text/xmlto |
185 |
+ sys-process/time |
186 |
+ ) |
187 |
+ python? ( ${PYTHON_DEPS} )" |
188 |
+ |
189 |
+S_K="${WORKDIR}/linux-${LINUX_VER}" |
190 |
+S="${S_K}/tools/perf" |
191 |
+ |
192 |
+CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" |
193 |
+ |
194 |
+pkg_setup() { |
195 |
+ linux-info_pkg_setup |
196 |
+ use python && python-single-r1_pkg_setup |
197 |
+} |
198 |
+ |
199 |
+src_unpack() { |
200 |
+ local paths=( tools/perf tools/scripts tools/lib include lib "arch/*/include" "arch/*/lib" ) |
201 |
+ |
202 |
+ # We expect the tar implementation to support the -j option (both |
203 |
+ # GNU tar and libarchive's tar support that). |
204 |
+ echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" |
205 |
+ tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ |
206 |
+ "${paths[@]/#/linux-${LINUX_VER}/}" || die |
207 |
+ |
208 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
209 |
+ eshopts_push -o noglob |
210 |
+ ebegin "Filtering partial source patch" |
211 |
+ filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die |
212 |
+ eend $? || die "filterdiff failed" |
213 |
+ eshopts_pop |
214 |
+ fi |
215 |
+ |
216 |
+ local a |
217 |
+ for a in ${A}; do |
218 |
+ [[ ${a} == ${LINUX_SOURCES} ]] && continue |
219 |
+ [[ ${a} == ${LINUX_PATCH} ]] && continue |
220 |
+ unpack ${a} |
221 |
+ done |
222 |
+} |
223 |
+ |
224 |
+src_prepare() { |
225 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
226 |
+ cd "${S_K}" |
227 |
+ epatch "${WORKDIR}"/${P}.patch |
228 |
+ fi |
229 |
+ |
230 |
+ # Drop some upstream too-developer-oriented flags and fix the |
231 |
+ # Makefile in general |
232 |
+ sed -i \ |
233 |
+ -e 's:-Werror::' \ |
234 |
+ -e 's:-ggdb3::' \ |
235 |
+ -e 's:-fstack-protector-all::' \ |
236 |
+ -e 's:^LDFLAGS =:EXTLIBS +=:' \ |
237 |
+ -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ |
238 |
+ -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ |
239 |
+ -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \ |
240 |
+ -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \ |
241 |
+ -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ |
242 |
+ "${S}"/Makefile || die |
243 |
+ sed -i -e 's:-Werror::' "${S_K}"/tools/lib/lk/Makefile || die |
244 |
+ sed -i \ |
245 |
+ -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \ |
246 |
+ "${S}"/Makefile \ |
247 |
+ "${S}"/Documentation/Makefile || die |
248 |
+ |
249 |
+ # Avoid the call to make kernelversion |
250 |
+ echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE |
251 |
+ |
252 |
+ # The code likes to compile local assembly files which lack ELF markings. |
253 |
+ find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + |
254 |
+} |
255 |
+ |
256 |
+puse() { usex $1 "" no; } |
257 |
+perf_make() { |
258 |
+ # The arch parsing is a bit funky. The perf tools package is integrated |
259 |
+ # into the kernel, so it wants an ARCH that looks like the kernel arch, |
260 |
+ # but it also wants to know about the split value -- i386/x86_64 vs just |
261 |
+ # x86. We can get that by telling the func to use an older linux version. |
262 |
+ # It's kind of a hack, but not that bad ... |
263 |
+ local arch=$(KV=2.6.23 tc-arch-kernel) |
264 |
+ emake -j1 V=1 \ |
265 |
+ CC="$(tc-getCC)" AR="$(tc-getAR)" \ |
266 |
+ prefix="/usr" bindir_relative="sbin" \ |
267 |
+ CFLAGS_OPTIMIZE="${CFLAGS}" \ |
268 |
+ LDFLAGS_OPTIMIZE="${LDFLAGS}" \ |
269 |
+ ARCH="${arch}" \ |
270 |
+ NO_DEMANGLE=$(puse demangle) \ |
271 |
+ NO_LIBAUDIT=$(puse audit) \ |
272 |
+ NO_LIBPERL=$(puse perl) \ |
273 |
+ NO_LIBPYTHON=$(puse python) \ |
274 |
+ NO_LIBUNWIND=$(puse unwind) \ |
275 |
+ NO_NEWT=$(puse slang) \ |
276 |
+ WERROR=0 \ |
277 |
+ "$@" |
278 |
+} |
279 |
+ |
280 |
+src_compile() { |
281 |
+ perf_make |
282 |
+ use doc && perf_make -C Documentation |
283 |
+} |
284 |
+ |
285 |
+src_test() { |
286 |
+ : |
287 |
+} |
288 |
+ |
289 |
+src_install() { |
290 |
+ perf_make install DESTDIR="${D}" |
291 |
+ |
292 |
+ dodoc CREDITS |
293 |
+ |
294 |
+ dodoc *txt Documentation/*.txt |
295 |
+ if use doc ; then |
296 |
+ dohtml Documentation/*.html |
297 |
+ doman Documentation/*.1 |
298 |
+ fi |
299 |
+} |
300 |
+ |
301 |
+pkg_postinst() { |
302 |
+ if ! use doc ; then |
303 |
+ elog "Without the doc USE flag you won't get any documentation nor man pages." |
304 |
+ elog "And without man pages, you won't get any --help output for perf and its" |
305 |
+ elog "sub-tools." |
306 |
+ fi |
307 |
+} |
308 |
|
309 |
diff --git a/dev-utils/perf/perf-3.13.1-r1.ebuild b/dev-utils/perf/perf-3.13.1-r1.ebuild |
310 |
new file mode 100644 |
311 |
index 0000000..e11af3b |
312 |
--- /dev/null |
313 |
+++ b/dev-utils/perf/perf-3.13.1-r1.ebuild |
314 |
@@ -0,0 +1,183 @@ |
315 |
+# Copyright 1999-2015 Gentoo Foundation |
316 |
+# Distributed under the terms of the GNU General Public License v2 |
317 |
+# $Id$ |
318 |
+ |
319 |
+EAPI="5" |
320 |
+ |
321 |
+PYTHON_COMPAT=( python2_7 ) |
322 |
+inherit versionator eutils toolchain-funcs python-single-r1 linux-info |
323 |
+ |
324 |
+MY_PV="${PV/_/-}" |
325 |
+MY_PV="${MY_PV/-pre/-git}" |
326 |
+ |
327 |
+DESCRIPTION="Userland tools for Linux Performance Counters" |
328 |
+HOMEPAGE="https://perf.wiki.kernel.org/" |
329 |
+ |
330 |
+LINUX_V="${PV:0:1}.x" |
331 |
+if [[ ${PV} == *_rc* ]] ; then |
332 |
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
333 |
+ PATCH_VERSION=$(get_version_component_range 1-3) |
334 |
+ LINUX_PATCH=patch-${PV//_/-}.xz |
335 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} |
336 |
+ mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
337 |
+else |
338 |
+ VER_COUNT=$(get_version_component_count) |
339 |
+ if [[ ${VER_COUNT} -gt 2 ]] ; then |
340 |
+ # stable-release series |
341 |
+ LINUX_VER=$(get_version_component_range 1-2) |
342 |
+ LINUX_PATCH=patch-${PV}.xz |
343 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" |
344 |
+ else |
345 |
+ LINUX_VER=${PV} |
346 |
+ SRC_URI="" |
347 |
+ fi |
348 |
+fi |
349 |
+ |
350 |
+LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" |
351 |
+SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" |
352 |
+ |
353 |
+LICENSE="GPL-2" |
354 |
+SLOT="0" |
355 |
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" |
356 |
+IUSE="audit +demangle +doc gtk perl python slang unwind" |
357 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
358 |
+ |
359 |
+RDEPEND="audit? ( sys-process/audit ) |
360 |
+ demangle? ( sys-devel/binutils ) |
361 |
+ gtk? ( x11-libs/gtk+:2 ) |
362 |
+ perl? ( dev-lang/perl ) |
363 |
+ slang? ( dev-libs/newt ) |
364 |
+ unwind? ( sys-libs/libunwind ) |
365 |
+ dev-libs/elfutils" |
366 |
+DEPEND="${RDEPEND} |
367 |
+ ${LINUX_PATCH+dev-util/patchutils} |
368 |
+ sys-devel/bison |
369 |
+ sys-devel/flex |
370 |
+ doc? ( |
371 |
+ app-text/asciidoc |
372 |
+ app-text/sgml-common |
373 |
+ app-text/xmlto |
374 |
+ sys-process/time |
375 |
+ ) |
376 |
+ python? ( ${PYTHON_DEPS} )" |
377 |
+ |
378 |
+S_K="${WORKDIR}/linux-${LINUX_VER}" |
379 |
+S="${S_K}/tools/perf" |
380 |
+ |
381 |
+CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" |
382 |
+ |
383 |
+pkg_setup() { |
384 |
+ linux-info_pkg_setup |
385 |
+ use python && python-single-r1_pkg_setup |
386 |
+} |
387 |
+ |
388 |
+src_unpack() { |
389 |
+ local paths=( tools/perf tools/scripts tools/lib include lib "arch/*/include" "arch/*/lib" ) |
390 |
+ |
391 |
+ # We expect the tar implementation to support the -j option (both |
392 |
+ # GNU tar and libarchive's tar support that). |
393 |
+ echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" |
394 |
+ tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ |
395 |
+ "${paths[@]/#/linux-${LINUX_VER}/}" || die |
396 |
+ |
397 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
398 |
+ eshopts_push -o noglob |
399 |
+ ebegin "Filtering partial source patch" |
400 |
+ filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die |
401 |
+ eend $? || die "filterdiff failed" |
402 |
+ eshopts_pop |
403 |
+ fi |
404 |
+ |
405 |
+ local a |
406 |
+ for a in ${A}; do |
407 |
+ [[ ${a} == ${LINUX_SOURCES} ]] && continue |
408 |
+ [[ ${a} == ${LINUX_PATCH} ]] && continue |
409 |
+ unpack ${a} |
410 |
+ done |
411 |
+} |
412 |
+ |
413 |
+src_prepare() { |
414 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
415 |
+ cd "${S_K}" |
416 |
+ epatch "${WORKDIR}"/${P}.patch |
417 |
+ fi |
418 |
+ |
419 |
+ # Drop some upstream too-developer-oriented flags and fix the |
420 |
+ # Makefile in general |
421 |
+ sed -i \ |
422 |
+ -e 's:-Werror::' \ |
423 |
+ -e 's:-ggdb3::' \ |
424 |
+ -e 's:-fstack-protector-all::' \ |
425 |
+ -e 's:^LDFLAGS =:EXTLIBS +=:' \ |
426 |
+ -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ |
427 |
+ -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ |
428 |
+ -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \ |
429 |
+ -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \ |
430 |
+ -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ |
431 |
+ "${S}"/Makefile || die |
432 |
+ sed -i -e 's:-Werror::' "${S_K}"/tools/lib/lk/Makefile || die |
433 |
+ sed -i \ |
434 |
+ -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \ |
435 |
+ "${S}"/Makefile \ |
436 |
+ "${S}"/Documentation/Makefile || die |
437 |
+ |
438 |
+ # Avoid the call to make kernelversion |
439 |
+ echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE |
440 |
+ |
441 |
+ # The code likes to compile local assembly files which lack ELF markings. |
442 |
+ find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + |
443 |
+} |
444 |
+ |
445 |
+puse() { usex $1 "" no; } |
446 |
+perf_make() { |
447 |
+ # The arch parsing is a bit funky. The perf tools package is integrated |
448 |
+ # into the kernel, so it wants an ARCH that looks like the kernel arch, |
449 |
+ # but it also wants to know about the split value -- i386/x86_64 vs just |
450 |
+ # x86. We can get that by telling the func to use an older linux version. |
451 |
+ # It's kind of a hack, but not that bad ... |
452 |
+ local arch=$(KV=2.6.23 tc-arch-kernel) |
453 |
+ emake V=1 \ |
454 |
+ CC="$(tc-getCC)" AR="$(tc-getAR)" \ |
455 |
+ prefix="/usr" bindir_relative="bin" \ |
456 |
+ CFLAGS_OPTIMIZE="${CFLAGS}" \ |
457 |
+ LDFLAGS_OPTIMIZE="${LDFLAGS}" \ |
458 |
+ ARCH="${arch}" \ |
459 |
+ NO_DEMANGLE=$(puse demangle) \ |
460 |
+ NO_GTK2=$(puse gtk) \ |
461 |
+ NO_LIBAUDIT=$(puse audit) \ |
462 |
+ NO_LIBPERL=$(puse perl) \ |
463 |
+ NO_LIBPYTHON=$(puse python) \ |
464 |
+ NO_LIBUNWIND=$(puse unwind) \ |
465 |
+ NO_NEWT=$(puse slang) \ |
466 |
+ WERROR=0 \ |
467 |
+ "$@" |
468 |
+} |
469 |
+ |
470 |
+src_compile() { |
471 |
+ perf_make -f Makefile.perf |
472 |
+ use doc && perf_make -C Documentation |
473 |
+} |
474 |
+ |
475 |
+src_test() { |
476 |
+ : |
477 |
+} |
478 |
+ |
479 |
+src_install() { |
480 |
+ perf_make -f Makefile.perf install DESTDIR="${D}" |
481 |
+ |
482 |
+ dodoc CREDITS |
483 |
+ |
484 |
+ dodoc *txt Documentation/*.txt |
485 |
+ if use doc ; then |
486 |
+ dohtml Documentation/*.html |
487 |
+ doman Documentation/*.1 |
488 |
+ fi |
489 |
+} |
490 |
+ |
491 |
+pkg_postinst() { |
492 |
+ if ! use doc ; then |
493 |
+ elog "Without the doc USE flag you won't get any documentation nor man pages." |
494 |
+ elog "And without man pages, you won't get any --help output for perf and its" |
495 |
+ elog "sub-tools." |
496 |
+ fi |
497 |
+} |
498 |
|
499 |
diff --git a/dev-utils/perf/perf-3.15.5.ebuild b/dev-utils/perf/perf-3.15.5.ebuild |
500 |
new file mode 100644 |
501 |
index 0000000..ee4515c |
502 |
--- /dev/null |
503 |
+++ b/dev-utils/perf/perf-3.15.5.ebuild |
504 |
@@ -0,0 +1,183 @@ |
505 |
+# Copyright 1999-2015 Gentoo Foundation |
506 |
+# Distributed under the terms of the GNU General Public License v2 |
507 |
+# $Id$ |
508 |
+ |
509 |
+EAPI="5" |
510 |
+ |
511 |
+PYTHON_COMPAT=( python2_7 ) |
512 |
+inherit versionator eutils toolchain-funcs python-single-r1 linux-info |
513 |
+ |
514 |
+MY_PV="${PV/_/-}" |
515 |
+MY_PV="${MY_PV/-pre/-git}" |
516 |
+ |
517 |
+DESCRIPTION="Userland tools for Linux Performance Counters" |
518 |
+HOMEPAGE="https://perf.wiki.kernel.org/" |
519 |
+ |
520 |
+LINUX_V="${PV:0:1}.x" |
521 |
+if [[ ${PV} == *_rc* ]] ; then |
522 |
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
523 |
+ PATCH_VERSION=$(get_version_component_range 1-3) |
524 |
+ LINUX_PATCH=patch-${PV//_/-}.xz |
525 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} |
526 |
+ mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
527 |
+else |
528 |
+ VER_COUNT=$(get_version_component_count) |
529 |
+ if [[ ${VER_COUNT} -gt 2 ]] ; then |
530 |
+ # stable-release series |
531 |
+ LINUX_VER=$(get_version_component_range 1-2) |
532 |
+ LINUX_PATCH=patch-${PV}.xz |
533 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" |
534 |
+ else |
535 |
+ LINUX_VER=${PV} |
536 |
+ SRC_URI="" |
537 |
+ fi |
538 |
+fi |
539 |
+ |
540 |
+LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" |
541 |
+SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" |
542 |
+ |
543 |
+LICENSE="GPL-2" |
544 |
+SLOT="0" |
545 |
+KEYWORDS="~amd64 ~arm ~ppc ~x86" |
546 |
+IUSE="audit debug +demangle +doc gtk perl python slang unwind" |
547 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
548 |
+ |
549 |
+RDEPEND="audit? ( sys-process/audit ) |
550 |
+ demangle? ( sys-devel/binutils ) |
551 |
+ gtk? ( x11-libs/gtk+:2 ) |
552 |
+ perl? ( dev-lang/perl ) |
553 |
+ slang? ( dev-libs/newt ) |
554 |
+ unwind? ( sys-libs/libunwind ) |
555 |
+ dev-libs/elfutils" |
556 |
+DEPEND="${RDEPEND} |
557 |
+ ${LINUX_PATCH+dev-util/patchutils} |
558 |
+ sys-devel/bison |
559 |
+ sys-devel/flex |
560 |
+ doc? ( |
561 |
+ app-text/asciidoc |
562 |
+ app-text/sgml-common |
563 |
+ app-text/xmlto |
564 |
+ sys-process/time |
565 |
+ ) |
566 |
+ python? ( ${PYTHON_DEPS} )" |
567 |
+ |
568 |
+S_K="${WORKDIR}/linux-${LINUX_VER}" |
569 |
+S="${S_K}/tools/perf" |
570 |
+ |
571 |
+CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" |
572 |
+ |
573 |
+pkg_setup() { |
574 |
+ linux-info_pkg_setup |
575 |
+ use python && python-single-r1_pkg_setup |
576 |
+} |
577 |
+ |
578 |
+src_unpack() { |
579 |
+ local paths=( tools/perf tools/scripts tools/include tools/lib include lib "arch/*/include" "arch/*/lib" ) |
580 |
+ |
581 |
+ # We expect the tar implementation to support the -j option (both |
582 |
+ # GNU tar and libarchive's tar support that). |
583 |
+ echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" |
584 |
+ tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ |
585 |
+ "${paths[@]/#/linux-${LINUX_VER}/}" || die |
586 |
+ |
587 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
588 |
+ eshopts_push -o noglob |
589 |
+ ebegin "Filtering partial source patch" |
590 |
+ filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die |
591 |
+ eend $? || die "filterdiff failed" |
592 |
+ eshopts_pop |
593 |
+ fi |
594 |
+ |
595 |
+ local a |
596 |
+ for a in ${A}; do |
597 |
+ [[ ${a} == ${LINUX_SOURCES} ]] && continue |
598 |
+ [[ ${a} == ${LINUX_PATCH} ]] && continue |
599 |
+ unpack ${a} |
600 |
+ done |
601 |
+} |
602 |
+ |
603 |
+src_prepare() { |
604 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
605 |
+ cd "${S_K}" |
606 |
+ epatch "${WORKDIR}"/${P}.patch |
607 |
+ fi |
608 |
+ |
609 |
+ # Drop some upstream too-developer-oriented flags and fix the |
610 |
+ # Makefile in general |
611 |
+ sed -i \ |
612 |
+ -e 's:-Werror::' \ |
613 |
+ -e 's:-ggdb3::' \ |
614 |
+ -e 's:-fstack-protector-all::' \ |
615 |
+ -e 's:^LDFLAGS =:EXTLIBS +=:' \ |
616 |
+ -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ |
617 |
+ -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ |
618 |
+ -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \ |
619 |
+ -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \ |
620 |
+ -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ |
621 |
+ "${S}"/Makefile || die |
622 |
+ sed -i -e 's:-Werror::' "${S_K}"/tools/lib/api/Makefile || die |
623 |
+ sed -i \ |
624 |
+ -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \ |
625 |
+ "${S}"/Makefile \ |
626 |
+ "${S}"/Documentation/Makefile || die |
627 |
+ |
628 |
+ # Avoid the call to make kernelversion |
629 |
+ echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE |
630 |
+ |
631 |
+ # The code likes to compile local assembly files which lack ELF markings. |
632 |
+ find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + |
633 |
+} |
634 |
+ |
635 |
+puse() { usex $1 "" no; } |
636 |
+perf_make() { |
637 |
+ # The arch parsing is a bit funky. The perf tools package is integrated |
638 |
+ # into the kernel, so it wants an ARCH that looks like the kernel arch, |
639 |
+ # but it also wants to know about the split value -- i386/x86_64 vs just |
640 |
+ # x86. We can get that by telling the func to use an older linux version. |
641 |
+ # It's kind of a hack, but not that bad ... |
642 |
+ local arch=$(KV=2.6.23 tc-arch-kernel) |
643 |
+ emake V=1 \ |
644 |
+ CC="$(tc-getCC)" AR="$(tc-getAR)" \ |
645 |
+ prefix="/usr" bindir_relative="bin" \ |
646 |
+ CFLAGS_OPTIMIZE="${CFLAGS}" \ |
647 |
+ LDFLAGS_OPTIMIZE="${LDFLAGS}" \ |
648 |
+ ARCH="${arch}" \ |
649 |
+ NO_DEMANGLE=$(puse demangle) \ |
650 |
+ NO_GTK2=$(puse gtk) \ |
651 |
+ NO_LIBAUDIT=$(puse audit) \ |
652 |
+ NO_LIBPERL=$(puse perl) \ |
653 |
+ NO_LIBPYTHON=$(puse python) \ |
654 |
+ NO_LIBUNWIND=$(puse unwind) \ |
655 |
+ NO_NEWT=$(puse slang) \ |
656 |
+ WERROR=0 \ |
657 |
+ "$@" |
658 |
+} |
659 |
+ |
660 |
+src_compile() { |
661 |
+ perf_make -f Makefile.perf |
662 |
+ use doc && perf_make -C Documentation |
663 |
+} |
664 |
+ |
665 |
+src_test() { |
666 |
+ : |
667 |
+} |
668 |
+ |
669 |
+src_install() { |
670 |
+ perf_make -f Makefile.perf install DESTDIR="${D}" |
671 |
+ |
672 |
+ dodoc CREDITS |
673 |
+ |
674 |
+ dodoc *txt Documentation/*.txt |
675 |
+ if use doc ; then |
676 |
+ dohtml Documentation/*.html |
677 |
+ doman Documentation/*.1 |
678 |
+ fi |
679 |
+} |
680 |
+ |
681 |
+pkg_postinst() { |
682 |
+ if ! use doc ; then |
683 |
+ elog "Without the doc USE flag you won't get any documentation nor man pages." |
684 |
+ elog "And without man pages, you won't get any --help output for perf and its" |
685 |
+ elog "sub-tools." |
686 |
+ fi |
687 |
+} |
688 |
|
689 |
diff --git a/dev-utils/perf/perf-3.8-r1.ebuild b/dev-utils/perf/perf-3.8-r1.ebuild |
690 |
new file mode 100644 |
691 |
index 0000000..1f72038 |
692 |
--- /dev/null |
693 |
+++ b/dev-utils/perf/perf-3.8-r1.ebuild |
694 |
@@ -0,0 +1,170 @@ |
695 |
+# Copyright 1999-2014 Gentoo Foundation |
696 |
+# Distributed under the terms of the GNU General Public License v2 |
697 |
+# $Id$ |
698 |
+ |
699 |
+EAPI="4" |
700 |
+ |
701 |
+PYTHON_DEPEND="python? 2" |
702 |
+inherit versionator eutils toolchain-funcs python linux-info |
703 |
+ |
704 |
+MY_PV="${PV/_/-}" |
705 |
+MY_PV="${MY_PV/-pre/-git}" |
706 |
+ |
707 |
+DESCRIPTION="Userland tools for Linux Performance Counters" |
708 |
+HOMEPAGE="https://perf.wiki.kernel.org/" |
709 |
+ |
710 |
+LINUX_V="${PV:0:1}.x" |
711 |
+if [[ ${PV/_rc} != ${PV} ]] ; then |
712 |
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
713 |
+ PATCH_VERSION=$(get_version_component_range 1-3) |
714 |
+ LINUX_PATCH=patch-${PV//_/-}.bz2 |
715 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} |
716 |
+ mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
717 |
+elif [[ $(get_version_component_count) == 4 ]] ; then |
718 |
+ # stable-release series |
719 |
+ LINUX_VER=$(get_version_component_range 1-3) |
720 |
+ LINUX_PATCH=patch-${PV}.bz2 |
721 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" |
722 |
+else |
723 |
+ LINUX_VER=${PV} |
724 |
+ SRC_URI="" |
725 |
+fi |
726 |
+ |
727 |
+LINUX_SOURCES="linux-${LINUX_VER}.tar.bz2" |
728 |
+SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" |
729 |
+ |
730 |
+LICENSE="GPL-2" |
731 |
+SLOT="0" |
732 |
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" |
733 |
+IUSE="audit +demangle +doc perl python slang unwind" |
734 |
+ |
735 |
+RDEPEND="audit? ( sys-process/audit ) |
736 |
+ demangle? ( sys-devel/binutils ) |
737 |
+ perl? ( dev-lang/perl ) |
738 |
+ slang? ( dev-libs/newt ) |
739 |
+ unwind? ( sys-libs/libunwind ) |
740 |
+ dev-libs/elfutils" |
741 |
+DEPEND="${RDEPEND} |
742 |
+ ${LINUX_PATCH+dev-util/patchutils} |
743 |
+ sys-devel/bison |
744 |
+ sys-devel/flex |
745 |
+ doc? ( |
746 |
+ app-text/asciidoc |
747 |
+ app-text/sgml-common |
748 |
+ app-text/xmlto |
749 |
+ sys-process/time |
750 |
+ )" |
751 |
+ |
752 |
+S_K="${WORKDIR}/linux-${LINUX_VER}" |
753 |
+S="${S_K}/tools/perf" |
754 |
+ |
755 |
+CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" |
756 |
+ |
757 |
+pkg_setup() { |
758 |
+ linux-info_pkg_setup |
759 |
+ use python && python_set_active_version 2 |
760 |
+} |
761 |
+ |
762 |
+src_unpack() { |
763 |
+ local paths=( tools/perf tools/scripts tools/lib include lib "arch/*/include" "arch/*/lib" ) |
764 |
+ |
765 |
+ # We expect the tar implementation to support the -j option (both |
766 |
+ # GNU tar and libarchive's tar support that). |
767 |
+ echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" |
768 |
+ tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ |
769 |
+ "${paths[@]/#/linux-${LINUX_VER}/}" || die |
770 |
+ |
771 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
772 |
+ eshopts_push -o noglob |
773 |
+ ebegin "Filtering partial source patch" |
774 |
+ filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die |
775 |
+ eend $? || die "filterdiff failed" |
776 |
+ eshopts_pop |
777 |
+ fi |
778 |
+ |
779 |
+ local a |
780 |
+ for a in ${A}; do |
781 |
+ [[ ${a} == ${LINUX_SOURCES} ]] && continue |
782 |
+ [[ ${a} == ${LINUX_PATCH} ]] && continue |
783 |
+ unpack ${a} |
784 |
+ done |
785 |
+} |
786 |
+ |
787 |
+src_prepare() { |
788 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
789 |
+ cd "${S_K}" |
790 |
+ epatch "${WORKDIR}"/${P}.patch |
791 |
+ fi |
792 |
+ |
793 |
+ # Drop some upstream too-developer-oriented flags and fix the |
794 |
+ # Makefile in general |
795 |
+ sed -i \ |
796 |
+ -e 's:-Werror::' \ |
797 |
+ -e 's:-ggdb3::' \ |
798 |
+ -e 's:-fstack-protector-all::' \ |
799 |
+ -e 's:^LDFLAGS =:EXTLIBS +=:' \ |
800 |
+ -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ |
801 |
+ -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ |
802 |
+ -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \ |
803 |
+ -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \ |
804 |
+ -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ |
805 |
+ "${S}"/Makefile |
806 |
+ sed -i \ |
807 |
+ -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \ |
808 |
+ "${S}"/Makefile \ |
809 |
+ "${S}"/Documentation/Makefile |
810 |
+ |
811 |
+ # Avoid the call to make kernelversion |
812 |
+ echo "PERF_VERSION = ${MY_PV}" > PERF-VERSION-FILE |
813 |
+ |
814 |
+ # The code likes to compile local assembly files which lack ELF markings. |
815 |
+ find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + |
816 |
+} |
817 |
+ |
818 |
+puse() { usex $1 "" no; } |
819 |
+perf_make() { |
820 |
+ local arch=$(tc-arch) |
821 |
+ [[ "${arch}" == "amd64" ]] && arch="x86_64" |
822 |
+ emake -j1 V=1 \ |
823 |
+ CC="$(tc-getCC)" AR="$(tc-getAR)" \ |
824 |
+ prefix="/usr" bindir_relative="sbin" \ |
825 |
+ CFLAGS_OPTIMIZE="${CFLAGS}" \ |
826 |
+ LDFLAGS_OPTIMIZE="${LDFLAGS}" \ |
827 |
+ ARCH="${arch}" \ |
828 |
+ NO_DEMANGLE=$(puse demangle) \ |
829 |
+ NO_LIBAUDIT=$(puse audit) \ |
830 |
+ NO_LIBPERL=$(puse perl) \ |
831 |
+ NO_LIBPYTHON=$(puse python) \ |
832 |
+ NO_LIBUNWIND=$(puse unwind) \ |
833 |
+ NO_NEWT=$(puse slang) \ |
834 |
+ "$@" |
835 |
+} |
836 |
+ |
837 |
+src_compile() { |
838 |
+ perf_make |
839 |
+ use doc && perf_make -C Documentation |
840 |
+} |
841 |
+ |
842 |
+src_test() { |
843 |
+ : |
844 |
+} |
845 |
+ |
846 |
+src_install() { |
847 |
+ perf_make install DESTDIR="${D}" |
848 |
+ |
849 |
+ dodoc CREDITS |
850 |
+ |
851 |
+ dodoc *txt Documentation/*.txt |
852 |
+ if use doc ; then |
853 |
+ dohtml Documentation/*.html |
854 |
+ doman Documentation/*.1 |
855 |
+ fi |
856 |
+} |
857 |
+ |
858 |
+pkg_postinst() { |
859 |
+ if ! use doc ; then |
860 |
+ elog "Without the doc USE flag you won't get any documentation nor man pages." |
861 |
+ elog "And without man pages, you won't get any --help output for perf and its" |
862 |
+ elog "sub-tools." |
863 |
+ fi |
864 |
+} |
865 |
|
866 |
diff --git a/dev-utils/perf/perf-4.1.5-r1.ebuild b/dev-utils/perf/perf-4.1.5-r1.ebuild |
867 |
new file mode 100644 |
868 |
index 0000000..f502d10 |
869 |
--- /dev/null |
870 |
+++ b/dev-utils/perf/perf-4.1.5-r1.ebuild |
871 |
@@ -0,0 +1,191 @@ |
872 |
+# Copyright 1999-2015 Gentoo Foundation |
873 |
+# Distributed under the terms of the GNU General Public License v2 |
874 |
+# $Id$ |
875 |
+ |
876 |
+EAPI="5" |
877 |
+ |
878 |
+PYTHON_COMPAT=( python2_7 ) |
879 |
+inherit versionator eutils toolchain-funcs python-single-r1 linux-info |
880 |
+ |
881 |
+MY_PV="${PV/_/-}" |
882 |
+MY_PV="${MY_PV/-pre/-git}" |
883 |
+ |
884 |
+DESCRIPTION="Userland tools for Linux Performance Counters" |
885 |
+HOMEPAGE="https://perf.wiki.kernel.org/" |
886 |
+ |
887 |
+LINUX_V="${PV:0:1}.x" |
888 |
+if [[ ${PV} == *_rc* ]] ; then |
889 |
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
890 |
+ PATCH_VERSION=$(get_version_component_range 1-3) |
891 |
+ LINUX_PATCH=patch-${PV//_/-}.xz |
892 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} |
893 |
+ mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
894 |
+else |
895 |
+ VER_COUNT=$(get_version_component_count) |
896 |
+ if [[ ${VER_COUNT} -gt 2 ]] ; then |
897 |
+ # stable-release series |
898 |
+ LINUX_VER=$(get_version_component_range 1-2) |
899 |
+ LINUX_PATCH=patch-${PV}.xz |
900 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" |
901 |
+ else |
902 |
+ LINUX_VER=${PV} |
903 |
+ SRC_URI="" |
904 |
+ fi |
905 |
+fi |
906 |
+ |
907 |
+LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" |
908 |
+SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" |
909 |
+ |
910 |
+LICENSE="GPL-2" |
911 |
+SLOT="0" |
912 |
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86" |
913 |
+IUSE="audit debug +demangle +doc gtk numa perl python slang unwind" |
914 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
915 |
+ |
916 |
+RDEPEND="audit? ( sys-process/audit ) |
917 |
+ demangle? ( sys-devel/binutils:= ) |
918 |
+ gtk? ( x11-libs/gtk+:2 ) |
919 |
+ numa? ( sys-process/numactl ) |
920 |
+ perl? ( dev-lang/perl ) |
921 |
+ slang? ( dev-libs/newt ) |
922 |
+ unwind? ( sys-libs/libunwind ) |
923 |
+ dev-libs/elfutils" |
924 |
+DEPEND="${RDEPEND} |
925 |
+ ${LINUX_PATCH+dev-util/patchutils} |
926 |
+ sys-devel/bison |
927 |
+ sys-devel/flex |
928 |
+ doc? ( |
929 |
+ app-text/asciidoc |
930 |
+ app-text/sgml-common |
931 |
+ app-text/xmlto |
932 |
+ sys-process/time |
933 |
+ ) |
934 |
+ python? ( ${PYTHON_DEPS} )" |
935 |
+ |
936 |
+S_K="${WORKDIR}/linux-${LINUX_VER}" |
937 |
+S="${S_K}/tools/perf" |
938 |
+ |
939 |
+CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" |
940 |
+ |
941 |
+pkg_setup() { |
942 |
+ linux-info_pkg_setup |
943 |
+ use python && python-single-r1_pkg_setup |
944 |
+} |
945 |
+ |
946 |
+src_unpack() { |
947 |
+ local paths=( |
948 |
+ tools/build tools/include tools/lib tools/perf tools/scripts |
949 |
+ include lib "arch/*/include" "arch/*/lib" |
950 |
+ ) |
951 |
+ |
952 |
+ # We expect the tar implementation to support the -j option (both |
953 |
+ # GNU tar and libarchive's tar support that). |
954 |
+ echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" |
955 |
+ tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ |
956 |
+ "${paths[@]/#/linux-${LINUX_VER}/}" || die |
957 |
+ |
958 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
959 |
+ eshopts_push -o noglob |
960 |
+ ebegin "Filtering partial source patch" |
961 |
+ filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ |
962 |
+ > ${P}.patch || die |
963 |
+ eend $? || die "filterdiff failed" |
964 |
+ eshopts_pop |
965 |
+ fi |
966 |
+ |
967 |
+ local a |
968 |
+ for a in ${A}; do |
969 |
+ [[ ${a} == ${LINUX_SOURCES} ]] && continue |
970 |
+ [[ ${a} == ${LINUX_PATCH} ]] && continue |
971 |
+ unpack ${a} |
972 |
+ done |
973 |
+} |
974 |
+ |
975 |
+src_prepare() { |
976 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
977 |
+ cd "${S_K}" |
978 |
+ epatch "${WORKDIR}"/${P}.patch |
979 |
+ fi |
980 |
+ |
981 |
+ epatch "${FILESDIR}"/${P}-prefix.patch |
982 |
+ |
983 |
+ # Drop some upstream too-developer-oriented flags and fix the |
984 |
+ # Makefile in general |
985 |
+ sed -i \ |
986 |
+ -e 's:-Werror::' \ |
987 |
+ -e 's:-ggdb3::' \ |
988 |
+ -e 's:-fstack-protector-all::' \ |
989 |
+ -e 's:^LDFLAGS =:EXTLIBS +=:' \ |
990 |
+ -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ |
991 |
+ -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ |
992 |
+ -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \ |
993 |
+ -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \ |
994 |
+ -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ |
995 |
+ "${S}"/Makefile || die |
996 |
+ sed -i -e 's:-Werror::' "${S_K}"/tools/lib/api/Makefile || die |
997 |
+ sed -i \ |
998 |
+ -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \ |
999 |
+ "${S}"/Makefile \ |
1000 |
+ "${S}"/Documentation/Makefile || die |
1001 |
+ |
1002 |
+ # Avoid the call to make kernelversion |
1003 |
+ echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE |
1004 |
+ |
1005 |
+ # The code likes to compile local assembly files which lack ELF markings. |
1006 |
+ find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + |
1007 |
+} |
1008 |
+ |
1009 |
+puse() { usex $1 "" no; } |
1010 |
+perf_make() { |
1011 |
+ # The arch parsing is a bit funky. The perf tools package is integrated |
1012 |
+ # into the kernel, so it wants an ARCH that looks like the kernel arch, |
1013 |
+ # but it also wants to know about the split value -- i386/x86_64 vs just |
1014 |
+ # x86. We can get that by telling the func to use an older linux version. |
1015 |
+ # It's kind of a hack, but not that bad ... |
1016 |
+ local arch=$(tc-arch-kernel) |
1017 |
+ emake V=1 \ |
1018 |
+ CC="$(tc-getCC)" AR="$(tc-getAR)" \ |
1019 |
+ prefix="/usr" bindir_relative="bin" \ |
1020 |
+ CFLAGS_OPTIMIZE="${CFLAGS}" \ |
1021 |
+ LDFLAGS_OPTIMIZE="${LDFLAGS}" \ |
1022 |
+ ARCH="${arch}" \ |
1023 |
+ NO_DEMANGLE=$(puse demangle) \ |
1024 |
+ NO_GTK2=$(puse gtk) \ |
1025 |
+ NO_LIBAUDIT=$(puse audit) \ |
1026 |
+ NO_LIBPERL=$(puse perl) \ |
1027 |
+ NO_LIBPYTHON=$(puse python) \ |
1028 |
+ NO_LIBUNWIND=$(puse unwind) \ |
1029 |
+ NO_NEWT=$(puse slang) \ |
1030 |
+ NO_LIBNUMA=$(puse numa) \ |
1031 |
+ WERROR=0 \ |
1032 |
+ "$@" |
1033 |
+} |
1034 |
+ |
1035 |
+src_compile() { |
1036 |
+ perf_make -f Makefile.perf |
1037 |
+ use doc && perf_make -C Documentation |
1038 |
+} |
1039 |
+ |
1040 |
+src_test() { |
1041 |
+ : |
1042 |
+} |
1043 |
+ |
1044 |
+src_install() { |
1045 |
+ perf_make -f Makefile.perf install DESTDIR="${D}" |
1046 |
+ |
1047 |
+ dodoc CREDITS |
1048 |
+ |
1049 |
+ dodoc *txt Documentation/*.txt |
1050 |
+ if use doc ; then |
1051 |
+ dohtml Documentation/*.html |
1052 |
+ doman Documentation/*.1 |
1053 |
+ fi |
1054 |
+} |
1055 |
+ |
1056 |
+pkg_postinst() { |
1057 |
+ if ! use doc ; then |
1058 |
+ elog "Without the doc USE flag you won't get any documentation nor man pages." |
1059 |
+ elog "And without man pages, you won't get any --help output for perf and its" |
1060 |
+ elog "sub-tools." |
1061 |
+ fi |
1062 |
+} |
1063 |
|
1064 |
diff --git a/dev-utils/perf/perf-4.4.4.ebuild b/dev-utils/perf/perf-4.4.4.ebuild |
1065 |
new file mode 100644 |
1066 |
index 0000000..18dd89e |
1067 |
--- /dev/null |
1068 |
+++ b/dev-utils/perf/perf-4.4.4.ebuild |
1069 |
@@ -0,0 +1,185 @@ |
1070 |
+# Copyright 1999-2015 Gentoo Foundation |
1071 |
+# Distributed under the terms of the GNU General Public License v2 |
1072 |
+# $Id$ |
1073 |
+ |
1074 |
+EAPI="5" |
1075 |
+ |
1076 |
+PYTHON_COMPAT=( python2_7 ) |
1077 |
+inherit versionator eutils toolchain-funcs python-single-r1 linux-info |
1078 |
+ |
1079 |
+MY_PV="${PV/_/-}" |
1080 |
+MY_PV="${MY_PV/-pre/-git}" |
1081 |
+ |
1082 |
+DESCRIPTION="Userland tools for Linux Performance Counters" |
1083 |
+HOMEPAGE="https://perf.wiki.kernel.org/" |
1084 |
+ |
1085 |
+LINUX_V="${PV:0:1}.x" |
1086 |
+if [[ ${PV} == *_rc* ]] ; then |
1087 |
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
1088 |
+ PATCH_VERSION=$(get_version_component_range 1-3) |
1089 |
+ LINUX_PATCH=patch-${PV//_/-}.xz |
1090 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} |
1091 |
+ mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
1092 |
+else |
1093 |
+ VER_COUNT=$(get_version_component_count) |
1094 |
+ if [[ ${VER_COUNT} -gt 2 ]] ; then |
1095 |
+ # stable-release series |
1096 |
+ LINUX_VER=$(get_version_component_range 1-2) |
1097 |
+ LINUX_PATCH=patch-${PV}.xz |
1098 |
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" |
1099 |
+ else |
1100 |
+ LINUX_VER=${PV} |
1101 |
+ SRC_URI="" |
1102 |
+ fi |
1103 |
+fi |
1104 |
+ |
1105 |
+LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" |
1106 |
+SRC_URI+=" mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" |
1107 |
+ |
1108 |
+LICENSE="GPL-2" |
1109 |
+SLOT="0" |
1110 |
+KEYWORDS="~amd64 ~arm ~ppc ~x86" |
1111 |
+IUSE="audit debug +demangle +doc gtk numa perl python slang unwind" |
1112 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
1113 |
+ |
1114 |
+RDEPEND="audit? ( sys-process/audit ) |
1115 |
+ demangle? ( sys-devel/binutils:= ) |
1116 |
+ gtk? ( x11-libs/gtk+:2 ) |
1117 |
+ numa? ( sys-process/numactl ) |
1118 |
+ perl? ( dev-lang/perl ) |
1119 |
+ slang? ( dev-libs/newt ) |
1120 |
+ unwind? ( sys-libs/libunwind ) |
1121 |
+ dev-libs/elfutils" |
1122 |
+DEPEND="${RDEPEND} |
1123 |
+ >=sys-kernel/linux-headers-4.4 |
1124 |
+ ${LINUX_PATCH+dev-util/patchutils} |
1125 |
+ sys-devel/bison |
1126 |
+ sys-devel/flex |
1127 |
+ doc? ( |
1128 |
+ app-text/asciidoc |
1129 |
+ app-text/sgml-common |
1130 |
+ app-text/xmlto |
1131 |
+ sys-process/time |
1132 |
+ ) |
1133 |
+ python? ( ${PYTHON_DEPS} )" |
1134 |
+ |
1135 |
+S_K="${WORKDIR}/linux-${LINUX_VER}" |
1136 |
+S="${S_K}/tools/perf" |
1137 |
+ |
1138 |
+CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" |
1139 |
+ |
1140 |
+pkg_setup() { |
1141 |
+ linux-info_pkg_setup |
1142 |
+ use python && python-single-r1_pkg_setup |
1143 |
+} |
1144 |
+ |
1145 |
+src_unpack() { |
1146 |
+ local paths=( |
1147 |
+ tools/arch tools/build tools/include tools/lib tools/perf tools/scripts |
1148 |
+ include lib "arch/*/lib" |
1149 |
+ ) |
1150 |
+ |
1151 |
+ # We expect the tar implementation to support the -j option (both |
1152 |
+ # GNU tar and libarchive's tar support that). |
1153 |
+ echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" |
1154 |
+ tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ |
1155 |
+ "${paths[@]/#/linux-${LINUX_VER}/}" || die |
1156 |
+ |
1157 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
1158 |
+ eshopts_push -o noglob |
1159 |
+ ebegin "Filtering partial source patch" |
1160 |
+ filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ |
1161 |
+ > ${P}.patch || die |
1162 |
+ eend $? || die "filterdiff failed" |
1163 |
+ eshopts_pop |
1164 |
+ fi |
1165 |
+ |
1166 |
+ local a |
1167 |
+ for a in ${A}; do |
1168 |
+ [[ ${a} == ${LINUX_SOURCES} ]] && continue |
1169 |
+ [[ ${a} == ${LINUX_PATCH} ]] && continue |
1170 |
+ unpack ${a} |
1171 |
+ done |
1172 |
+} |
1173 |
+ |
1174 |
+src_prepare() { |
1175 |
+ if [[ -n ${LINUX_PATCH} ]] ; then |
1176 |
+ cd "${S_K}" |
1177 |
+ epatch "${WORKDIR}"/${P}.patch |
1178 |
+ fi |
1179 |
+ |
1180 |
+ # Drop some upstream too-developer-oriented flags and fix the |
1181 |
+ # Makefile in general |
1182 |
+ sed -i \ |
1183 |
+ -e 's:-Werror::' \ |
1184 |
+ -e 's:-ggdb3::' \ |
1185 |
+ -e 's:-fstack-protector-all::' \ |
1186 |
+ -e 's:^LDFLAGS =:EXTLIBS +=:' \ |
1187 |
+ -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ |
1188 |
+ -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ |
1189 |
+ "${S}"/config/Makefile || die |
1190 |
+ sed -i \ |
1191 |
+ -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ |
1192 |
+ "${S}"/Makefile.perf || die |
1193 |
+ sed -i -e 's:-Werror::' "${S_K}"/tools/lib/api/Makefile || die |
1194 |
+ |
1195 |
+ # Avoid the call to make kernelversion |
1196 |
+ echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE |
1197 |
+ |
1198 |
+ # The code likes to compile local assembly files which lack ELF markings. |
1199 |
+ find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + |
1200 |
+} |
1201 |
+ |
1202 |
+puse() { usex $1 "" no; } |
1203 |
+perf_make() { |
1204 |
+ # The arch parsing is a bit funky. The perf tools package is integrated |
1205 |
+ # into the kernel, so it wants an ARCH that looks like the kernel arch, |
1206 |
+ # but it also wants to know about the split value -- i386/x86_64 vs just |
1207 |
+ # x86. We can get that by telling the func to use an older linux version. |
1208 |
+ # It's kind of a hack, but not that bad ... |
1209 |
+ local arch=$(tc-arch-kernel) |
1210 |
+ emake V=1 \ |
1211 |
+ CC="$(tc-getCC)" AR="$(tc-getAR)" LD="$(tc-getLD)" \ |
1212 |
+ prefix="/usr" bindir_relative="bin" \ |
1213 |
+ EXTRA_CFLAGS="${CFLAGS}" \ |
1214 |
+ ARCH="${arch}" \ |
1215 |
+ NO_DEMANGLE=$(puse demangle) \ |
1216 |
+ NO_GTK2=$(puse gtk) \ |
1217 |
+ NO_LIBAUDIT=$(puse audit) \ |
1218 |
+ NO_LIBPERL=$(puse perl) \ |
1219 |
+ NO_LIBPYTHON=$(puse python) \ |
1220 |
+ NO_LIBUNWIND=$(puse unwind) \ |
1221 |
+ NO_NEWT=$(puse slang) \ |
1222 |
+ NO_LIBNUMA=$(puse numa) \ |
1223 |
+ WERROR=0 \ |
1224 |
+ "$@" |
1225 |
+} |
1226 |
+ |
1227 |
+src_compile() { |
1228 |
+ perf_make -f Makefile.perf |
1229 |
+ use doc && perf_make -C Documentation |
1230 |
+} |
1231 |
+ |
1232 |
+src_test() { |
1233 |
+ : |
1234 |
+} |
1235 |
+ |
1236 |
+src_install() { |
1237 |
+ perf_make -f Makefile.perf install DESTDIR="${D}" |
1238 |
+ |
1239 |
+ dodoc CREDITS |
1240 |
+ |
1241 |
+ dodoc *txt Documentation/*.txt |
1242 |
+ if use doc ; then |
1243 |
+ dohtml Documentation/*.html |
1244 |
+ doman Documentation/*.1 |
1245 |
+ fi |
1246 |
+} |
1247 |
+ |
1248 |
+pkg_postinst() { |
1249 |
+ if ! use doc ; then |
1250 |
+ elog "Without the doc USE flag you won't get any documentation nor man pages." |
1251 |
+ elog "And without man pages, you won't get any --help output for perf and its" |
1252 |
+ elog "sub-tools." |
1253 |
+ fi |
1254 |
+} |