1 package CPANPLUS::Dist::Gentoo::Maps;
8 CPANPLUS::Dist::Gentoo::Maps - Map CPAN objects to Gentoo and vice versa.
16 our $VERSION = '0.08';
20 This is an helper package to L<CPANPLUS::Dist::Gentoo>.
26 /^\s*([\w-]+)\s+([\w-]+)\s*$/ and $gentooisms{$1} = $2 while <DATA>;
32 =head2 C<name_c2g $name>
34 Maps a CPAN distribution name to its Gentoo counterpart.
40 return $gentooisms{$name} || $name;
43 =head2 C<license_c2g @licenses>
45 Maps F<META.yml> C<license> tag values to the corresponding list of Gentoo licenses identifiers.
46 Duplicates are stripped off.
48 The included data was gathered from L<Module::Install> and L<Software::License>.
53 apache => [ 'Apache-2.0' ],
54 artistic => [ 'Artistic' ],
55 artistic_2 => [ 'Artistic-2' ],
60 lgpl => [ 'LGPL-2.1' ],
61 lgpl2 => [ 'LGPL-2.1' ],
62 lgpl3 => [ 'LGPL-3' ],
64 mozilla => [ 'MPL-1.1' ],
65 perl => [ 'Artistic', 'GPL-2' ],
70 grep !$seen{$_}++, map @{$licenses{+lc} || []}, @_;
73 =head2 C<version_c2g $version>
75 Converts a CPAN version to a Gentoo version.
87 $v =~ s/([._])[._]*/$1/g;
89 ($v, my $patch, my @rest) = split /_/, $v;
90 $v .= '_p' . $patch if defined $patch;
91 $v .= join('.', '', @rest) if @rest;
96 =head2 C<version_gcmp $va, $vb>
98 Compares two Gentoo versions.
103 my ($a, $b) = map { defined() ? $_ : 0 } @_;
108 if (/^([\d.]*\d)\.*(?:_p\.*(\d[\d.]*))?\.*(?:-r(\d+))?$/) {
110 v => [ split /\.+/, $1 ],
111 p => [ split /\.+/, $2 || 0 ],
116 Carp::croak("Couldn't parse version string '$_'");
120 for my $k (qw/v p r/) {
123 while (@$xa or @$xb) {
124 my $na = shift(@$xa) || 0;
125 my $nb = shift(@$xb) || 0;
136 L<CPANPLUS::Dist::Gentoo>.
140 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
142 You can contact me by mail or on C<irc.perl.org> (vincent).
146 Please report any bugs or feature requests to C<bug-cpanplus-dist-gentoo at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CPANPLUS-Dist-Gentoo>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
150 You can find documentation for this module with the perldoc command.
152 perldoc CPANPLUS::Dist::Gentoo
154 =head1 COPYRIGHT & LICENSE
156 Copyright 2009 Vincent Pit, all rights reserved.
158 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
162 1; # End of CPANPLUS::Dist::Gentoo::Maps
165 ANSIColor Term-ANSIColor
167 Audio-CD Audio-CD-disc-cover
168 CGI-Simple Cgi-Simple
169 Cache-Mmap cache-mmap
170 Class-Loader class-loader
171 Class-ReturnValue class-returnvalue
172 Config-General config-general
173 Convert-ASCII-Armour convert-ascii-armour
174 Convert-PEM convert-pem
176 Crypt-DES_EDE3 crypt-des-ede3
179 Crypt-IDEA crypt-idea
180 Crypt-Primes crypt-primes
182 Crypt-Random crypt-random
183 DBIx-SearchBuilder dbix-searchbuilder
184 Data-Buffer data-buffer
186 Digest-BubbleBabble digest-bubblebabble
187 Digest-MD2 digest-md2
188 ExtUtils-Depends extutils-depends
189 ExtUtils-PkgConfig extutils-pkgconfig
190 Frontier-RPC frontier-rpc
193 Gnome2-Canvas gnome2-canvas
194 Gnome2-GConf gnome2-gconf
195 Gnome2-Print gnome2-print
196 Gnome2-VFS gnome2-vfs-perl
197 Gnome2-Wnck gnome2-wnck
199 Gtk2-Ex-FormFactory gtk2-ex-formfactory
200 Gtk2-GladeXML gtk2-gladexml
201 Gtk2-Spell gtk2-spell
202 Gtk2-TrayIcon gtk2-trayicon
203 Gtk2-TrayManager gtk2-traymanager
205 I18N-LangTags i18n-langtags
208 Inline-Files inline-files
209 Locale-Maketext locale-maketext
210 Locale-Maketext-Fuzzy locale-maketext-fuzzy
211 Locale-Maketext-Lexicon locale-maketext-lexicon
212 Log-Dispatch log-dispatch
214 Module-Info module-info
218 Net-SSH-Perl net-ssh-perl
219 Net-Server net-server
220 OLE-Storage_Lite OLE-StorageLite
221 Ogg-Vorbis-Header ogg-vorbis-header
225 Regexp-Common regexp-common
227 Set-Scalar set-scalar
228 String-CRC32 string-crc32
229 Text-Autoformat text-autoformat
230 Text-Reform text-reform
231 Text-Template text-template
232 Text-Wrapper text-wrapper
233 Tie-EncryptedHash tie-encryptedhash
237 gettext Locale-gettext