| OLD | NEW |
| (Empty) | |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 6 # for details. All rights reserved. Use of this source code is governed by a |
| 7 # BSD-style license that can be found in the LICENSE file. |
| 8 |
| 9 # This file is a modified copy of src/third_party/zlib/zlib.gyp from Chromium. |
| 10 # Revision 165464 (this should agree with "nss_rev" in DEPS). |
| 11 { |
| 12 # Added by Dart. All Dart comments refer to the following block or line. |
| 13 'includes': [ |
| 14 '../../tools/gyp/runtime-configurations.gypi', |
| 15 '../../tools/gyp/nss_configurations.gypi', |
| 16 ], |
| 17 'variables': { |
| 18 # Added by Dart. |
| 19 'zlib_path': '../../../third_party/zlib', |
| 20 'conditions': [ |
| 21 [ 'OS=="none"', { |
| 22 # Because we have a patched zlib, we cannot use the system libz. |
| 23 # TODO(pvalchev): OpenBSD is purposefully left out, as the system |
| 24 # zlib brings up an incompatibility that breaks rendering. |
| 25 'use_system_zlib%': 1, |
| 26 }, { |
| 27 'use_system_zlib%': 0, |
| 28 }], |
| 29 ], |
| 30 'use_system_minizip%': 0, |
| 31 }, |
| 32 'targets': [ |
| 33 { |
| 34 'target_name': 'zlib', |
| 35 'type': 'static_library', |
| 36 'conditions': [ |
| 37 ['use_system_zlib==0', { |
| 38 # Changed by Dart: '<(zlib_directory)/' added to all paths. |
| 39 'sources': [ |
| 40 '<(zlib_path)/adler32.c', |
| 41 '<(zlib_path)/compress.c', |
| 42 '<(zlib_path)/crc32.c', |
| 43 '<(zlib_path)/crc32.h', |
| 44 '<(zlib_path)/deflate.c', |
| 45 '<(zlib_path)/deflate.h', |
| 46 '<(zlib_path)/gzio.c', |
| 47 '<(zlib_path)/infback.c', |
| 48 '<(zlib_path)/inffast.c', |
| 49 '<(zlib_path)/inffast.h', |
| 50 '<(zlib_path)/inffixed.h', |
| 51 '<(zlib_path)/inflate.c', |
| 52 '<(zlib_path)/inflate.h', |
| 53 '<(zlib_path)/inftrees.c', |
| 54 '<(zlib_path)/inftrees.h', |
| 55 '<(zlib_path)/mozzconf.h', |
| 56 '<(zlib_path)/trees.c', |
| 57 '<(zlib_path)/trees.h', |
| 58 '<(zlib_path)/uncompr.c', |
| 59 '<(zlib_path)/zconf.h', |
| 60 '<(zlib_path)/zlib.h', |
| 61 '<(zlib_path)/zutil.c', |
| 62 '<(zlib_path)/zutil.h', |
| 63 ], |
| 64 'include_dirs': [ |
| 65 '<(zlib_path)/.', |
| 66 ], |
| 67 'direct_dependent_settings': { |
| 68 'include_dirs': [ |
| 69 '<(zlib_path)/.', |
| 70 ], |
| 71 }, |
| 72 'conditions': [ |
| 73 ['OS!="win"', { |
| 74 'product_name': 'chrome_zlib', |
| 75 }], ['OS=="android"', { |
| 76 'toolsets': ['target', 'host'], |
| 77 }], |
| 78 ], |
| 79 }, { |
| 80 'direct_dependent_settings': { |
| 81 'defines': [ |
| 82 'USE_SYSTEM_ZLIB', |
| 83 ], |
| 84 }, |
| 85 'defines': [ |
| 86 'USE_SYSTEM_ZLIB', |
| 87 ], |
| 88 'link_settings': { |
| 89 'libraries': [ |
| 90 '-lz', |
| 91 ], |
| 92 }, |
| 93 }], |
| 94 ], |
| 95 }, |
| 96 { |
| 97 'target_name': 'minizip', |
| 98 'type': 'static_library', |
| 99 'conditions': [ |
| 100 ['use_system_minizip==0', { |
| 101 'sources': [ |
| 102 '<(zlib_path)/contrib/minizip/ioapi.c', |
| 103 '<(zlib_path)/contrib/minizip/ioapi.h', |
| 104 '<(zlib_path)/contrib/minizip/iowin32.c', |
| 105 '<(zlib_path)/contrib/minizip/iowin32.h', |
| 106 '<(zlib_path)/contrib/minizip/unzip.c', |
| 107 '<(zlib_path)/contrib/minizip/unzip.h', |
| 108 '<(zlib_path)/contrib/minizip/zip.c', |
| 109 '<(zlib_path)/contrib/minizip/zip.h', |
| 110 ], |
| 111 'include_dirs': [ |
| 112 '<(zlib_path)/.', |
| 113 '<(zlib_path)/../..', |
| 114 ], |
| 115 'direct_dependent_settings': { |
| 116 'include_dirs': [ |
| 117 '<(zlib_path)/.', |
| 118 ], |
| 119 }, |
| 120 'conditions': [ |
| 121 ['OS!="win"', { |
| 122 'sources!': [ |
| 123 '<(zlib_path)/contrib/minizip/iowin32.c' |
| 124 ], |
| 125 }], |
| 126 ['OS=="android"', { |
| 127 'toolsets': ['target', 'host'], |
| 128 }], |
| 129 ], |
| 130 }, { |
| 131 'direct_dependent_settings': { |
| 132 'defines': [ |
| 133 'USE_SYSTEM_MINIZIP', |
| 134 ], |
| 135 }, |
| 136 'defines': [ |
| 137 'USE_SYSTEM_MINIZIP', |
| 138 ], |
| 139 'link_settings': { |
| 140 'libraries': [ |
| 141 '-lminizip', |
| 142 ], |
| 143 }, |
| 144 }], |
| 145 ['OS=="mac" or OS=="ios" or os_bsd==1 or OS=="android"', { |
| 146 # Mac, Android and the BSDs don't have fopen64, ftello64, or |
| 147 # fseeko64. We use fopen, ftell, and fseek instead on these |
| 148 # systems. |
| 149 'defines': [ |
| 150 'USE_FILE32API' |
| 151 ], |
| 152 }], |
| 153 ['clang==1', { |
| 154 'xcode_settings': { |
| 155 'WARNING_CFLAGS': [ |
| 156 # zlib uses `if ((a == b))` for some reason. |
| 157 '-Wno-parentheses-equality', |
| 158 ], |
| 159 }, |
| 160 'cflags': [ |
| 161 '-Wno-parentheses-equality', |
| 162 ], |
| 163 }], |
| 164 ], |
| 165 } |
| 166 ], |
| 167 } |
| OLD | NEW |