Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Nov 2019 17:30:05 +0000 (UTC)
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r518257 - in head/www/qt5-webengine: . files
Message-ID:  <201911231730.xANHU5fk072844@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pkubaj
Date: Sat Nov 23 17:30:05 2019
New Revision: 518257
URL: https://svnweb.freebsd.org/changeset/ports/518257

Log:
  www/qt5-webengine: fix build on powerpc64 (elfv2 only)
  
  Tested with otter-browser on my Talos.
  
  Approved by:	tcberner (mentor, maintainer, earlier version)
  Differential Revision:	https://reviews.freebsd.org/D22184

Added:
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_shared__memory__mapping__unittest.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_bucket__ranges__unittest.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_pickle.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sha1.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_strings_string__number__conversions__unittest.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_third__party_dmg__fp_dtoa.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_download__nacl__toolchains.py   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_db_util__unittest.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_db_v4__rice.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_db_v4__rice__unittest.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_ffmpeg_ffmpeg__common.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp4_box__definitions.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_renderers_paint__canvas__video__renderer.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_crl__set.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_linux_bpf__renderer__policy__linux.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_config_SkUserConfig.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_ext_image__operations__unittest.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_base_internal_unscaledcycleclock.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Constants.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_gpu_webgl__image__conversion.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_gpu_webgl__image__conversion__test.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_graphics__context__test.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_highcontrast_highcontrast__classifier.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_heap_asm_BUILD.gn   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_heap_asm_SaveRegisters__ppc64.S   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_image-decoders_bmp_bmp__image__reader.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_image-decoders_jpeg_jpeg__image__decoder.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_image-decoders_webp_webp__image__decoder.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_dtoa_utils.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_asn1_a__int.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_chacha_chacha.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cipher__extra_e__aesgcmsiv.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_compiler__test.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_curve25519_spake25519.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_evp_scrypt.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_bn_bytes.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_ecdsa_ecdsa.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_gcm.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_internal.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_modes_polyval.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_rand_ctrdrbg.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_poly1305_poly1305.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_include_openssl_base.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_third__party_fiat_curve25519.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_third__party_fiat_p256.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_flatbuffers_src_include_flatbuffers_base.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_flatbuffers_src_include_flatbuffers_minireflect.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_leveldatabase_port_port__chromium.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libpng_BUILD.gn   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libpng_powerpc_filter__vsx__intrinsics.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libpng_powerpc_powerpc__init.c   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_modp__b64_BUILD.gn   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_modp__b64_modp__b64.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_third__party_base_allocator_partition__allocator_page__allocator__constants.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_utils.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_protozero_message.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_protozero_message.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_src_protozero_proto__decoder.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_include_core_SkPostConfig.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_include_private_GrTypesPriv.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_codec_SkCodecPriv.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkColor.cpp   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkPixmap.cpp   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_opts_Sk4px__none.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_opts_SkBlitRow__opts.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_utils_SkJSON.cpp   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_utils_SkJSON.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_third__party_skcms_skcms.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_third__party_skcms_src_Transform__inl.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_smhasher_src_City.cpp   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_common__audio_wav__file.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_common__audio_wav__header.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_differ__block.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_system_arch.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_aura_mus_os__exchange__data__provider__mus.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_resource_data__pack.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_codec_png__codec.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_codec_png__codec.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_codec_png__codec__unittest.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_color__analysis.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_skbitmap__operations__unittest.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_url_url__canon__host.cc   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_url_url__canon__internal.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_ppc_constants-ppc.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_ppc_register-ppc.h   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_test_BUILD.gn   (contents, props changed)
  head/www/qt5-webengine/files/patch-src_3rdparty_gn_tools_gn_args.cc   (contents, props changed)
Modified:
  head/www/qt5-webengine/Makefile
  head/www/qt5-webengine/files/patch-mkspecs_features_functions.prf
  head/www/qt5-webengine/files/patch-mkspecs_features_platform.prf
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_linux_BUILD.gn
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_opts_SkRasterPipeline__opts.h
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_codec_jpeg__codec.cc
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn
  head/www/qt5-webengine/pkg-plist

Modified: head/www/qt5-webengine/Makefile
==============================================================================
--- head/www/qt5-webengine/Makefile	Sat Nov 23 16:52:08 2019	(r518256)
+++ head/www/qt5-webengine/Makefile	Sat Nov 23 17:30:05 2019	(r518257)
@@ -110,6 +110,14 @@ MAKE_ENV+=	CC="${CC}" CXX="${CXX}"			\
 		CPLUS_INCLUDE_PATH=${LOCALBASE}/include	\
 		${CONFIGURE_ENV}
 
+.include <bsd.port.pre.mk>
+
+.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
+PLIST_SUB+=	BE="" LE="@comment "
+.else
+PLIST_SUB+=	BE="@comment " LE=""
+.endif
+
 post-extract:
 # Install FreeBSD's freebsd.pri file.
 	${CP} ${FILESDIR}/freebsd.pri ${WRKSRC}/src/core/config/freebsd.pri
@@ -121,6 +129,12 @@ post-extract-SNDIO-on:
 	@${CP} ${FILESDIR}/audio_manager_openbsd.* \
 		${WRKSRC}/src/3rdparty/chromium/media/audio/openbsd
 
+.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
+post-patch:
+	@${REINPLACE_CMD} -e 's/icudtl.dat/icudtb.dat/' \
+		${WRKSRC}/src/core/core_module.pro
+.endif
+
 pre-configure:
 # Link in ${PYTHON_CMD} to ${CONFIGURE_WRKSRC}/bin -- the scripts hardcode 'python'
 # in too many places to reasonably patch. So just link in ${PYTHON_CMD} to work around
@@ -132,4 +146,4 @@ pre-configure:
 # Rerun syncqt.pl -- otherwise the resulting package misses some forwarding headers.
 	cd ${WRKSRC} && ${QT_BINDIR}/syncqt.pl -version ${QT5_VERSION}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/www/qt5-webengine/files/patch-mkspecs_features_functions.prf
==============================================================================
--- head/www/qt5-webengine/files/patch-mkspecs_features_functions.prf	Sat Nov 23 16:52:08 2019	(r518256)
+++ head/www/qt5-webengine/files/patch-mkspecs_features_functions.prf	Sat Nov 23 17:30:05 2019	(r518257)
@@ -1,7 +1,7 @@
 Include the freebsd.pri file provided by the port, to pass FreeBSD specific
 settings to gn.
 
---- mkspecs/features/functions.prf.orig	2019-01-16 22:42:58 UTC
+--- mkspecs/features/functions.prf.orig	2019-05-24 09:01:39 UTC
 +++ mkspecs/features/functions.prf
 @@ -82,6 +82,7 @@ defineReplace(gnArgs) {
      linux: include($$QTWEBENGINE_ROOT/src/core/config/linux.pri)
@@ -11,7 +11,15 @@ settings to gn.
      isEmpty(gn_args): error(No gn_args found please make sure you have valid configuration.)
      return($$gn_args)
  }
