perl-native: Switch to using create_wrapper to make perl relocatable.
authorTom Rini <tom_rini@mentor.com>
Thu, 3 Feb 2011 18:54:22 +0000 (11:54 -0700)
committerTom Rini <tom_rini@mentor.com>
Thu, 3 Feb 2011 18:57:45 +0000 (11:57 -0700)
This is taken from poky.  In addition to problems in upstream
perl 5.12.x, Martin Jansa discovered that the regex perl uses during
install is broken for things like /OE/whatever (due to not escapipng the
periods in the regex perl uses).

Signed-off-by: Tom Rini <tom_rini@mentor.com>
recipes/perl/perl-native_5.10.1.bb

index 35cd3c0..5aa0c7b 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "Perl is a popular scripting language."
 HOMEPAGE = "http://www.perl.org/"
 SECTION = "libs"
 LICENSE = "Artistic|GPLv1+"
-PR = "r9"
+PR = "r10"
 NATIVE_INSTALL_WORKS = "1"
 INHIBIT_DEFAULT_DEPS = "1"
 PATCHTOOL = "patch"
@@ -41,15 +41,14 @@ do_configure () {
         -Dvendorprefix=${prefix} \
         -Dsiteprefix=${prefix} \
          \
-        -Dprivlib=.../../lib/perl/${PV} \
-        -Darchlib=.../../lib/perl/${PV} \
-        -Dvendorlib=.../../lib/perl/${PV} \
-        -Dvendorarch=.../../lib/perl/${PV} \
-        -Dsitelib=.../../lib/perl/${PV} \
-        -Dsitearch=.../../lib/perl/${PV} \
-        -Duserelocatableinc="y" \
+        -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
+        -Darchlib=${STAGING_LIBDIR}/perl/${PV} \
+        -Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \
+        -Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \
+        -Dsitelib=${STAGING_LIBDIR}/perl/${PV} \
+        -Dsitearch=${STAGING_LIBDIR}/perl/${PV} \
         \
-        -Uuseshrplib \
+        -Duseshrplib \
         -Dusethreads \
         -Duseithreads \
         -Duselargefiles \
@@ -104,6 +103,8 @@ do_install() {
        for PERLSCRIPT in `grep -rIEl '#!.*/perl' ${D}${bindir}`; do
                sed -i -e '1s|^#!.*|#!/usr/bin/env perl|' $PERLSCRIPT
        done
+
+       create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
 }
 
 do_install_append_nylon() {