1 |
commit: bfaec25596caf88fd3229effc4fd61a2f2d28b7e |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 9 22:23:54 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 9 22:24:34 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfaec255 |
7 |
|
8 |
dev-qt/qtwebengine: add Fedora patch for >= harfbuzz 3 |
9 |
|
10 |
I'd like to add the patches Google used for Chromium |
11 |
but we know this one works and I'd like the tree to be in a |
12 |
working state. Can swap patches later. |
13 |
|
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
...webengine-5.15.2_p20210824-harfbuzz-3.0.0.patch | 32 ++++++++++++++++++++++ |
17 |
.../qtwebengine-5.15.2_p20210824-r1.ebuild | 7 +++++ |
18 |
2 files changed, 39 insertions(+) |
19 |
|
20 |
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210824-harfbuzz-3.0.0.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210824-harfbuzz-3.0.0.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..61e56d5ae4f |
23 |
--- /dev/null |
24 |
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210824-harfbuzz-3.0.0.patch |
25 |
@@ -0,0 +1,32 @@ |
26 |
+https://src.fedoraproject.org/rpms/qt5-qtwebengine/raw/rawhide/f/qtwebengine-harfbuzz.patch |
27 |
+--- a/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc |
28 |
++++ b/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc |
29 |
+@@ -71,9 +71,9 @@ sk_sp<SkData> SubsetFont(SkTypeface* typeface, const GlyphUsage& usage) { |
30 |
+ hb_set_t* glyphs = |
31 |
+ hb_subset_input_glyph_set(input.get()); // Owned by |input|. |
32 |
+ usage.ForEach(base::BindRepeating(&AddGlyphs, base::Unretained(glyphs))); |
33 |
+- hb_subset_input_set_retain_gids(input.get(), true); |
34 |
++ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS); |
35 |
+ |
36 |
+- HbScoped<hb_face_t> subset_face(hb_subset(face.get(), input.get())); |
37 |
++ HbScoped<hb_face_t> subset_face(hb_subset_or_fail(face.get(), input.get())); |
38 |
+ HbScoped<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get())); |
39 |
+ if (!subset_blob) |
40 |
+ return nullptr; |
41 |
+--- a/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp |
42 |
++++ b/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp |
43 |
+@@ -71,11 +71,10 @@ static sk_sp<SkData> subset_harfbuzz(sk_sp<SkData> fontData, |
44 |
+ hb_set_t* glyphs = hb_subset_input_glyph_set(input.get()); |
45 |
+ glyphUsage.getSetValues([&glyphs](unsigned gid) { hb_set_add(glyphs, gid);}); |
46 |
+ |
47 |
+- hb_subset_input_set_retain_gids(input.get(), true); |
48 |
+ // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY. |
49 |
+ // If it isn't known if a font is 'tricky', retain the hints. |
50 |
+- hb_subset_input_set_drop_hints(input.get(), false); |
51 |
+- HBFace subset(hb_subset(face.get(), input.get())); |
52 |
++ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS | HB_SUBSET_FLAGS_NO_HINTING); |
53 |
++ HBFace subset(hb_subset_or_fail(face.get(), input.get())); |
54 |
+ HBBlob result(hb_face_reference_blob(subset.get())); |
55 |
+ return to_data(std::move(result)); |
56 |
+ } |
57 |
+ |
58 |
|
59 |
diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210824-r1.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210824-r1.ebuild |
60 |
index e3f9df28c79..b06e54bda94 100644 |
61 |
--- a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210824-r1.ebuild |
62 |
+++ b/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210824-r1.ebuild |
63 |
@@ -169,6 +169,13 @@ src_prepare() { |
64 |
done < <(find src/3rdparty/chromium/third_party/icu -type f "(" -name "*.c" -o -name "*.cpp" -o -name "*.h" ")" 2>/dev/null) |
65 |
fi |
66 |
|
67 |
+ if has_version ">=media-libs/harfbuzz-3.0.0-r1"; then |
68 |
+ # We can get away with conditionally applying this with has_version |
69 |
+ # because we have a := dep on harfbuzz and the subslot changed |
70 |
+ # at 3.0.0. |
71 |
+ eapply "${FILESDIR}/qtwebengine-5.15.2_p20210824-harfbuzz-3.0.0.patch" |
72 |
+ fi |
73 |
+ |
74 |
qt_use_disable_config alsa webengine-alsa src/buildtools/config/linux.pri |
75 |
qt_use_disable_config pulseaudio webengine-pulseaudio src/buildtools/config/linux.pri |