summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Lenehan <lenehan@twibble.org>2006-09-28 22:18:54 +0000
committerJamie Lenehan <lenehan@twibble.org>2006-09-28 22:18:54 +0000
commitf662cfc52df978469eef38abbddcaea297bb478c (patch)
treef05954d9f6831546667d0bebe887b5cc8012e5f5
parent43466984142b559813c7270c6d2d988ec57b0d9e (diff)
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.
-rw-r--r--classes/cpan_build.bbclass17
-rw-r--r--packages/perl/liblog-dispatch-perl_2.13.bb3
2 files changed, 18 insertions, 2 deletions
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):
diff --git a/packages/perl/liblog-dispatch-perl_2.13.bb b/packages/perl/liblog-dispatch-perl_2.13.bb
index 9b136a5bad..e14e65cb65 100644
--- a/packages/perl/liblog-dispatch-perl_2.13.bb
+++ b/packages/perl/liblog-dispatch-perl_2.13.bb
@@ -2,8 +2,7 @@ DESCRIPTION = "Log::Dispatch - Dispatches messages to one or more outputs"
SECTION = "libs"
MAINTAINER = "Jamie Lenehan <lenehan@twibble.org>"
LICENSE = "Artistic|GPL"
-DEPENDS = "libmodule-build-perl-native"
-PR = "r1"
+PR = "r2"
SRC_URI = "http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Log-Dispatch-2.13.tar.gz"