firefox: Perform a number of cleanups and fix consistency issues.
[openembedded.git] / classes / cpan-base.bbclass
index 19d431c..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}/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"