]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/blobdiff - lib/CPANPLUS/Dist/Gentoo.pm
Bump copyright year
[perl/modules/CPANPLUS-Dist-Gentoo.git] / lib / CPANPLUS / Dist / Gentoo.pm
index 3bc66a54e33b26ac96ae0d712f4be150d7a3cf7c..60970bfb38fbb7083874267417ec69f930affba1 100644 (file)
@@ -25,11 +25,11 @@ CPANPLUS::Dist::Gentoo - CPANPLUS backend generating Gentoo ebuilds.
 
 =head1 VERSION
 
-Version 0.08
+Version 0.09
 
 =cut
 
-our $VERSION = '0.08';
+our $VERSION = '0.09';
 
 =head1 SYNOPSIS
 
@@ -74,19 +74,19 @@ First, fetch tarballs for L<CPANPLUS> and L<CPANPLUS::Dist::Gentoo> :
 
     $ cd /tmp
     $ wget http://search.cpan.org/CPAN/authors/id/K/KA/KANE/CPANPLUS-0.88.tar.gz
-    $ wget http://search.cpan.org/CPAN/authors/id/V/VP/VPIT/CPANPLUS-Dist-Gentoo-0.08.tar.gz
+    $ wget http://search.cpan.org/CPAN/authors/id/V/VP/VPIT/CPANPLUS-Dist-Gentoo-0.09.tar.gz
 
 Log in as root and unpack them in e.g. your home directory :
 
     # cd
     # tar xzf /tmp/CPANPLUS-0.88.tar.gz
-    # tar xzf /tmp/CPANPLUS-Dist-Gentoo-0.08.tar.gz
+    # tar xzf /tmp/CPANPLUS-Dist-Gentoo-0.09.tar.gz
 
 Set up environment variables so that the toolchain is temporarily available :
 
     # export OLDPATH=$PATH
-    # export PATH=/root/CPANPLUS-Dist-Gentoo-0.08/bin:$PATH
-    # export PERL5LIB=/root/CPANPLUS-Dist-Gentoo-0.08/blib/lib:/root/CPANPLUS-0.88/lib:/root/CPANPLUS-0.88/inc/bundle
+    # export PATH=/root/CPANPLUS-0.88/bin:$PATH
+    # export PERL5LIB=/root/CPANPLUS-Dist-Gentoo-0.09/blib/lib:/root/CPANPLUS-0.88/lib:/root/CPANPLUS-0.88/inc/bundle
 
 Make sure you don't have an old C<.cpanplus> configuration visible :
 
@@ -94,7 +94,7 @@ Make sure you don't have an old C<.cpanplus> configuration visible :
 
 Bootstrap L<CPANPLUS> :
 
-    # cd /root/CPANPLUS-Dist-Gentoo-0.08
+    # cd /root/CPANPLUS-Dist-Gentoo-0.09
     # samples/g-cpanp CPANPLUS
 
 Reset the environment :
@@ -116,7 +116,7 @@ You may need to run each of these commands two times for them to succeed.
 
 At this point, you can bootstrap L<CPANPLUS::Dist::Gentoo> using the system L<CPANPLUS> :
 
-    # PERL5LIB=/root/CPANPLUS-Dist-Gentoo-0.08/blib/lib samples/g-cpanp CPANPLUS::Dist::Gentoo
+    # PERL5LIB=/root/CPANPLUS-Dist-Gentoo-0.09/blib/lib samples/g-cpanp CPANPLUS::Dist::Gentoo
     # emerge -tv CPANPLUS-Dist-Gentoo
 
 =back
@@ -324,7 +324,7 @@ sub prepare {
 
  $stat->prepared(0);
 
- $self->SUPER::prepare(%opts);
+ $self->SUPER::prepare(@_);
 
  return $FAIL->() unless $stat->prepared;
 
@@ -566,20 +566,17 @@ sub _cpan2portage {
     "$name-*.ebuild",
    ) or next;
 
-   my @atoms = map CPANPLUS::Dist::Gentoo::Atom->new(
-    defined $version ? (
-     ebuild => $_,
-     range  => '>=',
-    ) : (
-     category => $category,
-     name     => $name,
-    ),
-   ), @ebuilds;
+   my $last = reduce { $a < $b ? $b : $a } # handles overloading
+               map CPANPLUS::Dist::Gentoo::Atom->new_from_ebuild($_),
+                @ebuilds;
+   next if defined $version and $last < $version;
 
-   my $atom = reduce { $a < $b ? $b : $a } @atoms; # handles overloading
-   next if defined $version and $atom < $version;
-
-   return $atom;
+   return CPANPLUS::Dist::Gentoo::Atom->new(
+    category => $last->category,
+    name     => $last->name,
+    (defined $version ? (version => $version, range => '>=') : ()),
+    ebuild   => $last->ebuild,
+   );
   }
 
  }
@@ -696,7 +693,7 @@ Kent Fredric, for testing and suggesting improvements.
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2008-2009 Vincent Pit, all rights reserved.
+Copyright 2008,2009,2010 Vincent Pit, all rights reserved.
 
 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.