perl: Move config.sh to STAGING_LIBDIR rather than trying to be clever with staging...
authorRichard Purdie <rpurdie@linux.intel.com>
Wed, 11 Nov 2009 21:01:47 +0000 (21:01 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 11 Nov 2009 21:02:36 +0000 (21:02 +0000)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
classes/cpan-base.bbclass
classes/cpan.bbclass
classes/cpan_build.bbclass
recipes/perl/perl-native_5.8.8.bb
recipes/perl/perl.inc
recipes/perl/perl_5.8.4.bb
recipes/perl/perl_5.8.7.bb
recipes/perl/perl_5.8.8.bb

index cc0d11e..82fd5b4 100644 (file)
@@ -9,8 +9,8 @@ RDEPENDS  += "${@["perl", ""][(bb.data.inherits_class('native', d))]}"
 
 # Determine the staged version of perl from the perl configuration file
 def get_perl_version(d):
-       import os, bb, re
-       cfg = bb.data.expand('${STAGING_DIR}/${HOST_SYS}/perl/config.sh', d)
+       import re
+       cfg = bb.data.expand('${STAGING_LIBDIR}/perl/config.sh', d)
        try:
                f = open(cfg, 'r')
        except IOError:
@@ -33,7 +33,6 @@ def is_new_perl(d):
 
 # Determine where the library directories are
 def perl_get_libdirs(d):
-       import bb
        libdir = bb.data.getVar('libdir', d, 1)
        if is_new_perl(d) == "yes":
                libdirs = libdir + '/perl5'
@@ -42,7 +41,6 @@ def perl_get_libdirs(d):
        return libdirs
 
 def is_target(d):
-    import bb
     if not bb.data.inherits_class('native', d):
         return "yes"
     return "no"
index 7b3faa2..66054bc 100644 (file)
@@ -16,7 +16,7 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}"
 cpan_do_configure () {
        yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS}
        if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
-               . ${STAGING_DIR_TARGET}/perl/config.sh
+               . ${STAGING_LIBDIR}/perl/config.sh
                if [ "${IS_NEW_PERL}" = "yes" ]; then
                        sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \
                                -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \
index c3804ff..2ca0199 100644 (file)
@@ -25,7 +25,7 @@ DEPENDS_prepend = "${@cpan_build_dep_prepend(d)}"
 cpan_build_do_configure () {
        if [ ${@is_target(d)} == "yes" ]; then
                # build for target
-               . ${STAGING_DIR_TARGET}/perl/config.sh
+               . ${STAGING_LIBDIR}/perl/config.sh
                if [ "${IS_NEW_PERL}" = "yes" ]; then
                        perl Build.PL --installdirs vendor \
                                --destdir ${D} \
index ba05406..60a5cf5 100644 (file)
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.perl.org/"
 SECTION = "libs"
 LICENSE = "Artistic|GPL"
 DEPENDS = "virtual/db-native gdbm-native"
-PR = "r14"
+PR = "r15"
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/perl-${PV}"
 
@@ -66,10 +66,9 @@ do_stage_append() {
         # We need a hostperl link for building perl
         ln -sf ${STAGING_BINDIR_NATIVE}/perl${PV} ${STAGING_BINDIR_NATIVE}/hostperl
         # Store native config in non-versioned directory
-        install -d ${STAGING_DIR}/${HOST_SYS}/perl \
-                   ${STAGING_LIBDIR_NATIVE}/perl/${PV}/CORE \
+        install -d ${STAGING_LIBDIR_NATIVE}/perl/${PV}/CORE \
                    ${STAGING_DATADIR_NATIVE}/perl/${PV}/ExtUtils
-        install config.sh ${STAGING_DIR}/${HOST_SYS}/perl
+        install config.sh ${STAGING_LIBDIR}/perl
        # target configuration
         install lib/Config.pm       ${STAGING_LIBDIR_NATIVE}/perl/${PV}/
        install lib/ExtUtils/typemap ${STAGING_DATADIR_NATIVE}/perl/${PV}/ExtUtils/
@@ -88,7 +87,7 @@ do_stage_append() {
 }
 do_stage_append_nylon() {
         # get rid of definitions not supported by the gcc version we use for nylon...
-        for i in ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy.pl ${STAGING_DIR}/${HOST_SYS}/perl/config.sh; do
+        for i in ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy.pl ${STAGING_LIBDIR}/perl/config.sh; do
                 perl -pi -e 's/-Wdeclaration-after-statement //g' ${i}
         done
 }
index 9e20ae6..15ae55c 100644 (file)
@@ -36,8 +36,8 @@ do_install() {
 }
 
 do_stage() {
-       install -d ${STAGING_DIR}/${HOST_SYS}/perl/
-       install config.sh ${STAGING_DIR}/${HOST_SYS}/perl/
+       install -d ${STAGING_LIBDIR}/perl/
+       install config.sh ${STAGING_LIBDIR}/perl/
 }
 
 PACKAGES_DYNAMIC = "perl-module-*"
index 10a871c..881a2ac 100644 (file)
@@ -1,6 +1,6 @@
 require perl.inc
 
-PR = "r5"
+PR = "r6"
 
 SRC_URI += "file://uclibc.patch;patch=1 \
             file://config.sh-mipsel-linux \
index 6589180..5891670 100644 (file)
@@ -26,7 +26,7 @@ SRC_URI_append_powerpc += " ${GCCLINK_SRC}"
 
 PARALLEL_MAKE = ""
 
-PR = "r22"
+PR = "r23"
 
 do_configure() {
        ln -sf ${HOSTPERL} ${STAGING_BINDIR_NATIVE}/hostperl
index 35fcc83..02ad7bf 100644 (file)
@@ -141,12 +141,11 @@ do_install() {
         fi
 }
 do_stage() {
-        install -d ${STAGING_DIR}/${HOST_SYS}/perl \
-                   ${STAGING_LIBDIR_NATIVE}/perl/${PV} \
+        install -d ${STAGING_LIBDIR_NATIVE}/perl/${PV} \
                    ${STAGING_LIBDIR}/perl/${PV}/CORE \
                    ${STAGING_DATADIR}/perl/${PV}/ExtUtils
         # target config, used by cpan.bbclass to extract version information
-        install config.sh ${STAGING_DIR}/${HOST_SYS}/perl/
+        install config.sh ${STAGING_LIBDIR}/perl/
         # target configuration, used by native perl when cross-compiling
         install lib/Config_heavy.pl ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy-target.pl
        # target configuration