From a65ba920e8f634f3d7130291431c86880ace71d5 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Thu, 28 Sep 2006 21:21:31 +0000 Subject: perl: Update cpan.bbclass to set CCFLAGS to CFLAGS so that the compiler settings for the current OE build are used instead of the made up values in the perl config (which were manually generated since we are cross compiling). Remove this from each of the perl modules that was manually setting this. --- classes/cpan.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index c48bd1a980..0b90e754df 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -17,7 +17,7 @@ cpan_do_configure () { } cpan_do_compile () { - oe_runmake PASTHRU_INC="${CFLAGS}" + oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" } cpan_do_install () { -- cgit v1.2.3 From f662cfc52df978469eef38abbddcaea297bb478c Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Thu, 28 Sep 2006 22:18:54 +0000 Subject: perl: Update cpan_build to automatically add libmodule-build-perl-native to DEPENDS when building anything apart from libmodule-build-perl or libmodule-build-perl-native. When building itself it uses itself to provide the libmodule-build-perl code, for anything else it needs to have been built and installed. Remove the explicit depends from the modules that use it. --- classes/cpan_build.bbclass | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'classes') diff --git a/classes/cpan_build.bbclass b/classes/cpan_build.bbclass index b7cdf7d821..0660ef9b82 100644 --- a/classes/cpan_build.bbclass +++ b/classes/cpan_build.bbclass @@ -7,6 +7,23 @@ FILES_${PN} += '${libdir}/perl5' DEPENDS += "perl-native" RDEPENDS += "perl" +# +# We also need to have built libmodule-build-perl-native for +# everything except libmodule-build-perl-native itself (which uses +# this class, but uses itself as the probider of +# libmodule-build-perl) +# +def cpan_build_dep_prepend(d): + import bb; + if bb.data.getVar('CPAN_BUILD_DEPS', d, 1): + return '' + pn = bb.data.getVar('PN', d, 1) + if pn in ['libmodule-build-perl', 'libmodule-build-perl-native']: + return '' + return 'libmodule-build-perl-native ' + +DEPENDS_prepend = "${@cpan_build_dep_prepend(d)}" + def is_crosscompiling(d): import bb if not bb.data.inherits_class('native', d): -- cgit v1.2.3