[arch-commits] Commit in qt6-webengine/repos/kde-unstable-x86_64 (6 files)
Antonio Rojas
arojas at gemini.archlinux.org
Fri Sep 24 14:12:23 UTC 2021
Date: Friday, September 24, 2021 @ 14:12:23
Author: arojas
Revision: 424635
archrelease: copy kde-unstable to kde-unstable-x86_64
Added:
qt6-webengine/repos/kde-unstable-x86_64/PKGBUILD
(from rev 424634, qt6-webengine/kde-unstable/PKGBUILD)
qt6-webengine/repos/kde-unstable-x86_64/chromium-harfbuzz-3.0.0.patch
(from rev 424634, qt6-webengine/kde-unstable/chromium-harfbuzz-3.0.0.patch)
qt6-webengine/repos/kde-unstable-x86_64/skia-harfbuzz-3.0.0.patch
(from rev 424634, qt6-webengine/kde-unstable/skia-harfbuzz-3.0.0.patch)
Deleted:
qt6-webengine/repos/kde-unstable-x86_64/PKGBUILD
qt6-webengine/repos/kde-unstable-x86_64/chromium-harfbuzz-3.0.0.patch
qt6-webengine/repos/kde-unstable-x86_64/skia-harfbuzz-3.0.0.patch
-------------------------------+
PKGBUILD | 96 +++++++++----------
chromium-harfbuzz-3.0.0.patch | 40 ++++----
skia-harfbuzz-3.0.0.patch | 200 ++++++++++++++++++++--------------------
3 files changed, 168 insertions(+), 168 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2021-09-24 14:12:11 UTC (rev 424634)
+++ PKGBUILD 2021-09-24 14:12:23 UTC (rev 424635)
@@ -1,48 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgname=qt6-webengine
-_qtver=6.2.0-rc
-pkgver=${_qtver/-/}
-pkgrel=2
-arch=(x86_64)
-url='https://www.qt.io'
-license=(GPL3 LGPL3 FDL custom)
-pkgdesc='Provides support for web applications using the Chromium browser project'
-depends=(qt6-webchannel qt6-location libxcomposite libxrandr pciutils libxss libxkbfile
- libevent snappy nss libxslt minizip ffmpeg re2 libvpx libxtst ttf-font)
-makedepends=(cmake ninja python2 python gperf jsoncpp qt6-tools pipewire nodejs)
-optdepends=('pipewire: WebRTC desktop sharing under Wayland')
-groups=(qt6)
-_pkgfn="${pkgname/6-/}-everywhere-src-$_qtver"
-source=(https://download.qt.io/development_releases/qt/${pkgver%.*}/$_qtver/submodules/$_pkgfn.tar.xz
- chromium-harfbuzz-3.0.0.patch
- skia-harfbuzz-3.0.0.patch)
-sha256sums=('6763d1142601e4c7783ab6c5f3f19946216749c9e59ebdefd85ae29b13998ec8'
- '7ce947944a139e66774dfc7249bf7c3069f07f83a0f1b2c1a1b14287a7e15928'
- 'c9ed1dbadaf4be6097e25bc5577b91751799befc2d0376b143e1bd10def5754e')
-
-prepare() {
- cd $_pkgfn
-
- # Fix build with harfbuzz 3.0.0
- patch -p1 -d src/3rdparty/chromium -i "$srcdir"/chromium-harfbuzz-3.0.0.patch
- patch -p1 -d src/3rdparty/chromium/third_party/skia -i "$srcdir"/skia-harfbuzz-3.0.0.patch
-}
-
-build() {
- cmake -B build -S $_pkgfn -G Ninja \
- -DCMAKE_TOOLCHAIN_FILE=/usr/lib/cmake/Qt6/qt.toolchain.cmake \
- -DQT_FEATURE_webengine_system_ffmpeg=ON \
- -DQT_FEATURE_webengine_system_icu=ON \
- -DQT_FEATURE_webengine_proprietary_codecs=ON \
- -DQT_FEATURE_webengine_kerberos=ON \
- -DQT_FEATURE_webengine_webrtc_pipewire=ON
- cmake --build build
-}
-
-package() {
- DESTDIR="$pkgdir" cmake --install build
-
- install -Dm644 "$srcdir"/${_pkgfn}/src/3rdparty/chromium/LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE.chromium
-}
Copied: qt6-webengine/repos/kde-unstable-x86_64/PKGBUILD (from rev 424634, qt6-webengine/kde-unstable/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-09-24 14:12:23 UTC (rev 424635)
@@ -0,0 +1,48 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=qt6-webengine
+_qtver=6.2.0-rc2
+pkgver=${_qtver/-/}
+pkgrel=1
+arch=(x86_64)
+url='https://www.qt.io'
+license=(GPL3 LGPL3 FDL custom)
+pkgdesc='Provides support for web applications using the Chromium browser project'
+depends=(qt6-webchannel qt6-location libxcomposite libxrandr pciutils libxss libxkbfile
+ libevent snappy nss libxslt minizip ffmpeg re2 libvpx libxtst ttf-font)
+makedepends=(cmake ninja python2 python gperf jsoncpp qt6-tools pipewire nodejs)
+optdepends=('pipewire: WebRTC desktop sharing under Wayland')
+groups=(qt6)
+_pkgfn="${pkgname/6-/}-everywhere-src-$_qtver"
+source=(https://download.qt.io/development_releases/qt/${pkgver%.*}/$_qtver/submodules/$_pkgfn.tar.xz
+ chromium-harfbuzz-3.0.0.patch
+ skia-harfbuzz-3.0.0.patch)
+sha256sums=('d0088aea07c3b4fda06585f98fe8e7dfc13e8a1fcfd12388c6c1b4a4d97621d4'
+ '7ce947944a139e66774dfc7249bf7c3069f07f83a0f1b2c1a1b14287a7e15928'
+ 'c9ed1dbadaf4be6097e25bc5577b91751799befc2d0376b143e1bd10def5754e')
+
+prepare() {
+ cd $_pkgfn
+
+ # Fix build with harfbuzz 3.0.0
+ patch -p1 -d src/3rdparty/chromium -i "$srcdir"/chromium-harfbuzz-3.0.0.patch
+ patch -p1 -d src/3rdparty/chromium/third_party/skia -i "$srcdir"/skia-harfbuzz-3.0.0.patch
+}
+
+build() {
+ cmake -B build -S $_pkgfn -G Ninja \
+ -DCMAKE_TOOLCHAIN_FILE=/usr/lib/cmake/Qt6/qt.toolchain.cmake \
+ -DQT_FEATURE_webengine_system_ffmpeg=ON \
+ -DQT_FEATURE_webengine_system_icu=ON \
+ -DQT_FEATURE_webengine_proprietary_codecs=ON \
+ -DQT_FEATURE_webengine_kerberos=ON \
+ -DQT_FEATURE_webengine_webrtc_pipewire=ON
+ cmake --build build
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+
+ install -Dm644 "$srcdir"/${_pkgfn}/src/3rdparty/chromium/LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE.chromium
+}
Deleted: chromium-harfbuzz-3.0.0.patch
===================================================================
--- chromium-harfbuzz-3.0.0.patch 2021-09-24 14:12:11 UTC (rev 424634)
+++ chromium-harfbuzz-3.0.0.patch 2021-09-24 14:12:23 UTC (rev 424635)
@@ -1,20 +0,0 @@
-# https://github.com/chromium/chromium/commit/b289f6f3fcbc
-
-diff --git a/components/paint_preview/common/subset_font.cc b/components/paint_preview/common/subset_font.cc
-index 8ff0540d9a..20a7d37474 100644
---- a/components/paint_preview/common/subset_font.cc
-+++ b/components/paint_preview/common/subset_font.cc
-@@ -72,9 +72,11 @@ sk_sp<SkData> SubsetFont(SkTypeface* typeface, const GlyphUsage& usage) {
- 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()));
-+ if (!subset_face)
-+ return nullptr;
- HbScoped<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get()));
- if (!subset_blob)
- return nullptr;
Copied: qt6-webengine/repos/kde-unstable-x86_64/chromium-harfbuzz-3.0.0.patch (from rev 424634, qt6-webengine/kde-unstable/chromium-harfbuzz-3.0.0.patch)
===================================================================
--- chromium-harfbuzz-3.0.0.patch (rev 0)
+++ chromium-harfbuzz-3.0.0.patch 2021-09-24 14:12:23 UTC (rev 424635)
@@ -0,0 +1,20 @@
+# https://github.com/chromium/chromium/commit/b289f6f3fcbc
+
+diff --git a/components/paint_preview/common/subset_font.cc b/components/paint_preview/common/subset_font.cc
+index 8ff0540d9a..20a7d37474 100644
+--- a/components/paint_preview/common/subset_font.cc
++++ b/components/paint_preview/common/subset_font.cc
+@@ -72,9 +72,11 @@ sk_sp<SkData> SubsetFont(SkTypeface* typeface, const GlyphUsage& usage) {
+ 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()));
++ if (!subset_face)
++ return nullptr;
+ HbScoped<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get()));
+ if (!subset_blob)
+ return nullptr;
Deleted: skia-harfbuzz-3.0.0.patch
===================================================================
--- skia-harfbuzz-3.0.0.patch 2021-09-24 14:12:11 UTC (rev 424634)
+++ skia-harfbuzz-3.0.0.patch 2021-09-24 14:12:23 UTC (rev 424635)
@@ -1,100 +0,0 @@
-# Minimal diff for harfbuzz 3.0.0 support; based on:
-# https://github.com/google/skia/commit/66684b17b382
-# https://github.com/google/skia/commit/51d83abcd24a
-
-diff --git a/gn/skia.gni b/gn/skia.gni
-index d98fdc19ee..199335d5c4 100644
---- a/gn/skia.gni
-+++ b/gn/skia.gni
-@@ -34,8 +34,6 @@ declare_args() {
- skia_include_multiframe_procs = false
- skia_lex = false
- skia_libgifcodec_path = "third_party/externals/libgifcodec"
-- skia_pdf_subset_harfbuzz =
-- false # TODO: set skia_pdf_subset_harfbuzz to skia_use_harfbuzz.
- skia_qt_path = getenv("QT_PATH")
- skia_skqp_global_error_tolerance = 0
- skia_tools_require_resources = false
-@@ -99,6 +97,10 @@ declare_args() {
- skia_use_libfuzzer_defaults = true
- }
-
-+declare_args() {
-+ skia_pdf_subset_harfbuzz = skia_use_harfbuzz
-+}
-+
- declare_args() {
- skia_compile_sksl_tests = skia_compile_processors
- skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype
-diff --git a/src/pdf/SkPDFSubsetFont.cpp b/src/pdf/SkPDFSubsetFont.cpp
-index 81c37eef3a..2340a7937b 100644
---- a/src/pdf/SkPDFSubsetFont.cpp
-+++ b/src/pdf/SkPDFSubsetFont.cpp
-@@ -49,6 +49,37 @@ static sk_sp<SkData> to_data(HBBlob blob) {
- blob.release());
- }
-
-+template<typename...> using void_t = void;
-+template<typename T, typename = void>
-+struct SkPDFHarfBuzzSubset {
-+ // This is the HarfBuzz 3.0 interface.
-+ // hb_subset_flags_t does not exist in 2.0. It isn't dependent on T, so inline the value of
-+ // HB_SUBSET_FLAGS_RETAIN_GIDS until 2.0 is no longer supported.
-+ static HBFace Make(T input, hb_face_t* face) {
-+ // 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_flags(input, 2/*HB_SUBSET_FLAGS_RETAIN_GIDS*/);
-+ return HBFace(hb_subset_or_fail(face, input));
-+ }
-+};
-+template<typename T>
-+struct SkPDFHarfBuzzSubset<T, void_t<
-+ decltype(hb_subset_input_set_retain_gids(std::declval<T>(), std::declval<bool>())),
-+ decltype(hb_subset_input_set_drop_hints(std::declval<T>(), std::declval<bool>())),
-+ decltype(hb_subset(std::declval<hb_face_t*>(), std::declval<T>()))
-+ >>
-+{
-+ // This is the HarfBuzz 2.0 (non-public) interface, used if it exists.
-+ // This code should be removed as soon as all users are migrated to the newer API.
-+ static HBFace Make(T input, hb_face_t* face) {
-+ hb_subset_input_set_retain_gids(input, true);
-+ // 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, false);
-+ return HBFace(hb_subset(face, input));
-+ }
-+};
-+
- static sk_sp<SkData> subset_harfbuzz(sk_sp<SkData> fontData,
- const SkPDFGlyphUse& glyphUsage,
- int ttcIndex) {
-@@ -71,11 +102,10 @@ static sk_sp<SkData> subset_harfbuzz(sk_sp<SkData> fontData,
- 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);
-- // 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 = SkPDFHarfBuzzSubset<hb_subset_input_t*>::Make(input.get(), face.get());
-+ if (!subset) {
-+ return nullptr;
-+ }
- HBBlob result(hb_face_reference_blob(subset.get()));
- return to_data(std::move(result));
- }
-diff --git a/third_party/harfbuzz/BUILD.gn b/third_party/harfbuzz/BUILD.gn
-index 173830de62..4156607ef9 100644
---- a/third_party/harfbuzz/BUILD.gn
-+++ b/third_party/harfbuzz/BUILD.gn
-@@ -14,6 +14,9 @@ if (skia_use_system_harfbuzz) {
- "harfbuzz",
- "harfbuzz-icu",
- ]
-+ if (skia_pdf_subset_harfbuzz) {
-+ libs += [ "harfbuzz-subset" ]
-+ }
- }
- } else {
- third_party("harfbuzz") {
Copied: qt6-webengine/repos/kde-unstable-x86_64/skia-harfbuzz-3.0.0.patch (from rev 424634, qt6-webengine/kde-unstable/skia-harfbuzz-3.0.0.patch)
===================================================================
--- skia-harfbuzz-3.0.0.patch (rev 0)
+++ skia-harfbuzz-3.0.0.patch 2021-09-24 14:12:23 UTC (rev 424635)
@@ -0,0 +1,100 @@
+# Minimal diff for harfbuzz 3.0.0 support; based on:
+# https://github.com/google/skia/commit/66684b17b382
+# https://github.com/google/skia/commit/51d83abcd24a
+
+diff --git a/gn/skia.gni b/gn/skia.gni
+index d98fdc19ee..199335d5c4 100644
+--- a/gn/skia.gni
++++ b/gn/skia.gni
+@@ -34,8 +34,6 @@ declare_args() {
+ skia_include_multiframe_procs = false
+ skia_lex = false
+ skia_libgifcodec_path = "third_party/externals/libgifcodec"
+- skia_pdf_subset_harfbuzz =
+- false # TODO: set skia_pdf_subset_harfbuzz to skia_use_harfbuzz.
+ skia_qt_path = getenv("QT_PATH")
+ skia_skqp_global_error_tolerance = 0
+ skia_tools_require_resources = false
+@@ -99,6 +97,10 @@ declare_args() {
+ skia_use_libfuzzer_defaults = true
+ }
+
++declare_args() {
++ skia_pdf_subset_harfbuzz = skia_use_harfbuzz
++}
++
+ declare_args() {
+ skia_compile_sksl_tests = skia_compile_processors
+ skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype
+diff --git a/src/pdf/SkPDFSubsetFont.cpp b/src/pdf/SkPDFSubsetFont.cpp
+index 81c37eef3a..2340a7937b 100644
+--- a/src/pdf/SkPDFSubsetFont.cpp
++++ b/src/pdf/SkPDFSubsetFont.cpp
+@@ -49,6 +49,37 @@ static sk_sp<SkData> to_data(HBBlob blob) {
+ blob.release());
+ }
+
++template<typename...> using void_t = void;
++template<typename T, typename = void>
++struct SkPDFHarfBuzzSubset {
++ // This is the HarfBuzz 3.0 interface.
++ // hb_subset_flags_t does not exist in 2.0. It isn't dependent on T, so inline the value of
++ // HB_SUBSET_FLAGS_RETAIN_GIDS until 2.0 is no longer supported.
++ static HBFace Make(T input, hb_face_t* face) {
++ // 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_flags(input, 2/*HB_SUBSET_FLAGS_RETAIN_GIDS*/);
++ return HBFace(hb_subset_or_fail(face, input));
++ }
++};
++template<typename T>
++struct SkPDFHarfBuzzSubset<T, void_t<
++ decltype(hb_subset_input_set_retain_gids(std::declval<T>(), std::declval<bool>())),
++ decltype(hb_subset_input_set_drop_hints(std::declval<T>(), std::declval<bool>())),
++ decltype(hb_subset(std::declval<hb_face_t*>(), std::declval<T>()))
++ >>
++{
++ // This is the HarfBuzz 2.0 (non-public) interface, used if it exists.
++ // This code should be removed as soon as all users are migrated to the newer API.
++ static HBFace Make(T input, hb_face_t* face) {
++ hb_subset_input_set_retain_gids(input, true);
++ // 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, false);
++ return HBFace(hb_subset(face, input));
++ }
++};
++
+ static sk_sp<SkData> subset_harfbuzz(sk_sp<SkData> fontData,
+ const SkPDFGlyphUse& glyphUsage,
+ int ttcIndex) {
+@@ -71,11 +102,10 @@ static sk_sp<SkData> subset_harfbuzz(sk_sp<SkData> fontData,
+ 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);
+- // 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 = SkPDFHarfBuzzSubset<hb_subset_input_t*>::Make(input.get(), face.get());
++ if (!subset) {
++ return nullptr;
++ }
+ HBBlob result(hb_face_reference_blob(subset.get()));
+ return to_data(std::move(result));
+ }
+diff --git a/third_party/harfbuzz/BUILD.gn b/third_party/harfbuzz/BUILD.gn
+index 173830de62..4156607ef9 100644
+--- a/third_party/harfbuzz/BUILD.gn
++++ b/third_party/harfbuzz/BUILD.gn
+@@ -14,6 +14,9 @@ if (skia_use_system_harfbuzz) {
+ "harfbuzz",
+ "harfbuzz-icu",
+ ]
++ if (skia_pdf_subset_harfbuzz) {
++ libs += [ "harfbuzz-subset" ]
++ }
+ }
+ } else {
+ third_party("harfbuzz") {
More information about the arch-commits
mailing list