]> code.ossystems Code Review - openembedded-core.git/commitdiff
perl: fix startperl configuration option for perl-native
authorPaulo Cesar Zaneti <paulo.zaneti@gmail.com>
Mon, 19 Apr 2021 13:55:55 +0000 (10:55 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 23 Apr 2021 09:12:12 +0000 (10:12 +0100)
Unlike vanilla Perl "Configure" script, perl-cross "configure" does not
derive "startperl" from "bin". It instead derives from "perlpath".

This patch aims to fix "startperl" configuration option for perl-native by
correctly setting "perlpath" on perl-cross "configure" script.

It also changes do_install_append_class-native task to comply with
cpan_do_install task.

Signed-off-by: Paulo Cesar Zaneti <paulo.zaneti@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/perl/perl_5.32.1.bb

index b28040c7fb06546b1430e3c5c8109516f8db0dca..73d66f66568c292b741d788e30d254100bf0472e 100644 (file)
@@ -95,6 +95,7 @@ do_configure_class-nativesdk() {
 do_configure_class-native() {
     ./configure --prefix=${prefix} \
     -Dbin=${bindir}/perl-native \
+    -Dperlpath=${bindir}/perl-native/perl \
     -Duseshrplib \
     -Dsoname=libperl.so.5 \
     -Dvendorprefix=${prefix} \
@@ -171,8 +172,8 @@ do_install_append_class-native () {
     create_wrapper ${D}${bindir}/perl-native/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl5/site_perl/${PV}:${STAGING_LIBDIR}/perl5/vendor_perl/${PV}:${STAGING_LIBDIR}/perl5/${PV}'
 
     # Use /usr/bin/env nativeperl for the perl script.
-    for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
-            sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
+    for f in `grep -Il '#! *${bindir}/perl-native.*/perl' ${D}/${bindir}/*`; do
+            sed -i -e 's|${bindir}/perl-native.*/perl|/usr/bin/env nativeperl|' $f
     done
 }