summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2021-09-18 07:29:43 -0400
committergraysky2021-09-18 07:29:43 -0400
commit41c5a799578a4e76368873a4248d0d7635ae3a3f (patch)
treebc064cf9975f627fb0c6f68c9470e9c38dfb2afe
parentac63195441da1ee1d199024a78bbc3234638fa21 (diff)
downloadaur-41c5a799578a4e76368873a4248d0d7635ae3a3f.tar.gz
Update to 93.0.4577.82-2
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD12
-rw-r--r--chromium-harfbuzz-3.0.0.patch20
-rw-r--r--skia-harfbuzz-3.0.0.patch100
4 files changed, 135 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9b8cb6f54e90..638efaff7eaa 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = chromium-no-extras
pkgdesc = Chromium without hangout services, widevine, pipewire, or chromedriver
pkgver = 93.0.4577.82
- pkgrel = 1
+ pkgrel = 2
url = https://www.chromium.org/Home
arch = x86_64
license = BSD
@@ -56,6 +56,8 @@ pkgbase = chromium-no-extras
source = replace-blacklist-with-ignorelist.patch
source = sql-make-VirtualCursor-standard-layout-type.patch
source = chromium-93-ffmpeg-4.4.patch
+ source = chromium-harfbuzz-3.0.0.patch
+ source = skia-harfbuzz-3.0.0.patch
source = use-oauth2-client-switches-as-default.patch
sha256sums = 5d66214858fcba11a8f733d7a6fab61ed10e13e7df4ed37e63b66a0370fb2853
sha256sums = 213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a
@@ -65,6 +67,8 @@ pkgbase = chromium-no-extras
sha256sums = d3344ba39b8c6ed202334ba7f441c70d81ddf8cdb15af1aa8c16e9a3a75fbb35
sha256sums = dd317f85e5abfdcfc89c6f23f4c8edbcdebdd5e083dcec770e5da49ee647d150
sha256sums = 1a9e074f417f8ffd78bcd6874d8e2e74a239905bf662f76a7755fa40dc476b57
+ sha256sums = 7ce947944a139e66774dfc7249bf7c3069f07f83a0f1b2c1a1b14287a7e15928
+ sha256sums = dae11dec5088eb1b14045d8c9862801a342609c15701d7c371e1caccf46e1ffd
sha256sums = e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711
pkgname = chromium-no-extras
diff --git a/PKGBUILD b/PKGBUILD
index a5ed89a3c641..73413048d698 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,9 +9,9 @@
#export CXXFLAGS="${CFLAGS}"
pkgname=chromium-no-extras
-pkgver=93.0.4577.82
-pkgrel=1
_pkgname=chromium
+pkgver=93.0.4577.82
+pkgrel=2
_launcher_ver=8
_gcc_patchset=6
pkgdesc="Chromium without hangout services, widevine, pipewire, or chromedriver"
@@ -37,6 +37,8 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/$_pkg
replace-blacklist-with-ignorelist.patch
sql-make-VirtualCursor-standard-layout-type.patch
chromium-93-ffmpeg-4.4.patch
+ chromium-harfbuzz-3.0.0.patch
+ skia-harfbuzz-3.0.0.patch
use-oauth2-client-switches-as-default.patch)
sha256sums=('5d66214858fcba11a8f733d7a6fab61ed10e13e7df4ed37e63b66a0370fb2853'
'213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
@@ -46,6 +48,8 @@ sha256sums=('5d66214858fcba11a8f733d7a6fab61ed10e13e7df4ed37e63b66a0370fb2853'
'd3344ba39b8c6ed202334ba7f441c70d81ddf8cdb15af1aa8c16e9a3a75fbb35'
'dd317f85e5abfdcfc89c6f23f4c8edbcdebdd5e083dcec770e5da49ee647d150'
'1a9e074f417f8ffd78bcd6874d8e2e74a239905bf662f76a7755fa40dc476b57'
+ '7ce947944a139e66774dfc7249bf7c3069f07f83a0f1b2c1a1b14287a7e15928'
+ 'dae11dec5088eb1b14045d8c9862801a342609c15701d7c371e1caccf46e1ffd'
'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711')
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
@@ -103,6 +107,10 @@ prepare() {
# Fix build with older ffmpeg
patch -Np1 -i ../chromium-93-ffmpeg-4.4.patch
+ # Fix build with harfbuzz 3.0.0
+ patch -Np1 -i ../chromium-harfbuzz-3.0.0.patch
+ patch -Np1 -d third_party/skia <../skia-harfbuzz-3.0.0.patch
+
# Revert transition to -fsanitize-ignorelist (needs newer clang)
patch -Rp1 -i ../replace-blacklist-with-ignorelist.patch
diff --git a/chromium-harfbuzz-3.0.0.patch b/chromium-harfbuzz-3.0.0.patch
new file mode 100644
index 000000000000..c7724336bfba
--- /dev/null
+++ b/chromium-harfbuzz-3.0.0.patch
@@ -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;
diff --git a/skia-harfbuzz-3.0.0.patch b/skia-harfbuzz-3.0.0.patch
new file mode 100644
index 000000000000..a217691c1cf5
--- /dev/null
+++ b/skia-harfbuzz-3.0.0.patch
@@ -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) {
+ system("harfbuzz") {
+ include_dirs = [ "/usr/include/harfbuzz" ]
+ libs = [ "harfbuzz" ]
++ if (skia_pdf_subset_harfbuzz) {
++ libs += [ "harfbuzz-subset" ]
++ }
+ }
+ } else {
+ third_party("harfbuzz") {