diff options
| author | Ross Burton <ross.burton@arm.com> | 2023-08-22 18:00:17 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-24 16:50:24 +0100 |
| commit | d37eff39072ae4ad08808d23ec47b243f897ea5a (patch) | |
| tree | 980e8e2971257ef35c4510b683ddf59d1e56a86b | |
| parent | 8eb4223c223a41fae21fa627182c36c654da581b (diff) | |
| download | poky-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>
| -rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 20 |
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 | ||
| 12 | PR = "r9" | 12 | PR = "r9" |
| 13 | 13 | ||
| 14 | PACKAGECONFIG ??= "scripting tui libunwind libtraceevent" | 14 | PACKAGECONFIG ??= "perl python tui libunwind libtraceevent" |
| 15 | PACKAGECONFIG[dwarf] = ",NO_DWARF=1" | 15 | PACKAGECONFIG[dwarf] = ",NO_DWARF=1" |
| 16 | PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3 python3-setuptools-native" | 16 | PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl" |
| 17 | PACKAGECONFIG[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" | |||
| 51 | inherit linux-kernel-base kernel-arch manpages | 52 | inherit 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 |
| 54 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'python3targetconfig', '', d)} | 55 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)} |
| 55 | inherit python3-dir | 56 | inherit python3-dir |
| 56 | export PYTHON_SITEPACKAGES_DIR | 57 | export PYTHON_SITEPACKAGES_DIR |
| 57 | 58 | ||
| @@ -61,7 +62,7 @@ export WERROR = "0" | |||
| 61 | do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" | 62 | do_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 |
| 64 | include ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perf-perl.inc', '', d)} | 65 | include ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perf-perl.inc', '', d)} |
| 65 | 66 | ||
| 66 | inherit kernelsrc | 67 | inherit 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 | |||
| 370 | RDEPENDS:${PN}-perl =+ "bash perl perl-modules" | 371 | RDEPENDS:${PN}-perl =+ "bash perl perl-modules" |
| 371 | RDEPENDS:${PN}-tests =+ "python3 bash" | 372 | RDEPENDS:${PN}-tests =+ "python3 bash" |
| 372 | 373 | ||
| 373 | RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}" | 374 | RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests \ |
| 374 | RSUGGESTS:${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 | " | ||
| 376 | FILES_SOLIBSDEV = "" | 378 | FILES_SOLIBSDEV = "" |
| 377 | FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so" | 379 | FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so" |
| 378 | FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" | 380 | FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" |
