From e718e8c63e1eb00722f969317d8411095ed976a5 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Thu, 31 Jan 2019 14:42:04 +0100 Subject: [PATCH] chromium: update to 72.0.3626.109. * New option: js_optimize. Needs OpenJDK which doesn't work on musl yet *Use clang by default again, with GCC it fails to build [ci skip] --- .../chromium-i686-vaapi-fpermissive.patch | 11 +++ .../chromium/patches/chromium-71-gcc-0.patch | 57 ------------- .../patches/chromium-enable-vaapi.patch | 4 +- .../patches/chromium-fix_harfbuzz_2.patch | 80 ------------------- ...strap-remove-sysroot-related-options.patch | 25 ------ srcpkgs/chromium/template | 28 ++++--- 6 files changed, 32 insertions(+), 173 deletions(-) delete mode 100644 srcpkgs/chromium/patches/chromium-71-gcc-0.patch delete mode 100644 srcpkgs/chromium/patches/chromium-fix_harfbuzz_2.patch delete mode 100644 srcpkgs/chromium/patches/gn-bootstrap-remove-sysroot-related-options.patch diff --git a/srcpkgs/chromium/files/i686-patches/chromium-i686-vaapi-fpermissive.patch b/srcpkgs/chromium/files/i686-patches/chromium-i686-vaapi-fpermissive.patch index a099f5fac5d..15f1399a1ef 100644 --- a/srcpkgs/chromium/files/i686-patches/chromium-i686-vaapi-fpermissive.patch +++ b/srcpkgs/chromium/files/i686-patches/chromium-i686-vaapi-fpermissive.patch @@ -21,3 +21,14 @@ if (use_x11) { configs += [ "//build/config/linux:x11" ] deps += [ "//ui/gfx/x" ] +--- media/gpu/vaapi/vaapi_wrapper.cc 2019-02-01 20:00:10.825233133 +0100 ++++ media/gpu/vaapi/vaapi_wrapper.cc 2019-02-01 20:01:04.955228978 +0100 +@@ -1009,7 +1009,7 @@ + } + fds[i] = dmabuf_fd; + } +- va_attrib_extbuf.buffers = fds.data(); ++ va_attrib_extbuf.buffers = (unsigned int *) fds.data(); + va_attrib_extbuf.num_buffers = fds.size(); + + va_attrib_extbuf.flags = 0; \ No newline at end of file diff --git a/srcpkgs/chromium/patches/chromium-71-gcc-0.patch b/srcpkgs/chromium/patches/chromium-71-gcc-0.patch deleted file mode 100644 index 8ffadff20bc..00000000000 --- a/srcpkgs/chromium/patches/chromium-71-gcc-0.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 65be571f6ac2f7942b4df9e50b24da517f829eec Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa -Date: Mon, 15 Oct 2018 20:26:10 +0000 -Subject: [PATCH] google_util: Explicitly use std::initializer_list with - base::NoDestructor -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Follow-up to ac53c5c53 ("Remove CR_DEFINE_STATIC_LOCAL from /components"). -Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849, having -base::NoDestructor> and passing an initializer list of Us does not -work if this is not done explicitly, as GCC incorrectly fails to determine -which constructor overload to use: - - ../../components/google/core/common/google_util.cc: In function ‘bool google_util::{anonymous}::IsCanonicalHostGoogleHostname(base::StringPiece, google_util::SubdomainPermission)’: - ../../components/google/core/common/google_util.cc:120:24: error: call of overloaded ‘NoDestructor()’ is ambiguous - {GOOGLE_TLD_LIST}); - -See also: https://chromium-review.googlesource.com/c/chromium/src/+/1170905 - -Bug: 819294 -Change-Id: Ie1490b6646d7998d636c485769caabf56c1cf44c -Reviewed-on: https://chromium-review.googlesource.com/c/1275854 -Reviewed-by: Peter Kasting -Commit-Queue: Raphael Kubo da Costa (CET) -Cr-Commit-Position: refs/heads/master@{#599733} ---- - components/google/core/common/google_util.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/components/google/core/common/google_util.cc b/components/google/core/common/google_util.cc -index a44c84393820..7733848a0443 100644 ---- components/google/core/common/google_util.cc -+++ components/google/core/common/google_util.cc -@@ -117,7 +117,7 @@ bool IsCanonicalHostGoogleHostname(base::StringPiece canonical_host, - StripTrailingDot(&tld); - - static base::NoDestructor> google_tlds( -- {GOOGLE_TLD_LIST}); -+ std::initializer_list({GOOGLE_TLD_LIST})); - return base::ContainsKey(*google_tlds, tld.as_string()); - } - -@@ -132,7 +132,8 @@ bool IsGoogleSearchSubdomainUrl(const GURL& url) { - StripTrailingDot(&host); - - static base::NoDestructor> google_subdomains( -- {"ipv4.google.com", "ipv6.google.com"}); -+ std::initializer_list( -+ {"ipv4.google.com", "ipv6.google.com"})); - - return base::ContainsKey(*google_subdomains, host.as_string()); - } --- -2.19.1 - diff --git a/srcpkgs/chromium/patches/chromium-enable-vaapi.patch b/srcpkgs/chromium/patches/chromium-enable-vaapi.patch index 24f1ba77f76..6a553e18bd7 100644 --- a/srcpkgs/chromium/patches/chromium-enable-vaapi.patch +++ b/srcpkgs/chromium/patches/chromium-enable-vaapi.patch @@ -514,7 +514,7 @@ diff -ur media/base/media_switches.h chromium-69.0.3497.92/media/base/media_swit diff -ur media/gpu/BUILD.gn chromium-69.0.3497.92/media/gpu/BUILD.gn --- media/gpu/BUILD.gn 2018-09-12 00:39:48.000000000 +0530 +++ media/gpu/BUILD.gn 2018-09-13 22:10:34.210007863 +0530 -@@ -495,6 +495,14 @@ +@@ -508,6 +508,14 @@ } } @@ -526,7 +526,7 @@ diff -ur media/gpu/BUILD.gn chromium-69.0.3497.92/media/gpu/BUILD.gn + } +} + - if (use_vaapi) { + if (use_v4l2_codec || use_vaapi) { test("jpeg_encode_accelerator_unittest") { deps = [ @@ -559,6 +567,10 @@ diff --git a/srcpkgs/chromium/patches/chromium-fix_harfbuzz_2.patch b/srcpkgs/chromium/patches/chromium-fix_harfbuzz_2.patch deleted file mode 100644 index 95678c12920..00000000000 --- a/srcpkgs/chromium/patches/chromium-fix_harfbuzz_2.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 7ae38170a117e909bb28e1470842b68de3501197 Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Sun, 21 Oct 2018 10:06:53 -0400 -Subject: [PATCH] blink: add 'const' modifier for harfbuzz hb_codepoint_t - pointers - -This resolves a build failure against harfbuzz 2.0. - -Based on a patch by Alexandre Fierreira. - -Bug: https://bugs.gentoo.org/669034 ---- - .../renderer/platform/fonts/shaping/harfbuzz_face.cc | 2 +- - .../renderer/platform/fonts/skia/skia_text_metrics.cc | 9 +++++++-- - .../renderer/platform/fonts/skia/skia_text_metrics.h | 2 +- - 3 files changed, 9 insertions(+), 4 deletions(-) - -diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc -index 8e7d91ca371f..e279a5876cb3 100644 ---- third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc -+++ 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, -diff --git a/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.cc b/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.cc -index 77ec6209fab9..9f9070921448 100644 ---- third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.cc -+++ 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(reinterpret_cast(p) + byte_size); - } - -+template -+T* advance_by_byte_size_const(T* p, unsigned byte_size) { -+ return reinterpret_cast(reinterpret_cast(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_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 sk_width_array(count); -diff --git a/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h b/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h -index 787d8af0375a..3bc4407c641b 100644 ---- third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h -+++ 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); --- -2.19.1 - diff --git a/srcpkgs/chromium/patches/gn-bootstrap-remove-sysroot-related-options.patch b/srcpkgs/chromium/patches/gn-bootstrap-remove-sysroot-related-options.patch deleted file mode 100644 index 9e542bce362..00000000000 --- a/srcpkgs/chromium/patches/gn-bootstrap-remove-sysroot-related-options.patch +++ /dev/null @@ -1,25 +0,0 @@ -See: https://chromium.googlesource.com/chromium/src/tools/gn/+/6630c2e334d7bc179e95a3d543a8eca3201d6725%5E%21/#F0 -diff --git a/bootstrap/bootstrap.py b/bootstrap/bootstrap.py -index 261fddd..1945852 100755 ---- tools/gn/bootstrap/bootstrap.py -+++ tools/gn/bootstrap/bootstrap.py -@@ -46,10 +46,6 @@ - '--build-path', - help='The directory in which to build gn, ' - 'relative to the src directory. (eg. out/Release)') -- parser.add_option( -- '--with-sysroot', -- action='store_true', -- help='Download and build with the Debian sysroot.') - parser.add_option('-v', '--verbose', help='ignored') - parser.add_option( - '--skip-generate-buildfiles', -@@ -76,8 +72,6 @@ - '--no-last-commit-position', - '--out-path=' + gn_build_dir, - ] -- if not options.with_sysroot: -- cmd.append('--no-sysroot') - if options.debug: - cmd.append('--debug') - subprocess.check_call(cmd) diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index 7194b64dd72..ef410dd2b37 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -1,26 +1,27 @@ # Template file for 'chromium' pkgname=chromium # See http://www.chromium.org/developers/calendar for the latest version -version=71.0.3578.98 -revision=2 +version=72.0.3626.109 +revision=1 short_desc="Google's attempt at creating a safer, faster, and more stable browser" maintainer="Rasmus Thomsen " license="BSD-3-Clause" homepage="https://www.chromium.org/" distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz" -checksum=1c56a9e30825774c83d568d194e9585625c6e90f81ee0ef09760fcedc86b9d45 +checksum=574a5400dcd9452bf41481518aa5097c396df6e1eb97c67303638ba967048c2d -only_for_archs="i686 x86_64 x86_64-musl" +archs="i686 x86_64 x86_64-musl" lib32disabled=yes nodebug=yes nopie=yes # contains tools that are not PIE, enables PIE itself -build_options="clang jumbo_build" +build_options="clang jumbo_build js_optimize" desc_option_clang="Use clang to build" desc_option_jumbo_build="Do a jumbo build, needs way more RAM but builds way faster" +desc_option_js_optimize="Optimize the JS used for Chromium's UI" hostmakedepends="$(vopt_if clang clang) yasm python pkg-config perl gperf bison ninja nodejs hwids - libatomic-devel libevent-devel libglib-devel" + libatomic-devel libevent-devel libglib-devel $(vopt_if js_optimize openjdk)" makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel @@ -33,7 +34,11 @@ makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel ffmpeg-devel libva-devel" depends="libexif hwids desktop-file-utils hicolor-icon-theme" -build_options_default="jumbo_build" +build_options_default="jumbo_build clang" + +case "${XBPS_TARGET_MACHINE}" in + x86_64|i686) build_options_default+=" js_optimize" ;; +esac post_extract() { case "${XBPS_TARGET_MACHINE}" in @@ -44,10 +49,11 @@ post_extract() { done ;; i686) - for f in "${FILESDIR}"/i686-patches/*.patch; do + for f in "${FILESDIR}"/i686-patches/*.patch; do echo "Applying $f" patch -Np0 -i "$f" done + ;; esac # Use the file at run time instead of effectively compiling it in @@ -160,7 +166,11 @@ do_configure() { # Enable VAAPI - hardware accelerated video decoding. conf+=( - 'use_vaapi=true' + "use_vaapi=true" + ) + + conf+=( + "closure_compile=$(vopt_if js_optimize true false)" ) # Use explicit library dependencies instead of dlopen.