X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo%2FMaps.pm;h=5ce9f7ac5e535196b925c11fe80da9cb507b1266;hb=69b45a423d8ce50cc9c3cc8cb22a8822e698fb4f;hp=94d2e1603234a0c85117c0a02dfa8585f5af80c8;hpb=befc67bc91691a8ee10b9696d61ea3bb49e5b3d0;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo/Maps.pm b/lib/CPANPLUS/Dist/Gentoo/Maps.pm index 94d2e16..5ce9f7a 100644 --- a/lib/CPANPLUS/Dist/Gentoo/Maps.pm +++ b/lib/CPANPLUS/Dist/Gentoo/Maps.pm @@ -40,6 +40,36 @@ sub name_c2g { return $gentooisms{$name} || $name; } +=head2 C + +Maps F C tag values to the corresponding list of Gentoo licenses identifiers. +Duplicates are stripped off. + +The included data was gathered from L and L. + +=cut + +my %licenses = ( + apache => [ 'Apache-2.0' ], + artistic => [ 'Artistic' ], + artistic_2 => [ 'Artistic-2' ], + bsd => [ 'BSD' ], + gpl => [ 'GPL-1' ], + gpl2 => [ 'GPL-2' ], + gpl3 => [ 'GPL-3' ], + lgpl => [ 'LGPL-2.1' ], + lgpl2 => [ 'LGPL-2.1' ], + lgpl3 => [ 'LGPL-3' ], + mit => [ 'MIT' ], + mozilla => [ 'MPL-1.1' ], + perl => [ 'Artistic', 'GPL-2' ], +); + +sub license_c2g { + my %seen; + grep !$seen{$_}++, map @{$licenses{+lc} || []}, @_; +} + =head2 C Converts a CPAN version to a Gentoo version.