| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 $licensetext =~ /(is distributed|may be used|can redistribute).*terms.*(
LGPL|(Lesser|Library) GNU General Public License)/) { | 468 $licensetext =~ /(is distributed|may be used|can redistribute).*terms.*(
LGPL|(Lesser|Library) GNU General Public License)/) { |
| 469 if ($lgplver) { | 469 if ($lgplver) { |
| 470 $license = "LGPL$lgplver$extrainfo $license"; | 470 $license = "LGPL$lgplver$extrainfo $license"; |
| 471 } else { | 471 } else { |
| 472 $license = "LGPL (unversioned/unknown version) $license"; | 472 $license = "LGPL (unversioned/unknown version) $license"; |
| 473 } | 473 } |
| 474 } | 474 } |
| 475 | 475 |
| 476 if ($licensetext =~ /is free software.? you (can|may) redistribute it and\/o
r modify it under the terms of (?:version [^ ]+ (?:\(?only\)? )?of )?the GNU Gen
eral Public License/i) { | 476 if ($licensetext =~ /is free software.? you (can|may) redistribute it and\/o
r modify it under the terms of (?:version [^ ]+ (?:\(?only\)? )?of )?the GNU Gen
eral Public License/i) { |
| 477 $license = "GPL$gplver$extrainfo $license"; | 477 $license = "GPL$gplver$extrainfo $license"; |
| 478 } elsif ($licensetext =~ /is distributed under the terms of the GNU General
Public License,/ | 478 } elsif ($licensetext =~ /is distributed under the terms of the GNU General
Public License/ |
| 479 and $gplver) { | 479 and $gplver) { |
| 480 $license = "GPL$gplver$extrainfo $license"; | 480 $license = "GPL$gplver$extrainfo $license"; |
| 481 } elsif ($licensetext =~ /is distributed.*terms.*[^L]GPL/) { | 481 } elsif ($licensetext =~ /is distributed.*terms.*[^L]GPL/) { |
| 482 if ($gplver) { | 482 if ($gplver) { |
| 483 $license = "GPL$gplver$extrainfo $license"; | 483 $license = "GPL$gplver$extrainfo $license"; |
| 484 } else { | 484 } else { |
| 485 $license = "GPL (unversioned/unknown version) $license"; | 485 $license = "GPL (unversioned/unknown version) $license"; |
| 486 } | 486 } |
| 487 } | 487 } |
| 488 | 488 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 return $license; | 662 return $license; |
| 663 } | 663 } |
| 664 | 664 |
| 665 sub fatal($) { | 665 sub fatal($) { |
| 666 my ($pack,$file,$line); | 666 my ($pack,$file,$line); |
| 667 ($pack,$file,$line) = caller(); | 667 ($pack,$file,$line) = caller(); |
| 668 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; | 668 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; |
| 669 $msg =~ s/\n\n$/\n/; | 669 $msg =~ s/\n\n$/\n/; |
| 670 die $msg; | 670 die $msg; |
| 671 } | 671 } |
| OLD | NEW |