dev-util/perf: use python from prefix
authorGuilherme Amadio <amadio@gentoo.org>
Wed, 6 May 2020 08:18:44 +0000 (10:18 +0200)
committerGuilherme Amadio <amadio@gentoo.org>
Wed, 6 May 2020 08:25:38 +0000 (10:25 +0200)
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
dev-util/perf/perf-5.6.4.ebuild

index 79a230faed363c3f8053fbc6c14b2e844c916554..3067d7243be65af70c3631befe651f14365a1985 100644 (file)
@@ -4,7 +4,7 @@
 EAPI=7
 
 PYTHON_COMPAT=( python2_7 python3_{6,7} )
-inherit bash-completion-r1 estack eutils llvm toolchain-funcs python-r1 linux-info
+inherit bash-completion-r1 estack eutils llvm toolchain-funcs prefix python-r1 linux-info
 
 MY_PV="${PV/_/-}"
 MY_PV="${MY_PV/-pre/-git}"
@@ -130,6 +130,11 @@ src_prepare() {
 
        # The code likes to compile local assembly files which lack ELF markings.
        find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} +
+
+       # Fix shebang to use python from prefix
+       if [[ -n "${EPREFIX}" ]]; then
+               hprefixify ${S_K}/scripts/bpf_helpers_doc.py
+       fi
 }
 
 puse() { usex $1 "" no; }