| 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/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
| 6 import("//build/config/linux/pkg_config.gni") | 6 import("//build/config/linux/pkg_config.gni") |
| 7 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
| 8 | 8 |
| 9 # The GYP build supports system harfbuzz for non-official builds when using | |
| 10 # pangoft2 1.31.0 or greater (which pulls it in). | |
| 11 # TODO(brettw) we can consider doing this as well, although the benefit is | |
| 12 # unclear and requires shelling out to a script to check the version. | |
| 13 # | |
| 14 # ChromeOS uses an up-to-date system one that we have control over, so we | |
| 15 # don't want to bloat the binary more by including another copy. | |
| 16 | |
| 17 declare_args() { | 9 declare_args() { |
| 18 # Since version 1.31.0, pangoft2 which we depend on pulls in harfbuzz | 10 # Only overriden by the official Chromium OS builds which are done |
| 19 # anyways. However, we want to have control of the version of harfbuzz | 11 # against the Chromium OS SDK in a chroot. Should not be needed in any |
| 20 # we use, so don't use system harfbuzz unless we are building for | 12 # other configuration. |
| 21 # chrome os, where we have the system harfbuzz under control. | 13 # We need to be controlling the version of HarfBuzz used by Blink, as |
| 22 use_system_harfbuzz = | 14 # the correctness and good performance of text processing is only |
| 23 is_linux && is_chromeos && exec_script(pkg_config_script, | 15 # guaranteed and supported against the version of HarfBuzz that is in |
| 24 pkg_config_args + [ | 16 # third_party/harfbuzz-ng. So, on all other platforms HarfBuzz is |
| 25 "--atleast-version=1.31.0", | 17 # statically linked, on Chrome OS it is controlled as well, but part |
| 26 "pangoft2", | 18 # of the system. |
| 27 ], | 19 use_system_harfbuzz = false |
| 28 "value") | |
| 29 } | 20 } |
| 30 | 21 |
| 31 if (use_system_harfbuzz) { | 22 if (use_system_harfbuzz) { |
| 32 import("//build/config/linux/pkg_config.gni") | 23 import("//build/config/linux/pkg_config.gni") |
| 33 pkg_config("harfbuzz_pkgconfig") { | 24 pkg_config("harfbuzz_pkgconfig") { |
| 34 packages = [ "harfbuzz" ] | 25 packages = [ "harfbuzz" ] |
| 35 } | 26 } |
| 36 group("harfbuzz-ng") { | 27 group("harfbuzz-ng") { |
| 37 public_configs = [ ":harfbuzz_pkgconfig" ] | 28 public_configs = [ ":harfbuzz_pkgconfig" ] |
| 38 } | 29 } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 configs += [ "//build/config/linux:glib" ] | 197 configs += [ "//build/config/linux:glib" ] |
| 207 sources += [ | 198 sources += [ |
| 208 "src/hb-ft.cc", | 199 "src/hb-ft.cc", |
| 209 "src/hb-ft.h", | 200 "src/hb-ft.h", |
| 210 "src/hb-glib.cc", | 201 "src/hb-glib.cc", |
| 211 "src/hb-glib.h", | 202 "src/hb-glib.h", |
| 212 ] | 203 ] |
| 213 } | 204 } |
| 214 } | 205 } |
| 215 } | 206 } |
| OLD | NEW |