| 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 if (is_chromeos) { | 16 if (is_chromeos) { |
| 17 # ChromeOS includes an up-to-date system harfbuzz that we have control | 17 # ChromeOS includes an up-to-date system harfbuzz that we have control |
| 18 # over, so it use the system one by default. | 18 # over, so it use the system one by default. |
| 19 use_system_harfbuzz = true | 19 use_system_harfbuzz = true |
| 20 } else if (is_official_build) { | 20 } else if (is_official_build) { |
| 21 # For official builds, we want to control the Harbuzz version so always | 21 # For official builds, we want to control the Harbuzz version so always |
| 22 # use our included one. Currently the sysroot includes a version of pangoft | 22 # use our included one. Currently the sysroot includes a version of pangoft |
| 23 # that doesn't link to harfbuzz, so there are no linker problems. If we | 23 # that doesn't link to harfbuzz, so there are no linker problems. If we |
| 24 # update that version, we'll need to work around the duplicate symbols some | 24 # update that version, we'll need to work around the duplicate symbols some |
| 25 # other way. | 25 # other way. |
| 26 use_system_harfbuzz = false | 26 use_system_harfbuzz = false |
| 27 } else { | 27 } else if (is_linux) { |
| 28 # Use the system harfbuzz for newer versions of pangoft, and not for older | 28 # Use the system harfbuzz for newer versions of pangoft, and not for older |
| 29 # ones. pangoft links to the system harfbuzz starting with 1.31.0, which | 29 # ones. pangoft links to the system harfbuzz starting with 1.31.0, which |
| 30 # causes duplicate symbols when we link our own version. | 30 # causes duplicate symbols when we link our own version. |
| 31 use_system_harfbuzz = exec_script( | 31 use_system_harfbuzz = exec_script( |
| 32 pkg_config_script, | 32 pkg_config_script, |
| 33 pkg_config_args + [ "--atleast-version=1.31.0", "pangoft2" ], | 33 pkg_config_args + [ "--atleast-version=1.31.0", "pangoft2" ], |
| 34 "value") | 34 "value") |
| 35 } else { |
| 36 use_system_harfbuzz = false |
| 35 } | 37 } |
| 36 } | 38 } |
| 37 | 39 |
| 38 if (use_system_harfbuzz) { | 40 if (use_system_harfbuzz) { |
| 39 import("//build/config/linux/pkg_config.gni") | 41 import("//build/config/linux/pkg_config.gni") |
| 40 pkg_config("harfbuzz_pkgconfig") { | 42 pkg_config("harfbuzz_pkgconfig") { |
| 41 packages = [ "harfbuzz" ] | 43 packages = [ "harfbuzz" ] |
| 42 } | 44 } |
| 43 group("harfbuzz-ng") { | 45 group("harfbuzz-ng") { |
| 44 public_configs = [ ":harfbuzz_pkgconfig" ] | 46 public_configs = [ ":harfbuzz_pkgconfig" ] |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 170 } |
| 169 if (is_mac) { | 171 if (is_mac) { |
| 170 sources += [ | 172 sources += [ |
| 171 "src/hb-coretext.cc", | 173 "src/hb-coretext.cc", |
| 172 "src/hb-coretext.h", | 174 "src/hb-coretext.h", |
| 173 ] | 175 ] |
| 174 defines += [ "HAVE_CORETEXT" ] | 176 defines += [ "HAVE_CORETEXT" ] |
| 175 } | 177 } |
| 176 } | 178 } |
| 177 } | 179 } |
| OLD | NEW |