summaryrefslogtreecommitdiffstats
path: root/third_party/devscripts/chromium-1.patch
blob: ed40b4dcf73f778cbe9d43a1b05dff328b3516d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
--- licensecheck.pl.orig	2011-09-22 10:51:25.934402455 -0700
+++ licensecheck.pl	2011-09-22 10:45:54.585545044 -0700
@@ -241,6 +241,12 @@ my @files = ();
 my @find_args = ();
 my $files_count = @ARGV;
 
+push @find_args, qw(-not ( -path */LayoutTests/* -prune ) );
+push @find_args, qw(-not ( -path */out/Debug/* -prune ) );
+push @find_args, qw(-not ( -path */out/Release/* -prune ) );
+push @find_args, qw(-not ( -path *.git* -prune ) );
+push @find_args, qw(-not ( -path *.svn* -prune ) );
+
 push @find_args, qw(-maxdepth 1) unless $opt_recursive;
 push @find_args, qw(-follow -type f -print);
 
@@ -277,10 +277,6 @@
     while (<F>) {
         last if ($. > $opt_lines);
         $content .= $_;
-	$copyright_match = parse_copyright($_);
-	if ($copyright_match) {
-	    $copyrights{lc("$copyright_match")} = "$copyright_match";
-	}
     }
     close(F);
 
@@ -298,7 +294,6 @@
 
     $license = parselicense($content);
     print "$file: ";
-    print "*No copyright* " unless $copyright;
     print $license . "\n";
     print "  [Copyright: " . $copyright . "]\n"
       if $copyright and $opt_copyright;
@@ -398,15 +393,11 @@
 	$gplver = " (v$1 or later)";
     }
 
-    if ($licensetext =~ /(?:675 Mass Ave|59 Temple Place|51 Franklin Steet|02139|02111-1307)/i) {
-	$extrainfo = " (with incorrect FSF address)$extrainfo";
-    }
-
     if ($licensetext =~ /permission (?:is (also granted|given))? to link (the code of )?this program with (any edition of )?(Qt|the Qt library)/i) {
 	$extrainfo = " (with Qt exception)$extrainfo"
     }
 
-    if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDIT|delete this file)|Generated by)/i) {
+    if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDIT|delete this file)|Generated (automatically|by|from)|generated.*file)/i) {
 	$license = "GENERATED FILE";
     }
 
@@ -414,20 +405,12 @@
 	$license = "LGPL$gplver$extrainfo $license";
     }
 
-    if ($licensetext =~ /is free software.? you can redistribute it and\/or modify it under the terms of the (GNU Affero General Public License|AGPL)/i) {
-	$license = "AGPL$gplver$extrainfo $license";
-    }
-
     if ($licensetext =~ /is free software.? you (can|may) redistribute it and\/or modify it under the terms of (?:version [^ ]+ (?:\(?only\)? )?of )?the GNU General Public License/i) {
 	$license = "GPL$gplver$extrainfo $license";
-    }
-
-    if ($licensetext =~ /is distributed under the terms of the GNU General Public License,/
+    } elsif ($licensetext =~ /is distributed under the terms of the GNU General Public License,/
 	and length $gplver) {
 	$license = "GPL$gplver$extrainfo $license";
-    }
-
-    if ($licensetext =~ /is distributed.*terms.*GPL/) {
+    } elsif ($licensetext =~ /is distributed.*terms.*GPL/) {
 	$license = "GPL (unversioned/unknown version) $license";
     }
 
@@ -437,7 +420,7 @@
 	$license = "QPL $license";
     }
 
-    if ($licensetext =~ /http:\/\/opensource\.org\/licenses\/mit-license\.php/) {
+    if ($licensetext =~ /opensource\.org\/licenses\/mit-license\.php/) {
 	$license = "MIT/X11 (BSD like) $license";
     } elsif ($licensetext =~ /Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \(the Software\), to deal in the Software/) {
 	$license = "MIT/X11 (BSD like) $license";
@@ -448,15 +431,19 @@
     }
 
     if ($licensetext =~ /THIS SOFTWARE IS PROVIDED .*AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY/) {
-	if ($licensetext =~ /All advertising materials mentioning features or use of this software must display the following acknowledge?ment.*This product includes software developed by/i) {
+	if ($licensetext =~ /All advertising materials mentioning features or use of this software must display the following/) {
 	    $license = "BSD (4 clause) $license";
-	} elsif ($licensetext =~ /(The name of .*? may not|Neither the names? of .*? nor the names of (its|their) contributors may) be used to endorse or promote products derived from this software/i) {
+	} elsif ($licensetext =~ /be used to endorse or promote products derived from this software/) {
 	    $license = "BSD (3 clause) $license";
-	} elsif ($licensetext =~ /Redistributions of source code must retain the above copyright notice/i) {
+	} elsif ($licensetext =~ /Redistributions of source code must retain the above copyright notice/) {
 	    $license = "BSD (2 clause) $license";
 	} else {
 	    $license = "BSD $license";
 	}
+    } elsif ($licensetext =~ /Use of this source code is governed by a BSD-style license/) {
+        $license = "BSD-like $license";
+    } elsif ($licensetext =~ /BSD terms apply/) {
+        $license = "BSD-like $license";
     }
 
     if ($licensetext =~ /Mozilla Public License Version ([^ ]+)/) {
@@ -495,7 +482,7 @@
 	$license = "SGI Free Software License B $license";
     }
 
-    if ($licensetext =~ /is in the public domain/i) {
+    if ($licensetext =~ /in the public domain/i) {
 	$license = "Public domain";
     }
 
@@ -503,6 +490,10 @@
 	$license = "CDDL " . ($1 ? "(v$2) " : '') . $license;
     }
 
+    if ($licensetext =~ /Microsoft Permissive License \(Ms-PL\)/) {
+        $license = "Ms-PL $license";
+    }
+
     if ($licensetext =~ /Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license \(the \"Software\"\)/ or
 	$licensetext =~ /Boost Software License([ ,-]+Version ([^ ]+)?(\.))/i) {
 	$license = "BSL " . ($1 ? "(v$2) " : '') . $license;
@@ -515,18 +506,8 @@
     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
         $licensetext =~ /see copyright notice in zlib\.h/) {
 	$license = "zlib/libpng $license";
-    }
-
-    if ($licensetext =~ /Do What The Fuck You Want To Public License, Version ([^, ]+)/i) {
-        $license = "WTFPL (v$1)";
-    }
-
-    if ($licensetext =~ /Do what The Fuck You Want To Public License/i) {
-        $license = "WTFPL";
-    }
-
-    if ($licensetext =~ /(License WTFPL|Under (the|a) WTFPL)/i) {
-        $license = "WTFPL";
+    } elsif ($licensetext =~ /This code is released under the libpng license/) {
+        $license = "libpng $license";
     }
 
     $license = "UNKNOWN" if (!length($license));