commit 9d56b6cc5543d2ef921f3dd563afad3d4867dbfd
Author: Akarshan Biswas <akarshanbiswas(a)fedoraproject.org>
Date: Mon Sep 23 18:04:12 2019 +0530
Add patch from upstream to fix building with system harfbuzz
chromium-vaapi.spec | 6 +++++
link-against-harfbuzz-subset.patch | 55 ++++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+)
---
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index 77eb516..2e7183a 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -219,6 +219,9 @@ Patch71: chromium-unbundle-zlib.patch
Patch72: chromium-base-location.patch
Patch73: chromium-gcc9-r684731.patch
+# This patch fixes linking when build with system harfbuzz is enabled
+Patch74: link-against-harfbuzz-subset.patch
+
%description
%{name} is an open-source web browser, powered by WebKit (Blink)
@@ -231,6 +234,9 @@ Patch73: chromium-gcc9-r684731.patch
%if !%{freeworld}
%patch54 -p1 -R
%endif
+%if !%{with system_harfbuzz}
+%patch74 -p1 -R
+%endif
#Let's change the default shebang of python files.
diff --git a/link-against-harfbuzz-subset.patch b/link-against-harfbuzz-subset.patch
new file mode 100644
index 0000000..05731a5
--- /dev/null
+++ b/link-against-harfbuzz-subset.patch
@@ -0,0 +1,55 @@
+From 27e25336b8316ff3ec4e464058682ed85801fd06 Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <raphael.kubo.da.costa(a)intel.com>
+Date: Mon, 29 Jul 2019 10:54:28 +0000
+Subject: [PATCH] Also link against libharfbuzz-subset when use_system_harfbuzz
+ is true
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When building HarfBuzz as part of Chromium, there is a single source set
+with all the files we need in the build.
+
+Upstream HarfBuzz, on the other hand, produces a few different libraries:
+harfbuzz, harfbuzz-icu and harfbuzz-subset. When |use_system_harfbuzz| is
+true, we were only looking for (and using) harfbuzz.pc with pkg-config even
+though we also use symbols from libharfbuzz-subset.so. This resulted in
+errors when linking:
+
+ ld: obj/skia/skia/SkPDFSubsetFont.o: in function
`SkPDFSubsetFont(sk_sp<SkData>, SkPDFGlyphUse const&,
SkPDF::Metadata::Subsetter, char const*, int)':
+
SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x48a):
undefined reference to `hb_subset_input_create_or_fail'
+ ld:
SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x4af):
undefined reference to `hb_subset_input_glyph_set'
+ ld:
SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x5d7):
undefined reference to `hb_subset_input_set_retain_gids'
+ ld:
SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x5e4):
undefined reference to `hb_subset_input_set_drop_hints'
+ ld:
SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x5f3):
undefined reference to `hb_subset'
+ ld:
SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x66f):
undefined reference to `hb_subset_input_destroy'
+
+as reported in
+https://groups.google.com/a/chromium.org/d/msg/chromium-packagers/UyJsVJ5QqWo/jSv5z7-rEQAJ
+
+Change-Id: I997af075c7b7263cd7cc71a63db5b0f93bd1ab59
+Reviewed-on:
https://chromium-review.googlesource.com/c/chromium/src/+/1715288
+Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa(a)intel.com>
+Commit-Queue: Dominik Röttsches <drott(a)chromium.org>
+Reviewed-by: Dominik Röttsches <drott(a)chromium.org>
+Cr-Commit-Position: refs/heads/master@{#681760}
+---
+ third_party/harfbuzz-ng/BUILD.gn | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn
+index 37d8e334c2..72013eb1db 100644
+--- a/third_party/harfbuzz-ng/BUILD.gn
++++ b/third_party/harfbuzz-ng/BUILD.gn
+@@ -16,7 +16,10 @@ if (use_system_harfbuzz) {
+ "//third_party:freetype_harfbuzz",
+ "//third_party/freetype:freetype_source",
+ ]
+- packages = [ "harfbuzz" ]
++ packages = [
++ "harfbuzz",
++ "harfbuzz-subset",
++ ]
+ }
+ } else {
+ config("harfbuzz_config") {