summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-kernel/perf/perf.bb8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index b18e474de9..adb3a2cdcf 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -44,6 +44,7 @@ export STAGING_INCDIR
export STAGING_LIBDIR
export BUILD_SYS
export HOST_SYS
+export PYTHON_SITEPACKAGES_DIR
#kernel 3.1+ supports WERROR to disable warnings as errors
export WERROR = "0"
@@ -111,7 +112,7 @@ do_install() {
unset CFLAGS
oe_runmake DESTDIR=${D} install
# we are checking for this make target to be compatible with older perf versions
- if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0" ]; then
+ if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ] && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
oe_runmake DESTDIR=${D} install-python_ext
fi
}
@@ -143,7 +144,12 @@ do_configure_prepend () {
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
${S}/tools/perf/Makefile.perf
+ sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
+ ${S}/tools/perf/Makefile.perf
fi
+ sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
+ ${S}/tools/perf/Makefile
+
if [ -e "${S}/tools/build/Makefile.build" ]; then
sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
${S}/tools/build/Makefile.build