]> code.ossystems Code Review - openembedded-core.git/commitdiff
perl: Correct path for vendorlib, vendorarch, sitelib and sitearch
authorJens Rehsack <rehsack@gmail.com>
Thu, 8 Oct 2015 14:22:41 +0000 (16:22 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 29 Oct 2015 07:30:09 +0000 (07:30 +0000)
This patch corrects the path specifications when building perl
for vendorlib, vendorarch, sitelib and sitearch to allow newer
dual-life module being installed on host to satisfy configure
and build requirements of some CPAN distributions.

Additionally, fix search path order in perl wrappers.

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/perl/perl-native_5.22.0.bb
meta/recipes-devtools/perl/perl_5.22.0.bb

index a9a1cab94255efd8de1aec370243b2fcfd4069f4..b4dda3128565328edc9a95e1d203b56ae0d350ae 100644 (file)
@@ -28,16 +28,15 @@ do_configure () {
                -Dcf_by="Open Embedded" \
                -Dprefix=${prefix} \
                -Dvendorprefix=${prefix} \
-               -Dvendorprefix=${prefix} \
                -Dsiteprefix=${prefix} \
                \
                -Dbin=${STAGING_BINDIR}/${PN} \
                -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} \
+               -Dvendorlib=${STAGING_LIBDIR}/perl/vendor_perl/${PV} \
+               -Dvendorarch=${STAGING_LIBDIR}/perl/vendor_perl/${PV} \
+               -Dsitelib=${STAGING_LIBDIR}/perl/site_perl/${PV} \
+               -Dsitearch=${STAGING_LIBDIR}/perl/site_perl/${PV} \
                \
                -Duseshrplib \
                -Dusethreads \
@@ -95,8 +94,11 @@ do_install () {
                install $i ${D}${libdir}/perl/${PV}/CORE
        done
 
-       create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}'
-       create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl${STAGING_LIBDIR}/perl:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}'
+       # Those wrappers mean that perl installed from sstate (which may change
+       # path location) works and that in the nativesdk case, the SDK can be
+       # installed to a different location from the one it was built for.
+       create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}:${STAGING_LIBDIR}/perl/${PV}'
+       create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}:${STAGING_LIBDIR}/perl/${PV}'
 
        # Use /usr/bin/env nativeperl for the perl script.
        for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
index 66e074d37bfac152027beb209fabce563865c2e4..9df8d043e3bc61cb6fc50982e277335f631ea907 100644 (file)
@@ -246,7 +246,7 @@ do_install() {
 
 do_install_append_class-nativesdk () {
         create_wrapper ${D}${bindir}/perl \
-            PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}'
+            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}'
 }
 
 PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"