From dc2f301520eb0151967763d129a425fa0a509ada Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Sat, 14 Sep 2019 11:09:46 +0200 Subject: [PATCH] More of the harfbuzz related fixes --- chromium-77.0.3865.75-harfbuzz-subset.patch | 49 +++++++++++++++++++++ chromium.spec | 7 ++- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 chromium-77.0.3865.75-harfbuzz-subset.patch diff --git a/chromium-77.0.3865.75-harfbuzz-subset.patch b/chromium-77.0.3865.75-harfbuzz-subset.patch new file mode 100644 index 0000000..55d78d1 --- /dev/null +++ b/chromium-77.0.3865.75-harfbuzz-subset.patch @@ -0,0 +1,49 @@ +From 27e25336b8316ff3ec4e464058682ed85801fd06 Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Mon, 29 Jul 2019 10:54:28 +0000 +Subject: [PATCH] Also link against libharfbuzz-subset when use_system_harfbuzz is true + +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, 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 +Commit-Queue: Dominik Röttsches +Reviewed-by: Dominik Röttsches +Cr-Commit-Position: refs/heads/master@{#681760} +--- + +diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn +index 37d8e33..72013eb1d 100644 +--- a/third_party/harfbuzz-ng/BUILD.gn ++++ b/third_party/harfbuzz-ng/BUILD.gn +@@ -16,7 +16,10 @@ + "//third_party:freetype_harfbuzz", + "//third_party/freetype:freetype_source", + ] +- packages = [ "harfbuzz" ] ++ packages = [ ++ "harfbuzz", ++ "harfbuzz-subset", ++ ] + } + } else { + config("harfbuzz_config") { diff --git a/chromium.spec b/chromium.spec index dd3fbaf..8039cd0 100644 --- a/chromium.spec +++ b/chromium.spec @@ -281,6 +281,8 @@ Patch65: chromium-77.0.3865.75-unbundle-zlib.patch Patch66: chromium-77.0.3865.75-gcc-include-memory.patch # Needs to be submitted.. Patch67: chromium-77.0.3865.75-base-gcc-no-alignas.patch +# https://chromium.googlesource.com/chromium/src/+/27e25336b8316ff3ec4e464058682ed85801fd06 +Patch68: chromium-77.0.3865.75-harfbuzz-subset.patch # Apply these changes to work around EPEL7 compiler issues Patch100: chromium-62.0.3202.62-kmaxskip-constexpr.patch @@ -366,7 +368,7 @@ BuildRequires: gperf %if 0%{?bundleharfbuzz} #nothing %else -BuildRequires: harfbuzz-devel >= 2.3.0 +BuildRequires: harfbuzz-devel >= 2.4.0 %endif BuildRequires: libatomic BuildRequires: libcap-devel @@ -633,7 +635,7 @@ Provides: bundled(freetype) = 2.9.3 %endif Provides: bundled(gperftools) = svn144 %if 0%{?bundleharfbuzz} -Provides: bundled(harfbuzz) = 2.3.0 +Provides: bundled(harfbuzz) = 2.4.0 %endif Provides: bundled(hunspell) = 1.6.0 Provides: bundled(iccjpeg) @@ -849,6 +851,7 @@ udev. %patch65 -p1 -b .unbundle-zlib %patch66 -p1 -b .gcc-include-memory %patch67 -p1 -b .base-gcc-no-alignas +%patch68 -p1 -b .harfbuzz-subset # EPEL specific patches %if 0%{?rhel} == 7