diff options
Diffstat (limited to 'meta/classes/perl-version.bbclass')
-rw-r--r-- | meta/classes/perl-version.bbclass | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/meta/classes/perl-version.bbclass b/meta/classes/perl-version.bbclass deleted file mode 100644 index 84b67b8180..0000000000 --- a/meta/classes/perl-version.bbclass +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | PERL_OWN_DIR = "" | ||
2 | |||
3 | # Determine the staged version of perl from the perl configuration file | ||
4 | # Assign vardepvalue, because otherwise signature is changed before and after | ||
5 | # perl is built (from None to real version in config.sh). | ||
6 | get_perl_version[vardepvalue] = "${PERL_OWN_DIR}" | ||
7 | def get_perl_version(d): | ||
8 | import re | ||
9 | cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/config.sh') | ||
10 | try: | ||
11 | f = open(cfg, 'r') | ||
12 | except IOError: | ||
13 | return None | ||
14 | l = f.readlines(); | ||
15 | f.close(); | ||
16 | r = re.compile(r"^version='(\d*\.\d*\.\d*)'") | ||
17 | for s in l: | ||
18 | m = r.match(s) | ||
19 | if m: | ||
20 | return m.group(1) | ||
21 | return None | ||
22 | |||
23 | PERLVERSION := "${@get_perl_version(d)}" | ||
24 | PERLVERSION[vardepvalue] = "" | ||
25 | |||
26 | |||
27 | # Determine the staged arch of perl from the perl configuration file | ||
28 | # Assign vardepvalue, because otherwise signature is changed before and after | ||
29 | # perl is built (from None to real version in config.sh). | ||
30 | def get_perl_arch(d): | ||
31 | import re | ||
32 | cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/config.sh') | ||
33 | try: | ||
34 | f = open(cfg, 'r') | ||
35 | except IOError: | ||
36 | return None | ||
37 | l = f.readlines(); | ||
38 | f.close(); | ||
39 | r = re.compile("^archname='([^']*)'") | ||
40 | for s in l: | ||
41 | m = r.match(s) | ||
42 | if m: | ||
43 | return m.group(1) | ||
44 | return None | ||
45 | |||
46 | PERLARCH := "${@get_perl_arch(d)}" | ||
47 | PERLARCH[vardepvalue] = "" | ||
48 | |||
49 | # Determine the staged arch of perl-native from the perl configuration file | ||
50 | # Assign vardepvalue, because otherwise signature is changed before and after | ||
51 | # perl is built (from None to real version in config.sh). | ||
52 | def get_perl_hostarch(d): | ||
53 | import re | ||
54 | cfg = d.expand('${STAGING_LIBDIR_NATIVE}/perl5/config.sh') | ||
55 | try: | ||
56 | f = open(cfg, 'r') | ||
57 | except IOError: | ||
58 | return None | ||
59 | l = f.readlines(); | ||
60 | f.close(); | ||
61 | r = re.compile("^archname='([^']*)'") | ||
62 | for s in l: | ||
63 | m = r.match(s) | ||
64 | if m: | ||
65 | return m.group(1) | ||
66 | return None | ||