return 1;
}
- $stat->created(0);
- $stat->dist(undef);
-
- $self->SUPER::create(@_);
-
- $stat->created(0);
- $stat->dist(undef);
-
my $dir = $stat->eb_dir;
unless (-d $dir) {
eval { mkpath $dir };
}
}
+ my %seen;
+
my $d = $stat->header;
$d .= "# Generated by CPANPLUS::Dist::Gentoo version $VERSION\n\n";
$d .= 'MODULE_AUTHOR="' . $stat->author . "\"\ninherit perl-module\n\n";
$d .= 'LICENSE="|| ( ' . join(' ', sort @{$stat->license}) . " )\"\n";
$d .= 'KEYWORDS="' . join(' ', sort @{$stat->keywords}) . "\"\n";
$d .= 'DEPEND="' . join("\n",
- 'dev-lang/perl',
- map $self->_cpan2portage(@$_), @{$stat->deps}
+ sort grep !$seen{$_}++, 'dev-lang/perl',
+ map $self->_cpan2portage(@$_), @{$stat->deps}
) . "\"\n";
$d .= "SRC_TEST=\"do\"\n";
$d .= $stat->footer;
print $eb $d;
close $eb;
+ $stat->created(0);
+ $stat->dist(undef);
+
+ $self->SUPER::create(@_);
+
+ $stat->created(0);
+ $stat->dist(undef);
+
if ($stat->do_manifest) {
unless (copy $stat->fetched_arch, $stat->distdir) {
error "Couldn\'t copy the distribution file to distdir ($!) -- aborting";