diff options
author | Dexuan Cui <dexuan.cui@intel.com> | 2011-05-31 15:16:29 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-09 16:58:34 +0100 |
commit | c13b10a6ae1df18547db17c53b8f59594b2ad06b (patch) | |
tree | 7cb8551b4715dfbe9a163b2a2abb2881065dd88e /meta/classes/cpan-base.bbclass | |
parent | 38d0c607d8a15cce38e2fc0eec9072c20a94b8b5 (diff) | |
download | poky-c13b10a6ae1df18547db17c53b8f59594b2ad06b.tar.gz |
cpan.bbclass, cpan-base.bbclas: update them for the perlnative change
Since perl-native now populates into its own dir, here we need
change accordingly.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'meta/classes/cpan-base.bbclass')
-rw-r--r-- | meta/classes/cpan-base.bbclass | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes/cpan-base.bbclass b/meta/classes/cpan-base.bbclass index 6cd2aa340f..b5dbdaea81 100644 --- a/meta/classes/cpan-base.bbclass +++ b/meta/classes/cpan-base.bbclass | |||
@@ -7,10 +7,12 @@ FILES_${PN} += "${libdir}/perl ${datadir}/perl" | |||
7 | DEPENDS += "${@["perl", "perl-native"][(bb.data.inherits_class('native', d))]}" | 7 | DEPENDS += "${@["perl", "perl-native"][(bb.data.inherits_class('native', d))]}" |
8 | RDEPENDS += "${@["perl", ""][(bb.data.inherits_class('native', d))]}" | 8 | RDEPENDS += "${@["perl", ""][(bb.data.inherits_class('native', d))]}" |
9 | 9 | ||
10 | PERL_OWN_DIR = "${@["", "/perl-native"][(bb.data.inherits_class('native', d))]}" | ||
11 | |||
10 | # Determine the staged version of perl from the perl configuration file | 12 | # Determine the staged version of perl from the perl configuration file |
11 | def get_perl_version(d): | 13 | def get_perl_version(d): |
12 | import re | 14 | import re |
13 | cfg = bb.data.expand('${STAGING_LIBDIR}/perl/config.sh', d) | 15 | cfg = bb.data.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh', d) |
14 | try: | 16 | try: |
15 | f = open(cfg, 'r') | 17 | f = open(cfg, 'r') |
16 | except IOError: | 18 | except IOError: |
@@ -27,8 +29,10 @@ def get_perl_version(d): | |||
27 | # Determine where the library directories are | 29 | # Determine where the library directories are |
28 | def perl_get_libdirs(d): | 30 | def perl_get_libdirs(d): |
29 | libdir = bb.data.getVar('libdir', d, 1) | 31 | libdir = bb.data.getVar('libdir', d, 1) |
30 | libdirs = libdir + '/perl' | 32 | if is_target(d) == "no": |
31 | return libdirs | 33 | libdir += '/perl-native' |
34 | libdir += '/perl' | ||
35 | return libdir | ||
32 | 36 | ||
33 | def is_target(d): | 37 | def is_target(d): |
34 | if not bb.data.inherits_class('native', d): | 38 | if not bb.data.inherits_class('native', d): |