X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=fda4b054b8fb67c9c32911fa0db1452f73e0c4ef;hb=07bd0229f3fe4814b4355061f6cf2e97a3c76921;hp=cf3d3e8ef1140709a2f1748af427ca502a2f5ff7;hpb=5142e895bd8c21b1b542466a8deeb8a1730e2856;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index cf3d3e8..fda4b05 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -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 @@ -126,9 +127,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'; @@ -255,7 +260,7 @@ sub create { } my $d = $stat->header; - $d .= "# Generated by CPANPLUS::Dist::Gentoo\n\n"; + $d .= "# Generated by CPANPLUS::Dist::Gentoo version $VERSION\n\n"; $d .= 'MODULE_AUTHOR="' . $stat->author . "\"\ninherit perl-module\n\n"; $d .= 'S="${WORKDIR}/' . $stat->dist . "\"\n"; $d .= 'DESCRIPTION="' . $stat->desc . "\"\n"; @@ -358,7 +363,7 @@ Gentoo (L). L, L (core modules since 5.9.5). -L (since 5.001), L (5.002), L (5.00504). +L (since perl 5) L (5.001), L (5.002), L (5.00504). =head1 SEE ALSO @@ -386,6 +391,8 @@ You can find documentation for this module with the perldoc command. The module is to some extend cargo-culted from L and L. +Kent Fredric, for testing and suggesting improvements. + =head1 COPYRIGHT & LICENSE Copyright 2008 Vincent Pit, all rights reserved.