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

Christopher Larson chris_larson at mentor.com
Thu Nov 12 23:48:26 UTC 2015


On Thu, Nov 12, 2015 at 4:40 PM, Christopher Larson <kergoth at gmail.com>
wrote:

> 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}'
>

Hmm, perhaps create_wrapper should be altered to provide the binary dirname
as a variable so we can easily reference it, avoiding the need to
repeatedly dirname here.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20151112/5482d72d/attachment-0002.html>


More information about the Openembedded-core mailing list