| 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 } elsif ($licensetext =~ /Permission is hereby granted, free of charge, to a
ny person obtaining a copy of this software and(\/or)? associated documentation
files \(the (Software|Materials)\), to deal in the (Software|Materials)/) { | 451 } elsif ($licensetext =~ /Permission is hereby granted, free of charge, to a
ny person obtaining a copy of this software and(\/or)? associated documentation
files \(the (Software|Materials)\), to deal in the (Software|Materials)/) { |
| 452 $license = "MIT/X11 (BSD like) $license"; | 452 $license = "MIT/X11 (BSD like) $license"; |
| 453 } elsif ($licensetext =~ /Permission is hereby granted, without written agre
ement and without license or royalty fees, to use, copy, modify, and distribute
this software and its documentation for any purpose/) { | 453 } elsif ($licensetext =~ /Permission is hereby granted, without written agre
ement and without license or royalty fees, to use, copy, modify, and distribute
this software and its documentation for any purpose/) { |
| 454 $license = "MIT/X11 (BSD like) $license"; | 454 $license = "MIT/X11 (BSD like) $license"; |
| 455 } | 455 } |
| 456 | 456 |
| 457 if ($licensetext =~ /This file is distributed under the University of Illin
ois Open Source License/){ | 457 if ($licensetext =~ /This file is distributed under the University of Illin
ois Open Source License/){ |
| 458 $license = "University of Illinois/NCSA Open Source License (BSD like) $
license"; | 458 $license = "University of Illinois/NCSA Open Source License (BSD like) $
license"; |
| 459 } | 459 } |
| 460 | 460 |
| 461 if ($licensetext =~ /Permission to use, copy, modify, and(\/or)? distribute
this software (and its documentation )?for any purpose (with or )?without fee i
s hereby granted, provided.*(copyright|entire) notice.*all copies/) { | 461 if ($licensetext =~ /Permission to use, copy, modify, and(\/or)? distribute
this software (and its documentation )?for any purpose (with or )?without fee i
s hereby granted, provided.*(copyright|entire) notice.*all copies/i) { |
| 462 $license = "ISC $license"; | 462 $license = "ISC $license"; |
| 463 } | 463 } |
| 464 | 464 |
| 465 if ($licensetext =~ /THIS SOFTWARE IS PROVIDED .*AS IS AND ANY EXPRESS OR IM
PLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCH
ANTABILITY/ || | 465 if ($licensetext =~ /THIS SOFTWARE IS PROVIDED .*AS IS AND ANY EXPRESS OR IM
PLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCH
ANTABILITY/ || |
| 466 $licensetext =~ /THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHA
NTABIL- ITY/) { | 466 $licensetext =~ /THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHA
NTABIL- ITY/) { |
| 467 if ($licensetext =~ /All advertising materials mentioning features or us
e of this software must display the following/) { | 467 if ($licensetext =~ /All advertising materials mentioning features or us
e of this software must display the following/) { |
| 468 $license = "BSD (4 clause) $license"; | 468 $license = "BSD (4 clause) $license"; |
| 469 } elsif ($licensetext =~ /be used to endorse or promote products derived
from this software/) { | 469 } elsif ($licensetext =~ /be used to endorse or promote products derived
from this software/) { |
| 470 $license = "BSD (3 clause) $license"; | 470 $license = "BSD (3 clause) $license"; |
| 471 } elsif ($licensetext =~ /Redistributions of source code must retain the
above copyright notice/) { | 471 } elsif ($licensetext =~ /Redistributions of source code must retain the
above copyright notice/) { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 return $license; | 578 return $license; |
| 579 } | 579 } |
| 580 | 580 |
| 581 sub fatal($) { | 581 sub fatal($) { |
| 582 my ($pack,$file,$line); | 582 my ($pack,$file,$line); |
| 583 ($pack,$file,$line) = caller(); | 583 ($pack,$file,$line) = caller(); |
| 584 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; | 584 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; |
| 585 $msg =~ s/\n\n$/\n/; | 585 $msg =~ s/\n\n$/\n/; |
| 586 die $msg; | 586 die $msg; |
| 587 } | 587 } |
| OLD | NEW |