Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/devscripts/licensecheck.pl

Issue 1907603005: Add a dependency for FlatBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments on license Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | third_party/flatbuffers/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 if ($licensetext =~ /version ([^, ]+?)[.,]? (?:or later|or any later version ) (?:of the GNU (?:Lesser |Library )General Public License )(as )?published by t he Free Software Foundation/i or 453 if ($licensetext =~ /version ([^, ]+?)[.,]? (?:or later|or any later version ) (?:of the GNU (?:Lesser |Library )General Public License )(as )?published by t he Free Software Foundation/i or
454 $licensetext =~ /(?:GNU (?:Lesser |Library )|(?:Lesser|Library) GNU )Gen eral Public License (?:(?:as )?published by the Free Software Foundation;)?,? (? :either )?[Vv]ersion ([^, ]+?)(?: of the license)?[.,]? (?:or later|or (?:\(at y our option\) )?any later version)/i or 454 $licensetext =~ /(?:GNU (?:Lesser |Library )|(?:Lesser|Library) GNU )Gen eral Public License (?:(?:as )?published by the Free Software Foundation;)?,? (? :either )?[Vv]ersion ([^, ]+?)(?: of the license)?[.,]? (?:or later|or (?:\(at y our option\) )?any later version)/i or
455 $licensetext =~ /GNU (?:Lesser |Library )General Public License(?: \(LGP L\))?,? [Vv]ersion (\d+(?:\.\d+)?)[ \.]/) { 455 $licensetext =~ /GNU (?:Lesser |Library )General Public License(?: \(LGP L\))?,? [Vv]ersion (\d+(?:\.\d+)?)[ \.]/) {
456 $lgplver = " (v$1 or later)"; 456 $lgplver = " (v$1 or later)";
457 } 457 }
458 458
459 if ($licensetext =~ /permission (?:is (also granted|given))? to link (the co de of )?this program with (any edition of )?(Qt|the Qt library)/i) { 459 if ($licensetext =~ /permission (?:is (also granted|given))? to link (the co de of )?this program with (any edition of )?(Qt|the Qt library)/i) {
460 $extrainfo = " (with Qt exception)$extrainfo" 460 $extrainfo = " (with Qt exception)$extrainfo"
461 } 461 }
462 462
463 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) { 463 if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDI T|delete this file)|Generated (automatically|by|from)|generated.*file|automatica lly generated)/i) {
464 $license = "GENERATED FILE"; 464 $license = "GENERATED FILE";
465 } 465 }
466 466
467 if ($licensetext =~ /is (free software.? you can redistribute it and\/or mod ify it|licensed) under the terms of (version [^ ]+ of )?the (GNU (Library |Lesse r )General Public License|LGPL)/i or 467 if ($licensetext =~ /is (free software.? you can redistribute it and\/or mod ify it|licensed) under the terms of (version [^ ]+ of )?the (GNU (Library |Lesse r )General Public License|LGPL)/i or
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 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « DEPS ('k') | third_party/flatbuffers/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698