diff options
-rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 4e603f1a32..af0410c88d 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
@@ -13,7 +13,7 @@ PR = "r9" | |||
13 | 13 | ||
14 | PACKAGECONFIG ??= "scripting tui libunwind" | 14 | PACKAGECONFIG ??= "scripting tui libunwind" |
15 | PACKAGECONFIG[dwarf] = ",NO_DWARF=1" | 15 | PACKAGECONFIG[dwarf] = ",NO_DWARF=1" |
16 | PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python" | 16 | PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3" |
17 | # gui support was added with kernel 3.6.35 | 17 | # gui support was added with kernel 3.6.35 |
18 | # since 3.10 libnewt was replaced by slang | 18 | # since 3.10 libnewt was replaced by slang |
19 | # to cover a wide range of kernel we add both dependencies | 19 | # to cover a wide range of kernel we add both dependencies |
@@ -44,8 +44,8 @@ PROVIDES = "virtual/perf" | |||
44 | inherit linux-kernel-base kernel-arch manpages | 44 | inherit linux-kernel-base kernel-arch manpages |
45 | 45 | ||
46 | # needed for building the tools/perf Python bindings | 46 | # needed for building the tools/perf Python bindings |
47 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'pythonnative', '', d)} | 47 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'python3native', '', d)} |
48 | inherit python-dir | 48 | inherit python3-dir |
49 | export PYTHON_SITEPACKAGES_DIR | 49 | export PYTHON_SITEPACKAGES_DIR |
50 | 50 | ||
51 | #kernel 3.1+ supports WERROR to disable warnings as errors | 51 | #kernel 3.1+ supports WERROR to disable warnings as errors |
@@ -94,6 +94,7 @@ EXTRA_OEMAKE += "\ | |||
94 | 'sharedir=${@os.path.relpath(datadir, prefix)}' \ | 94 | 'sharedir=${@os.path.relpath(datadir, prefix)}' \ |
95 | 'mandir=${@os.path.relpath(mandir, prefix)}' \ | 95 | 'mandir=${@os.path.relpath(mandir, prefix)}' \ |
96 | 'infodir=${@os.path.relpath(infodir, prefix)}' \ | 96 | 'infodir=${@os.path.relpath(infodir, prefix)}' \ |
97 | ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \ | ||
97 | " | 98 | " |
98 | 99 | ||
99 | # During do_configure, we might run a 'make clean'. That often breaks | 100 | # During do_configure, we might run a 'make clean'. That often breaks |
@@ -132,7 +133,7 @@ do_install() { | |||
132 | oe_runmake install | 133 | oe_runmake install |
133 | # we are checking for this make target to be compatible with older perf versions | 134 | # we are checking for this make target to be compatible with older perf versions |
134 | if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then | 135 | if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then |
135 | oe_runmake DESTDIR=${D} install-python_ext | 136 | oe_runmake DESTDIR=${D} install-python_ext |
136 | fi | 137 | fi |
137 | } | 138 | } |
138 | 139 | ||
@@ -232,8 +233,10 @@ do_configure_prepend () { | |||
232 | fi | 233 | fi |
233 | 234 | ||
234 | # use /usr/bin/env instead of version specific python | 235 | # use /usr/bin/env instead of version specific python |
235 | for s in `find ${S}/tools/perf/scripts/python/ -name '*.py'`; do | 236 | for s in `find ${S}/tools/perf/ -name '*.py'`; do |
236 | sed -i 's,/usr/bin/python2,/usr/bin/env python,' "${s}" | 237 | sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}" |
238 | sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}" | ||
239 | sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}" | ||
237 | done | 240 | done |
238 | 241 | ||
239 | # unistd.h can be out of sync between libc-headers and the captured version in the perf source | 242 | # unistd.h can be out of sync between libc-headers and the captured version in the perf source |
@@ -252,9 +255,9 @@ PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" | |||
252 | 255 | ||
253 | RDEPENDS_${PN} += "elfutils bash" | 256 | RDEPENDS_${PN} += "elfutils bash" |
254 | RDEPENDS_${PN}-archive =+ "bash" | 257 | RDEPENDS_${PN}-archive =+ "bash" |
255 | RDEPENDS_${PN}-python =+ "bash python python-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}" | 258 | RDEPENDS_${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python3', '', d)}" |
256 | RDEPENDS_${PN}-perl =+ "bash perl perl-modules" | 259 | RDEPENDS_${PN}-perl =+ "bash perl perl-modules" |
257 | RDEPENDS_${PN}-tests =+ "python" | 260 | RDEPENDS_${PN}-tests =+ "python3" |
258 | 261 | ||
259 | RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}" | 262 | RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}" |
260 | RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" | 263 | RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" |