Update the license script to handle the new version of ICU (flutter/engine#4009)
This commit is contained in:
86
engine/src/flutter/tools/licenses/data/unicode
Normal file
86
engine/src/flutter/tools/licenses/data/unicode
Normal file
@@ -0,0 +1,86 @@
|
||||
Unicode® Terms of Use
|
||||
For the general privacy policy governing access to this site, see the Unicode Privacy Policy. For trademark usage, see the Unicode® Consortium Name and Trademark Usage Policy.
|
||||
|
||||
A. Unicode Copyright.
|
||||
1. Copyright © 1991-2017 Unicode, Inc. All rights reserved.
|
||||
2. Certain documents and files on this website contain a legend indicating that "Modification is permitted." Any person is hereby authorized, without fee, to modify such documents and files to create derivative works conforming to the Unicode® Standard, subject to Terms and Conditions herein.
|
||||
3. Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files solely for informational purposes and in the creation of products supporting the Unicode Standard, subject to the Terms and Conditions herein.
|
||||
4. Further specifications of rights and restrictions pertaining to the use of the particular set of data files known as the "Unicode Character Database" can be found in the License.
|
||||
5. Each version of the Unicode Standard has further specifications of rights and restrictions of use. For the book editions (Unicode 5.0 and earlier), these are found on the back of the title page. The online code charts carry specific restrictions. All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use.
|
||||
6. No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site.
|
||||
7. Modification is not permitted with respect to this document. All copies of this document must be verbatim.
|
||||
B. Restricted Rights Legend. Any technical data or software which is licensed to the United States of America, its agencies and/or instrumentalities under this Agreement is commercial technical data or commercial computer software developed exclusively at private expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, duplication, or disclosure by the Government is subject to restrictions as set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, as applicable, use, duplication or disclosure by the Government is subject to the restrictions set forth in this Agreement.
|
||||
C. Warranties and Disclaimers.
|
||||
1. This publication and/or website may include technical or typographical errors or other inaccuracies . Changes are periodically added to the information herein; these changes will be incorporated in new editions of the publication and/or website. Unicode may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time.
|
||||
2. If this file has been purchased on magnetic or optical media from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange of the defective media within ninety (90) days of original purchase.
|
||||
3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE.
|
||||
D. Waiver of Damages. In no event shall Unicode or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode was advised of the possibility of the damage, including, without limitation, those resulting from the following: loss of use, data or profits, in connection with the use, modification or distribution of this information or its derivatives.
|
||||
E. Trademarks & Logos.
|
||||
1. The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of Unicode, Inc. Use of the information and materials found on this website indicates your acknowledgement of Unicode, Inc.’s exclusive worldwide rights in the Unicode Word Mark, the Unicode Logo, and the Unicode trade names.
|
||||
2. The Unicode Consortium Name and Trademark Usage Policy (“Trademark Policy”) are incorporated herein by reference and you agree to abide by the provisions of the Trademark Policy, which may be changed from time to time in the sole discretion of Unicode, Inc.
|
||||
3. All third party trademarks referenced herein are the property of their respective owners.
|
||||
F. Miscellaneous.
|
||||
1. Jurisdiction and Venue. This server is operated from a location in the State of California, United States of America. Unicode makes no representation that the materials are appropriate for use in other locations. If you access this server from other locations, you are responsible for compliance with local laws. This Agreement, all use of this site and any claims and damages resulting from use of this site are governed solely by the laws of the State of California without regard to any principles which would apply the laws of a different jurisdiction. The user agrees that any disputes regarding this site shall be resolved solely in the courts located in Santa Clara County, California. The user agrees said courts have personal jurisdiction and agree to waive any right to transfer the dispute to any other forum.
|
||||
2. Modification by Unicode Unicode shall have the right to modify this Agreement at any time by posting it to this site. The user may not assign any part of this Agreement without Unicode’s prior written consent.
|
||||
3. Taxes. The user agrees to pay any taxes arising from access to this website or use of the information herein, except for those based on Unicode’s net income.
|
||||
4. Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect.
|
||||
5. Entire Agreement. This Agreement constitutes the entire agreement between the parties.
|
||||
|
||||
EXHIBIT 1
|
||||
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
|
||||
|
||||
Unicode Data Files include all data files under the directories
|
||||
http://www.unicode.org/Public/, http://www.unicode.org/reports/,
|
||||
http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
|
||||
http://www.unicode.org/utility/trac/browser/.
|
||||
|
||||
Unicode Data Files do not include PDF online code charts under the
|
||||
directory http://www.unicode.org/Public/.
|
||||
|
||||
Software includes any source code published in the Unicode Standard
|
||||
or under the directories
|
||||
http://www.unicode.org/Public/, http://www.unicode.org/reports/,
|
||||
http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
|
||||
http://www.unicode.org/utility/trac/browser/.
|
||||
|
||||
NOTICE TO USER: Carefully read the following legal agreement.
|
||||
BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
|
||||
DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
|
||||
YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
|
||||
TERMS AND CONDITIONS OF THIS AGREEMENT.
|
||||
IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
|
||||
THE DATA FILES OR SOFTWARE.
|
||||
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright © 1991-2017 Unicode, Inc. All rights reserved.
|
||||
Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Unicode data files and any associated documentation
|
||||
(the "Data Files") or Unicode software and any associated documentation
|
||||
(the "Software") to deal in the Data Files or Software
|
||||
without restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, and/or sell copies of
|
||||
the Data Files or Software, and to permit persons to whom the Data Files
|
||||
or Software are furnished to do so, provided that either
|
||||
(a) this copyright and permission notice appear with all copies
|
||||
of the Data Files or Software, or
|
||||
(b) this copyright and permission notice appear in associated
|
||||
Documentation.
|
||||
|
||||
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
|
||||
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
|
||||
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder
|
||||
shall not be used in advertising or otherwise to promote the sale,
|
||||
use or other dealings in these Data Files or Software without prior
|
||||
written authorization of the copyright holder.
|
||||
@@ -253,6 +253,10 @@ abstract class License implements Comparable<License> {
|
||||
body = new system.File('data/mit').readAsStringSync();
|
||||
type = LicenseType.mit;
|
||||
break;
|
||||
case 'http://www.unicode.org/copyright.html':
|
||||
body = new system.File('data/unicode').readAsStringSync();
|
||||
type = LicenseType.icu;
|
||||
break;
|
||||
default: throw 'unknown url $url';
|
||||
}
|
||||
return _registry.putIfAbsent(body, () => new License.fromBodyAndType(body, type, origin: origin));
|
||||
|
||||
@@ -549,72 +549,66 @@ class RepositoryIcuLicenseFile extends RepositoryLicenseFile {
|
||||
final List<License> _licenses;
|
||||
|
||||
static final RegExp _pattern = new RegExp(
|
||||
r'^ICU License - ICU [0-9.]+ and later\n+'
|
||||
r' *COPYRIGHT AND PERMISSION NOTICE\n+'
|
||||
r'^COPYRIGHT AND PERMISSION NOTICE \(ICU 58 and later\)\n+'
|
||||
r'( *Copyright (?:.|\n)+?)\n+' // 1
|
||||
r' *___________________________________________________________________\n+'
|
||||
r'( *All trademarks and registered trademarks mentioned herein are the\n'
|
||||
r' *property of their respective owners\.)\n+' // 2
|
||||
r' *___________________________________________________________________\n+'
|
||||
r'Third-Party Software Licenses\n+'
|
||||
r' *This section contains third-party software notices and/or additional\n'
|
||||
r' *terms for licensed third-party software components included within ICU\n'
|
||||
r' *libraries\.\n+'
|
||||
r' *1\. Unicode Data Files and Software[ \n]+?'
|
||||
r' *1\. ICU License - ICU 1.8.1 to ICU 57.1[ \n]+?'
|
||||
r' *COPYRIGHT AND PERMISSION NOTICE\n+'
|
||||
r'(Copyright (?:.|\n)+?)\n+' //3
|
||||
r'(Copyright (?:.|\n)+?)\n+' //2
|
||||
r' *2\. Chinese/Japanese Word Break Dictionary Data \(cjdict\.txt\)\n+'
|
||||
r' # The Google Chrome software developed by Google is licensed under the BSD li\n?'
|
||||
r'cense\. Other software included in this distribution is provided under other licen\n?'
|
||||
r'ses, as set forth below\.\n'
|
||||
r' # The Google Chrome software developed by Google is licensed under\n?'
|
||||
r' # the BSD license\. Other software included in this distribution is\n?'
|
||||
r' # provided under other licenses, as set forth below\.\n'
|
||||
r' #\n'
|
||||
r'( # The BSD License\n'
|
||||
r' # http://opensource\.org/licenses/bsd-license\.php\n'
|
||||
r' # +Copyright(?:.|\n)+?)\n' // 4
|
||||
r'( # The BSD License\n'
|
||||
r' # http://opensource\.org/licenses/bsd-license\.php\n'
|
||||
r' # +Copyright(?:.|\n)+?)\n' // 3
|
||||
r' #\n'
|
||||
r' #\n'
|
||||
r' # The word list in cjdict.txt are generated by combining three word lists l\n?'
|
||||
r'isted\n'
|
||||
r' # below with further processing for compound word breaking\. The frequency i\n?'
|
||||
r's generated\n'
|
||||
r' # with an iterative training against Google web corpora\.\n'
|
||||
r' # The word list in cjdict.txt are generated by combining three word lists\n?'
|
||||
r' # listed below with further processing for compound word breaking\. The\n?'
|
||||
r' # frequency is generated with an iterative training against Google web\n?'
|
||||
r' # corpora\.\n'
|
||||
r' #\n'
|
||||
r' # \* Libtabe \(Chinese\)\n'
|
||||
r' # - https://sourceforge\.net/project/\?group_id=1519\n'
|
||||
r' # - Its license terms and conditions are shown below\.\n'
|
||||
r' # \* Libtabe \(Chinese\)\n'
|
||||
r' # - https://sourceforge\.net/project/\?group_id=1519\n'
|
||||
r' # - Its license terms and conditions are shown below\.\n'
|
||||
r' #\n'
|
||||
r' # \* IPADIC \(Japanese\)\n'
|
||||
r' # - http://chasen\.aist-nara\.ac\.jp/chasen/distribution\.html\n'
|
||||
r' # - Its license terms and conditions are shown below\.\n'
|
||||
r' # \* IPADIC \(Japanese\)\n'
|
||||
r' # - http://chasen\.aist-nara\.ac\.jp/chasen/distribution\.html\n'
|
||||
r' # - Its license terms and conditions are shown below\.\n'
|
||||
r' #\n'
|
||||
r' # ---------COPYING\.libtabe ---- BEGIN--------------------\n'
|
||||
r' # ---------COPYING\.libtabe ---- BEGIN--------------------\n'
|
||||
r' #\n'
|
||||
r' # +/\*\n'
|
||||
r'( # +\* Copyrighy (?:.|\n)+?)\n' // yeah, that's a typo in the license. // 5
|
||||
r'( # +\* Copyrighy (?:.|\n)+?)\n' // yeah, that's a typo in the license. // 4
|
||||
r' # +\*/\n'
|
||||
r' #\n'
|
||||
r' # +/\*\n'
|
||||
r'( # +\* Copyright (?:.|\n)+?)\n' // 6
|
||||
r'( # +\* Copyright (?:.|\n)+?)\n' // 5
|
||||
r' # +\*/\n'
|
||||
r' #\n'
|
||||
r'( # +Copyright (?:.|\n)+?)\n' // 6
|
||||
r' #\n'
|
||||
r' # +---------------COPYING\.libtabe-----END--------------------------------\n'
|
||||
r' #\n'
|
||||
r' #\n'
|
||||
r' # +---------------COPYING\.ipadic-----BEGIN-------------------------------\n'
|
||||
r' #\n'
|
||||
r'( # +Copyright (?:.|\n)+?)\n' // 7
|
||||
r' #\n'
|
||||
r' # +---------------COPYING\.libtabe-----END-----------------------------------\n-\n'
|
||||
r' #\n'
|
||||
r' #\n'
|
||||
r' # +---------------COPYING\.ipadic-----BEGIN----------------------------------\n--\n'
|
||||
r' #\n'
|
||||
r'( # +Copyright (?:.|\n)+?)\n' // 8
|
||||
r' #\n'
|
||||
r' # +---------------COPYING\.ipadic-----END------------------------------------\n'
|
||||
r' # +---------------COPYING\.ipadic-----END----------------------------------\n'
|
||||
r'\n'
|
||||
r' *3\. Lao Word Break Dictionary Data \(laodict\.txt\)\n'
|
||||
r'\n'
|
||||
r'( # +Copyright(?:.|\n)+?)\n' // 9
|
||||
r'( # +Copyright(?:.|\n)+?)\n' // 8
|
||||
r'\n'
|
||||
r' *4\. Burmese Word Break Dictionary Data \(burmesedict\.txt\)\n'
|
||||
r'\n'
|
||||
r'( # +Copyright(?:.|\n)+?)\n' // 10
|
||||
r'( # +Copyright(?:.|\n)+?)\n' // 9
|
||||
r'\n'
|
||||
r' *5\. Time Zone Database\n'
|
||||
r'((?:.|\n)+)$',
|
||||
@@ -639,19 +633,19 @@ class RepositoryIcuLicenseFile extends RepositoryLicenseFile {
|
||||
final Match match = _pattern.firstMatch(io.readString());
|
||||
if (match == null)
|
||||
throw 'could not parse ICU license file';
|
||||
assert(match.groupCount == 11);
|
||||
if (match.group(11).contains(copyrightMentionPattern))
|
||||
assert(match.groupCount == 10);
|
||||
if (match.group(10).contains(copyrightMentionPattern))
|
||||
throw 'unexpected copyright in ICU license file';
|
||||
final List<License> result = <License>[
|
||||
new License.fromBodyAndType(_dewrap('${match.group(1)}\n\n${match.group(2)}'), LicenseType.icu, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(3)), LicenseType.unknown, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(1)), LicenseType.unknown, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(2)), LicenseType.icu, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(3)), LicenseType.bsd, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(4)), LicenseType.bsd, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(5)), LicenseType.bsd, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(6)), LicenseType.bsd, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(6)), LicenseType.unknown, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(7)), LicenseType.unknown, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(8)), LicenseType.unknown, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(8)), LicenseType.bsd, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(9)), LicenseType.bsd, origin: io.fullName),
|
||||
new License.fromBodyAndType(_dewrap(match.group(10)), LicenseType.bsd, origin: io.fullName),
|
||||
];
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -158,6 +158,7 @@ final List<RegExp> licenseFragments = <RegExp>[
|
||||
new RegExp(r'SUCH DAMAGE\.'),
|
||||
new RegExp(r'found in the LICENSE file'),
|
||||
new RegExp(r'<http://www\.gnu\.org/licenses/>'),
|
||||
new RegExp(r'License & terms of use'),
|
||||
];
|
||||
|
||||
final String _linebreak = r' *(?:(?:\*/ *|[*#])?(?:\n\1 *(?:\*/ *)?)*\n\1\2 *)?';
|
||||
@@ -1053,6 +1054,51 @@ final List<MultipleVersionedLicenseReferencePattern> csReferencesByUrl = <Multip
|
||||
)
|
||||
),
|
||||
|
||||
// ICU (Unicode)
|
||||
new MultipleVersionedLicenseReferencePattern(
|
||||
firstPrefixIndex: 1,
|
||||
indentPrefixIndex: 2,
|
||||
licenseIndices: const <int>[3],
|
||||
checkLocalFirst: false,
|
||||
pattern: new RegExp(
|
||||
kIndent +
|
||||
r'(?:©|Copyright \(C\)) 20.. and later: Unicode, Inc. and others.[ *]*\n'
|
||||
r'^\1\2License & terms of use: (http://www.unicode.org/copyright.html)',
|
||||
multiLine: true,
|
||||
caseSensitive: false,
|
||||
)
|
||||
),
|
||||
|
||||
// ICU (Unicode)
|
||||
new MultipleVersionedLicenseReferencePattern(
|
||||
firstPrefixIndex: 1,
|
||||
indentPrefixIndex: 2,
|
||||
licenseIndices: const <int>[3],
|
||||
checkLocalFirst: false,
|
||||
pattern: new RegExp(
|
||||
kIndent +
|
||||
r'Copyright \(C\) 2016 and later: Unicode, Inc. and others. License & terms of use: (http://www.unicode.org/copyright.html) *\n',
|
||||
multiLine: true,
|
||||
caseSensitive: false,
|
||||
)
|
||||
),
|
||||
|
||||
// ICU (Unicode)
|
||||
new MultipleVersionedLicenseReferencePattern(
|
||||
firstPrefixIndex: 1,
|
||||
indentPrefixIndex: 2,
|
||||
licenseIndices: const <int>[3],
|
||||
checkLocalFirst: false,
|
||||
pattern: new RegExp(
|
||||
kIndent +
|
||||
r'© 2016 and later: Unicode, Inc. and others. *\n'
|
||||
r'^ *License & terms of use: (http://www.unicode.org/copyright.html)#License *\n'
|
||||
r'^ *\n'
|
||||
r'^ *Copyright \(c\) 2000 IBM, Inc. and Others. *\n',
|
||||
multiLine: true,
|
||||
caseSensitive: false,
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
|
||||
@@ -1656,19 +1702,19 @@ final List<RegExp> csLicenses = <RegExp>[
|
||||
// ICU
|
||||
new RegExp(
|
||||
kIndent +
|
||||
r'This file is provided as-is by Unicode, Inc\. \(The Unicode Consortium\)\. *\n'
|
||||
r'^\1\2No claims are made as to fitness for any particular purpose\. +No *\n'
|
||||
r'^\1\2warranties of any kind are expressed or implied\. +The recipient *\n'
|
||||
r'^\1\2agrees to determine applicability of information provided\. +If this *\n'
|
||||
r'^\1\2file has been provided on optical media by Unicode, Inc\., the sole *\n'
|
||||
r'^\1\2remedy for any claim will be exchange of defective media within 90 *\n'
|
||||
r'^\1\2days of receipt\. *\n'
|
||||
r'^(?:(?:\1\2? *)? *\n)*'
|
||||
r'^\1\2Unicode, Inc\. +hereby grants the right to freely use the information *\n'
|
||||
r'^\1\2supplied in this file in the creation of products supporting the *\n'
|
||||
r'^\1\2Unicode Standard, and to make copies of this file in any form for *\n'
|
||||
r'^\1\2internal or external distribution as long as this notice remains *\n'
|
||||
r'^\1\2attached\.',
|
||||
r'This file is provided as-is by Unicode, Inc\. \(The Unicode Consortium\)\. '
|
||||
r'No claims are made as to fitness for any particular purpose\. No '
|
||||
r'warranties of any kind are expressed or implied\. The recipient '
|
||||
r'agrees to determine applicability of information provided\. If this '
|
||||
r'file has been provided on optical media by Unicode, Inc\., the sole '
|
||||
r'remedy for any claim will be exchange of defective media within 90 '
|
||||
r'days of receipt\. '
|
||||
r'Unicode, Inc\. hereby grants the right to freely use the information '
|
||||
r'supplied in this file in the creation of products supporting the '
|
||||
r'Unicode Standard, and to make copies of this file in any form for '
|
||||
r'internal or external distribution as long as this notice remains '
|
||||
r'attached\.'
|
||||
.replaceAll(' ', _linebreak),
|
||||
multiLine: true,
|
||||
caseSensitive: false
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user