aboutsummaryrefslogtreecommitdiff
path: root/www/firefox-esr/files/patch-bug847568
diff options
context:
space:
mode:
Diffstat (limited to 'www/firefox-esr/files/patch-bug847568')
-rw-r--r--www/firefox-esr/files/patch-bug847568186
1 files changed, 70 insertions, 116 deletions
diff --git a/www/firefox-esr/files/patch-bug847568 b/www/firefox-esr/files/patch-bug847568
index 3f688427b494..5b557e0e5a86 100644
--- a/www/firefox-esr/files/patch-bug847568
+++ b/www/firefox-esr/files/patch-bug847568
@@ -1,11 +1,11 @@
-# Allow building against system-wide graphite2/harfbuzz.
+Allow building against system-wide graphite2/harfbuzz
diff --git config/system-headers.mozbuild config/system-headers.mozbuild
-index 7620b4d00623..09d3db5ca8c0 100644
+index af44c89057fc..c0ac271917fb 100644
--- config/system-headers.mozbuild
+++ config/system-headers.mozbuild
-@@ -1292,6 +1292,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
- 'proxy.h',
+@@ -1304,6 +1304,19 @@ if CONFIG["MOZ_ENABLE_LIBPROXY"]:
+ "proxy.h",
]
+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
@@ -21,16 +21,16 @@ index 7620b4d00623..09d3db5ca8c0 100644
+ 'harfbuzz/hb.h',
+ ]
+
- if CONFIG['MOZ_SYSTEM_LIBVPX']:
+ if CONFIG["MOZ_SYSTEM_ICU"]:
system_headers += [
- 'vpx_mem/vpx_mem.h',
+ "unicode/calendar.h",
diff --git dom/base/moz.build dom/base/moz.build
-index 8e19020315ae..2fcdbb6f7b42 100644
+index 170d19f09aa9..a47fc8b1193c 100644
--- dom/base/moz.build
+++ dom/base/moz.build
-@@ -546,6 +546,9 @@ if CONFIG["MOZ_BUILD_APP"] in ["browser", "mobile/android", "xulrunner"]:
- if CONFIG["MOZ_X11"]:
- CXXFLAGS += CONFIG["TK_CFLAGS"]
+@@ -620,6 +620,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"]
@@ -40,7 +40,7 @@ index 8e19020315ae..2fcdbb6f7b42 100644
script="gen-usecounters.py",
diff --git gfx/graphite2/geckoextra/moz.build gfx/graphite2/geckoextra/moz.build
new file mode 100644
-index 0000000000000..24e8d7a03274a
+index 000000000000..ed0323eba9d5
--- /dev/null
+++ gfx/graphite2/geckoextra/moz.build
@@ -0,0 +1,21 @@
@@ -64,57 +64,24 @@ index 0000000000000..24e8d7a03274a
+# Match bundled graphite2 configuration
+AllowCompilerWarnings()
+
-+FINAL_LIBRARY = 'gkmedias'
-diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh
-index faaab1b17971..04eff5f09882 100644
---- gfx/graphite2/moz-gr-update.sh
-+++ gfx/graphite2/moz-gr-update.sh
-@@ -1,6 +1,7 @@
- #!/bin/bash
-
- # Script used to update the Graphite2 library in the mozilla source tree
-+# and bump version for --with-system-graphite2
-
- # This script lives in gfx/graphite2, along with the library source,
- # but must be run from the top level of the mozilla-central tree.
-@@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
- #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
- #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
-
-+# chase version for --with-system-graphite2
-+perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
-+ if /GR2_VERSION_REQUIRE/" old-configure.in
-+
- # summarize what's been touched
- echo Updated to $RELEASE.
- echo Here is what changed in the gfx/graphite2 directory:
- echo
-
--hg stat gfx/graphite2
-+hg stat old-configure.in gfx/graphite2
-
- echo
- echo If gfx/graphite2/src/files.mk has changed, please make corresponding
-diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla
-index 22c76a7df020..a01490bd49ee 100644
---- gfx/harfbuzz/README-mozilla
-+++ gfx/harfbuzz/README-mozilla
-@@ -15,3 +15,8 @@ from within the gfx/harfbuzz directory.
-
- If the collection of source files changes, manual updates to moz.build may be
- needed as we don't use the upstream makefiles.
-+
++FINAL_LIBRARY = 'xul'
+diff --git gfx/harfbuzz/README-mozilla.fbsd gfx/harfbuzz/README-mozilla.fbsd
+new file mode 100644
+index 000000000000..2a10eb1e2b42
+--- /dev/null
++++ gfx/harfbuzz/README-mozilla.fbsd
+@@ -0,0 +1,4 @@
+The in-tree copy may be omitted during build by --with-system-harfbuzz.
+Make sure to keep pkg-config version check within toolkit/moz.configure in sync
+with checkout version or increment latest tag by one if it's not based
+on upstream release.
diff --git gfx/moz.build gfx/moz.build
-index 771f652e837a..3b358d84e384 100644
+index 56ea317bedfc..07dd7f66f1bc 100644
--- gfx/moz.build
+++ gfx/moz.build
-@@ -13,6 +13,14 @@ with Files("wr/**"):
- if CONFIG["MOZ_TREE_CAIRO"]:
- DIRS += ["cairo"]
+@@ -10,6 +10,14 @@ with Files("**"):
+ with Files("wr/**"):
+ BUG_COMPONENT = ("Core", "Graphics: WebRender")
+if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
+ DIRS += ["graphite2/geckoextra"]
@@ -125,9 +92,9 @@ index 771f652e837a..3b358d84e384 100644
+ DIRS += ["harfbuzz/src"]
+
DIRS += [
+ "cairo",
"2d",
- "ycbcr",
-@@ -21,8 +29,6 @@ DIRS += [
+@@ -19,8 +27,6 @@ DIRS += [
"qcms",
"gl",
"layers",
@@ -137,10 +104,10 @@ index 771f652e837a..3b358d84e384 100644
"thebes",
"ipc",
diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
-index e06ae3457a47..93faa61594a3 100755
+index b589efde1c5c..47f49e10df70 100755
--- gfx/skia/generate_mozbuild.py
+++ gfx/skia/generate_mozbuild.py
-@@ -98,6 +98,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+@@ -95,6 +95,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
'-Wno-unused-private-field',
]
@@ -148,13 +115,13 @@ index e06ae3457a47..93faa61594a3 100755
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
- CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
- CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+ LOCAL_INCLUDES += [
+ "/gfx/cairo/cairo/src",
diff --git gfx/skia/moz.build gfx/skia/moz.build
-index 2118677ca3a8..e4978b413784 100644
+index 7fee54534878..ba1a4038e4a0 100644
--- gfx/skia/moz.build
+++ gfx/skia/moz.build
-@@ -490,6 +490,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+@@ -623,6 +623,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
'-Wno-unused-private-field',
]
@@ -162,13 +129,13 @@ index 2118677ca3a8..e4978b413784 100644
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
- CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
- CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+ LOCAL_INCLUDES += [
+ "/gfx/cairo/cairo/src",
diff --git gfx/thebes/moz.build gfx/thebes/moz.build
-index 56f1b9fe3f4b..0ac1100b0df3 100644
+index 48f2849e2025..7d0a161a91b4 100644
--- gfx/thebes/moz.build
+++ gfx/thebes/moz.build
-@@ -287,7 +287,13 @@ if CONFIG["MOZ_WAYLAND"]:
+@@ -295,7 +295,13 @@ if CONFIG["MOZ_WAYLAND"]:
LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
@@ -181,68 +148,54 @@ index 56f1b9fe3f4b..0ac1100b0df3 100644
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
- if CONFIG["CC_TYPE"] == "clang":
- # Suppress warnings from Skia header files.
+ CXXFLAGS += ["-Werror=switch"]
+
diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
-index cb1233c56d7e..06fb1f9f174b 100644
+index 2396210428ee..092baac6f79c 100644
--- intl/unicharutil/util/moz.build
+++ intl/unicharutil/util/moz.build
-@@ -25,4 +25,7 @@ UNIFIED_SOURCES += [
+@@ -24,6 +24,9 @@ UNIFIED_SOURCES += [
"nsUnicodeProperties.cpp",
]
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
+
- FINAL_LIBRARY = "xul"
+ include("/ipc/chromium/chromium-config.mozbuild")
+
+ GeneratedFile(
diff --git netwerk/dns/moz.build netwerk/dns/moz.build
-index 79c26e3e7001..c4d93bc5f7dc 100644
+index 1bb0430f01aa..0360e0f468c0 100644
--- netwerk/dns/moz.build
+++ netwerk/dns/moz.build
-@@ -105,3 +105,6 @@ USE_LIBS += ["icu"]
+@@ -111,6 +111,9 @@ GeneratedFile(
+ "etld_data.inc", script="prepare_tlds.py", inputs=["effective_tld_names.dat"]
+ )
- if CONFIG["CC_TYPE"] in ("clang", "gcc"):
- CXXFLAGS += ["-Wno-error=shadow"]
-+
+if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
+ CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
-diff --git old-configure.in old-configure.in
-index 95a58b634593..b614eef85c89 100644
---- old-configure.in
-+++ old-configure.in
-@@ -2303,6 +2303,27 @@ dnl ========================================================
-
- AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR)
-
-+dnl ========================================================
-+dnl Check for graphite2
-+dnl ========================================================
-+if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
-+ dnl graphite2.pc has bogus version, check manually
-+ _SAVE_CFLAGS=$CFLAGS
-+ CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
-+ AC_TRY_COMPILE([ #include <graphite2/Font.h>
-+ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
-+ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
-+ * 100 + GR2_VERSION_BUGFIX >= \
-+ (major) * 10000 + (minor) * 100 + (bugfix) )
-+ ], [
-+ #if !GR2_VERSION_REQUIRE(1,3,14)
-+ #error "Insufficient graphite2 version."
-+ #endif
-+ ], [],
-+ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
-+ CFLAGS=$_SAVE_CFLAGS
-+fi
+
- dnl ========================================================
- dnl Check for pixman and cairo
- dnl ========================================================
+ # need to include etld_data.inc
+ LOCAL_INCLUDES += [
+ "/netwerk/base",
+diff --git security/rlbox/moz.build security/rlbox/moz.build
+index 7ad8d076f0f1..835b9d905e03 100644
+--- security/rlbox/moz.build
++++ security/rlbox/moz.build
+@@ -47,6 +47,8 @@ if CONFIG["MOZ_WASM_SANDBOXING_GRAPHITE"]:
+ for k, v in graphite_defines:
+ WASM_DEFINES[k] = v
+ LOCAL_INCLUDES += ["/gfx/graphite2/src"]
++ if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
++ WASM_CXXFLAGS += CONFIG["MOZ_GRAPHITE2_CFLAGS"]
+
+ if CONFIG["MOZ_WASM_SANDBOXING_OGG"]:
+ include("/media/libogg/sources.mozbuild")
diff --git toolkit/library/moz.build toolkit/library/moz.build
-index 24f940e1ed7e..079a575adec3 100644
+index ee6051567c8e..c24a5a513bbc 100644
--- toolkit/library/moz.build
+++ toolkit/library/moz.build
-@@ -247,6 +247,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]:
+@@ -298,6 +298,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]:
if CONFIG["MOZ_SYSTEM_WEBP"]:
OS_LIBS += CONFIG["MOZ_WEBP_LIBS"]
@@ -256,12 +209,12 @@ index 24f940e1ed7e..079a575adec3 100644
OS_LIBS += CONFIG["MOZ_LIBEVENT_LIBS"]
diff --git toolkit/moz.configure toolkit/moz.configure
-index 9297e4d6f501..d8e273887e4b 100644
+index 1f85d2831f2f..04ce56e2cc0b 100644
--- toolkit/moz.configure
+++ toolkit/moz.configure
-@@ -1055,6 +1055,25 @@ set_config("FT2_LIBS", ft2_info.libs)
- add_old_configure_assignment("FT2_LIBS", ft2_info.libs)
- add_old_configure_assignment("FT2_CFLAGS", ft2_info.cflags)
+@@ -1397,6 +1397,26 @@ def enable_cairo_ft(target, tree_freetype, freetype2_info):
+ set_config("MOZ_ENABLE_CAIRO_FT", True, when=enable_cairo_ft)
+ set_config("CAIRO_FT_CFLAGS", ft2_info.cflags, when=enable_cairo_ft)
+# Graphite2
+# ==============================================================
@@ -282,6 +235,7 @@ index 9297e4d6f501..d8e273887e4b 100644
+ when="--with-system-harfbuzz")
+
+set_config("MOZ_SYSTEM_HARFBUZZ", depends_if(system_harfbuzz)(lambda _: True))
++
- # Remote agent
- # (partial implementation of Chromium Remote Debugging Protocol)
+ # WebDriver (HTTP / BiDi)
+ # ==============================================================