summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/perf
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-08-22 18:00:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-24 16:50:24 +0100
commitd37eff39072ae4ad08808d23ec47b243f897ea5a (patch)
tree980e8e2971257ef35c4510b683ddf59d1e56a86b /meta/recipes-kernel/perf
parent8eb4223c223a41fae21fa627182c36c654da581b (diff)
downloadpoky-d37eff39072ae4ad08808d23ec47b243f897ea5a.tar.gz
perf: split scripting PACKAGECONFIG into perl and python
There's no reason for Python and Perl support to be tied together, so split the PACKAGECONFIG into two. (From OE-Core rev: af1511065120b12600e39725d8507fa2c018ae1b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/perf')
-rw-r--r--meta/recipes-kernel/perf/perf.bb20
1 files changed, 11 insertions, 9 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 327934b72a..f89ab20ca4 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -11,9 +11,10 @@ LICENSE = "GPL-2.0-only"
11 11
12PR = "r9" 12PR = "r9"
13 13
14PACKAGECONFIG ??= "scripting tui libunwind libtraceevent" 14PACKAGECONFIG ??= "perl python tui libunwind libtraceevent"
15PACKAGECONFIG[dwarf] = ",NO_DWARF=1" 15PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
16PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3 python3-setuptools-native" 16PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl"
17PACKAGECONFIG[python] = ",NO_LIBPYTHON=1,python3 python3-setuptools-native"
17# gui support was added with kernel 3.6.35 18# gui support was added with kernel 3.6.35
18# since 3.10 libnewt was replaced by slang 19# since 3.10 libnewt was replaced by slang
19# to cover a wide range of kernel we add both dependencies 20# to cover a wide range of kernel we add both dependencies
@@ -51,7 +52,7 @@ PROVIDES = "virtual/perf"
51inherit linux-kernel-base kernel-arch manpages 52inherit linux-kernel-base kernel-arch manpages
52 53
53# needed for building the tools/perf Python bindings 54# needed for building the tools/perf Python bindings
54inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'python3targetconfig', '', d)} 55inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)}
55inherit python3-dir 56inherit python3-dir
56export PYTHON_SITEPACKAGES_DIR 57export PYTHON_SITEPACKAGES_DIR
57 58
@@ -61,7 +62,7 @@ export WERROR = "0"
61do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" 62do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
62 63
63# needed for building the tools/perf Perl binding 64# needed for building the tools/perf Perl binding
64include ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perf-perl.inc', '', d)} 65include ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perf-perl.inc', '', d)}
65 66
66inherit kernelsrc 67inherit kernelsrc
67 68
@@ -107,7 +108,7 @@ EXTRA_OEMAKE += "\
107 'sharedir=${@os.path.relpath(datadir, prefix)}' \ 108 'sharedir=${@os.path.relpath(datadir, prefix)}' \
108 'mandir=${@os.path.relpath(mandir, prefix)}' \ 109 'mandir=${@os.path.relpath(mandir, prefix)}' \
109 'infodir=${@os.path.relpath(infodir, prefix)}' \ 110 'infodir=${@os.path.relpath(infodir, prefix)}' \
110 ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \ 111 ${@bb.utils.contains('PACKAGECONFIG', 'python', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \
111" 112"
112 113
113# During do_configure, we might run a 'make clean'. That often breaks 114# During do_configure, we might run a 'make clean'. That often breaks
@@ -152,7 +153,7 @@ do_install() {
152 unset CFLAGS 153 unset CFLAGS
153 oe_runmake install 154 oe_runmake install
154 # we are checking for this make target to be compatible with older perf versions 155 # we are checking for this make target to be compatible with older perf versions
155 if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then 156 if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
156 oe_runmake DESTDIR=${D} install-python_ext 157 oe_runmake DESTDIR=${D} install-python_ext
157 if [ -e ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt ]; then 158 if [ -e ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt ]; then
158 sed -i -e 's#${WORKDIR}##g' ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt 159 sed -i -e 's#${WORKDIR}##g' ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt
@@ -370,9 +371,10 @@ RDEPENDS:${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PAC
370RDEPENDS:${PN}-perl =+ "bash perl perl-modules" 371RDEPENDS:${PN}-perl =+ "bash perl perl-modules"
371RDEPENDS:${PN}-tests =+ "python3 bash" 372RDEPENDS:${PN}-tests =+ "python3 bash"
372 373
373RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}" 374RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests \
374RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" 375 ${@bb.utils.contains('PACKAGECONFIG', 'perl', '${PN}-perl', '', d)} \
375 376 ${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)} \
377 "
376FILES_SOLIBSDEV = "" 378FILES_SOLIBSDEV = ""
377FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so" 379FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so"
378FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" 380FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive"