summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@aol.com>2023-04-04 17:49:10 +0800
committerJob Bautista <jobbautista9@protonmail.com>2023-04-05 21:22:17 +0800
commit3122de954751fe8df9a5fb786e5f8089ce778d9b (patch)
tree20a9d2e8b7859c5bd79f92b2aa12b40886b3869a /gfx
parentb137a3cff30bd5b6d56867bd32f5c81916e01e5d (diff)
downloaduxp-3122de954751fe8df9a5fb786e5f8089ce778d9b.tar.gz
Issue #1862 - Part 2: Update harfbuzz's build system for 7.1.0.
Harfbuzz upstream seems to have fixed all conflicts originally encountered before 2.6.0, so let's unify all harfbuzz's sources. Some parts of README-mozilla (now README-mcp) no longer apply, so update that as well.
Diffstat (limited to 'gfx')
-rw-r--r--gfx/harfbuzz/README-mcp11
-rw-r--r--gfx/harfbuzz/README-mozilla21
-rw-r--r--gfx/harfbuzz/src/moz.build87
3 files changed, 71 insertions, 48 deletions
diff --git a/gfx/harfbuzz/README-mcp b/gfx/harfbuzz/README-mcp
new file mode 100644
index 0000000000..11e87c6098
--- /dev/null
+++ b/gfx/harfbuzz/README-mcp
@@ -0,0 +1,11 @@
+gfx/harfbuzz status as of 2023-04-04:
+
+This directory contains the harfbuzz source from the latest release tag of
+https://github.com/harfbuzz/harfbuzz.
+
+Current version: 7.1.0
+
+UPDATING:
+
+If the collection of source files changes, manual updates to moz.build may be
+needed, as we don't use the upstream makefiles.
diff --git a/gfx/harfbuzz/README-mozilla b/gfx/harfbuzz/README-mozilla
deleted file mode 100644
index 35a855a05f..0000000000
--- a/gfx/harfbuzz/README-mozilla
+++ /dev/null
@@ -1,21 +0,0 @@
-gfx/harfbuzz status as of 2017-01-05:
-
-This directory contains the harfbuzz source from the 'master' branch of
-https://github.com/behdad/harfbuzz.
-
-Current version: 1.4.1
-
-UPDATING:
-
-Note that gfx/harfbuzz/src/hb-version.h is not present in the upstream Git
-repository. It is created at build time by the harfbuzz build system;
-but as we don't use that build system in mozilla, it is necessary to refresh
-this file when updating harfbuzz, and check it into the mozilla tree.
-
-The normal approach to updating harfbuzz, therefore, is to pull the latest HB
-source into a scratch directory and do a local build; then copy the original
-sources AND the generated header mentioned above from the build directory into
-the mozilla tree.
-
-If the collection of source files changes, manual updates to moz.build may be
-needed, as we don't use the upstream makefiles.
diff --git a/gfx/harfbuzz/src/moz.build b/gfx/harfbuzz/src/moz.build
index 92dbedb016..b6016cf29f 100644
--- a/gfx/harfbuzz/src/moz.build
+++ b/gfx/harfbuzz/src/moz.build
@@ -3,64 +3,94 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+# Harfbuzz upstream supports building everything as a single jumbo
+# file, so do that here.
+FILES_PER_UNIFIED_FILE = 100
+
EXPORTS.harfbuzz += [
+ 'hb-aat-layout.h',
+ 'hb-aat.h',
'hb-blob.h',
'hb-buffer.h',
'hb-common.h',
'hb-deprecated.h',
+ 'hb-draw.h',
'hb-face.h',
'hb-font.h',
+ 'hb-map.h',
+ 'hb-ot-color.h',
+ 'hb-ot-deprecated.h',
'hb-ot-font.h',
'hb-ot-layout.h',
'hb-ot-math.h',
+ 'hb-ot-meta.h',
+ 'hb-ot-metrics.h',
+ 'hb-ot-name.h',
'hb-ot-shape.h',
- 'hb-ot-tag.h',
+ 'hb-ot-var.h',
'hb-ot.h',
+ 'hb-paint.h',
'hb-set.h',
'hb-shape-plan.h',
'hb-shape.h',
+ 'hb-style.h',
'hb-unicode.h',
'hb-version.h',
'hb.h',
]
-SOURCES += [
- 'hb-blob.cc', # error: use of undeclared identifier 'snprintf' (FreeBSD)
- 'hb-common.cc', # error: use of undeclared identifier 'strdup'
- 'hb-ot-math.cc', # conflict with hb-ot-layout.cc
- 'hb-ot-shape-complex-hangul.cc', # error: redefinition of enumerator 'NONE'
- 'hb-ot-shape-complex-indic.cc', # error: redefinition of enumerator 'INIT'
- 'hb-ot-shape-complex-use.cc', # error: redefinition of 'basic_features'
- 'hb-ot-shape.cc', # error: functions that differ only in their return type cannot be overloaded
- 'hb-shape-plan.cc', # error: redefinition of 'hb_ot_shaper_face_data_ensure'
-]
-
UNIFIED_SOURCES += [
+ 'hb-aat-layout.cc',
+ 'hb-aat-map.cc',
+ 'hb-blob.cc',
'hb-buffer.cc',
+ 'hb-common.cc',
+ 'hb-draw.cc',
+ 'hb-face-builder.cc',
'hb-face.cc',
- 'hb-fallback-shape.cc',
'hb-font.cc',
+ 'hb-map.cc',
+ 'hb-number.cc',
+ 'hb-ot-cff1-table.cc',
+ 'hb-ot-cff2-table.cc',
+ 'hb-ot-color.cc',
+ 'hb-ot-face.cc',
+ 'hb-ot-font.cc',
'hb-ot-layout.cc',
'hb-ot-map.cc',
- 'hb-ot-shape-complex-arabic.cc',
- 'hb-ot-shape-complex-default.cc',
- 'hb-ot-shape-complex-hebrew.cc',
- 'hb-ot-shape-complex-indic-table.cc',
- 'hb-ot-shape-complex-myanmar.cc',
- 'hb-ot-shape-complex-thai.cc',
- 'hb-ot-shape-complex-tibetan.cc',
- 'hb-ot-shape-complex-use-table.cc',
+ 'hb-ot-math.cc',
+ 'hb-ot-metrics.cc',
+ 'hb-ot-name.cc',
'hb-ot-shape-fallback.cc',
'hb-ot-shape-normalize.cc',
+ 'hb-ot-shape.cc',
+ 'hb-ot-shaper-arabic.cc',
+ 'hb-ot-shaper-default.cc',
+ 'hb-ot-shaper-hangul.cc',
+ 'hb-ot-shaper-hebrew.cc',
+ 'hb-ot-shaper-indic-table.cc',
+ 'hb-ot-shaper-indic.cc',
+ 'hb-ot-shaper-khmer.cc',
+ 'hb-ot-shaper-myanmar.cc',
+ 'hb-ot-shaper-syllabic.cc',
+ 'hb-ot-shaper-thai.cc',
+ 'hb-ot-shaper-use.cc',
+ 'hb-ot-shaper-vowel-constraints.cc',
'hb-ot-tag.cc',
+ 'hb-ot-var.cc',
+ 'hb-outline.cc',
+ 'hb-paint-extents.cc',
+ 'hb-paint.cc',
'hb-set.cc',
+ 'hb-shape-plan.cc',
'hb-shape.cc',
'hb-shaper.cc',
+ 'hb-static.cc',
+ 'hb-style.cc',
'hb-unicode.cc',
- 'hb-warning.cc',
]
-if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
EXPORTS.harfbuzz += [
'hb-glib.h',
]
@@ -77,8 +107,11 @@ FINAL_LIBRARY = 'gkmedias'
DEFINES['PACKAGE_VERSION'] = '"moz"'
DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"'
DEFINES['HAVE_OT'] = 1
-DEFINES['HB_NO_MT'] = True
+DEFINES['HAVE_ROUND'] = 1
+DEFINES['HB_NO_BUFFER_VERIFY'] = True
+DEFINES['HB_NO_FALLBACK_SHAPE'] = True
+DEFINES['HB_NO_UCD'] = True
DEFINES['HB_NO_UNICODE_FUNCS'] = True
-# Cancel the effect of the -DDEBUG macro if present,
-# because harfbuzz uses that name for its own purposes
-DEFINES['DEBUG'] = False
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
+ DEFINES['UNICODE'] = True