=head1 VERSION
-Version 0.11
+Version 0.12
=cut
-our $VERSION = '0.11';
+our $VERSION = '0.12';
=head1 DESCRIPTION
=head1 FUNCTIONS
-=head2 C<name_c2g $name>
+=head2 C<name_c2g>
+
+ my $gentoo_pkg = name_c2g($cpan_dist);
Maps a CPAN distribution name to the corresponding Gentoo package name.
return $name_mismatch{$name} || $name;
}
-=head2 C<license_c2g @licenses>
+=head2 C<license_c2g>
+
+ my @gentoo_licenses = license_c2g(@meta_licenses);
Maps F<META.yml> C<license> tag values to the corresponding list of Gentoo license identifiers.
Duplicates are stripped off.
@_;
}
-=head2 C<version_c2g $name, $version>
+=head2 C<version_c2g>
+
+ my $gentoo_version = version_c2g($cpan_dist, $cpan_version);
Converts the C<$version> of a CPAN distribution C<$name> to a Gentoo version number.
};
my $insert_dot_every = sub {
- my ($version, $step) = @_;
+ my ($version, $step, $strip) = @_;
my $is_dev = $version =~ /_/;
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;
$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<
>;
$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
>;
$version_mismatch{$_} = $simple_and_correct_suffixes for qw<
- Gimp
XML-Grove
>;
return $handler->($v);
}
-=head2 C<perl_version_c2g $version>
+=head2 C<perl_version_c2g>
+
+ 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.
return join '.', map int, @parts;
}
-=head2 C<get_portage_timestamp $portage>
+=head2 C<get_portage_timestamp>
+
+ my $timestamp = get_portage_timestamp($portage);
Get the numerical timestamp associated with the portage tree located at C<$portage>.
Requires L<POSIX::strptime>, and returns C<undef> if it is not available.
=cut
-sub TIMESTAMP () { 1339737301 }
+sub TIMESTAMP () { 1367759701 }
=head1 SEE ALSO
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
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
Time-Period Period
Tk perl-tk
Wx wxperl
-XML-Sablotron XML-Sablot
YAML yaml
gettext Locale-gettext
txt2html TextToHTML