summaryrefslogtreecommitdiffstats
path: root/meta/classes/cpan-base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/cpan-base.bbclass')
-rw-r--r--meta/classes/cpan-base.bbclass38
1 files changed, 19 insertions, 19 deletions
diff --git a/meta/classes/cpan-base.bbclass b/meta/classes/cpan-base.bbclass
index b4b7b81d8d..660c15f549 100644
--- a/meta/classes/cpan-base.bbclass
+++ b/meta/classes/cpan-base.bbclass
@@ -11,28 +11,28 @@ PERL_OWN_DIR = "${@["", "/perl-native"][(bb.data.inherits_class('native', d))]}"
11 11
12# Determine the staged version of perl from the perl configuration file 12# Determine the staged version of perl from the perl configuration file
13def get_perl_version(d): 13def get_perl_version(d):
14 import re 14 import re
15 cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh') 15 cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh')
16 try: 16 try:
17 f = open(cfg, 'r') 17 f = open(cfg, 'r')
18 except IOError: 18 except IOError:
19 return None 19 return None
20 l = f.readlines(); 20 l = f.readlines();
21 f.close(); 21 f.close();
22 r = re.compile("^version='(\d*\.\d*\.\d*)'") 22 r = re.compile("^version='(\d*\.\d*\.\d*)'")
23 for s in l: 23 for s in l:
24 m = r.match(s) 24 m = r.match(s)
25 if m: 25 if m:
26 return m.group(1) 26 return m.group(1)
27 return None 27 return None
28 28
29# Determine where the library directories are 29# Determine where the library directories are
30def perl_get_libdirs(d): 30def perl_get_libdirs(d):
31 libdir = d.getVar('libdir', True) 31 libdir = d.getVar('libdir', True)
32 if is_target(d) == "no": 32 if is_target(d) == "no":
33 libdir += '/perl-native' 33 libdir += '/perl-native'
34 libdir += '/perl' 34 libdir += '/perl'
35 return libdir 35 return libdir
36 36
37def is_target(d): 37def is_target(d):
38 if not bb.data.inherits_class('native', d): 38 if not bb.data.inherits_class('native', d):