summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeppia2018-11-02 11:45:50 +0100
committerSeppia2018-11-02 11:45:50 +0100
commit395d5745a540ee3e197834b7af6feb2fb094083e (patch)
treef4c154236360034fca9ad0cc7b732148ec8eb7cf
parent6b2215b71eee485402c31f6afa1f44a4c2fda11c (diff)
downloadaur-395d5745a540ee3e197834b7af6feb2fb094083e.tar.gz
Adds patch resolving a build failure against harfbuzz 2.0
Based on https://bugs.gentoo.org/669034
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD8
-rw-r--r--chromium-harfbuzz-2.0.patch55
3 files changed, 63 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 995e103ec0a6..5d865aa3806a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -61,9 +61,11 @@ pkgbase = ungoogled-chromium
source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-70.0.3538.77.tar.xz
source = chromium-launcher-6.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v6.tar.gz
source = https://github.com/Eloston/ungoogled-chromium/archive/70.0.3538.77-1.tar.gz
+ source = chromium-harfbuzz-2.0.patch
sha256sums = c914f86c4c8375b719eca89ea89dbec4ae3d09df3f758d5f7c91d4914d290449
sha256sums = 04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1
sha256sums = 9731ddfc654bd74d2da26ccecdbe9262aed7f3ff6ad5b91571ae4b83ecf19159
+ sha256sums = bad4d4a3065f1432d5f9189e29c6bf1d7fe1d365b6c7c4ff51b294569b20e962
pkgname = ungoogled-chromium
diff --git a/PKGBUILD b/PKGBUILD
index ae1dd736b18a..5421b57a2a88 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,10 +26,12 @@ provides=('chromium')
conflicts=('chromium')
source=(https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz
chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
- https://github.com/Eloston/ungoogled-chromium/archive/$pkgver-$pkgrel.tar.gz)
+ https://github.com/Eloston/ungoogled-chromium/archive/$pkgver-$pkgrel.tar.gz
+ chromium-harfbuzz-2.0.patch)
sha256sums=('c914f86c4c8375b719eca89ea89dbec4ae3d09df3f758d5f7c91d4914d290449'
'04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1'
- '9731ddfc654bd74d2da26ccecdbe9262aed7f3ff6ad5b91571ae4b83ecf19159')
+ '9731ddfc654bd74d2da26ccecdbe9262aed7f3ff6ad5b91571ae4b83ecf19159'
+ 'bad4d4a3065f1432d5f9189e29c6bf1d7fe1d365b6c7c4ff51b294569b20e962')
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
# Keys are the names in the above script; values are the dependencies in Arch
@@ -66,6 +68,8 @@ prepare() {
cd "$srcdir/chromium-$pkgver"
+ patch -Np1 -i ../chromium-harfbuzz-2.0.patch
+
msg2 'Pruning binaries'
python "$_buildkit_cli" prune -b "$_config_bundle" ./
msg2 'Applying patches'
diff --git a/chromium-harfbuzz-2.0.patch b/chromium-harfbuzz-2.0.patch
new file mode 100644
index 000000000000..bbf4d3d9fe4f
--- /dev/null
+++ b/chromium-harfbuzz-2.0.patch
@@ -0,0 +1,55 @@
+--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
++++ a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
+@@ -139,7 +139,7 @@ static hb_position_t HarfBuzzGetGlyphHorizontalAdvance(hb_font_t* hb_font,
+ static void HarfBuzzGetGlyphHorizontalAdvances(hb_font_t* font,
+ void* font_data,
+ unsigned count,
+- hb_codepoint_t* first_glyph,
++ const hb_codepoint_t* first_glyph,
+ unsigned int glyph_stride,
+ hb_position_t* first_advance,
+ unsigned int advance_stride,
+--- a/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.cc
++++ a/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.cc
+@@ -18,6 +18,11 @@ T* advance_by_byte_size(T* p, unsigned byte_size) {
+ return reinterpret_cast<T*>(reinterpret_cast<uint8_t*>(p) + byte_size);
+ }
+
++template <class T>
++T* advance_by_byte_size_const(T* p, unsigned byte_size) {
++ return reinterpret_cast<T*>(reinterpret_cast<const uint8_t*>(p) + byte_size);
++}
++
+ } // namespace
+
+ SkiaTextMetrics::SkiaTextMetrics(const SkPaint* paint) : paint_(paint) {
+@@ -39,7 +44,7 @@ void SkiaTextMetrics::GetGlyphWidthForHarfBuzz(hb_codepoint_t codepoint,
+ }
+
+ void SkiaTextMetrics::GetGlyphWidthForHarfBuzz(unsigned count,
+- hb_codepoint_t* glyphs,
++ const hb_codepoint_t* glyphs,
+ unsigned glyph_stride,
+ hb_position_t* advances,
+ unsigned advance_stride) {
+@@ -48,7 +53,7 @@ void SkiaTextMetrics::GetGlyphWidthForHarfBuzz(unsigned count,
+ // array that copy them to a regular array.
+ Vector<Glyph, 256> glyph_array(count);
+ for (unsigned i = 0; i < count;
+- i++, glyphs = advance_by_byte_size(glyphs, glyph_stride)) {
++ i++, glyphs = advance_by_byte_size_const(glyphs, glyph_stride)) {
+ glyph_array[i] = *glyphs;
+ }
+ Vector<SkScalar, 256> sk_width_array(count);
+--- a/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h
++++ a/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h
+@@ -19,7 +19,7 @@ class SkiaTextMetrics final {
+
+ void GetGlyphWidthForHarfBuzz(hb_codepoint_t, hb_position_t* width);
+ void GetGlyphWidthForHarfBuzz(unsigned count,
+- hb_codepoint_t* first_glyph,
++ const hb_codepoint_t* first_glyph,
+ unsigned glyph_stride,
+ hb_position_t* first_advance,
+ unsigned advance_stride);
+--