| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 } else { | 473 } else { |
| 474 $license = "BSD $license"; | 474 $license = "BSD $license"; |
| 475 } | 475 } |
| 476 } elsif ($licensetext =~ /Use of this source code is governed by a BSD-style
license/) { | 476 } elsif ($licensetext =~ /Use of this source code is governed by a BSD-style
license/) { |
| 477 $license = "BSD-like $license"; | 477 $license = "BSD-like $license"; |
| 478 } elsif ($licensetext =~ /BSD terms apply/) { | 478 } elsif ($licensetext =~ /BSD terms apply/) { |
| 479 $license = "BSD-like $license"; | 479 $license = "BSD-like $license"; |
| 480 } elsif ($licensetext =~ /subject to the BSD License/) { | 480 } elsif ($licensetext =~ /subject to the BSD License/) { |
| 481 # TODO(sbc): remove this case once we fix: http://crbug.com/177268 | 481 # TODO(sbc): remove this case once we fix: http://crbug.com/177268 |
| 482 $license = "BSD-like $license"; | 482 $license = "BSD-like $license"; |
| 483 } elsif ($licensetext =~ /license BSD/) { |
| 484 $license = "BSD-like $license"; |
| 483 } elsif ($licensetext =~ /GOVERNED BY A BSD-STYLE SOURCE LICENSE/) { | 485 } elsif ($licensetext =~ /GOVERNED BY A BSD-STYLE SOURCE LICENSE/) { |
| 484 $license = "BSD-like $license"; | 486 $license = "BSD-like $license"; |
| 485 } | 487 } |
| 486 | 488 |
| 487 if ($licensetext =~ /Mozilla Public License( Version|, v.) ([^ ]+[^. ])/) { | 489 if ($licensetext =~ /Mozilla Public License( Version|, v.) ([^ ]+[^. ])/) { |
| 488 $license = "MPL (v$2) $license"; | 490 $license = "MPL (v$2) $license"; |
| 489 } | 491 } |
| 490 | 492 |
| 491 if ($licensetext =~ /Released under the terms of the Artistic License ([^ ]+
)/) { | 493 if ($licensetext =~ /Released under the terms of the Artistic License ([^ ]+
)/) { |
| 492 $license = "Artistic (v$1) $license"; | 494 $license = "Artistic (v$1) $license"; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 return $license; | 591 return $license; |
| 590 } | 592 } |
| 591 | 593 |
| 592 sub fatal($) { | 594 sub fatal($) { |
| 593 my ($pack,$file,$line); | 595 my ($pack,$file,$line); |
| 594 ($pack,$file,$line) = caller(); | 596 ($pack,$file,$line) = caller(); |
| 595 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; | 597 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; |
| 596 $msg =~ s/\n\n$/\n/; | 598 $msg =~ s/\n\n$/\n/; |
| 597 die $msg; | 599 die $msg; |
| 598 } | 600 } |
| OLD | NEW |