blob: 51aff4c94ad23ac03687ca5e6b90825433b629dc [file] [log] [blame]
Colin Cross48e772f2016-12-02 15:03:22 -08001//#
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 Badoureb311252021-02-12 15:09:02 -080054// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
55// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
56// DEPENDING ON IT IN YOUR PROJECT. ***
57package {
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
80license {
81 name: "external_harfbuzz_ng_license",
82 visibility: [":__subpackages__"],
83 license_kinds: [
Seigo Nonaka246cc292022-12-16 00:56:26 +090084 // "SPDX-license-Identifier-MIT-Modern-Variant",
Bob Badoureb311252021-02-12 15:09:02 -080085 "SPDX-license-identifier-Apache-2.0",
Seigo Nonaka246cc292022-12-16 00:56:26 +090086 "SPDX-license-identifier-ISC", // src/hb-ucd.cc
Bob Badoureb311252021-02-12 15:09:02 -080087 "SPDX-license-identifier-MIT",
88 "SPDX-license-identifier-OFL", // by exception only
Bob Badoureb311252021-02-12 15:09:02 -080089 "legacy_unencumbered",
90 ],
91 license_text: [
92 "COPYING",
93 "NOTICE",
Seigo Nonaka246cc292022-12-16 00:56:26 +090094
95 "LICENSE_APACHE2.TXT",
96 "LICENSE_ISC.TXT",
97 "LICENSE_OFL.TXT",
98 "src/ms-use/COPYING", // For MIT license
99 "LICENSE_MIT_MODERN_VARIANT.TXT",
Bob Badoureb311252021-02-12 15:09:02 -0800100 ],
101}
102
Jerome Gaillard05990ca2019-06-27 19:28:10 +0100103cc_library {
Seigo Nonaka6422af92023-02-28 18:49:09 +0900104 name: "libharfbuzz_subset",
Heimo Helokunnas1c1934b2024-02-06 15:44:48 +0000105
106 host_supported: true,
107
Seigo Nonaka6422af92023-02-28 18:49:09 +0900108 srcs: [
109 "src/hb-number.cc",
110 "src/hb-ot-cff1-table.cc",
111 "src/hb-ot-cff2-table.cc",
112 "src/hb-static.cc",
113 "src/hb-subset-cff-common.cc",
114 "src/hb-subset-cff1.cc",
115 "src/hb-subset-cff2.cc",
116 "src/hb-subset-input.cc",
Seigo Nonaka974d6cf2023-10-18 11:20:17 +0900117 "src/hb-subset-instancer-solver.cc",
Seigo Nonaka6422af92023-02-28 18:49:09 +0900118 "src/hb-subset-plan.cc",
119 "src/hb-subset-repacker.cc",
120 "src/hb-subset.cc",
121 "src/graph/gsubgpos-context.cc",
122 ],
123 shared_libs: [
124 "libharfbuzz_ng",
125 ],
126 export_include_dirs: ["src"],
127 cflags: [
128 "-DHAVE_PTHREAD",
129 "-DHB_NO_PRAGMA_GCC_DIAGNOSTIC",
130 "-DHAVE_OT",
131 "-DHAVE_ICU",
132 "-DHAVE_ICU_BUILTIN",
133 "-Werror",
134 "-Wno-unused-parameter",
135 "-Wno-missing-field-initializers",
136 ],
137}
138
139cc_library {
Colin Cross48e772f2016-12-02 15:03:22 -0800140 name: "libharfbuzz_ng",
Jerome Gaillardd725ce12018-07-10 16:07:32 +0100141 host_supported: true,
Colin Cross48e772f2016-12-02 15:03:22 -0800142 arch: {
143 arm: {
144 instruction_set: "arm",
145 },
146 },
147 srcs: [
Seigo Nonaka6361ed02018-10-25 16:35:42 -0700148 "src/hb-aat-layout.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -0800149 "src/hb-aat-map.cc",
Colin Cross48e772f2016-12-02 15:03:22 -0800150 "src/hb-blob.cc",
151 "src/hb-buffer-serialize.cc",
Seigo Nonaka2b1d6e22022-12-20 10:36:29 +0900152 "src/hb-buffer-verify.cc",
Colin Cross48e772f2016-12-02 15:03:22 -0800153 "src/hb-buffer.cc",
154 "src/hb-common.cc",
Seigo Nonaka6422af92023-02-28 18:49:09 +0900155 "src/hb-draw.cc",
Seigo Nonakae3320e02023-05-29 16:16:05 +0900156 "src/hb-face-builder.cc",
Colin Cross48e772f2016-12-02 15:03:22 -0800157 "src/hb-face.cc",
Hal Canary07410162019-11-11 13:56:23 -0500158 "src/hb-fallback-shape.cc",
Colin Cross48e772f2016-12-02 15:03:22 -0800159 "src/hb-font.cc",
Seigo Nonaka2b1d6e22022-12-20 10:36:29 +0900160 "src/hb-map.cc",
Hal Canary07410162019-11-11 13:56:23 -0500161 "src/hb-number.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -0800162 "src/hb-ot-cff1-table.cc",
163 "src/hb-ot-cff2-table.cc",
Seigo Nonaka2b1d6e22022-12-20 10:36:29 +0900164 "src/hb-ot-color.cc",
Seigo Nonaka6361ed02018-10-25 16:35:42 -0700165 "src/hb-ot-face.cc",
Colin Cross48e772f2016-12-02 15:03:22 -0800166 "src/hb-ot-font.cc",
167 "src/hb-ot-layout.cc",
168 "src/hb-ot-map.cc",
Jungshik Shinff95bda2017-01-26 12:39:49 -0800169 "src/hb-ot-math.cc",
Seigo Nonaka2b1d6e22022-12-20 10:36:29 +0900170 "src/hb-ot-meta.cc",
Hal Canary07410162019-11-11 13:56:23 -0500171 "src/hb-ot-metrics.cc",
Seigo Nonaka7337ccb2021-01-13 14:23:43 -0800172 "src/hb-ot-name.cc",
Colin Cross48e772f2016-12-02 15:03:22 -0800173 "src/hb-ot-shape-fallback.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -0800174 "src/hb-ot-shape-normalize.cc",
175 "src/hb-ot-shape.cc",
Seigo Nonaka2b1d6e22022-12-20 10:36:29 +0900176 "src/hb-ot-shaper-arabic.cc",
177 "src/hb-ot-shaper-default.cc",
178 "src/hb-ot-shaper-hangul.cc",
179 "src/hb-ot-shaper-hebrew.cc",
180 "src/hb-ot-shaper-indic-table.cc",
181 "src/hb-ot-shaper-indic.cc",
182 "src/hb-ot-shaper-khmer.cc",
183 "src/hb-ot-shaper-myanmar.cc",
184 "src/hb-ot-shaper-syllabic.cc",
185 "src/hb-ot-shaper-thai.cc",
186 "src/hb-ot-shaper-use.cc",
187 "src/hb-ot-shaper-vowel-constraints.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -0800188 "src/hb-ot-tag.cc",
Jungshik Shinff95bda2017-01-26 12:39:49 -0800189 "src/hb-ot-var.cc",
Seigo Nonakae3320e02023-05-29 16:16:05 +0900190 "src/hb-outline.cc",
191 "src/hb-paint-extents.cc",
192 "src/hb-paint.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -0800193 "src/hb-set.cc",
194 "src/hb-shape-plan.cc",
195 "src/hb-shape.cc",
196 "src/hb-shaper.cc",
197 "src/hb-static.cc",
Seigo Nonaka2b1d6e22022-12-20 10:36:29 +0900198 "src/hb-style.cc",
Seigo Nonaka2b1d6e22022-12-20 10:36:29 +0900199 "src/hb-ucd.cc",
200 "src/hb-unicode.cc",
Colin Cross48e772f2016-12-02 15:03:22 -0800201 ],
202
Jerome Gaillardd725ce12018-07-10 16:07:32 +0100203 target: {
204 android: {
205 shared_libs: [
Jerome Gaillard8c46d582019-01-16 14:07:28 +0000206 "libcutils",
Jerome Gaillardd725ce12018-07-10 16:07:32 +0100207 "libutils",
208 ],
209 },
210 host: {
211 static_libs: [
Jerome Gaillard8c46d582019-01-16 14:07:28 +0000212 "libcutils",
Jerome Gaillardd725ce12018-07-10 16:07:32 +0100213 "libutils",
214 ],
215 },
Jerome Gaillard8c46d582019-01-16 14:07:28 +0000216 windows: {
217 enabled: true,
218 },
Jerome Gaillardd725ce12018-07-10 16:07:32 +0100219 },
220
Colin Cross48e772f2016-12-02 15:03:22 -0800221 shared_libs: [
Victor Chang698f5bb2020-11-23 19:24:43 +0000222 "libicu",
Colin Cross48e772f2016-12-02 15:03:22 -0800223 "liblog",
224 ],
225
226 export_include_dirs: ["src"],
227 cflags: [
Seigo Nonaka7bc88b12021-11-11 15:59:55 -0800228 "-DHAVE_PTHREAD",
Yi Kong9270e0a2021-09-01 00:57:23 +0800229 "-DHB_NO_PRAGMA_GCC_DIAGNOSTIC",
Colin Cross48e772f2016-12-02 15:03:22 -0800230 "-DHAVE_OT",
231 "-DHAVE_ICU",
232 "-DHAVE_ICU_BUILTIN",
233 "-Werror",
234 "-Wno-unused-parameter",
235 "-Wno-missing-field-initializers",
236 ],
237}
Seigo Nonaka246cc292022-12-16 00:56:26 +0900238
239/////////////////////////////////////////////////////////////////////
240// Following filegroups and licences are ones not used in Android.
241/////////////////////////////////////////////////////////////////////
242
243license {
244 name: "external_harfbuzz_license.unused.GPLv3",
245 visibility: ["//visibility:private"],
246 license_kinds: [
247 "SPDX-license-identifier-GPL-3.0-with-autoconf-exception",
248 ],
249 license_text: [
250 "LICENSE_GPLv3_WITH_AUTOCONF_EXCEPTION.TXT",
251 ],
252}
253
254filegroup {
255 name: "external_harfbuzz.unused.GPLv3",
256 visibility: ["//visibility:private"],
257 licenses: ["external_harfbuzz_license.unused.GPLv3"],
258 srcs: [
259 "m4/ax_check_link_flag.m4",
260 "m4/ax_pthread.m4",
261 ],
262}
263
264license {
Seigo Nonaka2b1d6e22022-12-20 10:36:29 +0900265 name: "external_harfbuzz_license.unused.GPLv2",
266 visibility: ["//visibility:private"],
267 license_kinds: [
268 "SPDX-license-identifier-GPL-2.0",
269 ],
270 license_text: [
271 "LICENSE_GPLv2.TXT",
272 ],
273}
274
275filegroup {
276 name: "external_harfbuzz.unused.GPLv2",
277 visibility: ["//visibility:private"],
278 licenses: ["external_harfbuzz_license.unused.GPLv2"],
279 srcs: [
280 "test/shape/data/in-house/fonts/b895f8ff06493cc893ec44de380690ca0074edfa.ttf"
281 ],
282}
283
284license {
Seigo Nonaka246cc292022-12-16 00:56:26 +0900285 name: "external_harfbuzz_license.unused.LGPL",
286 visibility: ["//visibility:private"],
287 license_kinds: [
288 "SPDX-license-identifier-LGPL-2.1",
289 ],
290 license_text: [
291 "LICENSE_GPLv2_WITH_AUTOCONF_EXCEPTION.TXT",
292 ],
293}
294
295filegroup {
296 name: "external_harfbuzz.unused.LGPL",
297 visibility: ["//visibility:private"],
298 licenses: ["external_harfbuzz_license.unused.LGPL"],
299 srcs: ["m4/ax_code_coverage.m4"],
300}
301
302license {
303 name: "external_harfbuzz_license.unused.MIT",
304 visibility: ["//visibility:private"],
305 license_kinds: [
306 "SPDX-license-identifier-MIT",
307 ],
308 license_text: [
309 "src/ms-use/COPYING",
310 ],
311}
312
313filegroup {
314 name: "external_harfbuzz.unused.MIT",
315 visibility: ["//visibility:private"],
316 licenses: ["external_harfbuzz_license.unused.MIT"],
317 srcs: [
318 "src/ms-use/*",
319 ],
320}
321
322license {
323 name: "external_harfbuzz_license.unused.FSFAP",
324 visibility: ["//visibility:private"],
325 license_kinds: [
326 "SPDX-license-identifier-FSFAP",
327 ],
328 license_text: [
329 "LICENSE_FSFAP.TXT",
330 ],
331}
332
333filegroup {
334 name: "external_harfbuzz.unused.FSFAP",
335 visibility: ["//visibility:private"],
336 licenses: ["external_harfbuzz_license.unused.FSFAP"],
337 srcs: [
338 "git.mk",
339 "m4/ax_cxx_compile_stdcxx.m4",
340 ],
341}
342
343license {
344 name: "external_harfbuzz_license.unused.HPND-sell-variant",
345 visibility: ["//visibility:private"],
346 license_kinds: [
347 // "SPDX-license-identifier-HPND-sell-variant",
348 ],
349 license_text: [
350 "LICENSE_HPND_SELL_VARIANT.TXT"
351 ],
352}
353
354filegroup {
355 name: "external_harfbuzz.unused.HPND-sell-variant",
356 visibility: ["//visibility:private"],
357 licenses: ["external_harfbuzz_license.unused.HPND-sell-variant"],
358 srcs: [
359 "util/hb-fc-list.c",
360 ],
361}
362
363license {
364 name: "external_harfbuzz_license.unused.Apache-2.0",
365 visibility: ["//visibility:private"],
366 license_kinds: [
367 "SPDX-license-identifier-Apache-2.0",
368 ],
369 license_text: [
370 "LICENSE_APACHE2.TXT",
371 ],
372}
373
374filegroup {
375 name: "external_harfbuzz.unused.Apache-2.0",
376 visibility: ["//visibility:private"],
377 licenses: ["external_harfbuzz_license.unused.Apache-2.0"],
378 srcs: [
379 "perf/fonts/Roboto-Regular.ttf"
380 ],
381}
382
383license {
384 name: "external_harfbuzz_license.unused.OFL",
385 visibility: ["//visibility:private"],
386 license_kinds: [
387 "SPDX-license-identifier-OFL",
388 ],
389 license_text: [
390 "LICENSE_OFL.TXT",
391 ],
392}
393
394filegroup {
395 name: "external_harfbuzz.unused.OFL",
396 visibility: ["//visibility:private"],
397 licenses: ["external_harfbuzz_license.unused.OFL"],
398 srcs: [
399 "perf/fonts/Amiri-Regular.ttf",
400 "perf/fonts/NotoNastaliqUrdu-Regular.ttf",
Seigo Nonaka246cc292022-12-16 00:56:26 +0900401 ],
402}
403
404license {
405 name: "external_harfbuzz_license.unused.tests",
406 visibility: ["//visibility:private"],
407 license_kinds: [
408 // "SPDX-license-Identifier-MIT-Modern-Variant",
409 "SPDX-license-identifier-Apache-2.0",
410 "SPDX-license-identifier-MIT",
411 "SPDX-license-identifier-OFL", // by exception only
412 // Lots of font files used in tests directories are lack of license descriptions.
413 // The license of fuzzing payload is unknown.
414 "legacy_unencumbered",
415 ],
416 license_text: [
417 "LICENSE_OFL.TXT",
418 "LICENSE_APACHE2.TXT",
419 "LICENSE_MIT_MODERN_VARIANT.TXT",
420 "src/ms-use/COPYING", // For MIT license
421 ],
422}
423
424filegroup {
425 name: "external_harfbuzz.unused.tests",
426 visibility: ["//visibility:private"],
427 licenses: ["external_harfbuzz_license.unused.tests"],
428 srcs: [ "test/**/*" ],
429 path: "test"
430}
431