X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo%2FMaps.pm;h=7ba1e945ad1cbbd2005bb69c0eed7687750b79e5;hb=19eae8789c3ed2068bfde084ba9a8c711526c589;hp=c564c4ba7fea79c0a8b3f7e1527b74d0714db9ea;hpb=d5ec73d3500d10154218a91cab682ff97287a21d;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo/Maps.pm b/lib/CPANPLUS/Dist/Gentoo/Maps.pm index c564c4b..7ba1e94 100644 --- a/lib/CPANPLUS/Dist/Gentoo/Maps.pm +++ b/lib/CPANPLUS/Dist/Gentoo/Maps.pm @@ -12,11 +12,11 @@ CPANPLUS::Dist::Gentoo::Maps - Map CPAN distribution names, version numbers and =head1 VERSION -Version 0.11 +Version 0.12 =cut -our $VERSION = '0.11'; +our $VERSION = '0.12'; =head1 DESCRIPTION @@ -32,7 +32,9 @@ close DATA; =head1 FUNCTIONS -=head2 C +=head2 C + + my $gentoo_pkg = name_c2g($cpan_dist); Maps a CPAN distribution name to the corresponding Gentoo package name. @@ -43,7 +45,9 @@ sub name_c2g { return $name_mismatch{$name} || $name; } -=head2 C +=head2 C + + my @gentoo_licenses = license_c2g(@meta_licenses); Maps F C tag values to the corresponding list of Gentoo license identifiers. Duplicates are stripped off. @@ -77,7 +81,9 @@ sub license_c2g { @_; } -=head2 C +=head2 C + + my $gentoo_version = version_c2g($cpan_dist, $cpan_version); Converts the C<$version> of a CPAN distribution C<$name> to a Gentoo version number. @@ -142,7 +148,7 @@ my $default_but_no_strip_2 = sub { }; my $insert_dot_every = sub { - my ($version, $step) = @_; + my ($version, $step, $strip) = @_; my $is_dev = $version =~ /_/; @@ -160,7 +166,9 @@ my $insert_dot_every = sub { my $pat = sprintf '.{1,%d}', $step || 1; push @parts, $subversion =~ /($pat)/g; - s/^0+([^0]|0\z)/$1/ for @parts; + if ($strip) { + s/^0+([^0]|0\z)/$1/ for @parts; + } $version = join '.', @parts; $version .= '_rc' if $is_dev; @@ -221,13 +229,12 @@ $version_mismatch{$_} = $default_but_ignore_v for qw< $version_mismatch{$_} = $default_but_no_strip_1 for qw< Crypt-RC4 + FLV-AudioExtractor File-Grep MogileFS-Client-Async MogileFS-Network ->; - -$version_mismatch{$_} = $default_but_no_strip_2 for qw< - Net-IMAP-Simple + Test-Command-Simple + Unix-Getrusage >; $version_mismatch{$_} = sub { $insert_dot_every->($_[0], 1) } for qw< @@ -236,29 +243,25 @@ $version_mismatch{$_} = sub { $insert_dot_every->($_[0], 1) } for qw< >; $version_mismatch{$_} = sub { $insert_dot_every->($_[0], 3) } for qw< - POE-Component-IKC + Data-Diver >; $version_mismatch{$_} = $simple_cleanup for qw< - Alien-SDL CGI-SpeedyCGI Class-ISA - Data-Uniqid - ExtUtils-Install - File-Path - Getopt-GUI-Long + CryptX + Data-HexDump Gtk2-Notify HTML-Table I18N-LangTags IO IPC-System-Simple Lab-Measurement - Log-TraceMessages - MusicBrainz-DiscID - Net-IRC Net-Ping + REST-Client SDL SOAP-WSDL + TAP-Parser-SourceHandler-pgTAP TeX-Encode Tie-Simple Time-Piece @@ -266,7 +269,6 @@ $version_mismatch{$_} = $simple_cleanup for qw< >; $version_mismatch{$_} = $simple_and_correct_suffixes for qw< - Gimp XML-Grove >; @@ -291,7 +293,9 @@ sub version_c2g { return $handler->($v); } -=head2 C +=head2 C + + my $gentoo_version = perl_version_c2g($perl_version); Converts a perl version number as you can find it in CPAN prerequisites to a Gentoo version number. @@ -316,7 +320,9 @@ sub perl_version_c2g { return join '.', map int, @parts; } -=head2 C +=head2 C + + my $timestamp = get_portage_timestamp($portage); Get the numerical timestamp associated with the portage tree located at C<$portage>. Requires L, and returns C if it is not available. @@ -364,7 +370,7 @@ Numerical timestamp associated with the revision of the portage tree that was us =cut -sub TIMESTAMP () { 1339737301 } +sub TIMESTAMP () { 1367759701 } =head1 SEE ALSO @@ -389,7 +395,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009,2010,2011 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011,2012 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. @@ -401,7 +407,6 @@ __DATA__ AcePerl Ace CGI-Simple Cgi-Simple CGI-SpeedyCGI SpeedyCGI -CPAN-Mini-Phalanx100 CPAN-Mini-Phalanx Cache-Mmap cache-mmap Class-Loader class-loader Class-ReturnValue class-returnvalue @@ -425,7 +430,6 @@ Digest-MD2 digest-md2 ExtUtils-Depends extutils-depends ExtUtils-PkgConfig extutils-pkgconfig Frontier-RPC frontier-rpc -Gimp gimp-perl Glib glib-perl Gnome2 gnome2-perl Gnome2-Canvas gnome2-canvas @@ -472,7 +476,6 @@ Tie-EncryptedHash tie-encryptedhash Time-Period Period Tk perl-tk Wx wxperl -XML-Sablotron XML-Sablot YAML yaml gettext Locale-gettext txt2html TextToHTML