[oe-commits] org.oe.dev perl: Update cpan_build to automatically add libmodule-build-perl-native to

lenehan commit openembedded-commits at lists.openembedded.org
Fri Sep 29 03:34:30 UTC 2006


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.

Author: lenehan at openembedded.org
Branch: org.openembedded.dev
Revision: 879222e30e61459039f6b006501371c7941f25b1
ViewMTN: http://monotone.openembedded.org/revision.psp?id=879222e30e61459039f6b006501371c7941f25b1
Files:
1
classes/cpan_build.bbclass
packages/perl/liblog-dispatch-perl_2.13.bb
Diffs:

#
# mt diff -re79a13804e13e6b94ac816f21d7e18a077cb278f -r879222e30e61459039f6b006501371c7941f25b1
#
# 
# 
# patch "classes/cpan_build.bbclass"
#  from [844aad791f2286fb8214eb729382db2087633676]
#    to [6722204da1a096e06eb9222cb735a469b4df08f4]
# 
# patch "packages/perl/liblog-dispatch-perl_2.13.bb"
#  from [d37f985c88634bd8b3f4eba583999324a692405b]
#    to [37abec6c62f90d235bf6c9e83e692519d41d8b8b]
# 
============================================================
--- classes/cpan_build.bbclass	844aad791f2286fb8214eb729382db2087633676
+++ classes/cpan_build.bbclass	6722204da1a096e06eb9222cb735a469b4df08f4
@@ -7,6 +7,23 @@ RDEPENDS += "perl"
 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):
============================================================
--- packages/perl/liblog-dispatch-perl_2.13.bb	d37f985c88634bd8b3f4eba583999324a692405b
+++ packages/perl/liblog-dispatch-perl_2.13.bb	37abec6c62f90d235bf6c9e83e692519d41d8b8b
@@ -1,9 +1,8 @@ LICENSE = "Artistic|GPL"
 DESCRIPTION = "Log::Dispatch - Dispatches messages to one or more outputs"
 SECTION = "libs"
 MAINTAINER = "Jamie Lenehan <lenehan at 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"
 






More information about the Openembedded-commits mailing list