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