| 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 my ($licensetext) = @_; | 386 my ($licensetext) = @_; |
| 387 | 387 |
| 388 my $gplver = ""; | 388 my $gplver = ""; |
| 389 my $extrainfo = ""; | 389 my $extrainfo = ""; |
| 390 my $license = ""; | 390 my $license = ""; |
| 391 | 391 |
| 392 if ($licensetext =~ /version ([^ ]+) (?:\(?only\)?.? )?(?:of the GNU (Affero
)?General Public License )?as published by the Free Software Foundation/i or | 392 if ($licensetext =~ /version ([^ ]+) (?:\(?only\)?.? )?(?:of the GNU (Affero
)?General Public License )?as published by the Free Software Foundation/i or |
| 393 $licensetext =~ /GNU (?:Affero )?General Public License as published by
the Free Software Foundation; version ([^ ]+) /i) { | 393 $licensetext =~ /GNU (?:Affero )?General Public License as published by
the Free Software Foundation; version ([^ ]+) /i) { |
| 394 | 394 |
| 395 $gplver = " (v$1)"; | 395 $gplver = " (v$1)"; |
| 396 } elsif ($licensetext =~ /GNU (Affero ?)General Public License, version ([^
]+?)[ .]/) { | 396 } elsif ($licensetext =~ /GNU (?:Affero ?)General Public License, version ([
^ ]+?)[ .]/) { |
| 397 $gplver = " (v$1)"; | 397 $gplver = " (v$1)"; |
| 398 } elsif ($licensetext =~ /either version ([^ ]+) of the License, or \(at you
r option\) any later version/) { | 398 } elsif ($licensetext =~ /either version ([^ ]+)(?: of the License)?, or \(a
t your option\) any later version/) { |
| 399 $gplver = " (v$1 or later)"; | 399 $gplver = " (v$1 or later)"; |
| 400 } | 400 } |
| 401 | 401 |
| 402 if ($licensetext =~ /permission (?:is (also granted|given))? to link (the co
de of )?this program with (any edition of )?(Qt|the Qt library)/i) { | 402 if ($licensetext =~ /permission (?:is (also granted|given))? to link (the co
de of )?this program with (any edition of )?(Qt|the Qt library)/i) { |
| 403 $extrainfo = " (with Qt exception)$extrainfo" | 403 $extrainfo = " (with Qt exception)$extrainfo" |
| 404 } | 404 } |
| 405 | 405 |
| 406 if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDI
T|delete this file)|Generated (automatically|by|from)|generated.*file)/i) { | 406 if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDI
T|delete this file)|Generated (automatically|by|from)|generated.*file)/i) { |
| 407 $license = "GENERATED FILE"; | 407 $license = "GENERATED FILE"; |
| 408 } | 408 } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 return $license; | 542 return $license; |
| 543 } | 543 } |
| 544 | 544 |
| 545 sub fatal($) { | 545 sub fatal($) { |
| 546 my ($pack,$file,$line); | 546 my ($pack,$file,$line); |
| 547 ($pack,$file,$line) = caller(); | 547 ($pack,$file,$line) = caller(); |
| 548 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; | 548 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; |
| 549 $msg =~ s/\n\n$/\n/; | 549 $msg =~ s/\n\n$/\n/; |
| 550 die $msg; | 550 die $msg; |
| 551 } | 551 } |
| OLD | NEW |