Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Thaodan:mozilla
MozillaFirefox
0020-Bug-847568-Support-system-harfbuzz.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0020-Bug-847568-Support-system-harfbuzz.patch of Package MozillaFirefox
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann <whissi@gentoo.org> Date: Mon, 6 Apr 2020 19:32:39 +0200 Subject: [PATCH] Bug 847568 - Support system harfbuzz Allow building against system-wide harfbuzz. Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=847568 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> --- config/system-headers.mozbuild | 8 ++++++++ dom/base/moz.build | 3 +++ gfx/moz.build | 4 +++- gfx/skia/generate_mozbuild.py | 3 +++ gfx/skia/moz.build | 3 +++ gfx/thebes/moz.build | 3 +++ intl/unicharutil/util/moz.build | 3 +++ netwerk/dns/moz.build | 3 +++ toolkit/library/moz.build | 3 +++ toolkit/moz.configure | 8 ++++++++ 10 files changed, 40 insertions(+), 1 deletion(-) diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild index 51864315e6bf69a5c5ef8ea9500d00d844798b09..93328639c56d1781639bdc60fc3683e567c6b268 100644 --- a/config/system-headers.mozbuild +++ b/config/system-headers.mozbuild @@ -1252,6 +1252,14 @@ if CONFIG["OS_TARGET"] == "Android": "vr/gvr/capi/include/gvr.h", ] + +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + system_headers += [ + "harfbuzz/hb-glib.h", + "harfbuzz/hb-ot.h", + "harfbuzz/hb.h", + ] + if CONFIG["MOZ_JACK"]: system_headers += [ "jack/jack.h", diff --git a/dom/base/moz.build b/dom/base/moz.build index 7ce0213605b8e1d8cb7233aacdddb3989ffc5fee..ecdb852952d9b6a92abdbf26f6e60e433840e34e 100644 --- a/dom/base/moz.build +++ b/dom/base/moz.build @@ -622,6 +622,9 @@ FINAL_LIBRARY = "xul" if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + GeneratedFile( "UseCounterList.h", script="gen-usecounters.py", diff --git a/gfx/moz.build b/gfx/moz.build index 56ea317bedfc68d504248b5d3b79cd36e8bc388a..6cc19f84709bbe3be4ff830e3a6dd29189048c6f 100644 --- a/gfx/moz.build +++ b/gfx/moz.build @@ -10,6 +10,9 @@ with Files("**"): with Files("wr/**"): BUG_COMPONENT = ("Core", "Graphics: WebRender") +if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + DIRS += ["harfbuzz/src"] + DIRS += [ "cairo", "2d", @@ -20,7 +23,6 @@ DIRS += [ "gl", "layers", "graphite2/src", - "harfbuzz/src", "ots/src", "thebes", "ipc", diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py index b589efde1c5c29ca19394d681f95a5381968db5d..47f49e10df70b10f89a425f8085b147fdb6a2806 100755 --- a/gfx/skia/generate_mozbuild.py +++ b/gfx/skia/generate_mozbuild.py @@ -95,6 +95,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-unused-private-field', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'): LOCAL_INCLUDES += [ "/gfx/cairo/cairo/src", diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build index 7fee545348784084a769d01968a605c31c36d99d..ba1a4038e4a00b12bbb0309381b2419b706454ec 100644 --- a/gfx/skia/moz.build +++ b/gfx/skia/moz.build @@ -623,6 +623,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-unused-private-field', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'): LOCAL_INCLUDES += [ "/gfx/cairo/cairo/src", diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build index 48f2849e2025fc6a1c8fc99328d2c8da5e3ead42..5e163347c0fd1a1670c8fc70f3e1f1eb9e5b035b 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build @@ -297,6 +297,9 @@ LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"] DEFINES["GRAPHITE2_STATIC"] = True +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + CXXFLAGS += ["-Werror=switch"] include("/tools/fuzzing/libfuzzer-config.mozbuild") diff --git a/intl/unicharutil/util/moz.build b/intl/unicharutil/util/moz.build index 2396210428ee11b660fce0cbeba9a119b9f7bcb2..092baac6f79c65aff378a97149daa7844d327a49 100644 --- a/intl/unicharutil/util/moz.build +++ b/intl/unicharutil/util/moz.build @@ -24,6 +24,9 @@ UNIFIED_SOURCES += [ "nsUnicodeProperties.cpp", ] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + include("/ipc/chromium/chromium-config.mozbuild") GeneratedFile( diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build index 1bb0430f01aa3d8f489cf013233cd23d7ef5e239..f3f07fb808545bd9f921d17447a4dbde21da6277 100644 --- a/netwerk/dns/moz.build +++ b/netwerk/dns/moz.build @@ -118,4 +118,7 @@ LOCAL_INCLUDES += [ "/netwerk/protocol/http", ] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + USE_LIBS += ["icu"] diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build index d1c373c819890e427b67b14bee9bbe7739c5d8f8..d6a8ddfaedaa58db148283def414d18429d453eb 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build @@ -290,6 +290,9 @@ if CONFIG["MOZ_ANDROID_GOOGLE_VR"]: "-lgvr", ] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"] + if CONFIG["MOZ_SYSTEM_JPEG"]: OS_LIBS += CONFIG["MOZ_JPEG_LIBS"] diff --git a/toolkit/moz.configure b/toolkit/moz.configure index 0be5c4092038cce12d78eeec774526d6a7a350c5..b1f44524cd5687c7e2f86ae555b2210303b10b3b 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -792,6 +792,14 @@ def freetype2_combined_info(fontconfig_info, freetype2_info): set_define("MOZ_HAVE_FREETYPE2", depends_if(freetype2_info)(lambda _: True)) +# HarfBuzz +# ============================================================== +option('--with-system-harfbuzz', help="Use system harfbuzz (located with pkgconfig)") + +system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 2.7.4', + when='--with-system-harfbuzz') + +set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True)) # Apple platform decoder support # ==============================================================
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor