[OE-core] [PATCH 7/7] nativesdk-perl: set PERL5LIB based on wrapper path

Christopher Larson kergoth at gmail.com
Thu Nov 12 23:40:38 UTC 2015


From: Christopher Larson <chris_larson at mentor.com>

Rather than relying on OECORE_NATIVE_SYSROOT, we can operate relative to the
wrapper binary location.

Signed-off-by: Christopher Larson <chris_larson at mentor.com>
---
 meta/recipes-devtools/perl/perl_5.22.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/perl/perl_5.22.0.bb b/meta/recipes-devtools/perl/perl_5.22.0.bb
index 9df8d04..ea0677a 100644
--- a/meta/recipes-devtools/perl/perl_5.22.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.22.0.bb
@@ -244,9 +244,11 @@ do_install() {
         ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl
 }
 
+REL_PERLLIB = "${@os.path.relpath('${libdir}', '${bindir}')}/perl"
+
 do_install_append_class-nativesdk () {
         create_wrapper ${D}${bindir}/perl \
-            PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}'
+            PERL5LIB='$PERL5LIB:`dirname $realpath`/${REL_PERLLIB}/site_perl/${PV}:`dirname $realpath`/${REL_PERLLIB}/vendor_perl/${PV}:`dirname $realpath`/${REL_PERLLIB}/${PV}'
 }
 
 PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
-- 
2.2.1




More information about the Openembedded-core mailing list