From: Vincent Pit Date: Sat, 10 Oct 2009 13:05:48 +0000 (+0200) Subject: Rename misc "depends" items to "requires" X-Git-Tag: v0.09~21 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=0d54c05d27e53e16bc97eb47d63f11fc85e34f74;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git Rename misc "depends" items to "requires" --- diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 297a15d..a6b7734 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -190,7 +190,7 @@ sub init { my $conf = $self->parent->parent->configure_object; $stat->mk_accessors(qw/name version author distribution desc uri src license - fetched_arch deps + fetched_arch requires ebuild_name ebuild_version ebuild_dir ebuild_file portdir_overlay overlay distdir keywords do_manifest header footer @@ -338,8 +338,8 @@ sub prepare { $stat->license($self->intuit_license); - my $prereqs = $mod->status->prereqs; - my @depends; + my $prereqs = $mod->status->requires; + my @requires; for my $prereq (sort keys %$prereqs) { next if $prereq =~ /^perl(?:-|\z)/; my $obj = $int->module_tree($prereq); @@ -354,10 +354,10 @@ sub prepare { $version = $obj->package_version; } } - push @depends, [ $obj->package_name, $version ]; + push @requires, [ $obj->package_name, $version ]; } } - $stat->deps(\@depends); + $stat->requires(\@requires); return $OK->(); } @@ -510,8 +510,8 @@ sub ebuild_source { # We must resolve the deps now and not inside prepare because _cpan2portage # has to see the ebuilds already generated for the dependencies of the current # dist. - my @deps; - for (@{$stat->deps}) { + my @requires; + for (@{$stat->requires}) { my $dep = $self->_cpan2portage(@$_); unless (defined $dep) { $self->_abort( @@ -519,10 +519,10 @@ sub ebuild_source { ); return; } - push @deps, $dep; + push @requires, $dep; } - @deps = do { my %seen; sort grep !$seen{$_}++, 'dev-lang/perl', @deps }; + @requires = do { my %seen; sort grep !$seen{$_}++, 'dev-lang/perl',@requires }; my $d = $stat->header; $d .= "# Generated by CPANPLUS::Dist::Gentoo version $VERSION\n\n"; @@ -534,7 +534,7 @@ sub ebuild_source { $d .= "SLOT=\"0\"\n"; $d .= 'LICENSE="|| ( ' . join(' ', sort @{$stat->license}) . " )\"\n"; $d .= 'KEYWORDS="' . join(' ', sort @{$stat->keywords}) . "\"\n"; - $d .= 'RDEPEND="' . join("\n", @deps) . "\"\n"; + $d .= 'RDEPEND="' . join("\n", @requires) . "\"\n"; $d .= "DEPEND=\"\${RDEPEND}\"\n"; $d .= "SRC_TEST=\"do\"\n"; $d .= $stat->footer;