From e7c6b93906b8909e659d7e680a1457472bc99bda Mon Sep 17 00:00:00 2001 From: Roman I Khimov Date: Wed, 24 Mar 2010 00:33:57 +0300 Subject: cpan-base: add perl version to PR Makes perl modules rebuild on perl version change, since binary compatibility could be broken with that (although perl itself tries to maintain it within patchlevel range, like 5.8.7 -> 5.8.8). This is conditional on PACKAGE_ARCH, since there is nothing to rebuild for pure perl modules (and those should use 'PACKAGE_ARCH = "all"') even if they break with perl version change. This also should ease transition to perl 5.10.1. Signed-off-by: Roman I Khimov --- classes/cpan-base.bbclass | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'classes') diff --git a/classes/cpan-base.bbclass b/classes/cpan-base.bbclass index 8eb173eed5..1c77c9b69c 100644 --- a/classes/cpan-base.bbclass +++ b/classes/cpan-base.bbclass @@ -35,6 +35,14 @@ def is_target(d): return "yes" return "no" +def perl_get_version_suffix(d): + if bb.data.expand('${PACKAGE_ARCH}', d) != "all": + return '-' + get_perl_version(d) + else: + return '' + +PR .= "${@perl_get_version_suffix(d)}" + PERLLIBDIRS = "${@perl_get_libdirs(d)}" FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \ -- cgit 1.2.3-korg From 7f9e2c7d94dccc3082560cd33231d003839a7e50 Mon Sep 17 00:00:00 2001 From: Roman I Khimov Date: Tue, 9 Mar 2010 13:46:26 +0300 Subject: classes/cpan-base: fix perl version regexp Signed-off-by: Roman I Khimov --- classes/cpan-base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/cpan-base.bbclass b/classes/cpan-base.bbclass index 1c77c9b69c..6d3e234be8 100644 --- a/classes/cpan-base.bbclass +++ b/classes/cpan-base.bbclass @@ -17,7 +17,7 @@ def get_perl_version(d): return None l = f.readlines(); f.close(); - r = re.compile("version='(\d\.\d\.\d)'") + r = re.compile("version='(\d+\.\d+\.\d+)'") for s in l: m = r.match(s) if m: -- cgit 1.2.3-korg From 243f90253fdf8c69821d5328c1073a69277a1194 Mon Sep 17 00:00:00 2001 From: Roman I Khimov Date: Thu, 18 Mar 2010 18:29:38 +0300 Subject: cpan_build: adapt to new staging for native Signed-off-by: Roman I Khimov --- classes/cpan_build.bbclass | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'classes') diff --git a/classes/cpan_build.bbclass b/classes/cpan_build.bbclass index 899c4010ac..56f58168c7 100644 --- a/classes/cpan_build.bbclass +++ b/classes/cpan_build.bbclass @@ -3,7 +3,7 @@ # inherit cpan-base -INHIBIT_NATIVE_STAGE_INSTALL = "1" +NATIVE_INSTALL_WORKS = "1" # # We also need to have built libmodule-build-perl-native for @@ -46,12 +46,8 @@ cpan_build_do_compile () { cpan_build_do_install () { if [ ${@is_target(d)} == "yes" ]; then perl Build install - fi -} - -do_stage_append () { - if [ ${@is_target(d)} == "no" ]; then - perl Build install + else + perl Build install destdir="${WORKDIR}/image" fi } -- cgit 1.2.3-korg