[packages/qt5-qtwebengine] fix build with harfbuzz 3.0.0
atler
atler at pld-linux.org
Sun Sep 19 02:00:47 CEST 2021
commit d40d84d25b43e64b62161e7ae423a6261cd20ba3
Author: Jan Palus <atler at pld-linux.org>
Date: Sun Sep 19 01:57:26 2021 +0200
fix build with harfbuzz 3.0.0
harfbuzz 3.0.0 stabilized subset api along with many breaking changes
(no soname bump though due to subset api being considered unstable
before). from now on require harfbuzz 3.0.0 to avoid issues with missing
symbols.
harfbuzz3.patch | 30 ++++++++++++++++++++++++++++++
qt5-qtwebengine.spec | 10 ++++++----
2 files changed, 36 insertions(+), 4 deletions(-)
---
diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec
index 43f7db2..9233080 100644
--- a/qt5-qtwebengine.spec
+++ b/qt5-qtwebengine.spec
@@ -26,6 +26,7 @@ Patch1: %{name}-gn-dynamic.patch
Patch2: icu.patch
Patch3: glibc-2.33.patch
Patch4: glibc2.34.patch
+Patch5: harfbuzz3.patch
URL: https://www.qt.io/
BuildRequires: Qt5Core-devel >= %{qtbase_ver}
BuildRequires: Qt5Designer-devel >= %{qttools_ver}
@@ -52,8 +53,8 @@ BuildRequires: glib2-devel >= 1:2.32.0
BuildRequires: glibc-misc >= 6:2.17
BuildRequires: glibc-devel >= 6:2.17
BuildRequires: gperf
-BuildRequires: harfbuzz-devel >= 2.4.0
-BuildRequires: harfbuzz-subset-devel >= 2.4.0
+BuildRequires: harfbuzz-devel >= 3.0.0
+BuildRequires: harfbuzz-subset-devel >= 3.0.0
# webengine-system-jsoncpp disabled in src/core/config/linux.pri
#BuildRequires: jsoncpp-devel
BuildRequires: khrplatform-devel
@@ -147,8 +148,8 @@ Group: Libraries
%requires_ge_to Qt5WebChannel Qt5WebChannel-devel
Requires: alsa-lib >= 1.0.10
Requires: freetype >= 1:2.4.2
-Requires: harfbuzz >= 2.4.0
-Requires: harfbuzz-subset >= 2.4.0
+Requires: harfbuzz >= 3.0.0
+Requires: harfbuzz-subset >= 3.0.0
Requires: libicu >= 65
Requires: libpng >= 2:1.6.0
%{?with_system_libvpx:Requires: libvpx >= 1.8.0}
@@ -286,6 +287,7 @@ Przykłady do biblioteki Qt5 WebEngine.
cd src/3rdparty/chromium
%patch4 -p1
cd ../../..
+%patch5 -p1
%{qt5bindir}/syncqt.pl -version %{version}
diff --git a/harfbuzz3.patch b/harfbuzz3.patch
new file mode 100644
index 0000000..0ec7922
--- /dev/null
+++ b/harfbuzz3.patch
@@ -0,0 +1,30 @@
+-2.4.0-- qtwebengine/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc.orig 2021-09-08 23:31:22.000000000 +0200
++++ qtwebengine/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc 2021-09-18 23:41:59.009246422 +0200
+@@ -71,9 +71,9 @@
+ hb_set_t* glyphs =
+ hb_subset_input_glyph_set(input.get()); // Owned by |input|.
+ usage.ForEach(base::BindRepeating(&AddGlyphs, base::Unretained(glyphs)));
+- hb_subset_input_set_retain_gids(input.get(), true);
++ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS);
+
+- HbScoped<hb_face_t> subset_face(hb_subset(face.get(), input.get()));
++ HbScoped<hb_face_t> subset_face(hb_subset_or_fail(face.get(), input.get()));
+ HbScoped<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get()));
+ if (!subset_blob)
+ return nullptr;
+--- qtwebengine/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp.orig 2021-09-08 23:31:29.000000000 +0200
++++ qtwebengine/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp 2021-09-19 00:00:20.185565236 +0200
+@@ -71,11 +71,10 @@
+ hb_set_t* glyphs = hb_subset_input_glyph_set(input.get());
+ glyphUsage.getSetValues([&glyphs](unsigned gid) { hb_set_add(glyphs, gid);});
+
+- hb_subset_input_set_retain_gids(input.get(), true);
++ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS);
+ // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY.
+ // If it isn't known if a font is 'tricky', retain the hints.
+- hb_subset_input_set_drop_hints(input.get(), false);
+- HBFace subset(hb_subset(face.get(), input.get()));
++ HBFace subset(hb_subset_or_fail(face.get(), input.get()));
+ HBBlob result(hb_face_reference_blob(subset.get()));
+ return to_data(std::move(result));
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qt5-qtwebengine.git/commitdiff/d40d84d25b43e64b62161e7ae423a6261cd20ba3
More information about the pld-cvs-commit
mailing list