Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 1 | //# |
| 2 | //# Copyright (C) 2012 The Android Open Source Project |
| 3 | //# |
| 4 | //# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | //# you may not use this file except in compliance with the License. |
| 6 | //# You may obtain a copy of the License at |
| 7 | //# |
| 8 | //# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | //# |
| 10 | //# Unless required by applicable law or agreed to in writing, software |
| 11 | //# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | //# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | //# See the License for the specific language governing permissions and |
| 14 | //# limitations under the License. |
| 15 | //# |
| 16 | |
| 17 | //############################################################ |
| 18 | // Note: |
| 19 | // |
| 20 | // This file is used to build HarfBuzz within the Android |
| 21 | // platform itself. If you need to compile HarfBuzz to |
| 22 | // ship with your Android NDK app, you can use the autotools |
| 23 | // build system to do so. To do that you need to install a |
| 24 | // "standalone" toolchain with the NDK, eg: |
| 25 | // |
| 26 | // ndk/build/tools/make-standalone-toolchain.sh |
| 27 | // --platform=android-18 |
| 28 | // --install-dir=/prefix |
| 29 | // |
| 30 | // Set PLATFORM_PREFIX eng var to that prefix and make sure |
| 31 | // the cross-compile tools from PLATFORM_PREFIX are in path. |
| 32 | // Configure and install HarfBuzz: |
| 33 | // |
| 34 | // ./configure --host=arm-linux-androideabi |
| 35 | // --prefix=$PLATFORM_PREFIX |
| 36 | // --enable-static |
| 37 | // --with-freetype |
| 38 | // PKG_CONFIG_LIBDIR=$PLATFORM_PREFIX/lib/pkgconfig |
| 39 | // make install |
| 40 | // |
| 41 | // You can first build FreeType the same way: |
| 42 | // |
| 43 | // ./configure --host=arm-linux-androideabi |
| 44 | // --prefix=$PLATFORM_PREFIX |
| 45 | // --enable-stati |
| 46 | // --without-png |
| 47 | // PKG_CONFIG_LIBDIR=$PLATFORM_PREFIX/lib/pkgconfig |
| 48 | // make install |
| 49 | // |
| 50 | |
| 51 | //############################################################ |
| 52 | // build the harfbuzz shared library |
| 53 | // |
Bob Badour | eb31125 | 2021-02-12 15:09:02 -0800 | [diff] [blame] | 54 | // *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE |
| 55 | // CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE |
| 56 | // DEPENDING ON IT IN YOUR PROJECT. *** |
| 57 | package { |
| 58 | default_applicable_licenses: ["external_harfbuzz_ng_license"], |
| 59 | } |
| 60 | |
| 61 | // Added automatically by a large-scale-change that took the approach of |
| 62 | // 'apply every license found to every target'. While this makes sure we respect |
| 63 | // every license restriction, it may not be entirely correct. |
| 64 | // |
| 65 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 66 | // |
| 67 | // Please consider splitting the single license below into multiple licenses, |
| 68 | // taking care not to lose any license_kind information, and overriding the |
| 69 | // default license using the 'licenses: [...]' property on targets as needed. |
| 70 | // |
| 71 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 72 | // to attach the license to, and including a comment whether the files may be |
| 73 | // used in the current project. |
| 74 | // |
| 75 | // large-scale-change included anything that looked like it might be a license |
| 76 | // text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. |
| 77 | // |
| 78 | // Please consider removing redundant or irrelevant files from 'license_text:'. |
| 79 | // See: http://go/android-license-faq |
| 80 | license { |
| 81 | name: "external_harfbuzz_ng_license", |
| 82 | visibility: [":__subpackages__"], |
| 83 | license_kinds: [ |
| 84 | "SPDX-license-identifier-Apache-2.0", |
| 85 | "SPDX-license-identifier-ISC", |
| 86 | "SPDX-license-identifier-MIT", |
| 87 | "SPDX-license-identifier-OFL", // by exception only |
| 88 | "SPDX-license-identifier-WTFPL", |
| 89 | "legacy_unencumbered", |
| 90 | ], |
| 91 | license_text: [ |
| 92 | "COPYING", |
| 93 | "NOTICE", |
| 94 | ], |
| 95 | } |
| 96 | |
Jerome Gaillard | 05990ca | 2019-06-27 19:28:10 +0100 | [diff] [blame] | 97 | cc_library { |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 98 | name: "libharfbuzz_ng", |
Jerome Gaillard | d725ce1 | 2018-07-10 16:07:32 +0100 | [diff] [blame] | 99 | host_supported: true, |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 100 | arch: { |
| 101 | arm: { |
| 102 | instruction_set: "arm", |
| 103 | }, |
| 104 | }, |
| 105 | srcs: [ |
Seigo Nonaka | 6361ed0 | 2018-10-25 16:35:42 -0700 | [diff] [blame] | 106 | "src/hb-aat-layout.cc", |
Seigo Nonaka | b878ff2 | 2018-12-21 15:32:33 -0800 | [diff] [blame] | 107 | "src/hb-aat-map.cc", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 108 | "src/hb-blob.cc", |
| 109 | "src/hb-buffer-serialize.cc", |
| 110 | "src/hb-buffer.cc", |
| 111 | "src/hb-common.cc", |
| 112 | "src/hb-face.cc", |
Hal Canary | 0741016 | 2019-11-11 13:56:23 -0500 | [diff] [blame] | 113 | "src/hb-fallback-shape.cc", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 114 | "src/hb-font.cc", |
Seigo Nonaka | b878ff2 | 2018-12-21 15:32:33 -0800 | [diff] [blame] | 115 | "src/hb-icu.cc", |
Hal Canary | 0741016 | 2019-11-11 13:56:23 -0500 | [diff] [blame] | 116 | "src/hb-number.cc", |
Seigo Nonaka | b878ff2 | 2018-12-21 15:32:33 -0800 | [diff] [blame] | 117 | "src/hb-ot-cff1-table.cc", |
| 118 | "src/hb-ot-cff2-table.cc", |
Seigo Nonaka | 6361ed0 | 2018-10-25 16:35:42 -0700 | [diff] [blame] | 119 | "src/hb-ot-face.cc", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 120 | "src/hb-ot-font.cc", |
| 121 | "src/hb-ot-layout.cc", |
| 122 | "src/hb-ot-map.cc", |
Jungshik Shin | ff95bda | 2017-01-26 12:39:49 -0800 | [diff] [blame] | 123 | "src/hb-ot-math.cc", |
Hal Canary | 0741016 | 2019-11-11 13:56:23 -0500 | [diff] [blame] | 124 | "src/hb-ot-metrics.cc", |
Seigo Nonaka | 7337ccb | 2021-01-13 14:23:43 -0800 | [diff] [blame] | 125 | "src/hb-ot-name.cc", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 126 | "src/hb-ot-shape-complex-arabic.cc", |
| 127 | "src/hb-ot-shape-complex-default.cc", |
| 128 | "src/hb-ot-shape-complex-hangul.cc", |
| 129 | "src/hb-ot-shape-complex-hebrew.cc", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 130 | "src/hb-ot-shape-complex-indic-table.cc", |
Seigo Nonaka | b878ff2 | 2018-12-21 15:32:33 -0800 | [diff] [blame] | 131 | "src/hb-ot-shape-complex-indic.cc", |
Siyamed Sinir | 476d118 | 2018-07-27 17:31:17 -0700 | [diff] [blame] | 132 | "src/hb-ot-shape-complex-khmer.cc", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 133 | "src/hb-ot-shape-complex-myanmar.cc", |
| 134 | "src/hb-ot-shape-complex-thai.cc", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 135 | "src/hb-ot-shape-complex-use-table.cc", |
Seigo Nonaka | b878ff2 | 2018-12-21 15:32:33 -0800 | [diff] [blame] | 136 | "src/hb-ot-shape-complex-use.cc", |
| 137 | "src/hb-ot-shape-complex-vowel-constraints.cc", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 138 | "src/hb-ot-shape-fallback.cc", |
Seigo Nonaka | b878ff2 | 2018-12-21 15:32:33 -0800 | [diff] [blame] | 139 | "src/hb-ot-shape-normalize.cc", |
| 140 | "src/hb-ot-shape.cc", |
| 141 | "src/hb-ot-tag.cc", |
Jungshik Shin | ff95bda | 2017-01-26 12:39:49 -0800 | [diff] [blame] | 142 | "src/hb-ot-var.cc", |
Seigo Nonaka | b878ff2 | 2018-12-21 15:32:33 -0800 | [diff] [blame] | 143 | "src/hb-set.cc", |
| 144 | "src/hb-shape-plan.cc", |
| 145 | "src/hb-shape.cc", |
| 146 | "src/hb-shaper.cc", |
| 147 | "src/hb-static.cc", |
Hal Canary | 0741016 | 2019-11-11 13:56:23 -0500 | [diff] [blame] | 148 | "src/hb-ucd.cc", |
Seigo Nonaka | b878ff2 | 2018-12-21 15:32:33 -0800 | [diff] [blame] | 149 | "src/hb-unicode.cc", |
Stan Iliev | b229cdd | 2020-12-10 09:41:40 -0500 | [diff] [blame] | 150 | "src/hb-subset-cff-common.cc", |
| 151 | "src/hb-subset-cff1.cc", |
| 152 | "src/hb-subset-cff2.cc", |
| 153 | "src/hb-subset-input.cc", |
| 154 | "src/hb-subset-plan.cc", |
| 155 | "src/hb-subset.cc", |
| 156 | "src/hb-map.cc", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 157 | ], |
| 158 | |
Jerome Gaillard | d725ce1 | 2018-07-10 16:07:32 +0100 | [diff] [blame] | 159 | target: { |
| 160 | android: { |
| 161 | shared_libs: [ |
Jerome Gaillard | 8c46d58 | 2019-01-16 14:07:28 +0000 | [diff] [blame] | 162 | "libcutils", |
Jerome Gaillard | d725ce1 | 2018-07-10 16:07:32 +0100 | [diff] [blame] | 163 | "libutils", |
| 164 | ], |
| 165 | }, |
| 166 | host: { |
| 167 | static_libs: [ |
Jerome Gaillard | 8c46d58 | 2019-01-16 14:07:28 +0000 | [diff] [blame] | 168 | "libcutils", |
Jerome Gaillard | d725ce1 | 2018-07-10 16:07:32 +0100 | [diff] [blame] | 169 | "libutils", |
| 170 | ], |
| 171 | }, |
Jerome Gaillard | 8c46d58 | 2019-01-16 14:07:28 +0000 | [diff] [blame] | 172 | windows: { |
| 173 | enabled: true, |
| 174 | }, |
Jerome Gaillard | d725ce1 | 2018-07-10 16:07:32 +0100 | [diff] [blame] | 175 | }, |
| 176 | |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 177 | shared_libs: [ |
Victor Chang | 698f5bb | 2020-11-23 19:24:43 +0000 | [diff] [blame] | 178 | "libicu", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 179 | "liblog", |
| 180 | ], |
| 181 | |
| 182 | export_include_dirs: ["src"], |
| 183 | cflags: [ |
Seigo Nonaka | 6294f2f | 2018-01-27 16:45:27 -0800 | [diff] [blame] | 184 | "-DHAVE_INTEL_ATOMIC_PRIMITIVES", |
Colin Cross | 48e772f | 2016-12-02 15:03:22 -0800 | [diff] [blame] | 185 | "-DHAVE_OT", |
| 186 | "-DHAVE_ICU", |
| 187 | "-DHAVE_ICU_BUILTIN", |
| 188 | "-Werror", |
| 189 | "-Wno-unused-parameter", |
| 190 | "-Wno-missing-field-initializers", |
| 191 | ], |
| 192 | } |