Gentoo Archives: gentoo-commits

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