| 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. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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 if (is_linux) { | 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(pkg_config_script, |
| 32 pkg_config_script, | 32 pkg_config_args + [ |
| 33 pkg_config_args + [ "--atleast-version=1.31.0", "pangoft2" ], | 33 "--atleast-version=1.31.0", |
| 34 "value") | 34 "pangoft2", |
| 35 ], |
| 36 "value") |
| 35 } else { | 37 } else { |
| 36 use_system_harfbuzz = false | 38 use_system_harfbuzz = false |
| 37 } | 39 } |
| 38 } | 40 } |
| 39 | 41 |
| 40 if (use_system_harfbuzz) { | 42 if (use_system_harfbuzz) { |
| 41 import("//build/config/linux/pkg_config.gni") | 43 import("//build/config/linux/pkg_config.gni") |
| 42 pkg_config("harfbuzz_pkgconfig") { | 44 pkg_config("harfbuzz_pkgconfig") { |
| 43 packages = [ "harfbuzz" ] | 45 packages = [ "harfbuzz" ] |
| 44 } | 46 } |
| 45 group("harfbuzz-ng") { | 47 group("harfbuzz-ng") { |
| 46 public_configs = [ ":harfbuzz_pkgconfig" ] | 48 public_configs = [ ":harfbuzz_pkgconfig" ] |
| 47 } | 49 } |
| 48 | |
| 49 } else { | 50 } else { |
| 50 config("harfbuzz-ng_config") { | 51 config("harfbuzz-ng_config") { |
| 51 include_dirs = [ "src" ] | 52 include_dirs = [ "src" ] |
| 52 } | 53 } |
| 53 | 54 |
| 54 static_library("harfbuzz-ng") { | 55 static_library("harfbuzz-ng") { |
| 55 sources = [ | 56 sources = [ |
| 56 "src/hb-atomic-private.hh", | 57 "src/hb-atomic-private.hh", |
| 57 "src/hb-blob.cc", | 58 "src/hb-blob.cc", |
| 58 "src/hb-blob.h", | 59 "src/hb-blob.h", |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 } | 171 } |
| 171 if (is_mac) { | 172 if (is_mac) { |
| 172 sources += [ | 173 sources += [ |
| 173 "src/hb-coretext.cc", | 174 "src/hb-coretext.cc", |
| 174 "src/hb-coretext.h", | 175 "src/hb-coretext.h", |
| 175 ] | 176 ] |
| 176 defines += [ "HAVE_CORETEXT" ] | 177 defines += [ "HAVE_CORETEXT" ] |
| 177 } | 178 } |
| 178 } | 179 } |
| 179 } | 180 } |
| OLD | NEW |