-@@ -101,6 +102,7 @@ defineReplace(gnOS) {
+@@ -94,6 +95,7 @@ defineReplace(gnArch) {
+     contains(qtArch, "arm64"): return(arm64)
+     contains(qtArch, "mips"): return(mipsel)
+     contains(qtArch, "mips64"): return(mips64el)
++    contains(qtArch, "power64"): return(ppc64)
+     return(unknown)
+ }
+ 
+@@ -101,6 +103,7 @@ defineReplace(gnOS) {
      macos: return(mac)
      win32: return(win)
      linux: return(linux)

Modified: head/www/qt5-webengine/files/patch-mkspecs_features_platform.prf
==============================================================================
--- head/www/qt5-webengine/files/patch-mkspecs_features_platform.prf	Sat Nov 23 16:52:08 2019	(r518256)
+++ head/www/qt5-webengine/files/patch-mkspecs_features_platform.prf	Sat Nov 23 17:30:05 2019	(r518257)
@@ -1,4 +1,4 @@
---- mkspecs/features/platform.prf.orig	2018-11-27 04:10:38 UTC
+--- mkspecs/features/platform.prf.orig	2019-05-24 09:01:39 UTC
 +++ mkspecs/features/platform.prf
 @@ -11,7 +11,7 @@ defineTest(isQtMinimum) {
  
@@ -9,3 +9,11 @@
      if(!gcc:!clang)|intel_icc {
        skipBuild("Qt WebEngine on Linux requires clang or GCC.")
        return(false)
+@@ -84,6 +84,7 @@ defineTest(isArchSupported) {
+     contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true)
+     contains(QT_ARCH, "mips"): return(true)
+ #     contains(QT_ARCH, "mips64"): return(true)
++    contains(QT_ARCH, "power64"): return(true)
+ 
+     skipBuild("QtWebEngine can only be built for x86, x86-64, ARM, Aarch64, and MIPSel architectures.")
+     return(false)

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc
+@@ -440,7 +440,7 @@ static size_t PartitionPurgePage(internal::PartitionPa
+ #endif
+       }
+       // Terminate the freelist chain.
+-      *entry_ptr = nullptr;
++      *entry_ptr = internal::PartitionFreelistEntry::Transform(nullptr);
+       // The freelist head is stored unmasked.
+       page->freelist_head =
+           internal::PartitionFreelistEntry::Transform(page->freelist_head);

Modified: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc
==============================================================================
--- head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc	Sat Nov 23 16:52:08 2019	(r518256)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -1,5 +1,5 @@
---- src/3rdparty/chromium/base/i18n/icu_util.cc.orig	2018-11-13 18:25:11 UTC
-+++ src/3rdparty/chromium/base/i18n/icu_util.cc
+--- src/3rdparty/chromium/base/i18n/icu_util.cc.orig	2019-05-23 14:39:34.000000000 +0200
++++ src/3rdparty/chromium/base/i18n/icu_util.cc	2019-10-27 22:58:57.501541000 +0100
 @@ -20,7 +20,7 @@
  #include "build/build_config.h"
  #include "third_party/icu/source/common/unicode/putil.h"
@@ -9,7 +9,19 @@
  #include "third_party/icu/source/i18n/unicode/timezone.h"
  #endif
  
-@@ -320,7 +320,7 @@ bool InitializeICU() {
+@@ -75,7 +75,11 @@
+ // No need to change the filename in multiple places (gyp files, windows
+ // build pkg configurations, etc). 'l' stands for Little Endian.
+ // This variable is exported through the header file.
++#if defined(ARCH_CPU_LITTLE_ENDIAN)
+ const char kIcuDataFileName[] = "icudtl.dat";
++#else
++const char kIcuDataFileName[] = "icudtb.dat";
++#endif
+ #if defined(OS_ANDROID)
+ const char kAndroidAssetsIcuDataFileName[] = "assets/icudtl.dat";
+ #endif
+@@ -320,7 +324,7 @@
  // TODO(jungshik): Some callers do not care about tz at all. If necessary,
  // add a boolean argument to this function to init'd the default tz only
  // when requested.

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_shared__memory__mapping__unittest.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_shared__memory__mapping__unittest.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,39 @@
+--- src/3rdparty/chromium/base/memory/shared_memory_mapping_unittest.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/base/memory/shared_memory_mapping_unittest.cc
+@@ -12,6 +12,7 @@
+ #include "base/containers/span.h"
+ #include "base/memory/read_only_shared_memory_region.h"
+ #include "testing/gtest/include/gtest/gtest.h"
++#include "base/sys_byteorder.h"
+ 
+ namespace base {
+ 
+@@ -69,8 +70,8 @@ TEST_F(SharedMemoryMappingTest, SpanWithAutoDeducedEle
+ 
+   for (size_t i = 0; i < write_span.size(); ++i)
+     write_span[i] = i + 1;
+-  EXPECT_EQ(0x04030201u, read_span[0]);
+-  EXPECT_EQ(0x08070605u, read_span[1]);
++  EXPECT_EQ(HostToNet32(0x01020304u), read_span[0]);
++  EXPECT_EQ(HostToNet32(0x05060708u), read_span[1]);
+ }
+ 
+ TEST_F(SharedMemoryMappingTest, SpanWithExplicitElementCount) {
+@@ -95,13 +96,13 @@ TEST_F(SharedMemoryMappingTest, SpanWithExplicitElemen
+ 
+   for (size_t i = 0; i < write_span.size(); ++i)
+     write_span[i] = i + 1;
+-  EXPECT_EQ(0x04030201u, read_span[0]);
+-  EXPECT_EQ(0x08070605u, read_span[1]);
+-  EXPECT_EQ(0x04030201u, read_span_2[0]);
++  EXPECT_EQ(HostToNet32(0x01020304u), read_span[0]);
++  EXPECT_EQ(HostToNet32(0x05060708u), read_span[1]);
++  EXPECT_EQ(HostToNet32(0x01020304u), read_span_2[0]);
+ 
+   std::fill(write_span_2.begin(), write_span_2.end(), 0);
+   EXPECT_EQ(0u, read_span[0]);
+-  EXPECT_EQ(0x08070605u, read_span[1]);
++  EXPECT_EQ(HostToNet32(0x05060708u), read_span[1]);
+   EXPECT_EQ(0u, read_span_2[0]);
+ }
+ 

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_bucket__ranges__unittest.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_bucket__ranges__unittest.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,32 @@
+--- src/3rdparty/chromium/base/metrics/bucket_ranges_unittest.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/base/metrics/bucket_ranges_unittest.cc
+@@ -7,6 +7,7 @@
+ #include <stdint.h>
+ 
+ #include "testing/gtest/include/gtest/gtest.h"
++#include "base/sys_byteorder.h"
+ 
+ namespace base {
+ namespace {
+@@ -64,13 +65,21 @@ TEST(BucketRangesTest, Checksum) {
+   ranges.set_range(2, 2);
+ 
+   ranges.ResetChecksum();
++#if defined(ARCH_CPU_LITTLE_ENDIAN)
+   EXPECT_EQ(289217253u, ranges.checksum());
++#else
++  EXPECT_EQ(2767231596u, ranges.checksum());
++#endif
+ 
+   ranges.set_range(2, 3);
+   EXPECT_FALSE(ranges.HasValidChecksum());
+ 
+   ranges.ResetChecksum();
++#if defined(ARCH_CPU_LITTLE_ENDIAN)
+   EXPECT_EQ(2843835776u, ranges.checksum());
++#else
++  EXPECT_EQ(3556223738u, ranges.checksum());
++#endif
+   EXPECT_TRUE(ranges.HasValidChecksum());
+ }
+ 

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_pickle.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_pickle.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,16 @@
+--- src/3rdparty/chromium/base/pickle.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/base/pickle.cc
+@@ -82,7 +82,12 @@ inline const char* PickleIterator::GetReadPointerAndAd
+ }
+ 
+ bool PickleIterator::ReadBool(bool* result) {
+-  return ReadBuiltinType(result);
++  int int_result;
++  if (ReadBuiltinType(&int_result)) {
++    *result = static_cast<bool>(int_result);
++    return true;
++  } else
++    return false;
+ }
+ 
+ bool PickleIterator::ReadInt(int* result) {

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sha1.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sha1.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,24 @@
+--- src/3rdparty/chromium/base/sha1.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/base/sha1.cc
+@@ -110,8 +110,10 @@ void SecureHashAlgorithm::Final() {
+   Pad();
+   Process();
+ 
++#if defined(ARCH_CPU_LITTLE_ENDIAN)
+   for (auto& t : H)
+     t = ByteSwap(t);
++#endif
+ }
+ 
+ void SecureHashAlgorithm::Update(const void* data, size_t nbytes) {
+@@ -157,8 +159,10 @@ void SecureHashAlgorithm::Process() {
+   //
+   // W and M are in a union, so no need to memcpy.
+   // memcpy(W, M, sizeof(M));
++#if defined(ARCH_CPU_LITTLE_ENDIAN)
+   for (t = 0; t < 16; ++t)
+     W[t] = ByteSwap(W[t]);
++#endif
+ 
+   // b.
+   for (t = 16; t < 80; ++t)

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_strings_string__number__conversions__unittest.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_strings_string__number__conversions__unittest.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,24 @@
+--- src/3rdparty/chromium/base/strings/string_number_conversions_unittest.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/base/strings/string_number_conversions_unittest.cc
+@@ -829,12 +829,21 @@ TEST(StringNumberConversionsTest, DoubleToString) {
+   }
+ 
+   // The following two values were seen in crashes in the wild.
++#if defined(ARCH_CPU_LITTLE_ENDIAN)
+   const char input_bytes[8] = {0, 0, 0, 0, '\xee', '\x6d', '\x73', '\x42'};
++#else
++  const char input_bytes[8] = {'\x42', '\x73', '\x6d', '\xee', 0, 0, 0, 0};
++#endif
+   double input = 0;
+   memcpy(&input, input_bytes, base::size(input_bytes));
+   EXPECT_EQ("1335179083776", NumberToString(input));
++#if defined(ARCH_CPU_LITTLE_ENDIAN)
+   const char input_bytes2[8] =
+       {0, 0, 0, '\xa0', '\xda', '\x6c', '\x73', '\x42'};
++#else
++  const char input_bytes2[8] =
++      {'\x42', '\x73', '\x6c', '\xda', '\xa0', 0, 0, 0};
++#endif
+   input = 0;
+   memcpy(&input, input_bytes2, base::size(input_bytes2));
+   EXPECT_EQ("1334890332160", NumberToString(input));

Modified: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc
==============================================================================
--- head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc	Sat Nov 23 16:52:08 2019	(r518256)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -27,12 +27,14 @@
  int SysInfo::NumberOfProcessors() {
    return g_lazy_number_of_processors.Get().value();
  }
-@@ -225,6 +225,8 @@ std::string SysInfo::OperatingSystemArchitecture() {
+@@ -225,7 +225,9 @@ std::string SysInfo::OperatingSystemArchitecture() {
      arch = "x86";
    } else if (arch == "amd64") {
      arch = "x86_64";
+-  } else if (std::string(info.sysname) == "AIX") {
 +  } else if (arch == "arm64") {
 +    arch = "aarch64";
-   } else if (std::string(info.sysname) == "AIX") {
++  } else if (arch == "powerpc" || arch == "powerpc64") {
      arch = "ppc64";
    }
+   return arch;

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_third__party_dmg__fp_dtoa.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_third__party_dmg__fp_dtoa.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,14 @@
+--- src/3rdparty/chromium/base/third_party/dmg_fp/dtoa.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/base/third_party/dmg_fp/dtoa.cc
+@@ -186,7 +186,11 @@
+  *	used for input more than STRTOD_DIGLIM digits long (default 40).
+  */
+ 
++#ifdef __BIG_ENDIAN__
++#define IEEE_MC68k
++#else
+ #define IEEE_8087
++#endif
+ #define NO_HEX_FP
+ 
+ #ifndef Long

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_download__nacl__toolchains.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_download__nacl__toolchains.py	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,13 @@
+--- src/3rdparty/chromium/build/download_nacl_toolchains.py.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/build/download_nacl_toolchains.py
+@@ -11,6 +11,10 @@ import sys
+ 
+ 
+ def Main(args):
++  # If `disable_nacl=1` is in GYP_DEFINES, exit
++  if 'disable_nacl=1' in os.environ.get('GYP_DEFINES', ''):
++    return 0
++
+   script_dir = os.path.dirname(os.path.abspath(__file__))
+   src_dir = os.path.dirname(script_dir)
+   nacl_dir = os.path.join(src_dir, 'native_client')

Modified: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_linux_BUILD.gn
==============================================================================
--- head/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_linux_BUILD.gn	Sat Nov 23 16:52:08 2019	(r518256)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_linux_BUILD.gn	Sat Nov 23 17:30:05 2019	(r518257)
@@ -1,6 +1,21 @@
---- src/3rdparty/chromium/build/toolchain/linux/BUILD.gn.orig	2018-11-13 18:25:11 UTC
-+++ src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
-@@ -14,7 +14,6 @@ clang_toolchain("clang_arm") {
+--- src/3rdparty/chromium/build/toolchain/linux/BUILD.gn.orig	2019-05-23 14:39:34.000000000 +0200
++++ src/3rdparty/chromium/build/toolchain/linux/BUILD.gn	2019-10-29 02:47:24.026830000 +0100
+@@ -5,6 +5,14 @@
+ import("//build/config/sysroot.gni")
+ import("//build/toolchain/gcc_toolchain.gni")
+ 
++clang_toolchain("clang_ppc64") {
++  enable_linker_map = true
++  toolchain_args = {
++    current_cpu = "ppc64"
++    current_os = "linux"
++  }
++}
++
+ clang_toolchain("clang_arm") {
+   toolprefix = "arm-linux-gnueabihf-"
+   toolchain_args = {
+@@ -14,7 +22,6 @@
  }
  
  clang_toolchain("clang_arm64") {

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_db_util__unittest.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_db_util__unittest.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,24 @@
+--- src/3rdparty/chromium/components/safe_browsing/db/util_unittest.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/components/safe_browsing/db/util_unittest.cc
+@@ -12,6 +12,12 @@
+ #include "testing/gtest/include/gtest/gtest.h"
+ #include "url/gurl.h"
+ 
++#if defined(OS_WIN)
++#include <winsock2.h>
++#elif defined(OS_POSIX)
++#include <arpa/inet.h>
++#endif
++
+ namespace safe_browsing {
+ 
+ TEST(SafeBrowsingDbUtilTest, UrlToFullHashes) {
+@@ -83,7 +89,7 @@ TEST(SafeBrowsingDbUtilTest, StringToSBFullHashAndSBFu
+   // 31 chars plus the last \0 as full_hash.
+   const std::string hash_in = "12345678902234567890323456789012";
+   SBFullHash hash_out = StringToSBFullHash(hash_in);
+-  EXPECT_EQ(0x34333231U, hash_out.prefix);
++  EXPECT_EQ(htonl(0x31323334U), hash_out.prefix);
+   EXPECT_EQ(0, memcmp(hash_in.data(), hash_out.full_hash, sizeof(SBFullHash)));
+ 
+   std::string hash_final = SBFullHashToString(hash_out);

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_db_v4__rice.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_db_v4__rice.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,39 @@
+--- src/3rdparty/chromium/components/safe_browsing/db/v4_rice.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/components/safe_browsing/db/v4_rice.cc
+@@ -8,6 +8,7 @@
+ #include "base/logging.h"
+ #include "base/numerics/safe_math.h"
+ #include "base/strings/stringprintf.h"
++#include "base/sys_byteorder.h"
+ #include "build/build_config.h"
+ #include "components/safe_browsing/db/v4_rice.h"
+ 
+@@ -21,10 +22,6 @@ using ::google::protobuf::RepeatedField;
+ using ::google::protobuf::int32;
+ using ::google::protobuf::int64;
+ 
+-#if !defined(ARCH_CPU_LITTLE_ENDIAN) || (ARCH_CPU_LITTLE_ENDIAN != 1)
+-#error The code below assumes little-endianness.
+-#endif
+-
+ namespace safe_browsing {
+ 
+ namespace {
+@@ -117,7 +114,7 @@ V4DecodeResult V4RiceDecoder::DecodePrefixes(const int
+   out->reserve((num_entries + 1));
+ 
+   base::CheckedNumeric<uint32_t> last_value(first_value);
+-  out->push_back(htonl(last_value.ValueOrDie()));
++  out->push_back(base::ByteSwap(static_cast<uint32_t>(last_value.ValueOrDie())));
+ 
+   if (num_entries > 0) {
+     V4RiceDecoder decoder(rice_parameter, num_entries, encoded_data);
+@@ -136,7 +133,7 @@ V4DecodeResult V4RiceDecoder::DecodePrefixes(const int
+ 
+       // This flipping is done so that the decoded uint32 is interpreted
+       // correcly as a string of 4 bytes.
+-      out->push_back(htonl(last_value.ValueOrDie()));
++      out->push_back(base::ByteSwap(static_cast<uint32_t>(last_value.ValueOrDie())));
+     }
+   }
+ 

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_db_v4__rice__unittest.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_safe__browsing_db_v4__rice__unittest.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,33 @@
+--- src/3rdparty/chromium/components/safe_browsing/db/v4_rice_unittest.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/components/safe_browsing/db/v4_rice_unittest.cc
+@@ -6,6 +6,12 @@
+ #include "base/logging.h"
+ #include "testing/platform_test.h"
+ 
++#if defined(OS_WIN)
++#include <winsock2.h>
++#elif defined(OS_POSIX)
++#include <arpa/inet.h>
++#endif
++
+ using ::google::protobuf::RepeatedField;
+ using ::google::protobuf::int32;
+ 
+@@ -247,7 +253,7 @@ TEST_F(V4RiceTest, TestDecoderPrefixesWithOneValue) {
+   EXPECT_EQ(DECODE_SUCCESS,
+             V4RiceDecoder::DecodePrefixes(0x69F67F51u, 2, 0, "", &out));
+   EXPECT_EQ(1u, out.size());
+-  EXPECT_EQ(0x69F67F51u, out[0]);
++  EXPECT_EQ(htonl(0x517FF669u), out[0]);
+ }
+ 
+ TEST_F(V4RiceTest, TestDecoderPrefixesWithMultipleValues) {
+@@ -256,7 +262,7 @@ TEST_F(V4RiceTest, TestDecoderPrefixesWithMultipleValu
+             V4RiceDecoder::DecodePrefixes(
+                 5, 28, 3, "\xbf\xa8\x3f\xfb\xf\xf\x5e\x27\xe6\xc3\x1d\xc6\x38",
+                 &out));
+-  std::vector<uint32_t> expected = {5, 0xad934c0cu, 0x6ff67f56u, 0x81316fceu};
++  std::vector<uint32_t> expected = {htonl(0x05000000), htonl(0x0c4c93adu), htonl(0x567ff66fu), htonl(0xce6f3181u)};
+   EXPECT_EQ(expected.size(), out.size());
+   for (unsigned i = 0; i < expected.size(); i++) {
+     EXPECT_EQ(expected[i], out[i]);

Modified: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc
==============================================================================
--- head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc	Sat Nov 23 16:52:08 2019	(r518256)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -1,6 +1,6 @@
---- src/3rdparty/chromium/components/update_client/update_query_params.cc.orig	2018-11-13 18:25:11 UTC
-+++ src/3rdparty/chromium/components/update_client/update_query_params.cc
-@@ -38,6 +38,8 @@ const char kOs[] =
+--- src/3rdparty/chromium/components/update_client/update_query_params.cc.orig	2019-05-23 14:39:34.000000000 +0200
++++ src/3rdparty/chromium/components/update_client/update_query_params.cc	2019-10-29 02:42:47.135055000 +0100
+@@ -38,6 +38,8 @@
      "fuchsia";
  #elif defined(OS_OPENBSD)
      "openbsd";
@@ -9,3 +9,21 @@
  #else
  #error "unknown os"
  #endif
+@@ -55,6 +57,8 @@
+     "mips64el";
+ #elif defined(__mips__)
+     "mipsel";
++#elif defined(__powerpc64__)
++    "ppc64";
+ #else
+ #error "unknown arch"
+ #endif
+@@ -127,6 +131,8 @@
+   return "mips32";
+ #elif defined(ARCH_CPU_MIPS64EL)
+   return "mips64";
++#elif defined(ARCH_CPU_PPC64)
++  return "ppc64";
+ #else
+ // NOTE: when adding new values here, please remember to update the
+ // comment in the .h file about possible return values from this function.

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_ffmpeg_ffmpeg__common.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_ffmpeg_ffmpeg__common.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,13 @@
+--- src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
+@@ -686,10 +686,6 @@ ChannelLayout ChannelLayoutToChromeChannelLayout(int64
+   }
+ }
+ 
+-#if !defined(ARCH_CPU_LITTLE_ENDIAN)
+-#error The code below assumes little-endianness.
+-#endif
+-
+ VideoPixelFormat AVPixelFormatToVideoPixelFormat(AVPixelFormat pixel_format) {
+   // The YUVJ alternatives are FFmpeg's (deprecated, but still in use) way to
+   // specify a pixel format and full range color combination.

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp4_box__definitions.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp4_box__definitions.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,26 @@
+--- src/3rdparty/chromium/media/formats/mp4/box_definitions.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/media/formats/mp4/box_definitions.cc
+@@ -1107,15 +1107,14 @@ bool OpusSpecificBox::Parse(BoxReader* reader) {
+   RCHECK(reader->Read4(&sample_rate));
+   RCHECK(reader->Read2s(&gain_db));
+ 
+-#if !defined(ARCH_CPU_LITTLE_ENDIAN)
+-#error The code below assumes little-endianness.
+-#endif
+-
+-  memcpy(&extradata[OPUS_EXTRADATA_SKIP_SAMPLES_OFFSET], &codec_delay_in_frames,
+-         sizeof(codec_delay_in_frames));
+-  memcpy(&extradata[OPUS_EXTRADATA_SAMPLE_RATE_OFFSET], &sample_rate,
+-         sizeof(sample_rate));
+-  memcpy(&extradata[OPUS_EXTRADATA_GAIN_OFFSET], &gain_db, sizeof(gain_db));
++  extradata[OPUS_EXTRADATA_SKIP_SAMPLES_OFFSET] = (codec_delay_in_frames >> 0) & 0xff;
++  extradata[OPUS_EXTRADATA_SKIP_SAMPLES_OFFSET+1] = (codec_delay_in_frames >> 8) & 0xff;
++  extradata[OPUS_EXTRADATA_SAMPLE_RATE_OFFSET] = (sample_rate >> 0) & 0xff;
++  extradata[OPUS_EXTRADATA_SAMPLE_RATE_OFFSET+1] = (sample_rate >> 8) & 0xff;
++  extradata[OPUS_EXTRADATA_SAMPLE_RATE_OFFSET+2] = (sample_rate >> 16) & 0xff;
++  extradata[OPUS_EXTRADATA_SAMPLE_RATE_OFFSET+3] = (sample_rate >> 24) & 0xff;
++  extradata[OPUS_EXTRADATA_GAIN_OFFSET] = (gain_db >> 0) & 0xff;
++  extradata[OPUS_EXTRADATA_GAIN_OFFSET+1] = (gain_db >> 8) & 0xff;
+ 
+   channel_count = extradata[OPUS_EXTRADATA_CHANNELS_OFFSET];
+ 

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_renderers_paint__canvas__video__renderer.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_renderers_paint__canvas__video__renderer.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,22 @@
+--- src/3rdparty/chromium/media/renderers/paint_canvas_video_renderer.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/media/renderers/paint_canvas_video_renderer.cc
+@@ -31,8 +31,7 @@
+ 
+ // Skia internal format depends on a platform. On Android it is ABGR, on others
+ // it is ARGB.
+-#if SK_B32_SHIFT == 0 && SK_G32_SHIFT == 8 && SK_R32_SHIFT == 16 && \
+-    SK_A32_SHIFT == 24
++#if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
+ #define LIBYUV_I420_TO_ARGB libyuv::I420ToARGB
+ #define LIBYUV_I422_TO_ARGB libyuv::I422ToARGB
+ #define LIBYUV_I444_TO_ARGB libyuv::I444ToARGB
+@@ -42,8 +41,7 @@
+ #define LIBYUV_I010_TO_ARGB libyuv::I010ToARGB
+ #define LIBYUV_H010_TO_ARGB libyuv::H010ToARGB
+ #define LIBYUV_NV12_TO_ARGB libyuv::NV12ToARGB
+-#elif SK_R32_SHIFT == 0 && SK_G32_SHIFT == 8 && SK_B32_SHIFT == 16 && \
+-    SK_A32_SHIFT == 24
++#elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
+ #define LIBYUV_I420_TO_ARGB libyuv::I420ToABGR
+ #define LIBYUV_I422_TO_ARGB libyuv::I422ToABGR
+ #define LIBYUV_I444_TO_ARGB libyuv::I444ToABGR

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_crl__set.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cert_crl__set.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,48 @@
+--- src/3rdparty/chromium/net/cert/crl_set.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/net/cert/crl_set.cc
+@@ -6,6 +6,7 @@
+ 
+ #include "base/base64.h"
+ #include "base/json/json_reader.h"
++#include "base/sys_byteorder.h"
+ #include "base/time/time.h"
+ #include "base/trace_event/trace_event.h"
+ #include "base/values.h"
+@@ -44,9 +45,9 @@ base::DictionaryValue* ReadHeader(base::StringPiece* d
+   uint16_t header_len;
+   if (data->size() < sizeof(header_len))
+     return nullptr;
+-  // Assumes little-endian.
+   memcpy(&header_len, data->data(), sizeof(header_len));
+   data->remove_prefix(sizeof(header_len));
++  header_len = base::ByteSwapToLE16(header_len);
+ 
+   if (data->size() < header_len)
+     return nullptr;
+@@ -79,9 +80,9 @@ bool ReadCRL(base::StringPiece* data,
+   uint32_t num_serials;
+   if (data->size() < sizeof(num_serials))
+     return false;
+-  // Assumes little endian.
+   memcpy(&num_serials, data->data(), sizeof(num_serials));
+   data->remove_prefix(sizeof(num_serials));
++  num_serials = base::ByteSwapToLE32(num_serials);
+ 
+   if (num_serials > 32 * 1024 * 1024)  // Sanity check.
+     return false;
+@@ -192,15 +193,6 @@ CRLSet::~CRLSet() = default;
+ // static
+ bool CRLSet::Parse(base::StringPiece data, scoped_refptr<CRLSet>* out_crl_set) {
+   TRACE_EVENT0(NetTracingCategory(), "CRLSet::Parse");
+-// Other parts of Chrome assume that we're little endian, so we don't lose
+-// anything by doing this.
+-#if defined(__BYTE_ORDER)
+-  // Linux check
+-  static_assert(__BYTE_ORDER == __LITTLE_ENDIAN, "assumes little endian");
+-#elif defined(__BIG_ENDIAN__)
+-// Mac check
+-#error assumes little endian
+-#endif
+ 
+   std::unique_ptr<base::DictionaryValue> header_dict(ReadHeader(&data));
+   if (!header_dict.get())

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_linux_bpf__renderer__policy__linux.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_linux_bpf__renderer__policy__linux.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,14 @@
+--- src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc
+@@ -15,6 +15,11 @@
+ #include "sandbox/linux/system_headers/linux_syscalls.h"
+ #include "services/service_manager/sandbox/linux/sandbox_linux.h"
+ 
++// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
++#ifdef __powerpc64__
++#include <termios.h>
++#endif
++
+ // TODO(vignatti): replace the local definitions below with #include
+ // <linux/dma-buf.h> once kernel version 4.6 becomes widely used.
+ #include <linux/types.h>

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_config_SkUserConfig.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_config_SkUserConfig.h	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,39 @@
+--- src/3rdparty/chromium/skia/config/SkUserConfig.h.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/skia/config/SkUserConfig.h
+@@ -90,11 +90,18 @@ SK_API void SkDebugf_FileLine(const char* file, int li
+     __FILE__, __LINE__, #cond); } } while (false)
+ 
+ #if !defined(ANDROID)   // On Android, we use the skia default settings.
++#if defined(SK_CPU_BENDIAN)
++#define SK_A32_SHIFT    0
++#define SK_R32_SHIFT    8
++#define SK_G32_SHIFT    16
++#define SK_B32_SHIFT    24
++#else
+ #define SK_A32_SHIFT    24
+ #define SK_R32_SHIFT    16
+ #define SK_G32_SHIFT    8
+ #define SK_B32_SHIFT    0
+ #endif
++#endif
+ 
+ #if defined(SK_BUILD_FOR_MAC)
+ 
+@@ -107,17 +114,6 @@ SK_API void SkDebugf_FileLine(const char* file, int li
+ // TODO: skia used to just use hairline, but has improved since then, so
+ // we should revisit this choice...
+ #define SK_USE_FREETYPE_EMBOLDEN
+-
+-#if defined(SK_BUILD_FOR_UNIX) && defined(SK_CPU_BENDIAN)
+-// Above we set the order for ARGB channels in registers. I suspect that, on
+-// big endian machines, you can keep this the same and everything will work.
+-// The in-memory order will be different, of course, but as long as everything
+-// is reading memory as words rather than bytes, it will all work. However, if
+-// you find that colours are messed up I thought that I would leave a helpful
+-// locator for you. Also see the comments in
+-// base/gfx/bitmap_platform_device_linux.h
+-#error Read the comment at this location
+-#endif
+ 
+ #endif
+ 

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_ext_image__operations__unittest.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_ext_image__operations__unittest.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,59 @@
+--- src/3rdparty/chromium/skia/ext/image_operations_unittest.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/skia/ext/image_operations_unittest.cc
+@@ -18,9 +18,11 @@
+ #include "skia/ext/image_operations.h"
+ #include "testing/gtest/include/gtest/gtest.h"
+ #include "third_party/skia/include/core/SkBitmap.h"
++#include "third_party/skia/include/core/SkColorPriv.h"
+ #include "third_party/skia/include/core/SkColorSpace.h"
+ #include "third_party/skia/include/core/SkImageInfo.h"
+ #include "third_party/skia/include/core/SkRect.h"
++#include "third_party/skia/include/core/SkUnPreMultiply.h"
+ #include "ui/gfx/codec/png_codec.h"
+ #include "ui/gfx/geometry/size.h"
+ 
+@@ -151,7 +153,7 @@ void DrawCheckerToBitmap(int w, int h,
+ 
+       bool use_color2 = (x_bit != y_bit);  // xor
+ 
+-      *bmp->getAddr32(x, y) = (use_color2 ? color2 : color1);
++      *bmp->getAddr32(x, y) = SkPreMultiplyColor(use_color2 ? color2 : color1);
+     }
+   }
+ }
+@@ -273,7 +275,7 @@ void CheckResizeMethodShouldAverageGrid(
+         std::max(tested_pixel.max_color_distance,
+                  tested_method.max_color_distance_override);
+ 
+-    const SkColor actual_color = *dest.getAddr32(x, y);
++    const SkColor actual_color = SkUnPreMultiply::PMColorToColor(*dest.getAddr32(x, y));
+ 
+     // Check that the pixels away from the border region are very close
+     // to the expected average color
+@@ -528,7 +530,7 @@ TEST(ImageOperations, ScaleUp) {
+   for (int src_y = 0; src_y < src_h; ++src_y) {
+     for (int src_x = 0; src_x < src_w; ++src_x) {
+       *src.getAddr32(src_x, src_y) =
+-          SkColorSetARGB(255, 10 + src_x * 100, 10 + src_y * 100, 0);
++          SkPackARGB32(255, 10 + src_x * 100, 10 + src_y * 100, 0);
+     }
+   }
+ 
+@@ -552,7 +554,7 @@ TEST(ImageOperations, ScaleUp) {
+               lanczos3(src_x + 0.5 - dst_x_in_src) *
+               lanczos3(src_y + 0.5 - dst_y_in_src);
+           sum += coeff;
+-          SkColor tmp = *src.getAddr32(src_x, src_y);
++          SkColor tmp = SkUnPreMultiply::PMColorToColor(*src.getAddr32(src_x, src_y));
+           a += coeff * SkColorGetA(tmp);
+           r += coeff * SkColorGetR(tmp);
+           g += coeff * SkColorGetG(tmp);
+@@ -571,7 +573,7 @@ TEST(ImageOperations, ScaleUp) {
+       if (r > 255.0f) r = 255.0f;
+       if (g > 255.0f) g = 255.0f;
+       if (b > 255.0f) b = 255.0f;
+-      SkColor dst_color = *dst.getAddr32(dst_x, dst_y);
++      SkColor dst_color = SkUnPreMultiply::PMColorToColor(*dst.getAddr32(dst_x, dst_y));
+       EXPECT_LE(fabs(SkColorGetA(dst_color) - a), 1.5f);
+       EXPECT_LE(fabs(SkColorGetR(dst_color) - r), 1.5f);
+       EXPECT_LE(fabs(SkColorGetG(dst_color) - g), 1.5f);

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_base_internal_unscaledcycleclock.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_abseil-cpp_base_internal_unscaledcycleclock.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,20 @@
+--- src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc.orig	2019-05-23 14:39:34.000000000 +0200
++++ src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc	2019-10-27 21:56:29.777821000 +0100
+@@ -20,7 +20,7 @@
+ #include <intrin.h>
+ #endif
+ 
+-#if defined(__powerpc__) || defined(__ppc__)
++#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
+ #include <sys/platform/ppc.h>
+ #endif
+ 
+@@ -53,7 +53,7 @@
+   return base_internal::NominalCPUFrequency();
+ }
+ 
+-#elif defined(__powerpc__) || defined(__ppc__)
++#elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
+ 
+ int64_t UnscaledCycleClock::Now() {
+   return __ppc_get_timebase();

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Constants.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Constants.h	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,10 @@
+--- src/3rdparty/chromium/third_party/angle/src/libANGLE/Constants.h.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/third_party/angle/src/libANGLE/Constants.h
+@@ -9,6 +9,7 @@
+ #ifndef LIBANGLE_CONSTANTS_H_
+ #define LIBANGLE_CONSTANTS_H_
+ 
++#include <cstddef>
+ #include "common/platform.h"
+ 
+ namespace gl

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_gpu_webgl__image__conversion.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_gpu_webgl__image__conversion.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,13 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc
+@@ -456,8 +456,8 @@ void Unpack<WebGLImageConversion::kDataFormatBGRA8, ui
+   for (unsigned i = 0; i < pixels_per_row; ++i) {
+     uint32_t bgra = source32[i];
+ #if defined(ARCH_CPU_BIG_ENDIAN)
+-    uint32_t brMask = 0xff00ff00;
+-    uint32_t gaMask = 0x00ff00ff;
++    uint32_t br_mask = 0xff00ff00;
++    uint32_t ga_mask = 0x00ff00ff;
+ #else
+     uint32_t br_mask = 0x00ff00ff;
+     uint32_t ga_mask = 0xff00ff00;

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_gpu_webgl__image__conversion__test.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_gpu_webgl__image__conversion__test.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,15 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion_test.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion_test.cc
+@@ -76,9 +76,9 @@ TEST_F(WebGLImageConversionTest, convertBGRA8toRGBA8) 
+                              0x34567888, 0x12345678, 0x34567888,
+                              0x12345678, 0x34567888, 0x12345678};
+ #if defined(ARCH_CPU_BIG_ENDIAN)
+-  uint32_t expectedData[9] = {0x56341278, 0x78563488, 0x56341278,
+-                              0x78563488, 0x56341278, 0x78563488,
+-                              0x56341278, 0x78563488, 0x56341278};
++  uint32_t expected_data[9] = {0x56341278, 0x78563488, 0x56341278,
++			       0x78563488, 0x56341278, 0x78563488,
++			       0x56341278, 0x78563488, 0x56341278};
+ #else
+   uint32_t expected_data[9] = {0x12785634, 0x34887856, 0x12785634,
+                                0x34887856, 0x12785634, 0x34887856,

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_graphics__context__test.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_graphics__context__test.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,134 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/graphics_context_test.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/graphics_context_test.cc
+@@ -52,7 +52,7 @@ namespace blink {
+   {                                                              \
+     for (int y = opaqueRect.Y(); y < opaqueRect.MaxY(); ++y)     \
+       for (int x = opaqueRect.X(); x < opaqueRect.MaxX(); ++x) { \
+-        int alpha = *bitmap.getAddr32(x, y) >> 24;               \
++        int alpha = SkGetPackedA32(*bitmap.getAddr32(x, y));	 \
+         EXPECT_EQ(255, alpha);                                   \
+       }                                                          \
+   }
+@@ -61,12 +61,16 @@ namespace blink {
+   {                                                           \
+     for (int y = 0; y < bitmap.height(); ++y)                 \
+       for (int x = 0; x < bitmap.width(); ++x) {              \
+-        int alpha = *bitmap.getAddr32(x, y) >> 24;            \
++        int alpha = SkGetPackedA32(*bitmap.getAddr32(x, y));  \
+         bool opaque = opaqueRect.Contains(x, y);              \
+         EXPECT_EQ(opaque, alpha == 255);                      \
+       }                                                       \
+   }
+ 
++static inline uint32_t PackARGB32(uint32_t argb) {
++  return SkPackARGB32NoCheck(argb>>24, (argb<<8)>>24, (argb<<16)>>24, (argb<<24)>>24);
++}
++
+ TEST(GraphicsContextTest, Recording) {
+   SkBitmap bitmap;
+   bitmap.allocN32Pixels(100, 100);
+@@ -184,10 +188,10 @@ class GraphicsContextHighConstrastTest : public testin
+ TEST_F(GraphicsContextHighConstrastTest, MAYBE_NoHighContrast) {
+   DrawColorsToContext();
+ 
+-  EXPECT_EQ(0xff000000, *bitmap_.getAddr32(0, 0));
+-  EXPECT_EQ(0xffffffff, *bitmap_.getAddr32(1, 0));
+-  EXPECT_EQ(0xffff0000, *bitmap_.getAddr32(2, 0));
+-  EXPECT_EQ(0xff808080, *bitmap_.getAddr32(3, 0));
++  EXPECT_EQ(PackARGB32(0xff000000), *bitmap_.getAddr32(0, 0));
++  EXPECT_EQ(PackARGB32(0xffffffff), *bitmap_.getAddr32(1, 0));
++  EXPECT_EQ(PackARGB32(0xffff0000), *bitmap_.getAddr32(2, 0));
++  EXPECT_EQ(PackARGB32(0xff808080), *bitmap_.getAddr32(3, 0));
+ }
+ 
+ // TODO(crbug.com/850782): Reenable this.
+@@ -205,10 +209,10 @@ TEST_F(GraphicsContextHighConstrastTest, MAYBE_HighCon
+ 
+   DrawColorsToContext();
+ 
+-  EXPECT_EQ(0xff000000, *bitmap_.getAddr32(0, 0));
+-  EXPECT_EQ(0xffffffff, *bitmap_.getAddr32(1, 0));
+-  EXPECT_EQ(0xffff0000, *bitmap_.getAddr32(2, 0));
+-  EXPECT_EQ(0xff808080, *bitmap_.getAddr32(3, 0));
++  EXPECT_EQ(PackARGB32(0xff000000), *bitmap_.getAddr32(0, 0));
++  EXPECT_EQ(PackARGB32(0xffffffff), *bitmap_.getAddr32(1, 0));
++  EXPECT_EQ(PackARGB32(0xffff0000), *bitmap_.getAddr32(2, 0));
++  EXPECT_EQ(PackARGB32(0xff808080), *bitmap_.getAddr32(3, 0));
+ }
+ 
+ // Simple invert for testing. Each color component |c|
+@@ -228,10 +232,10 @@ TEST_F(GraphicsContextHighConstrastTest, MAYBE_SimpleI
+ 
+   DrawColorsToContext();
+ 
+-  EXPECT_EQ(0xffffffff, *bitmap_.getAddr32(0, 0));
+-  EXPECT_EQ(0xff000000, *bitmap_.getAddr32(1, 0));
+-  EXPECT_EQ(0xff00ffff, *bitmap_.getAddr32(2, 0));
+-  EXPECT_EQ(0xff7f7f7f, *bitmap_.getAddr32(3, 0));
++  EXPECT_EQ(PackARGB32(0xffffffff), *bitmap_.getAddr32(0, 0));
++  EXPECT_EQ(PackARGB32(0xff000000), *bitmap_.getAddr32(1, 0));
++  EXPECT_EQ(PackARGB32(0xff00ffff), *bitmap_.getAddr32(2, 0));
++  EXPECT_EQ(PackARGB32(0xff7f7f7f), *bitmap_.getAddr32(3, 0));
+ }
+ 
+ // Invert brightness (with gamma correction).
+@@ -250,10 +254,10 @@ TEST_F(GraphicsContextHighConstrastTest, MAYBE_InvertB
+ 
+   DrawColorsToContext();
+ 
+-  EXPECT_EQ(0xffffffff, *bitmap_.getAddr32(0, 0));
+-  EXPECT_EQ(0xff000000, *bitmap_.getAddr32(1, 0));
+-  EXPECT_EQ(0xff00ffff, *bitmap_.getAddr32(2, 0));
+-  EXPECT_EQ(0xffdddddd, *bitmap_.getAddr32(3, 0));
++  EXPECT_EQ(PackARGB32(0xffffffff), *bitmap_.getAddr32(0, 0));
++  EXPECT_EQ(PackARGB32(0xff000000), *bitmap_.getAddr32(1, 0));
++  EXPECT_EQ(PackARGB32(0xff00ffff), *bitmap_.getAddr32(2, 0));
++  EXPECT_EQ(PackARGB32(0xffdddddd), *bitmap_.getAddr32(3, 0));
+ }
+ 
+ // Invert lightness (in HSL space).
+@@ -272,10 +276,10 @@ TEST_F(GraphicsContextHighConstrastTest, MAYBE_InvertL
+ 
+   DrawColorsToContext();
+ 
+-  EXPECT_EQ(0xffffffff, *bitmap_.getAddr32(0, 0));
+-  EXPECT_EQ(0xff000000, *bitmap_.getAddr32(1, 0));
+-  EXPECT_EQ(0xffff0000, *bitmap_.getAddr32(2, 0));
+-  EXPECT_EQ(0xffdddddd, *bitmap_.getAddr32(3, 0));
++  EXPECT_EQ(PackARGB32(0xffffffff), *bitmap_.getAddr32(0, 0));
++  EXPECT_EQ(PackARGB32(0xff000000), *bitmap_.getAddr32(1, 0));
++  EXPECT_EQ(PackARGB32(0xffff0000), *bitmap_.getAddr32(2, 0));
++  EXPECT_EQ(PackARGB32(0xffdddddd), *bitmap_.getAddr32(3, 0));
+ }
+ 
+ // Invert lightness plus grayscale.
+@@ -288,10 +292,10 @@ TEST_F(GraphicsContextHighConstrastTest, InvertLightne
+ 
+   DrawColorsToContext();
+ 
+-  EXPECT_EQ(0xffffffff, *bitmap_.getAddr32(0, 0));
+-  EXPECT_EQ(0xff000000, *bitmap_.getAddr32(1, 0));
+-  EXPECT_EQ(0xffe2e2e2, *bitmap_.getAddr32(2, 0));
+-  EXPECT_EQ(0xffdddddd, *bitmap_.getAddr32(3, 0));
++  EXPECT_EQ(PackARGB32(0xffffffff), *bitmap_.getAddr32(0, 0));
++  EXPECT_EQ(PackARGB32(0xff000000), *bitmap_.getAddr32(1, 0));
++  EXPECT_EQ(PackARGB32(0xffe2e2e2), *bitmap_.getAddr32(2, 0));
++  EXPECT_EQ(PackARGB32(0xffdddddd), *bitmap_.getAddr32(3, 0));
+ }
+ 
+ // TODO(crbug.com/850782): Reenable this.
+@@ -309,10 +313,10 @@ TEST_F(GraphicsContextHighConstrastTest, MAYBE_InvertL
+ 
+   DrawColorsToContext();
+ 
+-  EXPECT_EQ(0xffffffff, *bitmap_.getAddr32(0, 0));
+-  EXPECT_EQ(0xff000000, *bitmap_.getAddr32(1, 0));
+-  EXPECT_EQ(0xffff0000, *bitmap_.getAddr32(2, 0));
+-  EXPECT_EQ(0xffeeeeee, *bitmap_.getAddr32(3, 0));
++  EXPECT_EQ(PackARGB32(0xffffffff), *bitmap_.getAddr32(0, 0));
++  EXPECT_EQ(PackARGB32(0xff000000), *bitmap_.getAddr32(1, 0));
++  EXPECT_EQ(PackARGB32(0xffff0000), *bitmap_.getAddr32(2, 0));
++  EXPECT_EQ(PackARGB32(0xffeeeeee), *bitmap_.getAddr32(3, 0));
+ }
+ 
+ }  // namespace blink

Added: head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_highcontrast_highcontrast__classifier.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_highcontrast_highcontrast__classifier.cc	Sat Nov 23 17:30:05 2019	(r518257)
@@ -0,0 +1,79 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/highcontrast/highcontrast_classifier.cc.orig	2019-05-23 12:39:34 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/highcontrast/highcontrast_classifier.cc
+@@ -1060,55 +1060,47 @@ void DequantizeMinFirst(const int32_t rank,
+ 
+ // -----------------------------------------------------------------------------
+ // CONSTANTS
+-// Note that for now, endianness of the target machine needs to match that of
+-// the one training was performed on.
+ // -----------------------------------------------------------------------------
+ const int32_t dnn_hiddenlayer_0_weights_part_0_shape[2] = {4, 10};
+ const union {
+-  uint8_t bytes[160];
+   float values[40];
+ } dnn_hiddenlayer_0_weights_part_0 = {{
+-    0xbc, 0x22, 0x0a, 0xbf, 0xb4, 0x46, 0x8c, 0x3f, 0xba, 0x31, 0x34, 0xbe,
+-    0x4c, 0x65, 0xdb, 0xbe, 0xf0, 0x54, 0x5e, 0xbe, 0xc1, 0x5d, 0xb3, 0x3f,
+-    0xf4, 0xe6, 0x15, 0xbf, 0x05, 0xc6, 0x34, 0xbf, 0xc0, 0x37, 0x7e, 0xbd,
+-    0x6c, 0x35, 0x0b, 0xbf, 0xca, 0x53, 0x26, 0xbf, 0x58, 0xb4, 0x87, 0x3f,
+-    0x37, 0xee, 0x39, 0xbf, 0xda, 0xfa, 0xf9, 0xbe, 0x97, 0xc1, 0x06, 0xbf,
+-    0xf9, 0x4e, 0x81, 0x3f, 0xb2, 0x44, 0x85, 0xbf, 0x7f, 0x98, 0x7c, 0x3d,
+-    0x15, 0x26, 0xbc, 0xbe, 0x5c, 0x48, 0x05, 0x3f, 0xc8, 0xaa, 0xa1, 0xbd,
+-    0x35, 0xb3, 0x43, 0xbe, 0xeb, 0x46, 0x91, 0x3f, 0x80, 0x71, 0xe3, 0x3c,
+-    0xd1, 0x98, 0x79, 0x3f, 0x3c, 0xd0, 0x0d, 0xbf, 0x1e, 0x02, 0xd3, 0x3e,
+-    0x5d, 0x4b, 0xa2, 0xbf, 0x68, 0xac, 0xaa, 0xbd, 0xf8, 0xe1, 0x75, 0x3e,
+-    0x4a, 0x9c, 0x27, 0xbe, 0xf8, 0xae, 0xb2, 0xbe, 0x7f, 0x9d, 0x91, 0x3f,
+-    0x1e, 0x8b, 0xa8, 0xbe, 0x35, 0x7e, 0xb2, 0x3f, 0xbe, 0x8c, 0xd3, 0xbe,
+-    0xf9, 0xcd, 0xb5, 0x3f, 0xa1, 0x50, 0xaa, 0x3f, 0xe4, 0x6d, 0xdd, 0xbe,
+-    0x0d, 0xce, 0xd3, 0xbe,
++     -0.539592504501343,   1.09590768814087, -0.175970941781998, -0.428507208824158,
++     -0.217120885848999,   1.40129864215851,   -0.5855553150177, -0.706146538257599,
++    -0.0620648860931396, -0.543783903121948, -0.649716019630432,   1.06019115447998,
++     -0.726291120052338, -0.488241970539093, -0.526391446590424,   1.01022255420685,
++      -1.04115891456604, 0.0616688691079617, -0.367478042840958,  0.520635366439819,
++    -0.0789390206336975,  -0.19111330807209,   1.13497674465179, 0.0277640819549561,
++      0.974988043308258, -0.553958654403687,  0.412125527858734,   -1.2679249048233,
++    -0.0833366513252258,  0.240119814872742, -0.163682132959366,  -0.34899115562439,
++        1.1376188993454, -0.329186379909515,    1.3944765329361, -0.413183152675629,
++       1.42034828662872,   1.33058559894562, -0.432479023933411, -0.413681417703629
+ }};
+ const int32_t dnn_hiddenlayer_0_biases_part_0_shape[1] = {10};
+ const union {
+-  uint8_t bytes[40];
+   float values[10];
+ } dnn_hiddenlayer_0_biases_part_0 = {{
+-    0x00, 0x00, 0x00, 0x00, 0xbf, 0x6a, 0x53, 0x3e, 0xd3, 0xc1,
+-    0xd0, 0x3e, 0x00, 0x00, 0x00, 0x00, 0xb6, 0xd8, 0xc0, 0x3e,
+-    0xca, 0xe7, 0x35, 0x3e, 0x23, 0xa5, 0x44, 0x3f, 0x61, 0xfd,
+-    0xd2, 0x3e, 0x00, 0x00, 0x00, 0x00, 0xb6, 0xe0, 0x43, 0x3c,
++                    0.0,  0.206461891531944,
++      0.407728761434555,                0.0,
++      0.376653373241425,  0.177642017602921,

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911231730.xANHU5fk072844>