-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move libpng to //flutter/third_party/libpng (#50571)
This is an example of moving a dependency to `//flutter/third_party` that requires forward/aliasing through the secondary build directory. Without forwarding, and only making changes to the `DEPS` file and rewriting paths in the engine repo, a `gn` invocation gets the following error: ``` ERROR at //third_party/freetype2/BUILD.gn:85:5: Can't load input file. "//third_party/libpng", ^--------------------- Unable to load: /Users/zra/flutter/engine/src/third_party/libpng/BUILD.gn I also checked in the secondary tree for: /Users/zra/flutter/engine/src/flutter/build/secondary/third_party/libpng/BUILD.gn ``` Another dependency, with a `BUILD.gn` file outside of the engine repo, is still referring to `libpng` by the old path. However, `gn` tells us that it is also checking under the secondary tree. We can put whatever we want in that `BUILD.gn` file to make `freetype2` happy. In this case it's easy, we just add a build rule there that forwards to `libpng`'s new location. There's only one wrinkle, which is that the dependency in the `group` target has to be `public_deps` rather than a simple `deps`. This is so that `public_deps` and `public_configs` of `//flutter/third_party/libpng` are correctly inherited by dependents of `//third_party/libpng`.
- Loading branch information
Showing
10 changed files
with
223 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright 2013 The Flutter Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
group("libpng") { | ||
public_deps = [ "//flutter/third_party/libpng" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1112,6 +1112,186 @@ See the License for the specific language governing permissions and | |
limitations under the License. | ||
==================================================================================================== | ||
|
||
==================================================================================================== | ||
LIBRARY: libpng | ||
ORIGIN: ../../../flutter/third_party/libpng/LICENSE | ||
ORIGIN: ../../../flutter/third_party/libpng/png.h | ||
TYPE: LicenseType.libpng | ||
FILE: ../../../flutter/third_party/libpng/arm/arm_init.c | ||
FILE: ../../../flutter/third_party/libpng/arm/filter_neon.S | ||
FILE: ../../../flutter/third_party/libpng/arm/filter_neon_intrinsics.c | ||
FILE: ../../../flutter/third_party/libpng/arm/palette_neon_intrinsics.c | ||
FILE: ../../../flutter/third_party/libpng/config.h.in | ||
FILE: ../../../flutter/third_party/libpng/example.c | ||
FILE: ../../../flutter/third_party/libpng/intel/filter_sse2_intrinsics.c | ||
FILE: ../../../flutter/third_party/libpng/intel/intel_init.c | ||
FILE: ../../../flutter/third_party/libpng/libpng.pc.in | ||
FILE: ../../../flutter/third_party/libpng/png.c | ||
FILE: ../../../flutter/third_party/libpng/png.h | ||
FILE: ../../../flutter/third_party/libpng/pngbar.jpg | ||
FILE: ../../../flutter/third_party/libpng/pngbar.png | ||
FILE: ../../../flutter/third_party/libpng/pngconf.h | ||
FILE: ../../../flutter/third_party/libpng/pngdebug.h | ||
FILE: ../../../flutter/third_party/libpng/pngerror.c | ||
FILE: ../../../flutter/third_party/libpng/pngget.c | ||
FILE: ../../../flutter/third_party/libpng/pnginfo.h | ||
FILE: ../../../flutter/third_party/libpng/pnglibconf.h | ||
FILE: ../../../flutter/third_party/libpng/pngmem.c | ||
FILE: ../../../flutter/third_party/libpng/pngnow.png | ||
FILE: ../../../flutter/third_party/libpng/pngpread.c | ||
FILE: ../../../flutter/third_party/libpng/pngprefix.h | ||
FILE: ../../../flutter/third_party/libpng/pngpriv.h | ||
FILE: ../../../flutter/third_party/libpng/pngread.c | ||
FILE: ../../../flutter/third_party/libpng/pngrio.c | ||
FILE: ../../../flutter/third_party/libpng/pngrtran.c | ||
FILE: ../../../flutter/third_party/libpng/pngrutil.c | ||
FILE: ../../../flutter/third_party/libpng/pngset.c | ||
FILE: ../../../flutter/third_party/libpng/pngstruct.h | ||
FILE: ../../../flutter/third_party/libpng/pngtest.c | ||
FILE: ../../../flutter/third_party/libpng/pngtest.png | ||
FILE: ../../../flutter/third_party/libpng/pngtrans.c | ||
FILE: ../../../flutter/third_party/libpng/pngusr.dfa | ||
FILE: ../../../flutter/third_party/libpng/pngwio.c | ||
FILE: ../../../flutter/third_party/libpng/pngwrite.c | ||
FILE: ../../../flutter/third_party/libpng/pngwtran.c | ||
FILE: ../../../flutter/third_party/libpng/pngwutil.c | ||
---------------------------------------------------------------------------------------------------- | ||
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE | ||
========================================= | ||
|
||
PNG Reference Library License version 2 | ||
--------------------------------------- | ||
|
||
* Copyright (c) 1995-2019 The PNG Reference Library Authors. | ||
* Copyright (c) 2018-2019 Cosmin Truta. | ||
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. | ||
* Copyright (c) 1996-1997 Andreas Dilger. | ||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. | ||
|
||
The software is supplied "as is", without warranty of any kind, | ||
express or implied, including, without limitation, the warranties | ||
of merchantability, fitness for a particular purpose, title, and | ||
non-infringement. In no event shall the Copyright owners, or | ||
anyone distributing the software, be liable for any damages or | ||
other liability, whether in contract, tort or otherwise, arising | ||
from, out of, or in connection with the software, or the use or | ||
other dealings in the software, even if advised of the possibility | ||
of such damage. | ||
|
||
Permission is hereby granted to use, copy, modify, and distribute | ||
this software, or portions hereof, for any purpose, without fee, | ||
subject to the following restrictions: | ||
|
||
1. The origin of this software must not be misrepresented; you | ||
must not claim that you wrote the original software. If you | ||
use this software in a product, an acknowledgment in the product | ||
documentation would be appreciated, but is not required. | ||
|
||
2. Altered source versions must be plainly marked as such, and must | ||
not be misrepresented as being the original software. | ||
|
||
3. This Copyright notice may not be removed or altered from any | ||
source or altered source distribution. | ||
|
||
|
||
PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) | ||
----------------------------------------------------------------------- | ||
|
||
libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are | ||
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are | ||
derived from libpng-1.0.6, and are distributed according to the same | ||
disclaimer and license as libpng-1.0.6 with the following individuals | ||
added to the list of Contributing Authors: | ||
|
||
Simon-Pierre Cadieux | ||
Eric S. Raymond | ||
Mans Rullgard | ||
Cosmin Truta | ||
Gilles Vollant | ||
James Yu | ||
Mandar Sahastrabuddhe | ||
Google Inc. | ||
Vadim Barkov | ||
|
||
and with the following additions to the disclaimer: | ||
|
||
There is no warranty against interference with your enjoyment of | ||
the library or against infringement. There is no warranty that our | ||
efforts or the library will fulfill any of your particular purposes | ||
or needs. This library is provided with all faults, and the entire | ||
risk of satisfactory quality, performance, accuracy, and effort is | ||
with the user. | ||
|
||
Some files in the "contrib" directory and some configure-generated | ||
files that are distributed with libpng have other copyright owners, and | ||
are released under other open source licenses. | ||
|
||
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are | ||
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from | ||
libpng-0.96, and are distributed according to the same disclaimer and | ||
license as libpng-0.96, with the following individuals added to the | ||
list of Contributing Authors: | ||
|
||
Tom Lane | ||
Glenn Randers-Pehrson | ||
Willem van Schaik | ||
|
||
libpng versions 0.89, June 1996, through 0.96, May 1997, are | ||
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, | ||
and are distributed according to the same disclaimer and license as | ||
libpng-0.88, with the following individuals added to the list of | ||
Contributing Authors: | ||
|
||
John Bowler | ||
Kevin Bracey | ||
Sam Bushell | ||
Magnus Holmgren | ||
Greg Roelofs | ||
Tom Tanner | ||
|
||
Some files in the "scripts" directory have other copyright owners, | ||
but are released under this license. | ||
|
||
libpng versions 0.5, May 1995, through 0.88, January 1996, are | ||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. | ||
|
||
For the purposes of this copyright and license, "Contributing Authors" | ||
is defined as the following set of individuals: | ||
|
||
Andreas Dilger | ||
Dave Martindale | ||
Guy Eric Schalnat | ||
Paul Schmidt | ||
Tim Wegner | ||
|
||
The PNG Reference Library is supplied "AS IS". The Contributing | ||
Authors and Group 42, Inc. disclaim all warranties, expressed or | ||
implied, including, without limitation, the warranties of | ||
merchantability and of fitness for any purpose. The Contributing | ||
Authors and Group 42, Inc. assume no liability for direct, indirect, | ||
incidental, special, exemplary, or consequential damages, which may | ||
result from the use of the PNG Reference Library, even if advised of | ||
the possibility of such damage. | ||
|
||
Permission is hereby granted to use, copy, modify, and distribute this | ||
source code, or portions hereof, for any purpose, without fee, subject | ||
to the following restrictions: | ||
|
||
1. The origin of this source code must not be misrepresented. | ||
|
||
2. Altered versions must be plainly marked as such and must not | ||
be misrepresented as being the original source. | ||
|
||
3. This Copyright notice may not be removed or altered from any | ||
source or altered source distribution. | ||
|
||
The Contributing Authors and Group 42, Inc. specifically permit, | ||
without fee, and encourage the use of this source code as a component | ||
to supporting the PNG file format in commercial products. If you use | ||
this source code in a product, acknowledgment is not required but would | ||
be appreciated. | ||
==================================================================================================== | ||
|
||
==================================================================================================== | ||
LIBRARY: libjpeg-turbo | ||
ORIGIN: ../../../flutter/third_party/libjpeg-turbo/src/rdcolmap.c | ||
|
@@ -11908,4 +12088,4 @@ TO DO | |
Please send bug reports, offers of help, etc. to [email protected]. | ||
==================================================================================================== | ||
|
||
Total license count: 113 | ||
Total license count: 114 |
Oops, something went wrong.