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 # | 7 # |
8 # This program is free software; you can redistribute it and/or modify | 8 # This program is free software; you can redistribute it and/or modify |
9 # it under the terms of the GNU General Public License as published by | 9 # it under the terms of the GNU General Public License as published by |
10 # the Free Software Foundation; either version 2 of the License, or | 10 # the Free Software Foundation; either version 2 of the License, or |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
520 $license = "PSF " . ($1 ? "(v$2) " : '') . $license; | 520 $license = "PSF " . ($1 ? "(v$2) " : '') . $license; |
521 } | 521 } |
522 | 522 |
523 if ($licensetext =~ /The origin of this software must not be misrepresented. *Altered source versions must be plainly marked as such.*This notice may not be removed or altered from any source distribution/ or | 523 if ($licensetext =~ /The origin of this software must not be misrepresented. *Altered source versions must be plainly marked as such.*This notice may not be removed or altered from any source distribution/ or |
524 $licensetext =~ /see copyright notice in zlib\.h/) { | 524 $licensetext =~ /see copyright notice in zlib\.h/) { |
525 $license = "zlib/libpng $license"; | 525 $license = "zlib/libpng $license"; |
526 } elsif ($licensetext =~ /This code is released under the libpng license/) { | 526 } elsif ($licensetext =~ /This code is released under the libpng license/) { |
527 $license = "libpng $license"; | 527 $license = "libpng $license"; |
528 } | 528 } |
529 | 529 |
530 if ($licensetext =~ /under MIT license/) { | |
531 $license = "MIT license $license"; | |
Paweł Hajdan Jr.
2011/10/21 06:53:30
This is good, just please use "MIT/X11 (BSD like)"
Ronghua
2011/10/21 19:04:06
Done.
| |
532 } | |
533 | |
530 $license = "UNKNOWN" if (!length($license)); | 534 $license = "UNKNOWN" if (!length($license)); |
531 | 535 |
532 return $license; | 536 return $license; |
533 } | 537 } |
534 | 538 |
535 sub fatal($) { | 539 sub fatal($) { |
536 my ($pack,$file,$line); | 540 my ($pack,$file,$line); |
537 ($pack,$file,$line) = caller(); | 541 ($pack,$file,$line) = caller(); |
538 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; | 542 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; |
539 $msg =~ s/\n\n$/\n/; | 543 $msg =~ s/\n\n$/\n/; |
540 die $msg; | 544 die $msg; |
541 } | 545 } |
OLD | NEW |