]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/blobdiff - lib/CPANPLUS/Dist/Gentoo.pm
More gentooisms
[perl/modules/CPANPLUS-Dist-Gentoo.git] / lib / CPANPLUS / Dist / Gentoo.pm
index 1fe2d5837a446aa0736e9031cfc3432b7a455950..25adfd351a6439ebe825eb3dd8c97378eef3a70f 100644 (file)
@@ -3,6 +3,7 @@ package CPANPLUS::Dist::Gentoo;
 use strict;
 use warnings;
 
+use Cwd qw/abs_path/;
 use File::Copy qw/copy/;
 use File::Path qw/mkpath/;
 use File::Spec::Functions qw/catdir catfile/;
@@ -19,11 +20,11 @@ CPANPLUS::Dist::Gentoo - CPANPLUS backend generating Gentoo ebuilds.
 
 =head1 VERSION
 
-Version 0.03
+Version 0.04
 
 =cut
 
-our $VERSION = '0.03';
+our $VERSION = '0.04';
 
 =head1 SYNOPSIS
 
@@ -81,13 +82,16 @@ sub init {
 }
 
 my %gentooism = (
+ 'Crypt-RSA'         => 'crypt-rsa',
  'Digest'            => 'digest-base',
  'Locale-Maketext'   => 'locale-maketext',
+ 'Math-Pari'         => 'math-pari',
  'Net-Ping'          => 'net-ping',
  'PathTools'         => 'File-Spec',
  'PodParser'         => 'Pod-Parser',
  'Set-Scalar'        => 'set-scalar',
  'Tie-EncryptedHash' => 'tie-encryptedhash',
+ 'YAML'              => 'yaml',
 );
 
 sub prepare {
@@ -126,9 +130,13 @@ sub prepare {
  }
  $stat->footer($footer);
 
- $stat->overlay(delete($opts{'overlay'}) || '/usr/local/portage');
+ my $overlay = delete $opts{'overlay'};
+ $overlay = (defined $overlay) ? abs_path $overlay : '/usr/local/portage';
+ $stat->overlay($overlay);
 
- $stat->distdir(delete($opts{'distdir'}) || '/usr/portage/distfiles');
+ my $distdir = delete $opts{'distdir'};
+ $distdir = (defined $distdir) ? abs_path $distdir : '/usr/portage/distfiles';
+ $stat->distdir($distdir);
 
  if ($stat->do_manifest && !-w $stat->distdir) {
   error 'distdir isn\'t writable -- aborting';
@@ -358,7 +366,7 @@ Gentoo (L<http://gentoo.org>).
 
 L<CPANPLUS>, L<IPC::Cmd> (core modules since 5.9.5).
 
-L<File::Path> (since 5.001), L<File::Copy> (5.002), L<File::Spec::Functions> (5.00504).
+L<Cwd> (since perl 5) L<File::Path> (5.001), L<File::Copy> (5.002), L<File::Spec::Functions> (5.00504).
 
 =head1 SEE ALSO