OLD | NEW |
1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -w |
2 # This script was originally based on the script of the same name from | 2 # This script was originally based on the script of the same name from |
3 # the KDE SDK (by dfaure@kde.org) | 3 # the KDE SDK (by dfaure@kde.org) |
4 # | 4 # |
5 # This version is | 5 # This version is |
6 # Copyright (C) 2007, 2008 Adam D. Barratt | 6 # Copyright (C) 2007, 2008 Adam D. Barratt |
7 # Copyright (C) 2012 Francesco Poli | 7 # Copyright (C) 2012 Francesco Poli |
8 # | 8 # |
9 # This program is free software; you can redistribute it and/or modify | 9 # This program is free software; you can redistribute it and/or modify |
10 # it under the terms of the GNU General Public License as published by | 10 # it under the terms of the GNU General Public License as published by |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 $license = "BSD-like $license"; | 524 $license = "BSD-like $license"; |
525 } elsif ($licensetext =~ /BSD terms apply/) { | 525 } elsif ($licensetext =~ /BSD terms apply/) { |
526 $license = "BSD-like $license"; | 526 $license = "BSD-like $license"; |
527 } elsif ($licensetext =~ /subject to the BSD License/) { | 527 } elsif ($licensetext =~ /subject to the BSD License/) { |
528 # TODO(sbc): remove this case once we fix: http://crbug.com/177268 | 528 # TODO(sbc): remove this case once we fix: http://crbug.com/177268 |
529 $license = "BSD-like $license"; | 529 $license = "BSD-like $license"; |
530 } elsif ($licensetext =~ /license BSD/) { | 530 } elsif ($licensetext =~ /license BSD/) { |
531 $license = "BSD-like $license"; | 531 $license = "BSD-like $license"; |
532 } elsif ($licensetext =~ /GOVERNED BY A BSD-STYLE SOURCE LICENSE/) { | 532 } elsif ($licensetext =~ /GOVERNED BY A BSD-STYLE SOURCE LICENSE/) { |
533 $license = "BSD-like $license"; | 533 $license = "BSD-like $license"; |
| 534 } elsif ($licensetext =~ /BSD 3-Clause license/) { |
| 535 $license = "BSD (3 clause) $license"; |
534 } | 536 } |
535 | 537 |
536 if ($licensetext =~ /Mozilla Public License( Version|, v.) ([^ ]+[^., ]),?/)
{ | 538 if ($licensetext =~ /Mozilla Public License( Version|, v.) ([^ ]+[^., ]),?/)
{ |
537 $license = "MPL (v$2) $license"; | 539 $license = "MPL (v$2) $license"; |
538 } | 540 } |
539 | 541 |
540 if ($licensetext =~ /Released under the terms of the Artistic License ([^ ]+
)/) { | 542 if ($licensetext =~ /Released under the terms of the Artistic License ([^ ]+
)/) { |
541 $license = "Artistic (v$1) $license"; | 543 $license = "Artistic (v$1) $license"; |
542 } | 544 } |
543 | 545 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 return $license; | 651 return $license; |
650 } | 652 } |
651 | 653 |
652 sub fatal($) { | 654 sub fatal($) { |
653 my ($pack,$file,$line); | 655 my ($pack,$file,$line); |
654 ($pack,$file,$line) = caller(); | 656 ($pack,$file,$line) = caller(); |
655 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; | 657 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; |
656 $msg =~ s/\n\n$/\n/; | 658 $msg =~ s/\n\n$/\n/; |
657 die $msg; | 659 die $msg; |
658 } | 660 } |
OLD | NEW |