Gentoo Archives: gentoo-commits

From: Guilherme Amadio <amadio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/perf/
Date: Tue, 31 May 2022 15:36:17
Message-Id: 1654011317.242122bac22ac2413031d74623afbdfb1b13ea50.amadio@gentoo
1 commit: 242122bac22ac2413031d74623afbdfb1b13ea50
2 Author: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 31 15:35:17 2022 +0000
4 Commit: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 15:35:17 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=242122ba
7
8 dev-util/perf: drop old 5.8 version
9
10 Needs llvm <= 9, which is not in the tree anymore.
11
12 Package-Manager: Portage-3.0.30, Repoman-3.0.3
13 Signed-off-by: Guilherme Amadio <amadio <AT> gentoo.org>
14
15 dev-util/perf/Manifest | 1 -
16 dev-util/perf/metadata.xml | 6 --
17 dev-util/perf/perf-5.8.ebuild | 244 ------------------------------------------
18 3 files changed, 251 deletions(-)
19
20 diff --git a/dev-util/perf/Manifest b/dev-util/perf/Manifest
21 index 87441f010c2a..708e858709e9 100644
22 --- a/dev-util/perf/Manifest
23 +++ b/dev-util/perf/Manifest
24 @@ -1,5 +1,4 @@
25 DIST linux-5.15.tar.xz 121913744 BLAKE2B 3921274b23f7938abdf3ed9334534b4581e13d7484303d3a5280eddb038999aaa8b836666a487472d9c4a219af0f06b9fecccaf348fb5510ab8762f4ef4b7e83 SHA512 d25ad40b5bcd6a4c6042fd0fd84e196e7a58024734c3e9a484fd0d5d54a0c1d87db8a3c784eff55e43b6f021709dc685eb0efa18d2aec327e4f88a79f405705a
26 DIST linux-5.17.tar.xz 128399340 BLAKE2B 82dc4a45cc25c781ac67aa6ed1e4c369544154960f41c4634d47621f381159687a227054976d078524cda28884d395a15f7542fe44ca74ce98ca6ff54a81d6d0 SHA512 89f0a7ca69d20a539d4b612a7028a30a5e98b402e4b6b88516f14237e5da4b626d7929eab8b40fccc90766e8f3bae87e9858a19077ffad20d8204acf18794f5b
27 DIST linux-5.18.tar.xz 129790264 BLAKE2B e2745a69eb70169e90505a9318a3993046eab3020496eecde7d8352ecda0eb71a25b21becf7ce93fc593507dce7d1cd61b94ddcdf82b3094d79c0d3d48508eeb SHA512 dbbc9d1395898a498fa4947fceda1781344fa5d360240f753810daa4fa88e519833e2186c4e582a8f1836e6413e9e85f6563c7770523b704e8702d67622f98b5
28 -DIST linux-5.8.tar.xz 114459324 BLAKE2B 7bd97f8fa4527840754434414c07283e89731dc8ebb1e95fa5bc1469a60af1122582c0d3b6e262e77882f023190068df3537bd8b65964b3caa820bb2c8e579c7 SHA512 45a53ecf351096ef6e98242cca4228b8da9b9139ecc6963695791ea6fb7a9484a4e1c19dcca7ce7cbfdfa49de0451b70973bb078f12bdae9cbaddbc3f8092556
29 DIST patch-5.17.1.xz 15244 BLAKE2B f340b8a103754122153dd381fe210b18ba37b7262dae4fc7a1f99c5a62868c9bdb178e83865b35f00b82bd2d67ae127c440515d1740093825f7ec7fa4c4a490d SHA512 fb9a28ce7c68daeca82586e7631dc0be00a1a8393b4cef4c659fc1f9dac6e1f941bd60671c0350d1dea9cb035f56d627f64a394a9acb00b2b5dea8a1d44c065f
30
31 diff --git a/dev-util/perf/metadata.xml b/dev-util/perf/metadata.xml
32 index 30edb4656ca7..795d980412ee 100644
33 --- a/dev-util/perf/metadata.xml
34 +++ b/dev-util/perf/metadata.xml
35 @@ -20,12 +20,6 @@
36 <use>
37 <flag name="babeltrace">Enable <pkg>dev-util/babeltrace</pkg> support</flag>
38 <flag name="clang">Enable builtin clang and LLVM support</flag>
39 - <flag name="demangle">
40 - Enable C++ symbol name demangling, using libbfd from
41 - <pkg>sys-devel/binutils</pkg>. When this flag is enabled, the
42 - package will have to be rebuilt after every version bump of
43 - binutils.
44 - </flag>
45 <flag name="doc">
46 Build documentation and man pages. With this USE flag disabled,
47 the --help parameter for perf and its sub-tools will not be
48
49 diff --git a/dev-util/perf/perf-5.8.ebuild b/dev-util/perf/perf-5.8.ebuild
50 deleted file mode 100644
51 index 38ceee391a81..000000000000
52 --- a/dev-util/perf/perf-5.8.ebuild
53 +++ /dev/null
54 @@ -1,244 +0,0 @@
55 -# Copyright 1999-2021 Gentoo Authors
56 -# Distributed under the terms of the GNU General Public License v2
57 -
58 -EAPI=7
59 -
60 -PYTHON_COMPAT=( python3_{7,8} )
61 -inherit bash-completion-r1 estack llvm toolchain-funcs prefix python-r1 linux-info
62 -
63 -MY_PV="${PV/_/-}"
64 -MY_PV="${MY_PV/-pre/-git}"
65 -
66 -DESCRIPTION="Userland tools for Linux Performance Counters"
67 -HOMEPAGE="https://perf.wiki.kernel.org/"
68 -
69 -LINUX_V="${PV:0:1}.x"
70 -if [[ ${PV} == *_rc* ]] ; then
71 - LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1))
72 - PATCH_VERSION=$(ver_cut 1-3)
73 - LINUX_PATCH=patch-${PV//_/-}.xz
74 - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH}
75 - https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
76 -elif [[ ${PV} == *.*.* ]] ; then
77 - # stable-release series
78 - LINUX_VER=$(ver_cut 1-2)
79 - LINUX_PATCH=patch-${PV}.xz
80 - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
81 -else
82 - LINUX_VER=${PV}
83 - SRC_URI=""
84 -fi
85 -
86 -LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
87 -SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
88 -
89 -LICENSE="GPL-2"
90 -SLOT="0"
91 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
92 -IUSE="audit clang crypt debug +demangle +doc gtk java lzma numa perl python slang systemtap unwind zlib"
93 -# TODO babeltrace
94 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
95 -
96 -RDEPEND="audit? ( sys-process/audit )
97 - crypt? ( dev-libs/openssl:0= )
98 - clang? (
99 - <sys-devel/clang-10:*
100 - <sys-devel/llvm-10:*
101 - )
102 - demangle? ( sys-libs/binutils-libs:= )
103 - gtk? ( x11-libs/gtk+:2 )
104 - java? ( virtual/jre:* )
105 - lzma? ( app-arch/xz-utils )
106 - numa? ( sys-process/numactl )
107 - perl? ( dev-lang/perl:= )
108 - python? ( ${PYTHON_DEPS} )
109 - slang? ( sys-libs/slang )
110 - systemtap? ( dev-util/systemtap )
111 - unwind? ( sys-libs/libunwind )
112 - zlib? ( sys-libs/zlib )
113 - dev-libs/elfutils"
114 -DEPEND="${RDEPEND}
115 - >=sys-kernel/linux-headers-4.19
116 - ${LINUX_PATCH+dev-util/patchutils}
117 - sys-devel/bison
118 - sys-devel/flex
119 - virtual/pkgconfig
120 - java? ( virtual/jdk )
121 - doc? (
122 - app-text/asciidoc
123 - app-text/sgml-common
124 - app-text/xmlto
125 - sys-process/time
126 - )"
127 -
128 -S_K="${WORKDIR}/linux-${LINUX_VER}"
129 -S="${S_K}/tools/perf"
130 -
131 -CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS"
132 -
133 -pkg_setup() {
134 - use clang && LLVM_MAX_SLOT=9 llvm_pkg_setup
135 -}
136 -
137 -src_unpack() {
138 - local paths=(
139 - tools/arch tools/build tools/include tools/lib tools/perf tools/scripts
140 - scripts include lib "arch/*/lib"
141 - )
142 -
143 - # We expect the tar implementation to support the -j option (both
144 - # GNU tar and libarchive's tar support that).
145 - echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}"
146 - tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \
147 - "${paths[@]/#/linux-${LINUX_VER}/}" || die
148 -
149 - if [[ -n ${LINUX_PATCH} ]] ; then
150 - eshopts_push -o noglob
151 - ebegin "Filtering partial source patch"
152 - filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \
153 - > ${P}.patch
154 - eend $? || die "filterdiff failed"
155 - eshopts_pop
156 - fi
157 -
158 - local a
159 - for a in ${A}; do
160 - [[ ${a} == ${LINUX_SOURCES} ]] && continue
161 - [[ ${a} == ${LINUX_PATCH} ]] && continue
162 - unpack ${a}
163 - done
164 -}
165 -
166 -src_prepare() {
167 - default
168 - if [[ -n ${LINUX_PATCH} ]] ; then
169 - pushd "${S_K}" >/dev/null || die
170 - eapply "${WORKDIR}"/${P}.patch
171 - popd || die
172 - fi
173 -
174 - # Drop some upstream too-developer-oriented flags and fix the
175 - # Makefile in general
176 - sed -i \
177 - -e "s:\$(sysconfdir_SQ)/bash_completion.d:$(get_bashcompdir):" \
178 - "${S}"/Makefile.perf || die
179 - # A few places still use -Werror w/out $(WERROR) protection.
180 - sed -i -e 's:-Werror::' \
181 - "${S}"/Makefile.perf "${S_K}"/tools/lib/bpf/Makefile || die
182 -
183 - # Avoid the call to make kernelversion
184 - echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE
185 -
186 - # The code likes to compile local assembly files which lack ELF markings.
187 - find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} +
188 -
189 - # Fix shebang to use python from prefix
190 - if [[ -n "${EPREFIX}" ]]; then
191 - hprefixify ${S_K}/scripts/bpf_helpers_doc.py
192 - fi
193 -}
194 -
195 -puse() { usex $1 "" no; }
196 -perf_make() {
197 - # The arch parsing is a bit funky. The perf tools package is integrated
198 - # into the kernel, so it wants an ARCH that looks like the kernel arch,
199 - # but it also wants to know about the split value -- i386/x86_64 vs just
200 - # x86. We can get that by telling the func to use an older linux version.
201 - # It's kind of a hack, but not that bad ...
202 -
203 - # LIBDIR sets a search path of perf-gtk.so. Bug 515954
204 -
205 - local arch=$(tc-arch-kernel)
206 - local java_dir
207 - use java && java_dir="/etc/java-config-2/current-system-vm"
208 - # FIXME: NO_CORESIGHT
209 - # FIXME: NO_LIBBABELTRACE
210 - emake V=1 VF=1 \
211 - HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \
212 - CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="$(tc-getLD)" NM="$(tc-getNM)" \
213 - PKG_CONFIG="$(tc-getPKG_CONFIG)" \
214 - prefix="${EPREFIX}/usr" bindir_relative="bin" \
215 - EXTRA_CFLAGS="${CFLAGS}" \
216 - ARCH="${arch}" \
217 - JDIR="${java_dir}" \
218 - LIBCLANGLLVM=$(usex clang 1 "") \
219 - NO_AUXTRACE="" \
220 - NO_BACKTRACE="" \
221 - NO_CORESIGHT=1 \
222 - NO_DEMANGLE=$(puse demangle) \
223 - NO_GTK2=$(puse gtk) \
224 - NO_JVMTI=$(puse java) \
225 - NO_LIBAUDIT=$(puse audit) \
226 - NO_LIBBABELTRACE=1 \
227 - NO_LIBBIONIC=1 \
228 - NO_LIBBPF="" \
229 - NO_LIBCRYPTO=$(puse crypt) \
230 - NO_LIBDW_DWARF_UNWIND="" \
231 - NO_LIBELF="" \
232 - NO_LIBNUMA=$(puse numa) \
233 - NO_LIBPERL=$(puse perl) \
234 - NO_LIBPYTHON=$(puse python) \
235 - NO_LIBUNWIND=$(puse unwind) \
236 - NO_SDT=$(puse systemtap) \
237 - NO_SLANG=$(puse slang) \
238 - NO_LZMA=$(puse lzma) \
239 - NO_ZLIB= \
240 - WERROR=0 \
241 - LIBDIR="/usr/libexec/perf-core" \
242 - libdir="${EPREFIX}/usr/$(get_libdir)" \
243 - plugindir="${EPREFIX}/usr/$(get_libdir)/perf/plugins" \
244 - "$@"
245 -}
246 -
247 -src_compile() {
248 - # test-clang.bin not build with g++
249 - if use clang; then
250 - pushd "${S_K}/tools/build/feature/" || die
251 - make V=1 CXX=${CHOST}-clang++ test-clang.bin || die
252 - popd
253 - fi
254 - perf_make -f Makefile.perf
255 - use doc && perf_make -C Documentation
256 -}
257 -
258 -src_test() {
259 - :
260 -}
261 -
262 -src_install() {
263 - _install_python_ext() {
264 - perf_make -f Makefile.perf install-python_ext DESTDIR="${D}"
265 - }
266 -
267 - perf_make -f Makefile.perf install DESTDIR="${D}"
268 - if use python; then
269 - python_foreach_impl _install_python_ext
270 - fi
271 -
272 - rm -rv "${ED}"/usr/share/doc/perf-tip || die
273 -
274 - if use gtk; then
275 - local libdir
276 - libdir="$(get_libdir)"
277 - # on some arches it ends up in lib even on 64bit, ppc64 for instance.
278 - [[ -f "${ED}"/usr/lib/libperf-gtk.so ]] && libdir="lib"
279 - mv "${ED}"/usr/${libdir}/libperf-gtk.so \
280 - "${ED}"/usr/libexec/perf-core || die
281 - fi
282 -
283 - dodoc CREDITS
284 -
285 - dodoc *txt Documentation/*.txt
286 - if use doc ; then
287 - HTML_DOCS="Documentation/*.html" einstalldocs
288 - doman Documentation/*.1
289 - fi
290 -}
291 -
292 -pkg_postinst() {
293 - if ! use doc ; then
294 - elog "Without the doc USE flag you won't get any documentation nor man pages."
295 - elog "And without man pages, you won't get any --help output for perf and its"
296 - elog "sub-tools."
297 - fi
298 -}