| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/linux/pkg_config.gni") | 5 import("//build/config/linux/pkg_config.gni") |
| 6 | 6 |
| 7 # The GYP build supports system harfbuzz for non-official builds when using | 7 # The GYP build supports system harfbuzz for non-official builds when using |
| 8 # pangoft2 1.31.0 or greater (which pulls it in). | 8 # pangoft2 1.31.0 or greater (which pulls it in). |
| 9 # TODO(brettw) we can consider doing this as well, although the benefit is | 9 # TODO(brettw) we can consider doing this as well, although the benefit is |
| 10 # unclear and requires shelling out to a script to check the version. | 10 # unclear and requires shelling out to a script to check the version. |
| 11 # | 11 # |
| 12 # ChromeOS uses an up-to-date system one that we have control over, so we | 12 # ChromeOS uses an up-to-date system one that we have control over, so we |
| 13 # don't want to bloat the binary more by including another copy. | 13 # don't want to bloat the binary more by including another copy. |
| 14 | 14 |
| 15 declare_args() { | 15 declare_args() { |
| 16 # Since version 1.31.0, pangoft2 which we depend on pulls in harfbuzz | 16 use_system_harfbuzz = is_linux && !is_fnl |
| 17 # anyways. However, we want to have control of the version of harfbuzz | |
| 18 # we use, so don't use system harfbuzz for official builds, unless we | |
| 19 # are building for chrome os, where we have the system harfbuzz under | |
| 20 # control as well. We also do not want to use the system harfbuzz | |
| 21 # when cross-compiling for ARM. | |
| 22 use_system_harfbuzz = is_linux && (is_chromeos || (!is_official_build && | |
| 23 current_cpu != "arm")) && | |
| 24 exec_script(pkg_config_script, | |
| 25 pkg_config_args + [ | |
| 26 "--atleast-version=1.31.0", | |
| 27 "pangoft2", | |
| 28 ], | |
| 29 "value") | |
| 30 } | 17 } |
| 31 | 18 |
| 32 if (use_system_harfbuzz) { | 19 if (use_system_harfbuzz) { |
| 33 import("//build/config/linux/pkg_config.gni") | 20 import("//build/config/linux/pkg_config.gni") |
| 34 pkg_config("harfbuzz_pkgconfig") { | 21 pkg_config("harfbuzz_pkgconfig") { |
| 35 packages = [ "harfbuzz" ] | 22 packages = [ "harfbuzz" ] |
| 36 } | 23 } |
| 37 group("harfbuzz-ng") { | 24 group("harfbuzz-ng") { |
| 38 public_configs = [ ":harfbuzz_pkgconfig" ] | 25 public_configs = [ ":harfbuzz_pkgconfig" ] |
| 39 } | 26 } |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 145 } |
| 159 if (is_mac) { | 146 if (is_mac) { |
| 160 sources += [ | 147 sources += [ |
| 161 "src/hb-coretext.cc", | 148 "src/hb-coretext.cc", |
| 162 "src/hb-coretext.h", | 149 "src/hb-coretext.h", |
| 163 ] | 150 ] |
| 164 defines += [ "HAVE_CORETEXT" ] | 151 defines += [ "HAVE_CORETEXT" ] |
| 165 } | 152 } |
| 166 } | 153 } |
| 167 } | 154 } |
| OLD | NEW |