Roll expat and buildroot (flutter/engine#29813)

Update license script for new expat

Fixes https://github.com/flutter/flutter/issues/91384
This commit is contained in:
Jason Simmons
2021-11-19 07:57:58 -08:00
committed by GitHub
parent 3942c6c9f7
commit b92dab5c1f
4 changed files with 31 additions and 41 deletions

4
DEPS
View File

@@ -99,7 +99,7 @@ allowed_hosts = [
]
deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '3dc3ec56b3dc76ba60c8348053a9f6ef3446b0f2',
'src': 'https://github.com/flutter/buildroot.git' + '@' + '0b267aac6794712a6d9d0f31dda3f844325d0258',
# Fuchsia compatibility
#
@@ -364,7 +364,7 @@ deps = {
Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8',
'src/third_party/expat':
Var('flutter_git') + '/third_party/expat' + '@' + '1441fc5252746e53b285d15be7e65e4cd74d97eb',
Var('chromium_git') + '/external/github.com/libexpat/libexpat.git' + '@' + 'a28238bdeebc087071777001245df1876a11f5ee',
'src/third_party/freetype2':
Var('flutter_git') + '/third_party/freetype2' + '@' + '1f03c1b2d7f2ae832a4fbe9d12bd96c3c15bbece',

View File

@@ -1,2 +1,2 @@
Signature: b868c0ccb9fa443bfee873dcaa5a0fc6
Signature: cfae70279279e1439f8c121bf3795393

View File

@@ -52,9 +52,9 @@ abstract class _RepositoryLicensedFile extends _RepositoryFile {
// file names that we are confident won't be included in the final build product
static final RegExp _readmeNamePattern = RegExp(r'\b_*(?:readme|contributing|patents)_*\b', caseSensitive: false);
static final RegExp _buildTimePattern = RegExp(r'^(?!.*gen$)(?:CMakeLists\.txt|(?:pkgdata)?Makefile(?:\.inc)?(?:\.am|\.in|)|configure(?:\.ac|\.in)?|config\.(?:sub|guess)|.+\.m4|install-sh|.+\.sh|.+\.bat|.+\.pyc?|.+\.pl|icu-configure|.+\.gypi?|.*\.gni?|.+\.mk|.+\.cmake|.+\.gradle|.+\.yaml|pubspec\.lock|\.packages|vms_make\.com|pom\.xml|\.project|source\.properties|.+\.obj|.+\.autopkg)$', caseSensitive: false);
static final RegExp _buildTimePattern = RegExp(r'^(?!.*gen$)(?:CMakeLists\.txt|(?:pkgdata)?Makefile(?:\.inc)?(?:\.am|\.in|)|configure(?:\.ac|\.in)?|config\.(?:sub|guess)|.+\.m4|install-sh|.+\.sh|.+\.bat|.+\.pyc?|.+\.pl|icu-configure|.+\.gypi?|.*\.gni?|.+\.mk|.+\.cmake|.+\.gradle|.+\.yaml|pubspec\.lock|\.packages|vms_make\.com|pom\.xml|\.project|source\.properties|.+\.obj|.+\.autopkg|Brewfile)$', caseSensitive: false);
static final RegExp _docsPattern = RegExp(r'^(?:INSTALL|NEWS|OWNERS|AUTHORS|ChangeLog(?:\.rst|\.[0-9]+)?|.+\.txt|.+\.md|.+\.log|.+\.css|.+\.1|doxygen\.config|Doxyfile|.+\.spec(?:\.in)?)$', caseSensitive: false);
static final RegExp _devPattern = RegExp(r'^(?:codereview\.settings|.+\.~|.+\.~[0-9]+~|\.clang-format|\.gitattributes|\.landmines|\.DS_Store|\.travis\.yml|\.cirrus\.yml|\.cache)$', caseSensitive: false);
static final RegExp _devPattern = RegExp(r'^(?:codereview\.settings|.+\.~|.+\.~[0-9]+~|\.clang-format|\.gitattributes|\.landmines|\.DS_Store|\.travis\.yml|\.cirrus\.yml|\.cache|\.mailmap)$', caseSensitive: false);
static final RegExp _testsPattern = RegExp(r'^(?:tj(?:bench|example)test\.(?:java\.)?in|example\.c)$', caseSensitive: false);
// The ICU library has sample code that will never get linked.
static final RegExp _icuSamplesPattern = RegExp(r'.*(?:icu\/source\/samples).*$', caseSensitive: false);
@@ -1362,6 +1362,23 @@ class _RepositoryExpatDirectory extends _RepositoryDirectory {
@override
bool get subdirectoriesAreLicenseRoots => true;
@override
_RepositoryDirectory createSubdirectory(fs.Directory entry) {
if (entry.name == 'expat')
return _RepositoryExpatExpatDirectory(this, entry);
return super.createSubdirectory(entry);
}
}
class _RepositoryExpatExpatDirectory extends _RepositoryDirectory {
_RepositoryExpatExpatDirectory(_RepositoryDirectory parent, fs.Directory io) : super(parent, io);
@override
bool shouldRecurse(fs.IoNode entry) {
return entry.name != 'doc' // we don't ship the documentation
&& super.shouldRecurse(entry);
}
}
class _RepositoryFreetypeDocsDirectory extends _RepositoryDirectory {

View File

@@ -189,13 +189,6 @@ final List<RegExp> csNoCopyrights = <RegExp>[
// used with _tryNone
// groups are ignored
// Seen in Expat files
RegExp(
r'^// No copyright notice; this file based on autogenerated header',
multiLine: true,
caseSensitive: false
),
// Seen in Android NDK
RegExp(
r'^[/* ]*This header was automatically generated from a Linux kernel header\n'
@@ -403,33 +396,6 @@ final List<LicenseFileReferencePattern> csReferencesByFilename = <LicenseFileRef
)
),
// Seen in Expat files
LicenseFileReferencePattern(
firstPrefixIndex: 1,
indentPrefixIndex: 2,
fileIndex: 3,
pattern: RegExp(
kIndent + r'See the file ([^ ]+) for copying permission\.',
multiLine: true,
caseSensitive: false,
)
),
// Seen in Expat files
LicenseFileReferencePattern(
firstPrefixIndex: 1,
indentPrefixIndex: 2,
fileIndex: 3,
pattern: RegExp(
kIndent +
r'This is free software. You are permitted to copy, distribute, or modify *\n'
r'^\1\2it under the terms of the MIT/X license \(contained in the ([^ ]+) file *\n'
r'^\1\2with this distribution\.\)',
multiLine: true,
caseSensitive: false,
)
),
// Seen in FreeType software
LicenseFileReferencePattern(
firstPrefixIndex: 1,
@@ -1577,9 +1543,16 @@ final List<RegExp> csLicenses = <RegExp>[
// MIT-DERIVED LICENSES
// Seen in Mesa, among others.
// A version with "// -------" between sections seen in ffx_spd.
RegExp(
kIndent +
(
r'(?:' // this bit is optional
r'Licensed under the MIT license:\r?\n' // seen in expat
r'\1\2? *\r?\n' // blank line
r'\1\2' // this is the prefix for the next block (handled by kIndent if this optional bit is skipped)
r')?' // end of optional bit
)
+
(
r'Permission is hereby granted, free of charge, to any person obtaining '
r'a copy of this software and(?: /or)? associated documentation files \(the "(?:Software|Materials) "\), '
@@ -1593,7 +1566,7 @@ final List<RegExp> csLicenses = <RegExp>[
r'(?:'
+
(
r'(?:(?:\1\2?(?: *| -*))? *\r?\n)*'
r'(?:(?:\1\2?(?: *| -*))? *\r?\n)*' // A version with "// -------" between sections was seen in ffx_spd, hence the -*.
+