1 |
commit: 2105ca92e27d14160374ce5a34a1a6a5da86cc24 |
2 |
Author: Kent Fredric <kentfredric <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Apr 28 09:37:56 2012 +0000 |
4 |
Commit: Kent Fredric <kentfredric <AT> gmail <DOT> com> |
5 |
CommitDate: Sat Apr 28 10:30:39 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=2105ca92 |
7 |
|
8 |
Specialcase gen_ebuild for open_source |
9 |
|
10 |
--- |
11 |
scripts/gen_ebuild.pl | 9 +++++++++ |
12 |
1 files changed, 9 insertions(+), 0 deletions(-) |
13 |
|
14 |
diff --git a/scripts/gen_ebuild.pl b/scripts/gen_ebuild.pl |
15 |
index f742a9b..b6c1f9b 100755 |
16 |
--- a/scripts/gen_ebuild.pl |
17 |
+++ b/scripts/gen_ebuild.pl |
18 |
@@ -170,11 +170,20 @@ my $licmap = { |
19 |
artistic_2 => [qw( Artistic-2 )], |
20 |
gpl_3 => [qw( GPL-3 )], |
21 |
}; |
22 |
+my $oddlic = { |
23 |
+ open_source => sub { |
24 |
+ warn "\n \e[31m*\e[0m User defined license in the metadata is 'open_source', which could mean any of: gpl, lgpl or mozilla. Please check Makefile/Build.PL" |
25 |
+ . "\n This is due to: https://metacpan.org/source/DAGOLDEN/CPAN-Meta-2.120921/lib/CPAN/Meta/Converter.pm#L155\n"; |
26 |
+ }, |
27 |
+}; |
28 |
|
29 |
for my $lic ( @{ $release_info->{license} } ) { |
30 |
if ( exists $licmap->{$lic} ) { |
31 |
push @$lics, @{ $licmap->{$lic} }; |
32 |
} |
33 |
+ elsif ( exists $oddlic->{$lic} ) { |
34 |
+ $oddlic->{$lic}->(); |
35 |
+ } |
36 |
else { |
37 |
warn "No Gentoo maping listed for $lic license type"; |
38 |
} |