From: Ross Burton <[email protected]>

There's no reason for Python and Perl support to be tied together, so
split the PACKAGECONFIG into two.

Signed-off-by: Ross Burton <[email protected]>
---
 meta/recipes-kernel/perf/perf.bb | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 327934b72a7..f89ab20ca41 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -11,9 +11,10 @@ LICENSE = "GPL-2.0-only"
 
 PR = "r9"
 
-PACKAGECONFIG ??= "scripting tui libunwind libtraceevent"
+PACKAGECONFIG ??= "perl python tui libunwind libtraceevent"
 PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
-PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3 
python3-setuptools-native"
+PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl"
+PACKAGECONFIG[python] = ",NO_LIBPYTHON=1,python3 python3-setuptools-native"
 # gui support was added with kernel 3.6.35
 # since 3.10 libnewt was replaced by slang
 # to cover a wide range of kernel we add both dependencies
@@ -51,7 +52,7 @@ PROVIDES = "virtual/perf"
 inherit linux-kernel-base kernel-arch manpages
 
 # needed for building the tools/perf Python bindings
-inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 
'python3targetconfig', '', d)}
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', 
'', d)}
 inherit python3-dir
 export PYTHON_SITEPACKAGES_DIR
 
@@ -61,7 +62,7 @@ export WERROR = "0"
 do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
 
 # needed for building the tools/perf Perl binding
-include ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perf-perl.inc', 
'', d)}
+include ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perf-perl.inc', '', d)}
 
 inherit kernelsrc
 
@@ -107,7 +108,7 @@ EXTRA_OEMAKE += "\
     'sharedir=${@os.path.relpath(datadir, prefix)}' \
     'mandir=${@os.path.relpath(mandir, prefix)}' \
     'infodir=${@os.path.relpath(infodir, prefix)}' \
-    ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'PYTHON=python3 
PYTHON_CONFIG=python3-config', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'python', 'PYTHON=python3 
PYTHON_CONFIG=python3-config', '', d)} \
 "
 
 # During do_configure, we might run a 'make clean'. That often breaks
@@ -152,7 +153,7 @@ do_install() {
        unset CFLAGS
        oe_runmake install
        # we are checking for this make target to be compatible with older perf 
versions
-       if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', 
d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
+       if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)} 
&& grep -q install-python_ext ${S}/tools/perf/Makefile*; then
            oe_runmake DESTDIR=${D} install-python_ext
            if [ -e ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt ]; 
then
                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
 RDEPENDS:${PN}-perl =+ "bash perl perl-modules"
 RDEPENDS:${PN}-tests =+ "python3 bash"
 
-RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', 
'${PN}-perl ${PN}-python', '',d)}"
-RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
-
+RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests \
+                    ${@bb.utils.contains('PACKAGECONFIG', 'perl', 
'${PN}-perl', '', d)} \
+                    ${@bb.utils.contains('PACKAGECONFIG', 'python', 
'${PN}-python', '', d)} \
+                    "
 FILES_SOLIBSDEV = ""
 FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core 
${libdir}/traceevent* ${libdir}/libperf-jvmti.so"
 FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186516): 
https://lists.openembedded.org/g/openembedded-core/message/186516
Mute This Topic: https://lists.openembedded.org/mt/100898285/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to