1 |
commit: 8673d705805b0698007cb9fd46edf7ab9726056b |
2 |
Author: Guilherme Amadio <amadio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 30 09:00:31 2021 +0000 |
4 |
Commit: Guilherme Amadio <amadio <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 30 09:00:50 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8673d705 |
7 |
|
8 |
dev-util/perf: drop old |
9 |
|
10 |
Keep 5.8 as it's the last version to support alpha. |
11 |
|
12 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
13 |
Signed-off-by: Guilherme Amadio <amadio <AT> gentoo.org> |
14 |
|
15 |
dev-util/perf/Manifest | 4 - |
16 |
dev-util/perf/perf-5.10.16.ebuild | 252 -------------------------------------- |
17 |
dev-util/perf/perf-5.9.9.ebuild | 252 -------------------------------------- |
18 |
3 files changed, 508 deletions(-) |
19 |
|
20 |
diff --git a/dev-util/perf/Manifest b/dev-util/perf/Manifest |
21 |
index f52fc704996..c1956dcd550 100644 |
22 |
--- a/dev-util/perf/Manifest |
23 |
+++ b/dev-util/perf/Manifest |
24 |
@@ -1,7 +1,3 @@ |
25 |
-DIST linux-5.10.tar.xz 116606704 BLAKE2B b923d7b66309224f42f35f8a5fa219421b0a9362d2adacdadd8d96251f61f7230878ea297a269a7f3b3c56830f0b177e068691e1d7f88501a05653b0a13274d1 SHA512 95bc137d0cf9148da6a9d1f1a878698dc27b40f68e22c597544010a6c591ce1b256f083489d3ff45ff77753289b535135590194d88ef9f007d0ddab3d74de70e |
26 |
DIST linux-5.11.tar.xz 117619104 BLAKE2B 81300c27bd5476387a83123aaeb4163c73eb61e9245806c23660cb5e6a4fa88ffc9def027031335fa0270fc4080506cd415990014364e3a98b9d2e8c58a29524 SHA512 a567ec133018bb5ec00c60281479b466c26e02137a93a9c690e83997947df02b6fd94e76e8df748f6d70ceb58a19bacc3b1467de10b7a1fad2763db32b3f1330 |
27 |
DIST linux-5.12.tar.xz 118112412 BLAKE2B 842d921b9a73d2aaade763dbd2ec67bdfe0275baa6d628b775f5c87574ad7dc86f0419afcd48c10c1235f4bffa16084243f2cf4556e6afcd391e975fe8ba530b SHA512 be03b6fee1d1ea8087b09874d27c0a602c0b04fd90ad38b975bd2c8455a07e83c29b56814aaf1389e82305fae0e4c2d1701075a7f0a7295dd28149f967ec5b3d |
28 |
DIST linux-5.8.tar.xz 114459324 BLAKE2B 7bd97f8fa4527840754434414c07283e89731dc8ebb1e95fa5bc1469a60af1122582c0d3b6e262e77882f023190068df3537bd8b65964b3caa820bb2c8e579c7 SHA512 45a53ecf351096ef6e98242cca4228b8da9b9139ecc6963695791ea6fb7a9484a4e1c19dcca7ce7cbfdfa49de0451b70973bb078f12bdae9cbaddbc3f8092556 |
29 |
-DIST linux-5.9.tar.xz 115507140 BLAKE2B e8d11472d63a9f8409ca12a2e8c97c6963a3d4516b5a398b627d6ece565584526f9b5a1377a2fa4bd184c09c7db94c987428bc5d52df0c788464a67e9e8d6dcb SHA512 d3d92ce4246bad74c9a784212f160d98449b1e8793970c2c308276568d852b8effe0528686bdb87d55d691f09a826abf7938d69bdd4759ce65ddd5c05ffe4eca |
30 |
-DIST patch-5.10.16.xz 498880 BLAKE2B 14061b505285f24938fb955ccc7f9fbd78ccc0b1026bffb17a89fdad08ea54bfee7bbb841123d9af4d0720a960a27c649c39852af7e2be8a286af926c7bce9c0 SHA512 be9cfe1ae6697956ca7476cedc212a8cbd9da2c3c72096a89afaaf73c5b6655fd04d458f96c472f680c5513c0ea3e4449c4092a958425b6040f0c7774453cd2f |
31 |
-DIST patch-5.9.9.xz 502816 BLAKE2B 104fa2ecaac3c543662b891de22cb881a917320317d58dcaeb6b6826e3f0296126ab5177cc7a44a438c15d3ae9cab116ff6926cce9d5e4d310df99fca0d9b909 SHA512 87852bc4d08cd5e82c7de9a8c8d50c1b4c67eed7157bfe1034d279370ff21a194f082f126d49812f84ec726100c5d97b3d908994e92c2cbfd231a4ac851babe3 |
32 |
|
33 |
diff --git a/dev-util/perf/perf-5.10.16.ebuild b/dev-util/perf/perf-5.10.16.ebuild |
34 |
deleted file mode 100644 |
35 |
index 5bcbb7413e9..00000000000 |
36 |
--- a/dev-util/perf/perf-5.10.16.ebuild |
37 |
+++ /dev/null |
38 |
@@ -1,252 +0,0 @@ |
39 |
-# Copyright 1999-2021 Gentoo Authors |
40 |
-# Distributed under the terms of the GNU General Public License v2 |
41 |
- |
42 |
-EAPI=7 |
43 |
- |
44 |
-PYTHON_COMPAT=( python3_{7,8} ) |
45 |
-inherit bash-completion-r1 estack llvm toolchain-funcs prefix python-r1 linux-info |
46 |
- |
47 |
-DESCRIPTION="Userland tools for Linux Performance Counters" |
48 |
-HOMEPAGE="https://perf.wiki.kernel.org/" |
49 |
- |
50 |
-LINUX_V="${PV:0:1}.x" |
51 |
-if [[ ${PV} == *_rc* ]] ; then |
52 |
- LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1)) |
53 |
- PATCH_VERSION=$(ver_cut 1-3) |
54 |
- LINUX_PATCH=patch-${PV//_/-}.xz |
55 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} |
56 |
- https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
57 |
-elif [[ ${PV} == *.*.* ]] ; then |
58 |
- # stable-release series |
59 |
- LINUX_VER=$(ver_cut 1-2) |
60 |
- LINUX_PATCH=patch-${PV}.xz |
61 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" |
62 |
-else |
63 |
- LINUX_VER=${PV} |
64 |
- SRC_URI="" |
65 |
-fi |
66 |
- |
67 |
-LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" |
68 |
-SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" |
69 |
- |
70 |
-LICENSE="GPL-2" |
71 |
-SLOT="0" |
72 |
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
73 |
-IUSE="audit clang crypt debug +demangle +doc gtk java libpfm lzma numa perl python slang systemtap unwind zlib" |
74 |
-# TODO babeltrace |
75 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
76 |
- |
77 |
-BDEPEND=" |
78 |
- ${LINUX_PATCH+dev-util/patchutils} |
79 |
- sys-devel/bison |
80 |
- sys-devel/flex |
81 |
- virtual/pkgconfig |
82 |
- doc? ( |
83 |
- app-text/asciidoc |
84 |
- app-text/sgml-common |
85 |
- app-text/xmlto |
86 |
- sys-process/time |
87 |
- )" |
88 |
- |
89 |
-RDEPEND="audit? ( sys-process/audit ) |
90 |
- crypt? ( dev-libs/openssl:0= ) |
91 |
- clang? ( |
92 |
- <sys-devel/clang-10:* |
93 |
- <sys-devel/llvm-10:* |
94 |
- ) |
95 |
- demangle? ( sys-libs/binutils-libs:= ) |
96 |
- gtk? ( x11-libs/gtk+:2 ) |
97 |
- java? ( virtual/jre:* ) |
98 |
- libpfm? ( dev-libs/libpfm ) |
99 |
- lzma? ( app-arch/xz-utils ) |
100 |
- numa? ( sys-process/numactl ) |
101 |
- perl? ( dev-lang/perl:= ) |
102 |
- python? ( ${PYTHON_DEPS} ) |
103 |
- slang? ( sys-libs/slang ) |
104 |
- systemtap? ( dev-util/systemtap ) |
105 |
- unwind? ( sys-libs/libunwind ) |
106 |
- zlib? ( sys-libs/zlib ) |
107 |
- dev-libs/elfutils" |
108 |
- |
109 |
-DEPEND="${RDEPEND} |
110 |
- >=sys-kernel/linux-headers-4.19 |
111 |
- java? ( virtual/jdk ) |
112 |
-" |
113 |
- |
114 |
-S_K="${WORKDIR}/linux-${LINUX_VER}" |
115 |
-S="${S_K}/tools/perf" |
116 |
- |
117 |
-CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" |
118 |
- |
119 |
-pkg_pretend() { |
120 |
- if ! use doc ; then |
121 |
- ewarn "Without the doc USE flag you won't get any documentation nor man pages." |
122 |
- ewarn "And without man pages, you won't get any --help output for perf and its" |
123 |
- ewarn "sub-tools." |
124 |
- fi |
125 |
-} |
126 |
- |
127 |
-pkg_setup() { |
128 |
- use clang && LLVM_MAX_SLOT=9 llvm_pkg_setup |
129 |
-} |
130 |
- |
131 |
-src_unpack() { |
132 |
- local paths=( |
133 |
- tools/arch tools/build tools/include tools/lib tools/perf tools/scripts |
134 |
- scripts include lib "arch/*/lib" |
135 |
- ) |
136 |
- |
137 |
- # We expect the tar implementation to support the -j option (both |
138 |
- # GNU tar and libarchive's tar support that). |
139 |
- echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" |
140 |
- tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ |
141 |
- "${paths[@]/#/linux-${LINUX_VER}/}" || die |
142 |
- |
143 |
- if [[ -n ${LINUX_PATCH} ]] ; then |
144 |
- eshopts_push -o noglob |
145 |
- ebegin "Filtering partial source patch" |
146 |
- filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ |
147 |
- > ${P}.patch |
148 |
- eend $? || die "filterdiff failed" |
149 |
- eshopts_pop |
150 |
- fi |
151 |
- |
152 |
- local a |
153 |
- for a in ${A}; do |
154 |
- [[ ${a} == ${LINUX_SOURCES} ]] && continue |
155 |
- [[ ${a} == ${LINUX_PATCH} ]] && continue |
156 |
- unpack ${a} |
157 |
- done |
158 |
-} |
159 |
- |
160 |
-src_prepare() { |
161 |
- default |
162 |
- if [[ -n ${LINUX_PATCH} ]] ; then |
163 |
- pushd "${S_K}" >/dev/null || die |
164 |
- eapply "${WORKDIR}"/${P}.patch |
165 |
- popd || die |
166 |
- fi |
167 |
- |
168 |
- # Drop some upstream too-developer-oriented flags and fix the |
169 |
- # Makefile in general |
170 |
- sed -i \ |
171 |
- -e "s:\$(sysconfdir_SQ)/bash_completion.d:$(get_bashcompdir):" \ |
172 |
- "${S}"/Makefile.perf || die |
173 |
- # A few places still use -Werror w/out $(WERROR) protection. |
174 |
- sed -i -e 's:-Werror::' \ |
175 |
- "${S}"/Makefile.perf "${S_K}"/tools/lib/bpf/Makefile || die |
176 |
- |
177 |
- # Avoid the call to make kernelversion |
178 |
- sed -i -e '/PERF-VERSION-GEN/d' Makefile.perf || die |
179 |
- echo "#define PERF_VERSION \"${PV}\"" > PERF-VERSION-FILE |
180 |
- |
181 |
- # The code likes to compile local assembly files which lack ELF markings. |
182 |
- find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + |
183 |
- |
184 |
- # Fix shebang to use python from prefix |
185 |
- if [[ -n "${EPREFIX}" ]]; then |
186 |
- hprefixify ${S_K}/scripts/bpf_helpers_doc.py |
187 |
- fi |
188 |
-} |
189 |
- |
190 |
-puse() { usex $1 "" no; } |
191 |
-perf_make() { |
192 |
- # The arch parsing is a bit funky. The perf tools package is integrated |
193 |
- # into the kernel, so it wants an ARCH that looks like the kernel arch, |
194 |
- # but it also wants to know about the split value -- i386/x86_64 vs just |
195 |
- # x86. We can get that by telling the func to use an older linux version. |
196 |
- # It's kind of a hack, but not that bad ... |
197 |
- |
198 |
- # LIBDIR sets a search path of perf-gtk.so. Bug 515954 |
199 |
- |
200 |
- local arch=$(tc-arch-kernel) |
201 |
- local java_dir |
202 |
- use java && java_dir="${EPREFIX}/etc/java-config-2/current-system-vm" |
203 |
- # FIXME: NO_CORESIGHT |
204 |
- # FIXME: NO_LIBBABELTRACE |
205 |
- emake V=1 VF=1 \ |
206 |
- HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \ |
207 |
- CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="$(tc-getLD)" NM="$(tc-getNM)" \ |
208 |
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
209 |
- prefix="${EPREFIX}/usr" bindir_relative="bin" \ |
210 |
- tipdir="share/doc/${PF}" \ |
211 |
- EXTRA_CFLAGS="${CFLAGS}" \ |
212 |
- ARCH="${arch}" \ |
213 |
- JDIR="${java_dir}" \ |
214 |
- LIBCLANGLLVM=$(usex clang 1 "") \ |
215 |
- LIBPFM4=$(usex libpfm 1 "") \ |
216 |
- NO_AUXTRACE="" \ |
217 |
- NO_BACKTRACE="" \ |
218 |
- NO_CORESIGHT=1 \ |
219 |
- NO_DEMANGLE=$(puse demangle) \ |
220 |
- GTK2=$(usex gtk 1 "") \ |
221 |
- feature-gtk2-infobar=$(usex gtk 1 "") \ |
222 |
- NO_JVMTI=$(puse java) \ |
223 |
- NO_LIBAUDIT=$(puse audit) \ |
224 |
- NO_LIBBABELTRACE=1 \ |
225 |
- NO_LIBBIONIC=1 \ |
226 |
- NO_LIBBPF= \ |
227 |
- NO_LIBCRYPTO=$(puse crypt) \ |
228 |
- NO_LIBDW_DWARF_UNWIND= \ |
229 |
- NO_LIBELF= \ |
230 |
- NO_LIBNUMA=$(puse numa) \ |
231 |
- NO_LIBPERL=$(puse perl) \ |
232 |
- NO_LIBPYTHON=$(puse python) \ |
233 |
- NO_LIBUNWIND=$(puse unwind) \ |
234 |
- NO_SDT=$(puse systemtap) \ |
235 |
- NO_SLANG=$(puse slang) \ |
236 |
- NO_LZMA=$(puse lzma) \ |
237 |
- NO_ZLIB= \ |
238 |
- WERROR=0 \ |
239 |
- LIBDIR="/usr/libexec/perf-core" \ |
240 |
- libdir="${EPREFIX}/usr/$(get_libdir)" \ |
241 |
- "$@" |
242 |
-} |
243 |
- |
244 |
-src_compile() { |
245 |
- # test-clang.bin not build with g++ |
246 |
- if use clang; then |
247 |
- pushd "${S_K}/tools/build/feature/" || die |
248 |
- make V=1 CXX=${CHOST}-clang++ test-clang.bin || die |
249 |
- popd |
250 |
- fi |
251 |
- perf_make -f Makefile.perf |
252 |
- use doc && perf_make -C Documentation |
253 |
-} |
254 |
- |
255 |
-src_test() { |
256 |
- : |
257 |
-} |
258 |
- |
259 |
-src_install() { |
260 |
- _install_python_ext() { |
261 |
- perf_make -f Makefile.perf install-python_ext DESTDIR="${D}" |
262 |
- } |
263 |
- |
264 |
- perf_make -f Makefile.perf install DESTDIR="${D}" |
265 |
- |
266 |
- if use python; then |
267 |
- python_foreach_impl _install_python_ext |
268 |
- fi |
269 |
- |
270 |
- if use gtk; then |
271 |
- local libdir |
272 |
- libdir="$(get_libdir)" |
273 |
- # on some arches it ends up in lib even on 64bit, ppc64 for instance. |
274 |
- [[ -f "${ED}"/usr/lib/libperf-gtk.so ]] && libdir="lib" |
275 |
- mv "${ED}"/usr/${libdir}/libperf-gtk.so \ |
276 |
- "${ED}"/usr/libexec/perf-core || die |
277 |
- fi |
278 |
- |
279 |
- dodoc CREDITS |
280 |
- |
281 |
- dodoc *txt Documentation/*.txt |
282 |
- |
283 |
- # perf needs this decompressed to print out tips for users |
284 |
- docompress -x /usr/share/doc/${PF}/tips.txt |
285 |
- |
286 |
- if use doc ; then |
287 |
- HTML_DOCS="Documentation/*.html" einstalldocs |
288 |
- doman Documentation/*.1 |
289 |
- fi |
290 |
-} |
291 |
|
292 |
diff --git a/dev-util/perf/perf-5.9.9.ebuild b/dev-util/perf/perf-5.9.9.ebuild |
293 |
deleted file mode 100644 |
294 |
index ade70b6a2fe..00000000000 |
295 |
--- a/dev-util/perf/perf-5.9.9.ebuild |
296 |
+++ /dev/null |
297 |
@@ -1,252 +0,0 @@ |
298 |
-# Copyright 1999-2021 Gentoo Authors |
299 |
-# Distributed under the terms of the GNU General Public License v2 |
300 |
- |
301 |
-EAPI=7 |
302 |
- |
303 |
-PYTHON_COMPAT=( python3_{7,8} ) |
304 |
-inherit bash-completion-r1 estack llvm toolchain-funcs prefix python-r1 linux-info |
305 |
- |
306 |
-DESCRIPTION="Userland tools for Linux Performance Counters" |
307 |
-HOMEPAGE="https://perf.wiki.kernel.org/" |
308 |
- |
309 |
-LINUX_V="${PV:0:1}.x" |
310 |
-if [[ ${PV} == *_rc* ]] ; then |
311 |
- LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1)) |
312 |
- PATCH_VERSION=$(ver_cut 1-3) |
313 |
- LINUX_PATCH=patch-${PV//_/-}.xz |
314 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} |
315 |
- https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
316 |
-elif [[ ${PV} == *.*.* ]] ; then |
317 |
- # stable-release series |
318 |
- LINUX_VER=$(ver_cut 1-2) |
319 |
- LINUX_PATCH=patch-${PV}.xz |
320 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" |
321 |
-else |
322 |
- LINUX_VER=${PV} |
323 |
- SRC_URI="" |
324 |
-fi |
325 |
- |
326 |
-LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" |
327 |
-SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" |
328 |
- |
329 |
-LICENSE="GPL-2" |
330 |
-SLOT="0" |
331 |
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
332 |
-IUSE="audit clang crypt debug +demangle +doc gtk java libpfm lzma numa perl python slang systemtap unwind zlib" |
333 |
-# TODO babeltrace |
334 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
335 |
- |
336 |
-BDEPEND=" |
337 |
- ${LINUX_PATCH+dev-util/patchutils} |
338 |
- sys-devel/bison |
339 |
- sys-devel/flex |
340 |
- virtual/pkgconfig |
341 |
- doc? ( |
342 |
- app-text/asciidoc |
343 |
- app-text/sgml-common |
344 |
- app-text/xmlto |
345 |
- sys-process/time |
346 |
- )" |
347 |
- |
348 |
-RDEPEND="audit? ( sys-process/audit ) |
349 |
- crypt? ( dev-libs/openssl:0= ) |
350 |
- clang? ( |
351 |
- <sys-devel/clang-10:* |
352 |
- <sys-devel/llvm-10:* |
353 |
- ) |
354 |
- demangle? ( sys-libs/binutils-libs:= ) |
355 |
- gtk? ( x11-libs/gtk+:2 ) |
356 |
- java? ( virtual/jre:* ) |
357 |
- libpfm? ( dev-libs/libpfm ) |
358 |
- lzma? ( app-arch/xz-utils ) |
359 |
- numa? ( sys-process/numactl ) |
360 |
- perl? ( dev-lang/perl:= ) |
361 |
- python? ( ${PYTHON_DEPS} ) |
362 |
- slang? ( sys-libs/slang ) |
363 |
- systemtap? ( dev-util/systemtap ) |
364 |
- unwind? ( sys-libs/libunwind ) |
365 |
- zlib? ( sys-libs/zlib ) |
366 |
- dev-libs/elfutils" |
367 |
- |
368 |
-DEPEND="${RDEPEND} |
369 |
- >=sys-kernel/linux-headers-4.19 |
370 |
- java? ( virtual/jdk ) |
371 |
-" |
372 |
- |
373 |
-S_K="${WORKDIR}/linux-${LINUX_VER}" |
374 |
-S="${S_K}/tools/perf" |
375 |
- |
376 |
-CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" |
377 |
- |
378 |
-pkg_pretend() { |
379 |
- if ! use doc ; then |
380 |
- ewarn "Without the doc USE flag you won't get any documentation nor man pages." |
381 |
- ewarn "And without man pages, you won't get any --help output for perf and its" |
382 |
- ewarn "sub-tools." |
383 |
- fi |
384 |
-} |
385 |
- |
386 |
-pkg_setup() { |
387 |
- use clang && LLVM_MAX_SLOT=9 llvm_pkg_setup |
388 |
-} |
389 |
- |
390 |
-src_unpack() { |
391 |
- local paths=( |
392 |
- tools/arch tools/build tools/include tools/lib tools/perf tools/scripts |
393 |
- scripts include lib "arch/*/lib" |
394 |
- ) |
395 |
- |
396 |
- # We expect the tar implementation to support the -j option (both |
397 |
- # GNU tar and libarchive's tar support that). |
398 |
- echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" |
399 |
- tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ |
400 |
- "${paths[@]/#/linux-${LINUX_VER}/}" || die |
401 |
- |
402 |
- if [[ -n ${LINUX_PATCH} ]] ; then |
403 |
- eshopts_push -o noglob |
404 |
- ebegin "Filtering partial source patch" |
405 |
- filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ |
406 |
- > ${P}.patch |
407 |
- eend $? || die "filterdiff failed" |
408 |
- eshopts_pop |
409 |
- fi |
410 |
- |
411 |
- local a |
412 |
- for a in ${A}; do |
413 |
- [[ ${a} == ${LINUX_SOURCES} ]] && continue |
414 |
- [[ ${a} == ${LINUX_PATCH} ]] && continue |
415 |
- unpack ${a} |
416 |
- done |
417 |
-} |
418 |
- |
419 |
-src_prepare() { |
420 |
- default |
421 |
- if [[ -n ${LINUX_PATCH} ]] ; then |
422 |
- pushd "${S_K}" >/dev/null || die |
423 |
- eapply "${WORKDIR}"/${P}.patch |
424 |
- popd || die |
425 |
- fi |
426 |
- |
427 |
- # Drop some upstream too-developer-oriented flags and fix the |
428 |
- # Makefile in general |
429 |
- sed -i \ |
430 |
- -e "s:\$(sysconfdir_SQ)/bash_completion.d:$(get_bashcompdir):" \ |
431 |
- "${S}"/Makefile.perf || die |
432 |
- # A few places still use -Werror w/out $(WERROR) protection. |
433 |
- sed -i -e 's:-Werror::' \ |
434 |
- "${S}"/Makefile.perf "${S_K}"/tools/lib/bpf/Makefile || die |
435 |
- |
436 |
- # Avoid the call to make kernelversion |
437 |
- sed -i -e '/PERF-VERSION-GEN/d' Makefile.perf || die |
438 |
- echo "#define PERF_VERSION \"${PV}\"" > PERF-VERSION-FILE |
439 |
- |
440 |
- # The code likes to compile local assembly files which lack ELF markings. |
441 |
- find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + |
442 |
- |
443 |
- # Fix shebang to use python from prefix |
444 |
- if [[ -n "${EPREFIX}" ]]; then |
445 |
- hprefixify ${S_K}/scripts/bpf_helpers_doc.py |
446 |
- fi |
447 |
-} |
448 |
- |
449 |
-puse() { usex $1 "" no; } |
450 |
-perf_make() { |
451 |
- # The arch parsing is a bit funky. The perf tools package is integrated |
452 |
- # into the kernel, so it wants an ARCH that looks like the kernel arch, |
453 |
- # but it also wants to know about the split value -- i386/x86_64 vs just |
454 |
- # x86. We can get that by telling the func to use an older linux version. |
455 |
- # It's kind of a hack, but not that bad ... |
456 |
- |
457 |
- # LIBDIR sets a search path of perf-gtk.so. Bug 515954 |
458 |
- |
459 |
- local arch=$(tc-arch-kernel) |
460 |
- local java_dir |
461 |
- use java && java_dir="${EPREFIX}/etc/java-config-2/current-system-vm" |
462 |
- # FIXME: NO_CORESIGHT |
463 |
- # FIXME: NO_LIBBABELTRACE |
464 |
- emake V=1 VF=1 \ |
465 |
- HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \ |
466 |
- CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="$(tc-getLD)" NM="$(tc-getNM)" \ |
467 |
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
468 |
- prefix="${EPREFIX}/usr" bindir_relative="bin" \ |
469 |
- tipdir="share/doc/${PF}" \ |
470 |
- EXTRA_CFLAGS="${CFLAGS}" \ |
471 |
- ARCH="${arch}" \ |
472 |
- JDIR="${java_dir}" \ |
473 |
- LIBCLANGLLVM=$(usex clang 1 "") \ |
474 |
- LIBPFM4=$(usex libpfm 1 "") \ |
475 |
- NO_AUXTRACE="" \ |
476 |
- NO_BACKTRACE="" \ |
477 |
- NO_CORESIGHT=1 \ |
478 |
- NO_DEMANGLE=$(puse demangle) \ |
479 |
- NO_GTK2=$(puse gtk) \ |
480 |
- feature-gtk2-infobar=$(usex gtk 1 "") \ |
481 |
- NO_JVMTI=$(puse java) \ |
482 |
- NO_LIBAUDIT=$(puse audit) \ |
483 |
- NO_LIBBABELTRACE=1 \ |
484 |
- NO_LIBBIONIC=1 \ |
485 |
- NO_LIBBPF= \ |
486 |
- NO_LIBCRYPTO=$(puse crypt) \ |
487 |
- NO_LIBDW_DWARF_UNWIND= \ |
488 |
- NO_LIBELF= \ |
489 |
- NO_LIBNUMA=$(puse numa) \ |
490 |
- NO_LIBPERL=$(puse perl) \ |
491 |
- NO_LIBPYTHON=$(puse python) \ |
492 |
- NO_LIBUNWIND=$(puse unwind) \ |
493 |
- NO_SDT=$(puse systemtap) \ |
494 |
- NO_SLANG=$(puse slang) \ |
495 |
- NO_LZMA=$(puse lzma) \ |
496 |
- NO_ZLIB= \ |
497 |
- WERROR=0 \ |
498 |
- LIBDIR="/usr/libexec/perf-core" \ |
499 |
- libdir="${EPREFIX}/usr/$(get_libdir)" \ |
500 |
- "$@" |
501 |
-} |
502 |
- |
503 |
-src_compile() { |
504 |
- # test-clang.bin not build with g++ |
505 |
- if use clang; then |
506 |
- pushd "${S_K}/tools/build/feature/" || die |
507 |
- make V=1 CXX=${CHOST}-clang++ test-clang.bin || die |
508 |
- popd |
509 |
- fi |
510 |
- perf_make -f Makefile.perf |
511 |
- use doc && perf_make -C Documentation |
512 |
-} |
513 |
- |
514 |
-src_test() { |
515 |
- : |
516 |
-} |
517 |
- |
518 |
-src_install() { |
519 |
- _install_python_ext() { |
520 |
- perf_make -f Makefile.perf install-python_ext DESTDIR="${D}" |
521 |
- } |
522 |
- |
523 |
- perf_make -f Makefile.perf install DESTDIR="${D}" |
524 |
- |
525 |
- if use python; then |
526 |
- python_foreach_impl _install_python_ext |
527 |
- fi |
528 |
- |
529 |
- if use gtk; then |
530 |
- local libdir |
531 |
- libdir="$(get_libdir)" |
532 |
- # on some arches it ends up in lib even on 64bit, ppc64 for instance. |
533 |
- [[ -f "${ED}"/usr/lib/libperf-gtk.so ]] && libdir="lib" |
534 |
- mv "${ED}"/usr/${libdir}/libperf-gtk.so \ |
535 |
- "${ED}"/usr/libexec/perf-core || die |
536 |
- fi |
537 |
- |
538 |
- dodoc CREDITS |
539 |
- |
540 |
- dodoc *txt Documentation/*.txt |
541 |
- |
542 |
- # perf needs this decompressed to print out tips for users |
543 |
- docompress -x /usr/share/doc/${PF}/tips.txt |
544 |
- |
545 |
- if use doc ; then |
546 |
- HTML_DOCS="Documentation/*.html" einstalldocs |
547 |
- doman Documentation/*.1 |
548 |
- fi |
549 |
-} |