diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-06-22 11:40:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-06-22 11:40:06 +0100 |
commit | 7a86906b67693cc65671d3e1476835d3a7e13092 (patch) | |
tree | 9de1b9e2cf77833183d4e5ffab2e94d0403ef725 /www-client/chromium | |
parent | d56d144655e3785864da43c9acb6c228ef9360ae (diff) |
gentoo resync : 22.06.2019
Diffstat (limited to 'www-client/chromium')
16 files changed, 2793 insertions, 0 deletions
diff --git a/www-client/chromium/chromium-75.0.3770.100.ebuild b/www-client/chromium/chromium-75.0.3770.100.ebuild new file mode 100644 index 000000000000..0dde4528fb73 --- /dev/null +++ b/www-client/chromium/chromium-75.0.3770.100.ebuild @@ -0,0 +1,706 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 ) + +CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he + hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr + sv sw ta te th tr uk vi zh-CN zh-TW" + +inherit check-reqs chromium-2 desktop flag-o-matic multilib ninja-utils pax-utils portability python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils + +DESCRIPTION="Open-source version of Google Chrome web browser" +HOMEPAGE="http://chromium.org/" +SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+closure-compile component-build cups gnome-keyring +hangouts jumbo-build kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc widevine" +RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )" +REQUIRED_USE="component-build? ( !suid )" + +COMMON_DEPEND=" + >=app-accessibility/at-spi2-atk-2.26:2 + app-arch/bzip2:= + cups? ( >=net-print/cups-1.3.11:= ) + >=dev-libs/atk-2.26 + dev-libs/expat:= + dev-libs/glib:2 + system-icu? ( >=dev-libs/icu-64:= ) + >=dev-libs/libxml2-2.9.4-r3:=[icu] + dev-libs/libxslt:= + dev-libs/nspr:= + >=dev-libs/nss-3.26:= + >=dev-libs/re2-0.2016.11.01:= + gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= ) + >=media-libs/alsa-lib-1.0.19:= + media-libs/fontconfig:= + media-libs/freetype:= + >=media-libs/harfbuzz-2.2.0:0=[icu(-)] + media-libs/libjpeg-turbo:= + media-libs/libpng:= + system-libvpx? ( media-libs/libvpx:=[postproc,svc] ) + >=media-libs/openh264-1.6.0:= + pulseaudio? ( media-sound/pulseaudio:= ) + system-ffmpeg? ( + >=media-video/ffmpeg-4:= + || ( + media-video/ffmpeg[-samba] + >=net-fs/samba-4.5.10-r1[-debug(-)] + ) + !=net-fs/samba-4.5.12-r0 + media-libs/opus:= + ) + sys-apps/dbus:= + sys-apps/pciutils:= + virtual/udev + x11-libs/cairo:= + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3[X] + x11-libs/libX11:= + x11-libs/libXcomposite:= + x11-libs/libXcursor:= + x11-libs/libXdamage:= + x11-libs/libXext:= + x11-libs/libXfixes:= + >=x11-libs/libXi-1.6.0:= + x11-libs/libXrandr:= + x11-libs/libXrender:= + x11-libs/libXScrnSaver:= + x11-libs/libXtst:= + x11-libs/pango:= + app-arch/snappy:= + media-libs/flac:= + >=media-libs/libwebp-0.4.0:= + sys-libs/zlib:=[minizip] + kerberos? ( virtual/krb5 ) +" +# For nvidia-drivers blocker, see bug #413637 . +RDEPEND="${COMMON_DEPEND} + !<www-plugins/chrome-binary-plugins-57 + x11-misc/xdg-utils + virtual/opengl + virtual/ttf-fonts + selinux? ( sec-policy/selinux-chromium ) + tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 ) + widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] ) +" +# dev-vcs/git - https://bugs.gentoo.org/593476 +# sys-apps/sandbox - https://crbug.com/586444 +DEPEND="${COMMON_DEPEND} +" +BDEPEND=" + >=app-arch/gzip-1.7 + !arm? ( + dev-lang/yasm + ) + dev-lang/perl + <dev-util/gn-0.1583 + dev-vcs/git + >=dev-util/gperf-3.0.3 + >=dev-util/ninja-1.7.2 + >=net-libs/nodejs-7.6.0[inspector] + sys-apps/hwids[usb(+)] + >=sys-devel/bison-2.4.3 + sys-devel/flex + closure-compile? ( virtual/jre ) + virtual/pkgconfig +" + +: ${CHROMIUM_FORCE_CLANG=no} + +if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then + BDEPEND+=" >=sys-devel/clang-7" +fi + +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then + EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; +fi + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS=" +Some web pages may require additional fonts to display properly. +Try installing some of the following packages if some characters +are not displayed properly: +- media-fonts/arphicfonts +- media-fonts/droid +- media-fonts/ipamonafont +- media-fonts/noto +- media-fonts/ja-ipafonts +- media-fonts/takao-fonts +- media-fonts/wqy-microhei +- media-fonts/wqy-zenhei + +To fix broken icons on the Downloads page, you should install an icon +theme that covers the appropriate MIME types, and configure this as your +GTK+ icon theme. + +For native file dialogs in KDE, install kde-apps/kdialog. +" + +PATCHES=( + "${FILESDIR}/chromium-compiler-r9.patch" + "${FILESDIR}/chromium-widevine-r4.patch" + "${FILESDIR}/chromium-fix-char_traits.patch" + "${FILESDIR}/chromium-75-fix-gn-gen.patch" + "${FILESDIR}/chromium-75-gcc-angle-fix.patch" + "${FILESDIR}/chromium-75-unique_ptr.patch" + "${FILESDIR}/chromium-75-lss.patch" + "${FILESDIR}/chromium-75-noexcept.patch" + "${FILESDIR}/chromium-75-llvm8.patch" + "${FILESDIR}/chromium-75-pure-virtual.patch" +) + +pre_build_checks() { + if [[ ${MERGE_TYPE} != binary ]]; then + local -x CPP="$(tc-getCXX) -E" + if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 8.0; then + die "At least gcc 8.0 is required" + fi + fi + + # Check build requirements, bug #541816 and bug #471810 . + CHECKREQS_MEMORY="3G" + CHECKREQS_DISK_BUILD="5G" + if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then + CHECKREQS_DISK_BUILD="25G" + if ! use component-build; then + CHECKREQS_MEMORY="16G" + fi + fi + check-reqs_pkg_setup +} + +pkg_pretend() { + pre_build_checks +} + +pkg_setup() { + pre_build_checks + + chromium_suid_sandbox_check_kernel_config +} + +src_prepare() { + # Calling this here supports resumption via FEATURES=keepwork + python_setup + + default + + mkdir -p third_party/node/linux/node-linux-x64/bin || die + ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die + + local keeplibs=( + base/third_party/dmg_fp + base/third_party/dynamic_annotations + base/third_party/icu + base/third_party/nspr + base/third_party/superfasthash + base/third_party/symbolize + base/third_party/valgrind + base/third_party/xdg_mime + base/third_party/xdg_user_dirs + buildtools/third_party/libc++ + buildtools/third_party/libc++abi + chrome/third_party/mozilla_security_manager + courgette/third_party + net/third_party/mozilla_security_manager + net/third_party/nss + net/third_party/quic + net/third_party/uri_template + third_party/abseil-cpp + third_party/angle + third_party/angle/src/common/third_party/base + third_party/angle/src/common/third_party/smhasher + third_party/angle/src/common/third_party/xxhash + third_party/angle/src/third_party/compiler + third_party/angle/src/third_party/libXNVCtrl + third_party/angle/src/third_party/trace_event + third_party/angle/third_party/glslang + third_party/angle/third_party/spirv-headers + third_party/angle/third_party/spirv-tools + third_party/angle/third_party/vulkan-headers + third_party/angle/third_party/vulkan-loader + third_party/angle/third_party/vulkan-tools + third_party/angle/third_party/vulkan-validation-layers + third_party/apple_apsl + third_party/axe-core + third_party/blink + third_party/boringssl + third_party/boringssl/src/third_party/fiat + third_party/breakpad + third_party/breakpad/breakpad/src/third_party/curl + third_party/brotli + third_party/cacheinvalidation + third_party/catapult + third_party/catapult/common/py_vulcanize/third_party/rcssmin + third_party/catapult/common/py_vulcanize/third_party/rjsmin + third_party/catapult/third_party/beautifulsoup4 + third_party/catapult/third_party/html5lib-python + third_party/catapult/third_party/polymer + third_party/catapult/third_party/six + third_party/catapult/tracing/third_party/d3 + third_party/catapult/tracing/third_party/gl-matrix + third_party/catapult/tracing/third_party/jszip + third_party/catapult/tracing/third_party/mannwhitneyu + third_party/catapult/tracing/third_party/oboe + third_party/catapult/tracing/third_party/pako + third_party/ced + third_party/cld_3 + third_party/closure_compiler + third_party/crashpad + third_party/crashpad/crashpad/third_party/zlib + third_party/crc32c + third_party/cros_system_api + third_party/dav1d + third_party/dawn + third_party/devscripts + third_party/dom_distiller_js + third_party/emoji-segmenter + third_party/flatbuffers + third_party/flot + third_party/freetype + third_party/glslang + third_party/google_input_tools + third_party/google_input_tools/third_party/closure_library + third_party/google_input_tools/third_party/closure_library/third_party/closure + third_party/googletest + third_party/hunspell + third_party/iccjpeg + third_party/inspector_protocol + third_party/jinja2 + third_party/jsoncpp + third_party/jstemplate + third_party/khronos + third_party/leveldatabase + third_party/libXNVCtrl + third_party/libaddressinput + third_party/libaom + third_party/libaom/source/libaom/third_party/vector + third_party/libaom/source/libaom/third_party/x86inc + third_party/libjingle + third_party/libphonenumber + third_party/libsecret + third_party/libsrtp + third_party/libsync + third_party/libudev + third_party/libwebm + third_party/libxml/chromium + third_party/libyuv + third_party/llvm + third_party/lss + third_party/lzma_sdk + third_party/markupsafe + third_party/mesa + third_party/metrics_proto + third_party/modp_b64 + third_party/nasm + third_party/node + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 + third_party/openmax_dl + third_party/ots + third_party/pdfium + third_party/pdfium/third_party/agg23 + third_party/pdfium/third_party/base + third_party/pdfium/third_party/bigint + third_party/pdfium/third_party/freetype + third_party/pdfium/third_party/lcms + third_party/pdfium/third_party/libopenjpeg20 + third_party/pdfium/third_party/libpng16 + third_party/pdfium/third_party/libtiff + third_party/pdfium/third_party/skia_shared + third_party/perfetto + third_party/pffft + third_party/ply + third_party/polymer + third_party/protobuf + third_party/protobuf/third_party/six + third_party/pyjson5 + third_party/qcms + third_party/rnnoise + third_party/s2cellid + third_party/sfntly + third_party/simplejson + third_party/skia + third_party/skia/include/third_party/vulkan + third_party/skia/third_party/gif + third_party/skia/third_party/skcms + third_party/skia/third_party/vulkan + third_party/smhasher + third_party/spirv-headers + third_party/SPIRV-Tools + third_party/sqlite + third_party/swiftshader + third_party/swiftshader/third_party/llvm-7.0 + third_party/swiftshader/third_party/llvm-subzero + third_party/swiftshader/third_party/subzero + third_party/unrar + third_party/usrsctp + third_party/vulkan + third_party/web-animations-js + third_party/webdriver + third_party/webrtc + third_party/webrtc/common_audio/third_party/fft4g + third_party/webrtc/common_audio/third_party/spl_sqrt_floor + third_party/webrtc/modules/third_party/fft + third_party/webrtc/modules/third_party/g711 + third_party/webrtc/modules/third_party/g722 + third_party/webrtc/rtc_base/third_party/base64 + third_party/webrtc/rtc_base/third_party/sigslot + third_party/widevine + third_party/woff2 + third_party/zlib/google + url/third_party/mozilla + v8/src/third_party/siphash + v8/src/third_party/valgrind + v8/src/third_party/utf8-decoder + v8/third_party/inspector_protocol + v8/third_party/v8 + + # gyp -> gn leftovers + base/third_party/libevent + third_party/adobe + third_party/speech-dispatcher + third_party/usb_ids + third_party/xdg-utils + third_party/yasm/run_yasm.py + ) + if ! use system-ffmpeg; then + keeplibs+=( third_party/ffmpeg third_party/opus ) + fi + if ! use system-icu; then + keeplibs+=( third_party/icu ) + fi + if ! use system-libvpx; then + keeplibs+=( third_party/libvpx ) + keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc ) + fi + if use tcmalloc; then + keeplibs+=( third_party/tcmalloc ) + fi + + # Remove most bundled libraries. Some are still needed. + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die +} + +src_configure() { + # Calling this here supports resumption via FEATURES=keepwork + python_setup + + local myconf_gn="" + + # Make sure the build system will use the right tools, bug #340795. + tc-export AR CC CXX NM + + if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then + # Force clang since gcc is pretty broken at the moment. + CC=${CHOST}-clang + CXX=${CHOST}-clang++ + strip-unsupported-flags + fi + + if tc-is-clang; then + myconf_gn+=" is_clang=true clang_use_chrome_plugins=false" + else + myconf_gn+=" is_clang=false" + fi + + # Define a custom toolchain for GN + myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" + + if tc-is-cross-compiler; then + tc-export BUILD_{AR,CC,CXX,NM} + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\"" + myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\"" + else + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" + fi + + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. + myconf_gn+=" is_debug=false" + + # Component build isn't generally intended for use by end users. It's mostly useful + # for development and debugging. + myconf_gn+=" is_component_build=$(usex component-build true false)" + + # https://chromium.googlesource.com/chromium/src/+/lkcr/docs/jumbo.md + myconf_gn+=" use_jumbo_build=$(usex jumbo-build true false)" + + myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")" + + # Disable nacl, we can't build without pnacl (http://crbug.com/269560). + myconf_gn+=" enable_nacl=false" + + # Use system-provided libraries. + # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733). + # TODO: use_system_hunspell (upstream changes needed). + # TODO: use_system_libsrtp (bug #459932). + # TODO: use_system_protobuf (bug #525560). + # TODO: use_system_ssl (http://crbug.com/58087). + # TODO: use_system_sqlite (http://crbug.com/22208). + + # libevent: https://bugs.gentoo.org/593458 + local gn_system_libraries=( + flac + fontconfig + freetype + # Need harfbuzz_from_pkgconfig target + #harfbuzz-ng + libdrm + libjpeg + libpng + libwebp + libxml + libxslt + openh264 + re2 + snappy + yasm + zlib + ) + if use system-ffmpeg; then + gn_system_libraries+=( ffmpeg opus ) + fi + if use system-icu; then + gn_system_libraries+=( icu ) + fi + if use system-libvpx; then + gn_system_libraries+=( libvpx ) + fi + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die + + # See dependency logic in third_party/BUILD.gn + myconf_gn+=" use_system_harfbuzz=true" + + # Optional dependencies. + myconf_gn+=" closure_compile=$(usex closure-compile true false)" + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)" + myconf_gn+=" enable_widevine=$(usex widevine true false)" + myconf_gn+=" use_cups=$(usex cups true false)" + myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)" + myconf_gn+=" use_kerberos=$(usex kerberos true false)" + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" + + # TODO: link_pulseaudio=true for GN. + + myconf_gn+=" fieldtrial_testing_like_official_build=true" + + # Never use bundled gold binary. Disable gold linker flags for now. + # Do not use bundled clang. + # Trying to use gold results in linker crash. + myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false use_custom_libcxx=false" + + # Disable forced lld, bug 641556 + myconf_gn+=" use_lld=false" + + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" + myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\"" + + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . + # Note: these are for Gentoo use ONLY. For your own distribution, + # please get your own set of keys. Feel free to contact chromium@gentoo.org + # for more info. + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" + local google_default_client_id="329227923882.apps.googleusercontent.com" + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" + myconf_gn+=" google_api_key=\"${google_api_key}\"" + myconf_gn+=" google_default_client_id=\"${google_default_client_id}\"" + myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\"" + + local myarch="$(tc-arch)" + + # Avoid CFLAGS problems, bug #352457, bug #390147. + if ! use custom-cflags; then + replace-flags "-Os" "-O2" + strip-flags + + # Prevent linker from running out of address space, bug #471810 . + if use x86; then + filter-flags "-g*" + fi + + # Prevent libvpx build failures. Bug 530248, 544702, 546984. + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 + fi + fi + + if [[ $myarch = amd64 ]] ; then + myconf_gn+=" target_cpu=\"x64\"" + ffmpeg_target_arch=x64 + elif [[ $myarch = x86 ]] ; then + myconf_gn+=" target_cpu=\"x86\"" + ffmpeg_target_arch=ia32 + + # This is normally defined by compiler_cpu_abi in + # build/config/compiler/BUILD.gn, but we patch that part out. + append-flags -msse2 -mfpmath=sse -mmmx + elif [[ $myarch = arm64 ]] ; then + myconf_gn+=" target_cpu=\"arm64\"" + ffmpeg_target_arch=arm64 + elif [[ $myarch = arm ]] ; then + myconf_gn+=" target_cpu=\"arm\"" + ffmpeg_target_arch=$(usex neon arm-neon arm) + else + die "Failed to determine target arch, got '$myarch'." + fi + + # Make sure that -Werror doesn't get added to CFLAGS by the build system. + # Depending on GCC version the warnings are different and we don't want + # the build to fail because of that. + myconf_gn+=" treat_warnings_as_errors=false" + + # Disable fatal linker warnings, bug 506268. + myconf_gn+=" fatal_linker_warnings=false" + + # Bug 491582. + export TMPDIR="${WORKDIR}/temp" + mkdir -p -m 755 "${TMPDIR}" || die + + # https://bugs.gentoo.org/654216 + addpredict /dev/dri/ #nowarn + + #if ! use system-ffmpeg; then + if false; then + local build_ffmpeg_args="" + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then + build_ffmpeg_args+=" --disable-asm" + fi + + # Re-configure bundled ffmpeg. See bug #491378 for example reasons. + einfo "Configuring bundled ffmpeg..." + pushd third_party/ffmpeg > /dev/null || die + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die + chromium/scripts/copy_config.sh || die + chromium/scripts/generate_gn.py || die + popd > /dev/null || die + fi + + einfo "Configuring Chromium..." + set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release + echo "$@" + "$@" || die +} + +src_compile() { + # Final link uses lots of file descriptors. + ulimit -n 2048 + + # Calling this here supports resumption via FEATURES=keepwork + python_setup + + #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die + + # Build mksnapshot and pax-mark it. + local x + for x in mksnapshot v8_context_snapshot_generator; do + if tc-is-cross-compiler; then + eninja -C out/Release "host/${x}" + pax-mark m "out/Release/host/${x}" + else + eninja -C out/Release "${x}" + pax-mark m "out/Release/${x}" + fi + done + + # Even though ninja autodetects number of CPUs, we respect + # user's options, for debugging with -j 1 or any other reason. + eninja -C out/Release chrome chromedriver + use suid && eninja -C out/Release chrome_sandbox + + pax-mark m out/Release/chrome +} + +src_install() { + local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser" + exeinto "${CHROMIUM_HOME}" + doexe out/Release/chrome + + if use suid; then + newexe out/Release/chrome_sandbox chrome-sandbox + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" + fi + + doexe out/Release/chromedriver + + local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" ) + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die + doexe chromium-launcher.sh + + # It is important that we name the target "chromium-browser", + # xdg-utils expect it; bug #355517. + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser + # keep the old symlink around for consistency + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium + + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver + + # Allow users to override command-line options, bug #357629. + insinto /etc/chromium + newins "${FILESDIR}/chromium.default" "default" + + pushd out/Release/locales > /dev/null || die + chromium_remove_language_paks + popd + + insinto "${CHROMIUM_HOME}" + doins out/Release/*.bin + doins out/Release/*.pak + doins out/Release/*.so + + if ! use system-icu; then + doins out/Release/icudtl.dat + fi + + doins -r out/Release/locales + doins -r out/Release/resources + + if [[ -d out/Release/swiftshader ]]; then + insinto "${CHROMIUM_HOME}/swiftshader" + doins out/Release/swiftshader/*.so + fi + + # Install icons and desktop entry. + local branding size + for size in 16 22 24 32 48 64 128 256 ; do + case ${size} in + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; + *) branding="chrome/app/theme/chromium" ;; + esac + newicon -s ${size} "${branding}/product_logo_${size}.png" \ + chromium-browser.png + done + + local mime_types="text/html;text/xml;application/xhtml+xml;" + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 + mime_types+="x-scheme-handler/ftp;" # bug #412185 + mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393 + make_desktop_entry \ + chromium-browser \ + "Chromium" \ + chromium-browser \ + "Network;WebBrowser" \ + "MimeType=${mime_types}\nStartupWMClass=chromium-browser" + sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die + + # Install GNOME default application entry (bug #303100). + insinto /usr/share/gnome-control-center/default-apps + newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml + + readme.gentoo_create_doc +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_desktop_database_update +} + +pkg_postinst() { + xdg_icon_cache_update + xdg_desktop_database_update + readme.gentoo_print_elog +} diff --git a/www-client/chromium/chromium-76.0.3809.36.ebuild b/www-client/chromium/chromium-76.0.3809.36.ebuild new file mode 100644 index 000000000000..5873a5a0710e --- /dev/null +++ b/www-client/chromium/chromium-76.0.3809.36.ebuild @@ -0,0 +1,717 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 ) + +CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he + hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr + sv sw ta te th tr uk vi zh-CN zh-TW" + +inherit check-reqs chromium-2 desktop flag-o-matic multilib ninja-utils pax-utils portability python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils + +DESCRIPTION="Open-source version of Google Chrome web browser" +HOMEPAGE="http://chromium.org/" +SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+closure-compile component-build cups gnome-keyring +hangouts jumbo-build kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc widevine" +RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )" +REQUIRED_USE="component-build? ( !suid )" + +COMMON_DEPEND=" + >=app-accessibility/at-spi2-atk-2.26:2 + app-arch/bzip2:= + cups? ( >=net-print/cups-1.3.11:= ) + >=dev-libs/atk-2.26 + dev-libs/expat:= + dev-libs/glib:2 + system-icu? ( >=dev-libs/icu-64:= ) + >=dev-libs/libxml2-2.9.4-r3:=[icu] + dev-libs/libxslt:= + dev-libs/nspr:= + >=dev-libs/nss-3.26:= + >=dev-libs/re2-0.2016.11.01:= + gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= ) + >=media-libs/alsa-lib-1.0.19:= + media-libs/fontconfig:= + media-libs/freetype:= + >=media-libs/harfbuzz-2.2.0:0=[icu(-)] + media-libs/libjpeg-turbo:= + media-libs/libpng:= + system-libvpx? ( media-libs/libvpx:=[postproc,svc] ) + >=media-libs/openh264-1.6.0:= + pulseaudio? ( media-sound/pulseaudio:= ) + system-ffmpeg? ( + >=media-video/ffmpeg-4:= + || ( + media-video/ffmpeg[-samba] + >=net-fs/samba-4.5.10-r1[-debug(-)] + ) + !=net-fs/samba-4.5.12-r0 + media-libs/opus:= + ) + sys-apps/dbus:= + sys-apps/pciutils:= + virtual/udev + x11-libs/cairo:= + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3[X] + x11-libs/libX11:= + x11-libs/libXcomposite:= + x11-libs/libXcursor:= + x11-libs/libXdamage:= + x11-libs/libXext:= + x11-libs/libXfixes:= + >=x11-libs/libXi-1.6.0:= + x11-libs/libXrandr:= + x11-libs/libXrender:= + x11-libs/libXScrnSaver:= + x11-libs/libXtst:= + x11-libs/pango:= + app-arch/snappy:= + media-libs/flac:= + >=media-libs/libwebp-0.4.0:= + sys-libs/zlib:=[minizip] + kerberos? ( virtual/krb5 ) +" +# For nvidia-drivers blocker, see bug #413637 . +RDEPEND="${COMMON_DEPEND} + !<www-plugins/chrome-binary-plugins-57 + x11-misc/xdg-utils + virtual/opengl + virtual/ttf-fonts + selinux? ( sec-policy/selinux-chromium ) + tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 ) + widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] ) +" +# dev-vcs/git - https://bugs.gentoo.org/593476 +# sys-apps/sandbox - https://crbug.com/586444 +DEPEND="${COMMON_DEPEND} +" +BDEPEND=" + >=app-arch/gzip-1.7 + !arm? ( + dev-lang/yasm + ) + dev-lang/perl + <dev-util/gn-0.1583 + dev-vcs/git + >=dev-util/gperf-3.0.3 + >=dev-util/ninja-1.7.2 + >=net-libs/nodejs-7.6.0[inspector] + sys-apps/hwids[usb(+)] + >=sys-devel/bison-2.4.3 + sys-devel/flex + closure-compile? ( virtual/jre ) + virtual/pkgconfig +" + +: ${CHROMIUM_FORCE_CLANG=no} + +if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then + BDEPEND+=" >=sys-devel/clang-7" +fi + +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then + EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; +fi + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS=" +Some web pages may require additional fonts to display properly. +Try installing some of the following packages if some characters +are not displayed properly: +- media-fonts/arphicfonts +- media-fonts/droid +- media-fonts/ipamonafont +- media-fonts/noto +- media-fonts/ja-ipafonts +- media-fonts/takao-fonts +- media-fonts/wqy-microhei +- media-fonts/wqy-zenhei + +To fix broken icons on the Downloads page, you should install an icon +theme that covers the appropriate MIME types, and configure this as your +GTK+ icon theme. + +For native file dialogs in KDE, install kde-apps/kdialog. +" + +PATCHES=( + "${FILESDIR}/chromium-compiler-r10.patch" + "${FILESDIR}/chromium-widevine-r4.patch" + "${FILESDIR}/chromium-fix-char_traits.patch" + "${FILESDIR}/chromium-76-quiche.patch" + "${FILESDIR}/chromium-76-lss.patch" + "${FILESDIR}/chromium-76-gcc-vulkan.patch" + "${FILESDIR}/chromium-76-gcc-private.patch" + "${FILESDIR}/chromium-76-gcc-noexcept.patch" + "${FILESDIR}/chromium-76-gcc-gl-init.patch" + "${FILESDIR}/chromium-76-gcc-blink-namespace1.patch" + "${FILESDIR}/chromium-76-gcc-blink-namespace2.patch" + "${FILESDIR}/chromium-76-gcc-blink-constexpr.patch" + "${FILESDIR}/chromium-76-gcc-uint32.patch" + "${FILESDIR}/chromium-76-gcc-ambiguous-nodestructor.patch" + "${FILESDIR}/chromium-76-gcc-include.patch" + "${FILESDIR}/chromium-76-gcc-pure-virtual.patch" +) + +pre_build_checks() { + if [[ ${MERGE_TYPE} != binary ]]; then + local -x CPP="$(tc-getCXX) -E" + if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 8.0; then + die "At least gcc 8.0 is required" + fi + fi + + # Check build requirements, bug #541816 and bug #471810 . + CHECKREQS_MEMORY="3G" + CHECKREQS_DISK_BUILD="7G" + if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then + CHECKREQS_DISK_BUILD="25G" + if ! use component-build; then + CHECKREQS_MEMORY="16G" + fi + fi + check-reqs_pkg_setup +} + +pkg_pretend() { + pre_build_checks +} + +pkg_setup() { + pre_build_checks + + chromium_suid_sandbox_check_kernel_config +} + +src_prepare() { + # Calling this here supports resumption via FEATURES=keepwork + python_setup + + default + + mkdir -p third_party/node/linux/node-linux-x64/bin || die + ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die + + local keeplibs=( + base/third_party/cityhash + base/third_party/dmg_fp + base/third_party/dynamic_annotations + base/third_party/icu + base/third_party/nspr + base/third_party/superfasthash + base/third_party/symbolize + base/third_party/valgrind + base/third_party/xdg_mime + base/third_party/xdg_user_dirs + buildtools/third_party/libc++ + buildtools/third_party/libc++abi + chrome/third_party/mozilla_security_manager + courgette/third_party + net/third_party/mozilla_security_manager + net/third_party/nss + net/third_party/quic + net/third_party/uri_template + third_party/abseil-cpp + third_party/angle + third_party/angle/src/common/third_party/base + third_party/angle/src/common/third_party/smhasher + third_party/angle/src/common/third_party/xxhash + third_party/angle/src/third_party/compiler + third_party/angle/src/third_party/libXNVCtrl + third_party/angle/src/third_party/trace_event + third_party/angle/third_party/glslang + third_party/angle/third_party/spirv-headers + third_party/angle/third_party/spirv-tools + third_party/angle/third_party/vulkan-headers + third_party/angle/third_party/vulkan-loader + third_party/angle/third_party/vulkan-tools + third_party/angle/third_party/vulkan-validation-layers + third_party/apple_apsl + third_party/axe-core + third_party/blink + third_party/boringssl + third_party/boringssl/src/third_party/fiat + third_party/boringssl/src/third_party/sike + third_party/boringssl/linux-aarch64/crypto/third_party/sike + third_party/boringssl/linux-x86_64/crypto/third_party/sike + third_party/breakpad + third_party/breakpad/breakpad/src/third_party/curl + third_party/brotli + third_party/cacheinvalidation + third_party/catapult + third_party/catapult/common/py_vulcanize/third_party/rcssmin + third_party/catapult/common/py_vulcanize/third_party/rjsmin + third_party/catapult/third_party/beautifulsoup4 + third_party/catapult/third_party/html5lib-python + third_party/catapult/third_party/polymer + third_party/catapult/third_party/six + third_party/catapult/tracing/third_party/d3 + third_party/catapult/tracing/third_party/gl-matrix + third_party/catapult/tracing/third_party/jszip + third_party/catapult/tracing/third_party/mannwhitneyu + third_party/catapult/tracing/third_party/oboe + third_party/catapult/tracing/third_party/pako + third_party/ced + third_party/cld_3 + third_party/closure_compiler + third_party/crashpad + third_party/crashpad/crashpad/third_party/zlib + third_party/crc32c + third_party/cros_system_api + third_party/dav1d + third_party/dawn + third_party/devscripts + third_party/dom_distiller_js + third_party/emoji-segmenter + third_party/flatbuffers + third_party/flot + third_party/freetype + third_party/glslang + third_party/google_input_tools + third_party/google_input_tools/third_party/closure_library + third_party/google_input_tools/third_party/closure_library/third_party/closure + third_party/googletest + third_party/hunspell + third_party/iccjpeg + third_party/inspector_protocol + third_party/jinja2 + third_party/jsoncpp + third_party/jstemplate + third_party/khronos + third_party/leveldatabase + third_party/libXNVCtrl + third_party/libaddressinput + third_party/libaom + third_party/libaom/source/libaom/third_party/vector + third_party/libaom/source/libaom/third_party/x86inc + third_party/libjingle + third_party/libphonenumber + third_party/libsecret + third_party/libsrtp + third_party/libsync + third_party/libudev + third_party/libwebm + third_party/libxml/chromium + third_party/libyuv + third_party/llvm + third_party/lss + third_party/lzma_sdk + third_party/markupsafe + third_party/mesa + third_party/metrics_proto + third_party/modp_b64 + third_party/nasm + third_party/node + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 + third_party/openscreen + third_party/ots + third_party/pdfium + third_party/pdfium/third_party/agg23 + third_party/pdfium/third_party/base + third_party/pdfium/third_party/bigint + third_party/pdfium/third_party/freetype + third_party/pdfium/third_party/lcms + third_party/pdfium/third_party/libopenjpeg20 + third_party/pdfium/third_party/libpng16 + third_party/pdfium/third_party/libtiff + third_party/pdfium/third_party/skia_shared + third_party/perfetto + third_party/pffft + third_party/ply + third_party/polymer + third_party/protobuf + third_party/protobuf/third_party/six + third_party/pyjson5 + third_party/qcms + third_party/rnnoise + third_party/s2cellid + third_party/sfntly + third_party/simplejson + third_party/skia + third_party/skia/include/third_party/skcms + third_party/skia/include/third_party/vulkan + third_party/skia/third_party/gif + third_party/skia/third_party/skcms + third_party/skia/third_party/vulkan + third_party/smhasher + third_party/spirv-headers + third_party/SPIRV-Tools + third_party/sqlite + third_party/swiftshader + third_party/swiftshader/third_party/llvm-7.0 + third_party/swiftshader/third_party/llvm-subzero + third_party/swiftshader/third_party/subzero + third_party/unrar + third_party/usrsctp + third_party/vulkan + third_party/web-animations-js + third_party/webdriver + third_party/webrtc + third_party/webrtc/common_audio/third_party/fft4g + third_party/webrtc/common_audio/third_party/spl_sqrt_floor + third_party/webrtc/modules/third_party/fft + third_party/webrtc/modules/third_party/g711 + third_party/webrtc/modules/third_party/g722 + third_party/webrtc/rtc_base/third_party/base64 + third_party/webrtc/rtc_base/third_party/sigslot + third_party/widevine + third_party/woff2 + third_party/zlib/google + url/third_party/mozilla + v8/src/third_party/siphash + v8/src/third_party/valgrind + v8/src/third_party/utf8-decoder + v8/third_party/inspector_protocol + v8/third_party/v8 + + # gyp -> gn leftovers + base/third_party/libevent + third_party/adobe + third_party/speech-dispatcher + third_party/usb_ids + third_party/xdg-utils + third_party/yasm/run_yasm.py + ) + if ! use system-ffmpeg; then + keeplibs+=( third_party/ffmpeg third_party/opus ) + fi + if ! use system-icu; then + keeplibs+=( third_party/icu ) + fi + if ! use system-libvpx; then + keeplibs+=( third_party/libvpx ) + keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc ) + fi + if use tcmalloc; then + keeplibs+=( third_party/tcmalloc ) + fi + + # Remove most bundled libraries. Some are still needed. + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die +} + +src_configure() { + # Calling this here supports resumption via FEATURES=keepwork + python_setup + + local myconf_gn="" + + # Make sure the build system will use the right tools, bug #340795. + tc-export AR CC CXX NM + + if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then + # Force clang since gcc is pretty broken at the moment. + CC=${CHOST}-clang + CXX=${CHOST}-clang++ + strip-unsupported-flags + fi + + if tc-is-clang; then + myconf_gn+=" is_clang=true clang_use_chrome_plugins=false" + else + myconf_gn+=" is_clang=false" + fi + + # Define a custom toolchain for GN + myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" + + if tc-is-cross-compiler; then + tc-export BUILD_{AR,CC,CXX,NM} + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\"" + myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\"" + else + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" + fi + + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. + myconf_gn+=" is_debug=false" + + # Component build isn't generally intended for use by end users. It's mostly useful + # for development and debugging. + myconf_gn+=" is_component_build=$(usex component-build true false)" + + # https://chromium.googlesource.com/chromium/src/+/lkcr/docs/jumbo.md + myconf_gn+=" use_jumbo_build=$(usex jumbo-build true false)" + + myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")" + + # Disable nacl, we can't build without pnacl (http://crbug.com/269560). + myconf_gn+=" enable_nacl=false" + + # Use system-provided libraries. + # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733). + # TODO: use_system_hunspell (upstream changes needed). + # TODO: use_system_libsrtp (bug #459932). + # TODO: use_system_protobuf (bug #525560). + # TODO: use_system_ssl (http://crbug.com/58087). + # TODO: use_system_sqlite (http://crbug.com/22208). + + # libevent: https://bugs.gentoo.org/593458 + local gn_system_libraries=( + flac + fontconfig + freetype + # Need harfbuzz_from_pkgconfig target + #harfbuzz-ng + libdrm + libjpeg + libpng + libwebp + libxml + libxslt + openh264 + re2 + snappy + yasm + zlib + ) + if use system-ffmpeg; then + gn_system_libraries+=( ffmpeg opus ) + fi + if use system-icu; then + gn_system_libraries+=( icu ) + fi + if use system-libvpx; then + gn_system_libraries+=( libvpx ) + fi + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die + + # See dependency logic in third_party/BUILD.gn + myconf_gn+=" use_system_harfbuzz=true" + + # Optional dependencies. + myconf_gn+=" closure_compile=$(usex closure-compile true false)" + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)" + myconf_gn+=" enable_widevine=$(usex widevine true false)" + myconf_gn+=" use_cups=$(usex cups true false)" + myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)" + myconf_gn+=" use_kerberos=$(usex kerberos true false)" + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" + + # TODO: link_pulseaudio=true for GN. + + myconf_gn+=" fieldtrial_testing_like_official_build=true" + + # Never use bundled gold binary. Disable gold linker flags for now. + # Do not use bundled clang. + # Trying to use gold results in linker crash. + myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false use_custom_libcxx=false" + + # Disable forced lld, bug 641556 + myconf_gn+=" use_lld=false" + + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" + myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\"" + + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . + # Note: these are for Gentoo use ONLY. For your own distribution, + # please get your own set of keys. Feel free to contact chromium@gentoo.org + # for more info. + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" + local google_default_client_id="329227923882.apps.googleusercontent.com" + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" + myconf_gn+=" google_api_key=\"${google_api_key}\"" + myconf_gn+=" google_default_client_id=\"${google_default_client_id}\"" + myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\"" + + local myarch="$(tc-arch)" + + # Avoid CFLAGS problems, bug #352457, bug #390147. + if ! use custom-cflags; then + replace-flags "-Os" "-O2" + strip-flags + + # Prevent linker from running out of address space, bug #471810 . + if use x86; then + filter-flags "-g*" + fi + + # Prevent libvpx build failures. Bug 530248, 544702, 546984. + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 + fi + fi + + if [[ $myarch = amd64 ]] ; then + myconf_gn+=" target_cpu=\"x64\"" + ffmpeg_target_arch=x64 + elif [[ $myarch = x86 ]] ; then + myconf_gn+=" target_cpu=\"x86\"" + ffmpeg_target_arch=ia32 + + # This is normally defined by compiler_cpu_abi in + # build/config/compiler/BUILD.gn, but we patch that part out. + append-flags -msse2 -mfpmath=sse -mmmx + elif [[ $myarch = arm64 ]] ; then + myconf_gn+=" target_cpu=\"arm64\"" + ffmpeg_target_arch=arm64 + elif [[ $myarch = arm ]] ; then + myconf_gn+=" target_cpu=\"arm\"" + ffmpeg_target_arch=$(usex neon arm-neon arm) + else + die "Failed to determine target arch, got '$myarch'." + fi + + # Make sure that -Werror doesn't get added to CFLAGS by the build system. + # Depending on GCC version the warnings are different and we don't want + # the build to fail because of that. + myconf_gn+=" treat_warnings_as_errors=false" + + # Disable fatal linker warnings, bug 506268. + myconf_gn+=" fatal_linker_warnings=false" + + # Bug 491582. + export TMPDIR="${WORKDIR}/temp" + mkdir -p -m 755 "${TMPDIR}" || die + + # https://bugs.gentoo.org/654216 + addpredict /dev/dri/ #nowarn + + #if ! use system-ffmpeg; then + if false; then + local build_ffmpeg_args="" + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then + build_ffmpeg_args+=" --disable-asm" + fi + + # Re-configure bundled ffmpeg. See bug #491378 for example reasons. + einfo "Configuring bundled ffmpeg..." + pushd third_party/ffmpeg > /dev/null || die + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die + chromium/scripts/copy_config.sh || die + chromium/scripts/generate_gn.py || die + popd > /dev/null || die + fi + + einfo "Configuring Chromium..." + set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release + echo "$@" + "$@" || die +} + +src_compile() { + # Final link uses lots of file descriptors. + ulimit -n 2048 + + # Calling this here supports resumption via FEATURES=keepwork + python_setup + + #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die + + # Build mksnapshot and pax-mark it. + local x + for x in mksnapshot v8_context_snapshot_generator; do + if tc-is-cross-compiler; then + eninja -C out/Release "host/${x}" + pax-mark m "out/Release/host/${x}" + else + eninja -C out/Release "${x}" + pax-mark m "out/Release/${x}" + fi + done + + # Even though ninja autodetects number of CPUs, we respect + # user's options, for debugging with -j 1 or any other reason. + eninja -C out/Release chrome chromedriver + use suid && eninja -C out/Release chrome_sandbox + + pax-mark m out/Release/chrome +} + +src_install() { + local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser" + exeinto "${CHROMIUM_HOME}" + doexe out/Release/chrome + + if use suid; then + newexe out/Release/chrome_sandbox chrome-sandbox + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" + fi + + doexe out/Release/chromedriver + + local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" ) + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die + doexe chromium-launcher.sh + + # It is important that we name the target "chromium-browser", + # xdg-utils expect it; bug #355517. + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser + # keep the old symlink around for consistency + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium + + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver + + # Allow users to override command-line options, bug #357629. + insinto /etc/chromium + newins "${FILESDIR}/chromium.default" "default" + + pushd out/Release/locales > /dev/null || die + chromium_remove_language_paks + popd + + insinto "${CHROMIUM_HOME}" + doins out/Release/*.bin + doins out/Release/*.pak + doins out/Release/*.so + + if ! use system-icu; then + doins out/Release/icudtl.dat + fi + + doins -r out/Release/locales + doins -r out/Release/resources + + if [[ -d out/Release/swiftshader ]]; then + insinto "${CHROMIUM_HOME}/swiftshader" + doins out/Release/swiftshader/*.so + fi + + # Install icons and desktop entry. + local branding size + for size in 16 22 24 32 48 64 128 256 ; do + case ${size} in + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; + *) branding="chrome/app/theme/chromium" ;; + esac + newicon -s ${size} "${branding}/product_logo_${size}.png" \ + chromium-browser.png + done + + local mime_types="text/html;text/xml;application/xhtml+xml;" + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 + mime_types+="x-scheme-handler/ftp;" # bug #412185 + mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393 + make_desktop_entry \ + chromium-browser \ + "Chromium" \ + chromium-browser \ + "Network;WebBrowser" \ + "MimeType=${mime_types}\nStartupWMClass=chromium-browser" + sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die + + # Install GNOME default application entry (bug #303100). + insinto /usr/share/gnome-control-center/default-apps + newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml + + readme.gentoo_create_doc +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_desktop_database_update +} + +pkg_postinst() { + xdg_icon_cache_update + xdg_desktop_database_update + readme.gentoo_print_elog +} diff --git a/www-client/chromium/files/chromium-76-gcc-ambiguous-nodestructor.patch b/www-client/chromium/files/chromium-76-gcc-ambiguous-nodestructor.patch new file mode 100644 index 000000000000..587abf31bb7c --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-ambiguous-nodestructor.patch @@ -0,0 +1,39 @@ +From 52b5ceac95b67491b1c71f0ef9a32b778bbbaa2e Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Wed, 05 Jun 2019 19:46:55 +0000 +Subject: [PATCH] GCC: avoid ambiguous NoDestructor creation in GetNeverSniffedMimeTypes. + +Use brace-list notation to wrap the already existing brace-list for +initializing the flat-set. This resolves an ambiguous instantiation +in GCC. + +Bug: 819294 +Change-Id: I89ddf12522d62a5140a8c2c41dc98e30ec7a0e78 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645774 +Reviewed-by: Matt Menke <mmenke@chromium.org> +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Cr-Commit-Position: refs/heads/master@{#666401} +--- + +diff --git a/services/network/cross_origin_read_blocking.cc b/services/network/cross_origin_read_blocking.cc +index 30999c0..60a03f6 100644 +--- a/services/network/cross_origin_read_blocking.cc ++++ b/services/network/cross_origin_read_blocking.cc +@@ -211,7 +211,7 @@ + // confirmation sniffing because images, scripts, etc. are frequently + // mislabelled by http servers as HTML/JSON/XML). + base::flat_set<std::string>& GetNeverSniffedMimeTypes() { +- static base::NoDestructor<base::flat_set<std::string>> s_types({ ++ static base::NoDestructor<base::flat_set<std::string>> s_types{{ + // The list below has been populated based on most commonly used content + // types according to HTTP Archive - see: + // https://github.com/whatwg/fetch/issues/860#issuecomment-457330454 +@@ -224,7 +224,7 @@ + "application/x-www-form-urlencoded", + "application/zip", + "text/event-stream", +- }); ++ }}; + + // All items need to be lower-case, to support case-insensitive comparisons + // later. diff --git a/www-client/chromium/files/chromium-76-gcc-blink-constexpr.patch b/www-client/chromium/files/chromium-76-gcc-blink-constexpr.patch new file mode 100644 index 000000000000..26bba05aa92e --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-blink-constexpr.patch @@ -0,0 +1,32 @@ +From cf6d6b40d711fce93a24a2cf517fa3becdbae8bb Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Wed, 05 Jun 2019 17:18:40 +0000 +Subject: [PATCH] Make blink::LayoutUnit::HasFraction constexpr + +Other HasFraction methods as in PhysicalUnit are declared already +constexpr and using it. It breaks GCC build. + +Bug: 819294. +Change-Id: I0c4bd9bd206d45cf31f7fa815ce8533718a425cb +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645222 +Reviewed-by: vmpstr <vmpstr@chromium.org> +Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Cr-Commit-Position: refs/heads/master@{#666336} +--- + +diff --git a/third_party/blink/renderer/platform/geometry/layout_unit.h b/third_party/blink/renderer/platform/geometry/layout_unit.h +index f073986..b6dbc76 100644 +--- a/third_party/blink/renderer/platform/geometry/layout_unit.h ++++ b/third_party/blink/renderer/platform/geometry/layout_unit.h +@@ -202,7 +202,9 @@ + return value_ > 0 ? LayoutUnit() : *this; + } + +- bool HasFraction() const { return RawValue() % kFixedPointDenominator; } ++ constexpr bool HasFraction() const { ++ return RawValue() % kFixedPointDenominator; ++ } + + LayoutUnit Fraction() const { + // Compute fraction using the mod operator to preserve the sign of the value diff --git a/www-client/chromium/files/chromium-76-gcc-blink-namespace1.patch b/www-client/chromium/files/chromium-76-gcc-blink-namespace1.patch new file mode 100644 index 000000000000..bae3edec89d3 --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-blink-namespace1.patch @@ -0,0 +1,91 @@ +From c6afbd59c997c2b64f11abdd1eaef71ae8ea2ddc Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Fri, 07 Jun 2019 18:11:15 +0000 +Subject: [PATCH] GCC: FeaturePolicyParser ParseValueForFuzzer is not in anonymous namespace + +Compilation fails because we are declaring ParseValueForFuzzer as friend method, +but we are declaring it is in anonymous namespace. Moving to global namespace +still fails (in this case in Clang). + +So final solution is making it a public static method of FeaturePolicyParser. + +Bug: 819294 +Change-Id: Iea307cb6faef675b748d6eb5da2175dcbb17fdc7 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645223 +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Reviewed-by: Luna Lu <loonybear@chromium.org> +Cr-Commit-Position: refs/heads/master@{#667228} +--- + +diff --git a/third_party/blink/renderer/core/feature_policy/feature_policy_parser.cc b/third_party/blink/renderer/core/feature_policy/feature_policy_parser.cc +index f1c9594..bae91a1 100644 +--- a/third_party/blink/renderer/core/feature_policy/feature_policy_parser.cc ++++ b/third_party/blink/renderer/core/feature_policy/feature_policy_parser.cc +@@ -323,6 +323,13 @@ + return value; + } + ++void FeaturePolicyParser::ParseValueForFuzzer( ++ blink::mojom::PolicyValueType feature_type, ++ const WTF::String& value_string) { ++ bool ok; ++ ParseValueForType(feature_type, value_string, &ok); ++} ++ + bool IsFeatureDeclared(mojom::FeaturePolicyFeature feature, + const ParsedFeaturePolicy& policy) { + return std::any_of(policy.begin(), policy.end(), +diff --git a/third_party/blink/renderer/core/feature_policy/feature_policy_parser.h b/third_party/blink/renderer/core/feature_policy/feature_policy_parser.h +index fd25d90..8aa7323 100644 +--- a/third_party/blink/renderer/core/feature_policy/feature_policy_parser.h ++++ b/third_party/blink/renderer/core/feature_policy/feature_policy_parser.h +@@ -16,9 +16,6 @@ + #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" + #include "third_party/blink/renderer/platform/wtf/vector.h" + +-// Forward declare for friendship. +-void ParseValueForFuzzer(blink::mojom::PolicyValueType, const WTF::String&); +- + namespace blink { + + class Document; +@@ -79,8 +76,10 @@ + const FeatureNameMap& feature_names, + ExecutionContext* execution_context = nullptr); + ++ // Used for LLVM fuzzer test ++ static void ParseValueForFuzzer(mojom::PolicyValueType, const String&); ++ + private: +- friend void ::ParseValueForFuzzer(mojom::PolicyValueType, const String&); + static PolicyValue GetFallbackValueForFeature( + mojom::FeaturePolicyFeature feature); + static PolicyValue ParseValueForType(mojom::PolicyValueType feature_type, +diff --git a/third_party/blink/renderer/core/feature_policy/feature_policy_value_fuzzer.cc b/third_party/blink/renderer/core/feature_policy/feature_policy_value_fuzzer.cc +index 7f8e6aa..1455636 100644 +--- a/third_party/blink/renderer/core/feature_policy/feature_policy_value_fuzzer.cc ++++ b/third_party/blink/renderer/core/feature_policy/feature_policy_value_fuzzer.cc +@@ -13,19 +13,12 @@ + #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" + #include "third_party/blink/renderer/platform/wtf/vector.h" + +-void ParseValueForFuzzer(blink::mojom::PolicyValueType feature_type, +- const WTF::String& value_string) { +- bool ok; +- blink::FeaturePolicyParser::ParseValueForType(feature_type, value_string, +- &ok); +-} +- + extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + static blink::BlinkFuzzerTestSupport test_support = + blink::BlinkFuzzerTestSupport(); +- ParseValueForFuzzer(blink::mojom::PolicyValueType::kBool, +- WTF::String(data, size)); +- ParseValueForFuzzer(blink::mojom::PolicyValueType::kDecDouble, +- WTF::String(data, size)); ++ blink::FeaturePolicyParser::ParseValueForFuzzer( ++ blink::mojom::PolicyValueType::kBool, WTF::String(data, size)); ++ blink::FeaturePolicyParser::ParseValueForFuzzer( ++ blink::mojom::PolicyValueType::kDecDouble, WTF::String(data, size)); + return 0; + } diff --git a/www-client/chromium/files/chromium-76-gcc-blink-namespace2.patch b/www-client/chromium/files/chromium-76-gcc-blink-namespace2.patch new file mode 100644 index 000000000000..1d4b90febf64 --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-blink-namespace2.patch @@ -0,0 +1,97 @@ +From dcb55fb8f18abe5f43d260aa67b14b2dc996f992 Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Tue, 11 Jun 2019 08:00:13 +0000 +Subject: [PATCH] GCC: move explicit specialization out of RunInfo + +Explicit specialization in non-namespace scope is not allowed in C++, and GCC breaks +build because of that. Move the template specializations out of RunInfo declaration +in shape_result_inline_headeres.h to fix the GCC build issue. + +Bug: 819294 +Change-Id: Id083852bcf8e9efbdc911fdad28fd8767d2905d0 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1651728 +Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Cr-Commit-Position: refs/heads/master@{#667901} +--- + +diff --git a/third_party/blink/renderer/platform/fonts/shaping/shape_result_inline_headers.h b/third_party/blink/renderer/platform/fonts/shaping/shape_result_inline_headers.h +index 76ee6091..c14d3a0 100644 +--- a/third_party/blink/renderer/platform/fonts/shaping/shape_result_inline_headers.h ++++ b/third_party/blink/renderer/platform/fonts/shaping/shape_result_inline_headers.h +@@ -251,37 +251,6 @@ + template <bool has_non_zero_glyph_offsets> + struct iterator final {}; + +- // For non-zero glyph offset array +- template <> +- struct iterator<true> final { +- // The constructor for ShapeResult +- explicit iterator(const GlyphOffsetArray& array) +- : pointer(array.storage_.get()) { +- DCHECK(pointer); +- } +- +- // The constructor for ShapeResultView +- explicit iterator(const GlyphDataRange& range) : pointer(range.offsets) { +- DCHECK(pointer); +- } +- +- GlyphOffset operator*() const { return *pointer; } +- void operator++() { ++pointer; } +- +- const GlyphOffset* pointer; +- }; +- +- // For zero glyph offset array +- template <> +- struct iterator<false> final { +- explicit iterator(const GlyphOffsetArray& array) { +- DCHECK(!array.HasStorage()); +- } +- explicit iterator(const GlyphDataRange& range) { DCHECK(!range.offsets); } +- GlyphOffset operator*() const { return GlyphOffset(); } +- void operator++() {} +- }; +- + template <bool has_non_zero_glyph_offsets> + iterator<has_non_zero_glyph_offsets> GetIterator() const { + return iterator<has_non_zero_glyph_offsets>(*this); +@@ -495,6 +464,37 @@ + float width_; + }; + ++// For non-zero glyph offset array ++template <> ++struct ShapeResult::RunInfo::GlyphOffsetArray::iterator<true> final { ++ // The constructor for ShapeResult ++ explicit iterator(const GlyphOffsetArray& array) ++ : pointer(array.storage_.get()) { ++ DCHECK(pointer); ++ } ++ ++ // The constructor for ShapeResultView ++ explicit iterator(const GlyphDataRange& range) : pointer(range.offsets) { ++ DCHECK(pointer); ++ } ++ ++ GlyphOffset operator*() const { return *pointer; } ++ void operator++() { ++pointer; } ++ ++ const GlyphOffset* pointer; ++}; ++ ++// For zero glyph offset array ++template <> ++struct ShapeResult::RunInfo::GlyphOffsetArray::iterator<false> final { ++ explicit iterator(const GlyphOffsetArray& array) { ++ DCHECK(!array.HasStorage()); ++ } ++ explicit iterator(const GlyphDataRange& range) { DCHECK(!range.offsets); } ++ GlyphOffset operator*() const { return GlyphOffset(); } ++ void operator++() {} ++}; ++ + // Find the range of HarfBuzzRunGlyphData for the specified character index + // range. This function uses binary search twice, hence O(2 log n). + inline ShapeResult::RunInfo::GlyphDataRange diff --git a/www-client/chromium/files/chromium-76-gcc-gl-init.patch b/www-client/chromium/files/chromium-76-gcc-gl-init.patch new file mode 100644 index 000000000000..3bf394f92d9b --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-gl-init.patch @@ -0,0 +1,33 @@ +From 7dc76c8d9f4cfbce7cf11424120aa6f6094916dc Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Wed, 05 Jun 2019 21:09:01 +0000 +Subject: [PATCH] GCC: XSetWindowAttributes struct initialization should keep order of declaration + +XSetWindowAttributes initialization of attributes in GLSurfaceGLX is not in the +same order of the declaration. GCC fails because of that. + +Bug: 819294 +Change-Id: I8a97da980d5961a35a47ae4d0d8d558b85291f1f +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1646253 +Reviewed-by: Zhenyao Mo <zmo@chromium.org> +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Cr-Commit-Position: refs/heads/master@{#666436} +--- + +diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc +index f649dd4..0aa6892 100644 +--- a/ui/gl/gl_surface_glx.cc ++++ b/ui/gl/gl_surface_glx.cc +@@ -583,10 +583,10 @@ + + XSetWindowAttributes swa = { + .background_pixmap = 0, +- .bit_gravity = NorthWestGravity, +- .colormap = g_colormap, + .background_pixel = 0, // ARGB(0,0,0,0) for compositing WM + .border_pixel = 0, ++ .bit_gravity = NorthWestGravity, ++ .colormap = g_colormap, + }; + auto value_mask = CWBackPixmap | CWBitGravity | CWColormap | CWBorderPixel; + if (ui::IsCompositingManagerPresent() && diff --git a/www-client/chromium/files/chromium-76-gcc-include.patch b/www-client/chromium/files/chromium-76-gcc-include.patch new file mode 100644 index 000000000000..adc7f3ab3ac1 --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-include.patch @@ -0,0 +1,10 @@ +--- a/chrome/browser/themes/theme_service.h 2019-06-13 18:56:30.000000000 -0000 ++++ b/chrome/browser/themes/theme_service.h 2019-06-17 08:50:57.714289399 -0000 +@@ -26,6 +26,7 @@ + #include "extensions/common/extension_id.h" + #include "ui/base/theme_provider.h" + #include "ui/native_theme/native_theme_observer.h" ++#include "ui/native_theme/native_theme.h" + + class BrowserThemePack; + class CustomThemeSupplier; diff --git a/www-client/chromium/files/chromium-76-gcc-noexcept.patch b/www-client/chromium/files/chromium-76-gcc-noexcept.patch new file mode 100644 index 000000000000..2a7f4b35a726 --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-noexcept.patch @@ -0,0 +1,347 @@ +From 84c91abab33966f928497c24db4a39f436d2dca8 Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Fri, 07 Jun 2019 09:50:11 +0000 +Subject: [PATCH] Make SharedMemoryMapping move constructor noexcept + +As LayerTreeHostImpl::UIResourceData move constructor is declared +noexcept with default implementation, the move constructor of its +members should also be noexcept. GCC will fail to build otherwise +for mismatching noexcept declaration. + +We also set the move assignment operator. + +Bug: 819294 +Change-Id: Icd663da83b882e15f7d16780c9241972e09bc492 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645297 +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Reviewed-by: Daniel Cheng <dcheng@chromium.org> +Cr-Commit-Position: refs/heads/master@{#667064} +--- + +diff --git a/base/memory/shared_memory_mapping.cc b/base/memory/shared_memory_mapping.cc +index 2be2570..8426fa8 100644 +--- a/base/memory/shared_memory_mapping.cc ++++ b/base/memory/shared_memory_mapping.cc +@@ -33,7 +33,7 @@ + + SharedMemoryMapping::SharedMemoryMapping() = default; + +-SharedMemoryMapping::SharedMemoryMapping(SharedMemoryMapping&& mapping) ++SharedMemoryMapping::SharedMemoryMapping(SharedMemoryMapping&& mapping) noexcept + : memory_(mapping.memory_), + size_(mapping.size_), + mapped_size_(mapping.mapped_size_), +@@ -42,7 +42,7 @@ + } + + SharedMemoryMapping& SharedMemoryMapping::operator=( +- SharedMemoryMapping&& mapping) { ++ SharedMemoryMapping&& mapping) noexcept { + Unmap(); + memory_ = mapping.memory_; + size_ = mapping.size_; +@@ -90,9 +90,9 @@ + + ReadOnlySharedMemoryMapping::ReadOnlySharedMemoryMapping() = default; + ReadOnlySharedMemoryMapping::ReadOnlySharedMemoryMapping( +- ReadOnlySharedMemoryMapping&&) = default; ++ ReadOnlySharedMemoryMapping&&) noexcept = default; + ReadOnlySharedMemoryMapping& ReadOnlySharedMemoryMapping::operator=( +- ReadOnlySharedMemoryMapping&&) = default; ++ ReadOnlySharedMemoryMapping&&) noexcept = default; + ReadOnlySharedMemoryMapping::ReadOnlySharedMemoryMapping( + void* address, + size_t size, +@@ -102,9 +102,9 @@ + + WritableSharedMemoryMapping::WritableSharedMemoryMapping() = default; + WritableSharedMemoryMapping::WritableSharedMemoryMapping( +- WritableSharedMemoryMapping&&) = default; ++ WritableSharedMemoryMapping&&) noexcept = default; + WritableSharedMemoryMapping& WritableSharedMemoryMapping::operator=( +- WritableSharedMemoryMapping&&) = default; ++ WritableSharedMemoryMapping&&) noexcept = default; + WritableSharedMemoryMapping::WritableSharedMemoryMapping( + void* address, + size_t size, +diff --git a/base/memory/shared_memory_mapping.h b/base/memory/shared_memory_mapping.h +index d9569af..2b8858e 100644 +--- a/base/memory/shared_memory_mapping.h ++++ b/base/memory/shared_memory_mapping.h +@@ -32,8 +32,8 @@ + SharedMemoryMapping(); + + // Move operations are allowed. +- SharedMemoryMapping(SharedMemoryMapping&& mapping); +- SharedMemoryMapping& operator=(SharedMemoryMapping&& mapping); ++ SharedMemoryMapping(SharedMemoryMapping&& mapping) noexcept; ++ SharedMemoryMapping& operator=(SharedMemoryMapping&& mapping) noexcept; + + // Unmaps the region if the mapping is valid. + virtual ~SharedMemoryMapping(); +@@ -93,8 +93,9 @@ + ReadOnlySharedMemoryMapping(); + + // Move operations are allowed. +- ReadOnlySharedMemoryMapping(ReadOnlySharedMemoryMapping&&); +- ReadOnlySharedMemoryMapping& operator=(ReadOnlySharedMemoryMapping&&); ++ ReadOnlySharedMemoryMapping(ReadOnlySharedMemoryMapping&&) noexcept; ++ ReadOnlySharedMemoryMapping& operator=( ++ ReadOnlySharedMemoryMapping&&) noexcept; + + // Returns the base address of the mapping. This is read-only memory. This is + // page-aligned. This is nullptr for invalid instances. +@@ -171,8 +172,9 @@ + WritableSharedMemoryMapping(); + + // Move operations are allowed. +- WritableSharedMemoryMapping(WritableSharedMemoryMapping&&); +- WritableSharedMemoryMapping& operator=(WritableSharedMemoryMapping&&); ++ WritableSharedMemoryMapping(WritableSharedMemoryMapping&&) noexcept; ++ WritableSharedMemoryMapping& operator=( ++ WritableSharedMemoryMapping&&) noexcept; + + // Returns the base address of the mapping. This is writable memory. This is + // page-aligned. This is nullptr for invalid instances. + +From bdc24128b75008743d819e298557a53205706e7c Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Sun, 09 Jun 2019 11:22:25 +0000 +Subject: [PATCH] GCC: fix noexcept from move constructor and assign operators of AccountInfo + +AccountInfo declares them as noexcept and uses default implementation, +so all its members (including AccountId) should be noexcept. But AccountId +is not noexcept. To fix it we just need to make CoreAccountId move +operator/assign operator noexcept. + +Bug: 819294 +Change-Id: Ice38654ab7cf3b9eaa6f54aa36e1fec329264f98 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645296 +Reviewed-by: Roger Tawa <rogerta@chromium.org> +Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Cr-Commit-Position: refs/heads/master@{#667484} +--- + +diff --git a/google_apis/gaia/core_account_id.cc b/google_apis/gaia/core_account_id.cc +index d808082..12eefe3 100644 +--- a/google_apis/gaia/core_account_id.cc ++++ b/google_apis/gaia/core_account_id.cc +@@ -6,8 +6,16 @@ + + CoreAccountId::CoreAccountId() = default; + ++CoreAccountId::CoreAccountId(const CoreAccountId&) = default; ++ ++CoreAccountId::CoreAccountId(CoreAccountId&&) noexcept = default; ++ + CoreAccountId::~CoreAccountId() = default; + ++CoreAccountId& CoreAccountId::operator=(const CoreAccountId&) = default; ++ ++CoreAccountId& CoreAccountId::operator=(CoreAccountId&&) noexcept = default; ++ + CoreAccountId::CoreAccountId(const char* id) : id(id) {} + + CoreAccountId::CoreAccountId(std::string&& id) : id(std::move(id)) {} +diff --git a/google_apis/gaia/core_account_id.h b/google_apis/gaia/core_account_id.h +index 5ea602a..c2d1911 100644 +--- a/google_apis/gaia/core_account_id.h ++++ b/google_apis/gaia/core_account_id.h +@@ -14,8 +14,13 @@ + // for design and tracking). + struct CoreAccountId { + CoreAccountId(); ++ CoreAccountId(const CoreAccountId&); ++ CoreAccountId(CoreAccountId&&) noexcept; + ~CoreAccountId(); + ++ CoreAccountId& operator=(const CoreAccountId&); ++ CoreAccountId& operator=(CoreAccountId&&) noexcept; ++ + // Those implicit constructor and conversion operator allow to + // progressively migrate the code to use this struct. Removing + // them is tracked by https://crbug.com/959161 + +From 9aae68736bc7eb7172d0d0c978ecb6d1f75c7b30 Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Tue, 11 Jun 2019 10:27:19 +0200 +Subject: [PATCH] GCC: add noexcept move assignment in history::URLRow + +In GCC, build is failing because history::QueryURLResult declares its move +assignment operator as noexcept using default implementation. That requires +its members to provide a move assignment operator that is noexcept too. + +But URLRow was missing noexcept declaration in move assignment operator (even +though it was providing noexcept to its move constructor). + +Bug: 819294 +Change-Id: I726e3cf7a4a50c9206a5d0fba8a561d363483d4f +--- + +diff --git a/components/history/core/browser/url_row.cc b/components/history/core/browser/url_row.cc +index 44c22fd..aec0101 100644 +--- a/components/history/core/browser/url_row.cc ++++ b/components/history/core/browser/url_row.cc +@@ -26,7 +26,7 @@ + } + + URLRow& URLRow::operator=(const URLRow& other) = default; +-URLRow& URLRow::operator=(URLRow&& other) = default; ++URLRow& URLRow::operator=(URLRow&& other) noexcept = default; + + void URLRow::Swap(URLRow* other) { + std::swap(id_, other->id_); +diff --git a/components/history/core/browser/url_row.h b/components/history/core/browser/url_row.h +index 8f6f9cf..31a1ef8 100644 +--- a/components/history/core/browser/url_row.h ++++ b/components/history/core/browser/url_row.h +@@ -35,7 +35,7 @@ + + virtual ~URLRow(); + URLRow& operator=(const URLRow& other); +- URLRow& operator=(URLRow&& other); ++ URLRow& operator=(URLRow&& other) noexcept; + + URLID id() const { return id_; } + + +From 41d954dec0669c9a85730c0bde7df7ba7a0ff43e Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Thu, 06 Jun 2019 15:30:49 +0000 +Subject: [PATCH] Fix AutocompleteMatch move constructor/assign operator noexcept + +For AutocompleteMatch to declare noexcept them, all the contained +properties need to be noexcept too. This is required at least +for SuggestionAnswer, because base::string16 will make default +calculated signature of the move operator noexcept(false). + +To avoid this issue we explicitely declare them on SuggestionAnswer, +and its member classes TextField and ImageLine. + +Bug: 819294 +Change-Id: I8714f2c6352a3292bdebdc3aed9790270e49c580 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1554669 +Reviewed-by: Kevin Bailey <krb@chromium.org> +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Cr-Commit-Position: refs/heads/master@{#666714} +--- + +diff --git a/components/omnibox/browser/suggestion_answer.cc b/components/omnibox/browser/suggestion_answer.cc +index 151e55f..a0c9049 100644 +--- a/components/omnibox/browser/suggestion_answer.cc ++++ b/components/omnibox/browser/suggestion_answer.cc +@@ -55,6 +55,12 @@ + + SuggestionAnswer::TextField::TextField() = default; + SuggestionAnswer::TextField::~TextField() = default; ++SuggestionAnswer::TextField::TextField(const TextField&) = default; ++SuggestionAnswer::TextField::TextField(TextField&&) noexcept = default; ++SuggestionAnswer::TextField& SuggestionAnswer::TextField::operator=( ++ const TextField&) = default; ++SuggestionAnswer::TextField& SuggestionAnswer::TextField::operator=( ++ TextField&&) noexcept = default; + + // static + bool SuggestionAnswer::TextField::ParseTextField(const base::Value& field_json, +@@ -93,9 +99,12 @@ + SuggestionAnswer::ImageLine::ImageLine() + : num_text_lines_(1) {} + SuggestionAnswer::ImageLine::ImageLine(const ImageLine& line) = default; ++SuggestionAnswer::ImageLine::ImageLine(ImageLine&&) noexcept = default; + + SuggestionAnswer::ImageLine& SuggestionAnswer::ImageLine::operator=( + const ImageLine& line) = default; ++SuggestionAnswer::ImageLine& SuggestionAnswer::ImageLine::operator=( ++ ImageLine&&) noexcept = default; + + SuggestionAnswer::ImageLine::~ImageLine() {} + +@@ -251,9 +260,14 @@ + + SuggestionAnswer::SuggestionAnswer(const SuggestionAnswer& answer) = default; + ++SuggestionAnswer::SuggestionAnswer(SuggestionAnswer&&) noexcept = default; ++ + SuggestionAnswer& SuggestionAnswer::operator=(const SuggestionAnswer& answer) = + default; + ++SuggestionAnswer& SuggestionAnswer::operator=(SuggestionAnswer&&) noexcept = ++ default; ++ + SuggestionAnswer::~SuggestionAnswer() = default; + + // static +diff --git a/components/omnibox/browser/suggestion_answer.h b/components/omnibox/browser/suggestion_answer.h +index 31be937..2840ace 100644 +--- a/components/omnibox/browser/suggestion_answer.h ++++ b/components/omnibox/browser/suggestion_answer.h +@@ -125,6 +125,10 @@ + public: + TextField(); + ~TextField(); ++ TextField(const TextField&); ++ TextField(TextField&&) noexcept; ++ TextField& operator=(const TextField&); ++ TextField& operator=(TextField&&) noexcept; + + // Parses |field_json| dictionary and populates |text_field| with the + // contents. If any of the required elements is missing, returns false and +@@ -162,7 +166,9 @@ + public: + ImageLine(); + explicit ImageLine(const ImageLine& line); ++ ImageLine(ImageLine&&) noexcept; + ImageLine& operator=(const ImageLine& line); ++ ImageLine& operator=(ImageLine&&) noexcept; + ~ImageLine(); + + // Parses dictionary |line_json| and populates |image_line| with the +@@ -213,7 +219,9 @@ + + SuggestionAnswer(); + SuggestionAnswer(const SuggestionAnswer& answer); ++ SuggestionAnswer(SuggestionAnswer&&) noexcept; + SuggestionAnswer& operator=(const SuggestionAnswer& answer); ++ SuggestionAnswer& operator=(SuggestionAnswer&&) noexcept; + ~SuggestionAnswer(); + + // Parses dictionary |answer_json| and fills a SuggestionAnswer containing the + +From 9f99af41cae3cfff3bcdcc856c1539801c9b745b Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Fri, 07 Jun 2019 18:59:59 +0000 +Subject: [PATCH] DisjoingRangeLockManager::Lock move constructor/assign operator cannot be noexcept + +They depend on LockRequest, that depends on WeakPtr, none of them noexcept. + +Bug: 819294 +Change-Id: I04ec15901ca627358df727540597f21f135c129b +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1646252 +Reviewed-by: Joshua Bell <jsbell@chromium.org> +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Cr-Commit-Position: refs/heads/master@{#667260} +--- + +diff --git a/content/browser/indexed_db/scopes/disjoint_range_lock_manager.cc b/content/browser/indexed_db/scopes/disjoint_range_lock_manager.cc +index 478a5c9..a18c6cd 100644 +--- a/content/browser/indexed_db/scopes/disjoint_range_lock_manager.cc ++++ b/content/browser/indexed_db/scopes/disjoint_range_lock_manager.cc +@@ -19,14 +19,13 @@ + : requested_type(type), + locks_holder(std::move(locks_holder)), + acquired_callback(std::move(acquired_callback)) {} +-DisjointRangeLockManager::LockRequest::LockRequest(LockRequest&&) noexcept = +- default; ++DisjointRangeLockManager::LockRequest::LockRequest(LockRequest&&) = default; + DisjointRangeLockManager::LockRequest::~LockRequest() = default; + DisjointRangeLockManager::Lock::Lock() = default; +-DisjointRangeLockManager::Lock::Lock(Lock&&) noexcept = default; ++DisjointRangeLockManager::Lock::Lock(Lock&&) = default; + DisjointRangeLockManager::Lock::~Lock() = default; + DisjointRangeLockManager::Lock& DisjointRangeLockManager::Lock::operator=( +- DisjointRangeLockManager::Lock&&) noexcept = default; ++ DisjointRangeLockManager::Lock&&) = default; + + DisjointRangeLockManager::DisjointRangeLockManager(int level_count) + : task_runner_(base::SequencedTaskRunnerHandle::Get()), diff --git a/www-client/chromium/files/chromium-76-gcc-private.patch b/www-client/chromium/files/chromium-76-gcc-private.patch new file mode 100644 index 000000000000..bc0ed980fd31 --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-private.patch @@ -0,0 +1,63 @@ +From 502e6e42633d2571c8236c8649b031fe9915eb5b Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Tue, 11 Jun 2019 16:56:27 +0000 +Subject: [PATCH] GCC: CertNetFetcherImpl declares Job as a friend but it is in the anonymous namespace + +GCC does not allow friendship declaration to anonymous namespace as done with Job +object in the CertNetFetcherImpl. This fix removes the friend declaration, and just +makes RemoveJob method public, that was the only reason to make Job a friend. + +Error was: +./../net/cert_net/cert_net_fetcher_impl.cc: In member function ‘void net::{anonymous}::Job::DetachRequest(net::CertNetFetcherImpl::RequestCore*)’: +../../net/cert_net/cert_net_fetcher_impl.cc:458:42: error: ‘std::unique_ptr<net::{anonymous}::Job> net::CertNetFetcherImpl::AsyncCertNetFetcherImpl::RemoveJob(net::{anonymous}::Job*)’ is private within this context + delete_this = parent_->RemoveJob(this); + ^ +../../net/cert_net/cert_net_fetcher_impl.cc:151:24: note: declared private here + std::unique_ptr<Job> RemoveJob(Job* job); + ^~~~~~~~~ +../../net/cert_net/cert_net_fetcher_impl.cc: In member function ‘void net::{anonymous}::Job::OnJobCompleted(net::Error)’: +../../net/cert_net/cert_net_fetcher_impl.cc:610:61: error: ‘std::unique_ptr<net::{anonymous}::Job> net::CertNetFetcherImpl::AsyncCertNetFetcherImpl::RemoveJob(net::{anonymous}::Job*)’ is private within this context + std::unique_ptr<Job> delete_this = parent_->RemoveJob(this); + ^ +../../net/cert_net/cert_net_fetcher_impl.cc:151:24: note: declared private here + std::unique_ptr<Job> RemoveJob(Job* job); + ^~~~~~~~~ + +Bug: 819294 +Change-Id: I3609f4558e570741395366de6a4cd40577d91450 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1651783 +Commit-Queue: Eric Roman <eroman@chromium.org> +Reviewed-by: Eric Roman <eroman@chromium.org> +Cr-Commit-Position: refs/heads/master@{#668015} +--- + +diff --git a/net/cert_net/cert_net_fetcher_impl.cc b/net/cert_net/cert_net_fetcher_impl.cc +index 11a1166..349c656 100644 +--- a/net/cert_net/cert_net_fetcher_impl.cc ++++ b/net/cert_net/cert_net_fetcher_impl.cc +@@ -135,21 +135,19 @@ + void Fetch(std::unique_ptr<RequestParams> request_params, + scoped_refptr<RequestCore> request); + ++ // Removes |job| from the in progress jobs and transfers ownership to the ++ // caller. ++ std::unique_ptr<Job> RemoveJob(Job* job); ++ + // Cancels outstanding jobs, which stops network requests and signals the + // corresponding RequestCores that the requests have completed. + void Shutdown(); + + private: +- friend class Job; +- + // Finds a job with a matching RequestPararms or returns nullptr if there was + // no match. + Job* FindJob(const RequestParams& params); + +- // Removes |job| from the in progress jobs and transfers ownership to the +- // caller. +- std::unique_ptr<Job> RemoveJob(Job* job); +- + // The in-progress jobs. This set does not contain the job which is actively + // invoking callbacks (OnJobCompleted). + JobSet jobs_; diff --git a/www-client/chromium/files/chromium-76-gcc-pure-virtual.patch b/www-client/chromium/files/chromium-76-gcc-pure-virtual.patch new file mode 100644 index 000000000000..3d34e436a281 --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-pure-virtual.patch @@ -0,0 +1,50 @@ +From cdf306db81efaaaa954487585d5a5a16205a5ebd Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Wed, 05 Jun 2019 14:45:06 +0000 +Subject: [PATCH] Avoid pure virtual crash destroying RenderProcessUserData + +When RenderProcessUserData is destroyed from the destructor of +RenderProcessHostImpl, it is done in the destructor of RenderProcessHost. +At this point RemoveObserver override is already freed, so RenderProcessHost +is pure virtual. This crash happens at least building with GCC: + + at /usr/include/c++/8/ext/new_allocator.h:140 + (this=0x7fffffffcb50, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/stl_tree.h:964 + +We need to destroy RenderProcessUserData before that happens. To do that +we can just override RenderProcessHostDestroyed. + +Bug: 910288 +Change-Id: I38107b178829b0cb7494f5333b765e5b087d82cd +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645366 +Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org> +Reviewed-by: Sigurður Ásgeirsson <siggi@chromium.org> +Cr-Commit-Position: refs/heads/master@{#666279} +--- + +diff --git a/chrome/browser/performance_manager/render_process_user_data.cc b/chrome/browser/performance_manager/render_process_user_data.cc +index 2e2c199..ef6e1fb 100644 +--- a/chrome/browser/performance_manager/render_process_user_data.cc ++++ b/chrome/browser/performance_manager/render_process_user_data.cc +@@ -116,4 +116,9 @@ + base::Unretained(process_node_.get()), info.exit_code)); + } + ++void RenderProcessUserData::RenderProcessHostDestroyed( ++ content::RenderProcessHost* host) { ++ host->RemoveUserData(kRenderProcessUserDataKey); ++} ++ + } // namespace performance_manager +diff --git a/chrome/browser/performance_manager/render_process_user_data.h b/chrome/browser/performance_manager/render_process_user_data.h +index ac74b1d..f3b4d16 100644 +--- a/chrome/browser/performance_manager/render_process_user_data.h ++++ b/chrome/browser/performance_manager/render_process_user_data.h +@@ -47,6 +47,7 @@ + void RenderProcessExited( + content::RenderProcessHost* host, + const content::ChildProcessTerminationInfo& info) override; ++ void RenderProcessHostDestroyed(content::RenderProcessHost* host) override; + + // All instances are linked together in a doubly linked list to allow orderly + // destruction at browser shutdown time. diff --git a/www-client/chromium/files/chromium-76-gcc-uint32.patch b/www-client/chromium/files/chromium-76-gcc-uint32.patch new file mode 100644 index 000000000000..5e392e6a6e5b --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-uint32.patch @@ -0,0 +1,30 @@ +From 53bb5a463ee956c70230eaa5450022185d0ddc3c Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Thu, 06 Jun 2019 07:54:05 +0000 +Subject: [PATCH] ThrottlingController::Liveness needs to be uint32_t + +We are setting kAlive and kDead values assigning values that +are bigger than the maximum signed int32. It is better to use +uint32_t in this case. + +Bug: 819294 +Change-Id: If72b48291a66a3a9db24b4c8e2d11d31936a66ee +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645772 +Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Cr-Commit-Position: refs/heads/master@{#666619} +--- + +diff --git a/services/network/throttling/throttling_controller.h b/services/network/throttling/throttling_controller.h +index 43751c4..3c6f87b 100644 +--- a/services/network/throttling/throttling_controller.h ++++ b/services/network/throttling/throttling_controller.h +@@ -38,7 +38,7 @@ + + // TODO(https://crbug.com/960874): Debugging code to try and shed some light + // on why the owned maps are invalid. +- enum class Liveness : int32_t { ++ enum class Liveness : uint32_t { + kAlive = 0xCA11AB13, + kDead = 0xDEADBEEF, + }; diff --git a/www-client/chromium/files/chromium-76-gcc-vulkan.patch b/www-client/chromium/files/chromium-76-gcc-vulkan.patch new file mode 100644 index 000000000000..cf93bce63e92 --- /dev/null +++ b/www-client/chromium/files/chromium-76-gcc-vulkan.patch @@ -0,0 +1,115 @@ +From fdb3bb1f8c41d044a5b0cb80257a26dd3c8f83a3 Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jose.dapena@lge.com> +Date: Tue, 11 Jun 2019 17:39:38 +0000 +Subject: [PATCH] GCC: do not use old C notation to assign struct with property names. + +The notation for initialization of structs referring to its properties +is invalid in C++. This is not accepted in GCC. It was making build +fail in VulkanCommandBuffer. + +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc: In member function 'void gpu::VulkanCommandBuffer::TransitionImageLayout(VkImage, VkImageLayout, VkImageLayout)': +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc:214:7: error: expected primary-expression before '.' token + .subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, + ^ +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc:215:7: error: expected primary-expression before '.' token + .subresourceRange.baseMipLevel = 0, + ^ +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc:216:7: error: expected primary-expression before '.' token + .subresourceRange.levelCount = 1, + ^ +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc:217:7: error: expected primary-expression before '.' token + .subresourceRange.baseArrayLayer = 0, + ^ +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc:218:7: error: expected primary-expression before '.' token + .subresourceRange.layerCount = 1, + ^ +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc: In member function 'void gpu::VulkanCommandBuffer::CopyBufferToImage(VkBuffer, VkImage, uint32_t, uint32_t, uint32_t, uint32_t)': +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc:235:7: error: expected primary-expression before '.' token + .imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, + ^ +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc:236:7: error: expected primary-expression before '.' token + .imageSubresource.mipLevel = 0, + ^ +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc:237:7: error: expected primary-expression before '.' token + .imageSubresource.baseArrayLayer = 0, + ^ +./../../../chromium-76.0.3806.1/gpu/vulkan/vulkan_command_buffer.cc:238:7: error: expected primary-expression before '.' token + .imageSubresource.layerCount = 1, + ^ +Bug: 819294 + +Change-Id: I999abece0c727e77964789183642ba62009c2c22 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1651802 +Commit-Queue: José Dapena Paz <jose.dapena@lge.com> +Reviewed-by: Antoine Labour <piman@chromium.org> +Cr-Commit-Position: refs/heads/master@{#668033} +--- + +diff --git a/gpu/vulkan/vulkan_command_buffer.cc b/gpu/vulkan/vulkan_command_buffer.cc +index ba776e4..4f14c85 100644 +--- a/gpu/vulkan/vulkan_command_buffer.cc ++++ b/gpu/vulkan/vulkan_command_buffer.cc +@@ -207,21 +207,20 @@ + void VulkanCommandBuffer::TransitionImageLayout(VkImage image, + VkImageLayout old_layout, + VkImageLayout new_layout) { +- VkImageMemoryBarrier barrier = { +- .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, +- .srcAccessMask = GetAccessMask(old_layout), +- .dstAccessMask = GetAccessMask(new_layout), +- .oldLayout = old_layout, +- .newLayout = new_layout, +- .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, +- .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, +- .image = image, +- .subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, +- .subresourceRange.baseMipLevel = 0, +- .subresourceRange.levelCount = 1, +- .subresourceRange.baseArrayLayer = 0, +- .subresourceRange.layerCount = 1, +- }; ++ VkImageMemoryBarrier barrier = {}; ++ barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; ++ barrier.srcAccessMask = GetAccessMask(old_layout); ++ barrier.dstAccessMask = GetAccessMask(new_layout); ++ barrier.oldLayout = old_layout; ++ barrier.newLayout = new_layout; ++ barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; ++ barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; ++ barrier.image = image; ++ barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; ++ barrier.subresourceRange.baseMipLevel = 0; ++ barrier.subresourceRange.levelCount = 1; ++ barrier.subresourceRange.baseArrayLayer = 0; ++ barrier.subresourceRange.layerCount = 1; + vkCmdPipelineBarrier(command_buffer_, GetPipelineStageFlags(old_layout), + GetPipelineStageFlags(new_layout), 0, 0, nullptr, 0, + nullptr, 1, &barrier); +@@ -233,17 +232,16 @@ + uint32_t buffer_height, + uint32_t width, + uint32_t height) { +- VkBufferImageCopy region = { +- .bufferOffset = 0, +- .bufferRowLength = buffer_width, +- .bufferImageHeight = buffer_height, +- .imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, +- .imageSubresource.mipLevel = 0, +- .imageSubresource.baseArrayLayer = 0, +- .imageSubresource.layerCount = 1, +- .imageOffset = {0, 0, 0}, +- .imageExtent = {width, height, 1}, +- }; ++ VkBufferImageCopy region = {}; ++ region.bufferOffset = 0; ++ region.bufferRowLength = buffer_width; ++ region.bufferImageHeight = buffer_height; ++ region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; ++ region.imageSubresource.mipLevel = 0; ++ region.imageSubresource.baseArrayLayer = 0; ++ region.imageSubresource.layerCount = 1; ++ region.imageOffset = {0, 0, 0}; ++ region.imageExtent = {width, height, 1}; + vkCmdCopyBufferToImage(command_buffer_, buffer, image, + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion); + } diff --git a/www-client/chromium/files/chromium-76-lss.patch b/www-client/chromium/files/chromium-76-lss.patch new file mode 100644 index 000000000000..4d475b539584 --- /dev/null +++ b/www-client/chromium/files/chromium-76-lss.patch @@ -0,0 +1,39 @@ +diff --git a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc +index 008f858..69d0623 100644 +--- a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc ++++ b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc +@@ -25,7 +25,7 @@ + #include "base/logging.h" + #include "base/strings/stringprintf.h" + #include "client/client_argv_handling.h" +-#include "third_party/lss/lss.h" ++#include "third_party/lss/linux_syscall_support.h" + #include "util/file/file_io.h" + #include "util/linux/exception_handler_client.h" + #include "util/linux/exception_information.h" +diff --git a/third_party/crashpad/crashpad/util/linux/proc_task_reader_test.cc b/third_party/crashpad/crashpad/util/linux/proc_task_reader_test.cc +index 911f6d3..11c1ffa 100644 +--- a/third_party/crashpad/crashpad/util/linux/proc_task_reader_test.cc ++++ b/third_party/crashpad/crashpad/util/linux/proc_task_reader_test.cc +@@ -19,7 +19,7 @@ + #include "base/strings/stringprintf.h" + #include "gtest/gtest.h" + #include "test/multiprocess_exec.h" +-#include "third_party/lss/lss.h" ++#include "third_party/lss/linux_syscall_support.h" + #include "util/synchronization/semaphore.h" + #include "util/thread/thread.h" + +diff --git a/third_party/crashpad/crashpad/util/linux/socket.cc b/third_party/crashpad/crashpad/util/linux/socket.cc +index 68efd57..d6e39f0 100644 +--- a/third_party/crashpad/crashpad/util/linux/socket.cc ++++ b/third_party/crashpad/crashpad/util/linux/socket.cc +@@ -18,7 +18,7 @@ + + #include "base/logging.h" + #include "base/posix/eintr_wrapper.h" +-#include "third_party/lss/lss.h" ++#include "third_party/lss/linux_syscall_support.h" + + namespace crashpad { + diff --git a/www-client/chromium/files/chromium-76-quiche.patch b/www-client/chromium/files/chromium-76-quiche.patch new file mode 100644 index 000000000000..f3aa42aa304c --- /dev/null +++ b/www-client/chromium/files/chromium-76-quiche.patch @@ -0,0 +1,239 @@ +From 9424add9d73432a794b7944790253213cce6dcb8 Mon Sep 17 00:00:00 2001 +From: danzh <danzh@google.com> +Date: Thu, 06 Jun 2019 14:04:36 -0700 +Subject: [PATCH] gfe-relnote: (n/a) code cleanup. Fix envoy compile errors. + +Add #include header for std library. +Reference TransportParameters when using its enum TransportParameterId. + +PiperOrigin-RevId: 251922363 +Change-Id: Iba38660e5adc3069e377829acec44267658b11c6 +--- + +diff --git a/net/third_party/quiche/src/quic/core/crypto/transport_parameters.cc b/net/third_party/quiche/src/quic/core/crypto/transport_parameters.cc +index ee0ebf0..e5df9fe 100644 +--- a/net/third_party/quiche/src/quic/core/crypto/transport_parameters.cc ++++ b/net/third_party/quiche/src/quic/core/crypto/transport_parameters.cc +@@ -62,37 +62,37 @@ + std::string TransportParameterIdToString( + TransportParameters::TransportParameterId param_id) { + switch (param_id) { +- case kOriginalConnectionId: ++ case TransportParameters::kOriginalConnectionId: + return "original_connection_id"; +- case kIdleTimeout: ++ case TransportParameters::kIdleTimeout: + return "idle_timeout"; +- case kStatelessResetToken: ++ case TransportParameters::kStatelessResetToken: + return "stateless_reset_token"; +- case kMaxPacketSize: ++ case TransportParameters::kMaxPacketSize: + return "max_packet_size"; +- case kInitialMaxData: ++ case TransportParameters::kInitialMaxData: + return "initial_max_data"; +- case kInitialMaxStreamDataBidiLocal: ++ case TransportParameters::kInitialMaxStreamDataBidiLocal: + return "initial_max_stream_data_bidi_local"; +- case kInitialMaxStreamDataBidiRemote: ++ case TransportParameters::kInitialMaxStreamDataBidiRemote: + return "initial_max_stream_data_bidi_remote"; +- case kInitialMaxStreamDataUni: ++ case TransportParameters::kInitialMaxStreamDataUni: + return "initial_max_stream_data_uni"; +- case kInitialMaxStreamsBidi: ++ case TransportParameters::kInitialMaxStreamsBidi: + return "initial_max_streams_bidi"; +- case kInitialMaxStreamsUni: ++ case TransportParameters::kInitialMaxStreamsUni: + return "initial_max_streams_uni"; +- case kAckDelayExponent: ++ case TransportParameters::kAckDelayExponent: + return "ack_delay_exponent"; +- case kMaxAckDelay: ++ case TransportParameters::kMaxAckDelay: + return "max_ack_delay"; +- case kDisableMigration: ++ case TransportParameters::kDisableMigration: + return "disable_migration"; +- case kPreferredAddress: ++ case TransportParameters::kPreferredAddress: + return "preferred_address"; +- case kGoogleQuicParam: ++ case TransportParameters::kGoogleQuicParam: + return "google"; +- case kGoogleQuicVersion: ++ case TransportParameters::kGoogleQuicVersion: + return "google-version"; + } + return "Unknown(" + QuicTextUtils::Uint64ToString(param_id) + ")"; +@@ -390,7 +390,7 @@ + CBB original_connection_id_param; + if (!in.original_connection_id.IsEmpty()) { + DCHECK_EQ(Perspective::IS_SERVER, in.perspective); +- if (!CBB_add_u16(¶ms, kOriginalConnectionId) || ++ if (!CBB_add_u16(¶ms, TransportParameters::kOriginalConnectionId) || + !CBB_add_u16_length_prefixed(¶ms, &original_connection_id_param) || + !CBB_add_bytes( + &original_connection_id_param, +@@ -412,7 +412,7 @@ + if (!in.stateless_reset_token.empty()) { + DCHECK_EQ(kStatelessResetTokenLength, in.stateless_reset_token.size()); + DCHECK_EQ(Perspective::IS_SERVER, in.perspective); +- if (!CBB_add_u16(¶ms, kStatelessResetToken) || ++ if (!CBB_add_u16(¶ms, TransportParameters::kStatelessResetToken) || + !CBB_add_u16_length_prefixed(¶ms, &stateless_reset_token_param) || + !CBB_add_bytes(&stateless_reset_token_param, + in.stateless_reset_token.data(), +@@ -438,7 +438,7 @@ + + // disable_migration + if (in.disable_migration) { +- if (!CBB_add_u16(¶ms, kDisableMigration) || ++ if (!CBB_add_u16(¶ms, TransportParameters::kDisableMigration) || + !CBB_add_u16(¶ms, 0u)) { // 0 is the length of this parameter. + QUIC_BUG << "Failed to write disable_migration for " << in; + return false; +@@ -458,7 +458,7 @@ + QUIC_BUG << "Bad lengths " << *in.preferred_address; + return false; + } +- if (!CBB_add_u16(¶ms, kPreferredAddress) || ++ if (!CBB_add_u16(¶ms, TransportParameters::kPreferredAddress) || + !CBB_add_u16_length_prefixed(¶ms, &preferred_address_params) || + !CBB_add_bytes( + &preferred_address_params, +@@ -491,7 +491,7 @@ + if (in.google_quic_params) { + const QuicData& serialized_google_quic_params = + in.google_quic_params->GetSerialized(); +- if (!CBB_add_u16(¶ms, kGoogleQuicParam) || ++ if (!CBB_add_u16(¶ms, TransportParameters::kGoogleQuicParam) || + !CBB_add_u16_length_prefixed(¶ms, &google_quic_params) || + !CBB_add_bytes(&google_quic_params, + reinterpret_cast<const uint8_t*>( +@@ -505,7 +505,7 @@ + + // Google-specific version extension. + CBB google_version_params; +- if (!CBB_add_u16(¶ms, kGoogleQuicVersion) || ++ if (!CBB_add_u16(¶ms, TransportParameters::kGoogleQuicVersion) || + !CBB_add_u16_length_prefixed(¶ms, &google_version_params) || + !CBB_add_u32(&google_version_params, in.version)) { + QUIC_BUG << "Failed to write Google version extension for " << in; +@@ -565,7 +565,7 @@ + } + bool parse_success = true; + switch (param_id) { +- case kOriginalConnectionId: ++ case TransportParameters::kOriginalConnectionId: + if (!out->original_connection_id.IsEmpty()) { + QUIC_DLOG(ERROR) << "Received a second original connection ID"; + return false; +@@ -581,10 +581,10 @@ + CBS_len(&value)); + } + break; +- case kIdleTimeout: ++ case TransportParameters::kIdleTimeout: + parse_success = out->idle_timeout_milliseconds.ReadFromCbs(&value); + break; +- case kStatelessResetToken: ++ case TransportParameters::kStatelessResetToken: + if (!out->stateless_reset_token.empty()) { + QUIC_DLOG(ERROR) << "Received a second stateless reset token"; + return false; +@@ -597,36 +597,36 @@ + out->stateless_reset_token.assign(CBS_data(&value), + CBS_data(&value) + CBS_len(&value)); + break; +- case kMaxPacketSize: ++ case TransportParameters::kMaxPacketSize: + parse_success = out->max_packet_size.ReadFromCbs(&value); + break; +- case kInitialMaxData: ++ case TransportParameters::kInitialMaxData: + parse_success = out->initial_max_data.ReadFromCbs(&value); + break; +- case kInitialMaxStreamDataBidiLocal: ++ case TransportParameters::kInitialMaxStreamDataBidiLocal: + parse_success = + out->initial_max_stream_data_bidi_local.ReadFromCbs(&value); + break; +- case kInitialMaxStreamDataBidiRemote: ++ case TransportParameters::kInitialMaxStreamDataBidiRemote: + parse_success = + out->initial_max_stream_data_bidi_remote.ReadFromCbs(&value); + break; +- case kInitialMaxStreamDataUni: ++ case TransportParameters::kInitialMaxStreamDataUni: + parse_success = out->initial_max_stream_data_uni.ReadFromCbs(&value); + break; +- case kInitialMaxStreamsBidi: ++ case TransportParameters::kInitialMaxStreamsBidi: + parse_success = out->initial_max_streams_bidi.ReadFromCbs(&value); + break; +- case kInitialMaxStreamsUni: ++ case TransportParameters::kInitialMaxStreamsUni: + parse_success = out->initial_max_streams_uni.ReadFromCbs(&value); + break; +- case kAckDelayExponent: ++ case TransportParameters::kAckDelayExponent: + parse_success = out->ack_delay_exponent.ReadFromCbs(&value); + break; +- case kMaxAckDelay: ++ case TransportParameters::kMaxAckDelay: + parse_success = out->max_ack_delay.ReadFromCbs(&value); + break; +- case kDisableMigration: ++ case TransportParameters::kDisableMigration: + if (out->disable_migration) { + QUIC_DLOG(ERROR) << "Received a second disable migration"; + return false; +@@ -638,7 +638,7 @@ + } + out->disable_migration = true; + break; +- case kPreferredAddress: { ++ case TransportParameters::kPreferredAddress: { + uint16_t ipv4_port, ipv6_port; + in_addr ipv4_address; + in6_addr ipv6_address; +@@ -692,7 +692,7 @@ + QuicMakeUnique<TransportParameters::PreferredAddress>( + preferred_address); + } break; +- case kGoogleQuicParam: { ++ case TransportParameters::kGoogleQuicParam: { + if (out->google_quic_params) { + QUIC_DLOG(ERROR) << "Received a second Google parameter"; + return false; +@@ -701,7 +701,7 @@ + reinterpret_cast<const char*>(CBS_data(&value)), CBS_len(&value)); + out->google_quic_params = CryptoFramer::ParseMessage(serialized_params); + } break; +- case kGoogleQuicVersion: { ++ case TransportParameters::kGoogleQuicVersion: { + if (!CBS_get_u32(&value, &out->version)) { + QUIC_DLOG(ERROR) << "Failed to parse Google version extension"; + return false; +diff --git a/quic/core/quic_socket_address_coder.cc b/quic/core/quic_socket_address_coder.cc +index 2527fc9..b26103d 100644 +--- a/net/third_party/quiche/src/quic/core/quic_socket_address_coder.cc ++++ b/net/third_party/quiche/src/quic/core/quic_socket_address_coder.cc +@@ -2,10 +2,12 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +-#include <string> +- + #include "net/third_party/quiche/src/quic/core/quic_socket_address_coder.h" + ++#include <cstring> ++#include <string> ++#include <vector> ++ + namespace quic { + + namespace { diff --git a/www-client/chromium/files/chromium-compiler-r10.patch b/www-client/chromium/files/chromium-compiler-r10.patch new file mode 100644 index 000000000000..f2ecdc3f32b4 --- /dev/null +++ b/www-client/chromium/files/chromium-compiler-r10.patch @@ -0,0 +1,185 @@ +From a1207cc75454e653030716948d27ec27412f6fe8 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Sat, 16 Jun 2019 15:43:27 +0100 +Subject: [PATCH] Disable various compiler configs + +--- + build/config/compiler/BUILD.gn | 64 +++++++++++++--------------------- + 1 file changed, 25 insertions(+), 39 deletions(-) + +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +index a3f21b7..0a7bec6 100644 +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -230,8 +230,6 @@ config("compiler") { + + configs += [ + # See the definitions below. +- ":clang_revision", +- ":compiler_cpu_abi", + ":compiler_codegen", + ":compiler_deterministic", + ] +@@ -471,20 +469,6 @@ config("compiler") { + } + } + +- if (is_clang && !is_nacl && !use_xcode_clang) { +- cflags += [ "-fcrash-diagnostics-dir=" + +- rebase_path("//tools/clang/crashreports", root_build_dir) ] +- +- cflags += [ +- # TODO(hans): Remove this once Clang generates better optimized debug info +- # by default. https://crbug.com/765793 +- "-Xclang", +- "-mllvm", +- "-Xclang", +- "-instcombine-lower-dbg-declare=0", +- ] +- } +- + # C11/C++11 compiler flags setup. + # --------------------------- + if (is_linux || is_android || (is_nacl && is_clang) || current_os == "aix") { +@@ -1431,6 +1415,12 @@ config("default_warnings") { + "-Wno-narrowing", + ] + ++ # -Wno-class-memaccess warns about hash table and vector in blink. ++ # But the violation is intentional. ++ if (!is_nacl) { ++ cflags_cc += [ "-Wno-class-memaccess" ] ++ } ++ + # -Wunused-local-typedefs is broken in gcc, + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872 + cflags += [ "-Wno-unused-local-typedefs" ] +@@ -1525,7 +1515,7 @@ config("chromium_code") { + defines = [ "_HAS_NODISCARD" ] + } + } else { +- cflags = [ "-Wall" ] ++ cflags = [] + if (treat_warnings_as_errors) { + cflags += [ "-Werror" ] + +@@ -1534,10 +1524,6 @@ config("chromium_code") { + # well. + ldflags = [ "-Werror" ] + } +- if (is_clang) { +- # Enable extra warnings for chromium_code when we control the compiler. +- cflags += [ "-Wextra" ] +- } + + # In Chromium code, we define __STDC_foo_MACROS in order to get the + # C99 macros on Mac and Linux. +@@ -1546,15 +1532,6 @@ config("chromium_code") { + "__STDC_FORMAT_MACROS", + ] + +- if (!is_debug && !using_sanitizer && current_cpu != "s390x" && +- current_cpu != "s390" && current_cpu != "ppc64" && +- current_cpu != "mips" && current_cpu != "mips64") { +- # Non-chromium code is not guaranteed to compile cleanly with +- # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are +- # disabled, so only do that for Release build. +- defines += [ "_FORTIFY_SOURCE=2" ] +- } +- + if (is_mac) { + cflags_objc = [ "-Wobjc-missing-property-synthesis" ] + cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] +@@ -1943,7 +1920,8 @@ config("default_stack_frames") { + } + + # Default "optimization on" config. +-config("optimize") { ++config("optimize") { } ++config("xoptimize") { + if (is_win) { + # TODO(thakis): Remove is_clang here, https://crbug.com/598772 + if (is_official_build && full_wpo_on_official && !is_clang) { +@@ -1977,7 +1955,8 @@ config("optimize") { + } + + # Same config as 'optimize' but without the WPO flag. +-config("optimize_no_wpo") { ++config("optimize_no_wpo") { } ++config("xoptimize_no_wpo") { + if (is_win) { + # Favor size over speed, /O1 must be before the common flags. The GYP + # build also specifies /Os and /GF but these are implied by /O1. +@@ -2000,7 +1979,8 @@ config("optimize_no_wpo") { + } + + # Turn off optimizations. +-config("no_optimize") { ++config("no_optimize") { } ++config("xno_optimize") { + if (is_win) { + cflags = [ + "/Od", # Disable optimization. +@@ -2028,7 +2008,8 @@ config("no_optimize") { + # Turns up the optimization level. On Windows, this implies whole program + # optimization and link-time code generation which is very expensive and should + # be used sparingly. +-config("optimize_max") { ++config("optimize_max") { } ++config("xoptimize_max") { + if (is_nacl && is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # Various components do: +@@ -2075,7 +2056,8 @@ config("optimize_max") { + # + # TODO(crbug.com/621335) - rework how all of these configs are related + # so that we don't need this disclaimer. +-config("optimize_speed") { ++config("optimize_speed") { } ++config("xoptimize_speed") { + if (is_nacl && is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # Various components do: +@@ -2113,7 +2095,8 @@ config("optimize_speed") { + } + } + +-config("optimize_fuzzing") { ++config("optimize_fuzzing") { } ++config("xoptimize_fuzzing") { + cflags = [ "-O1" ] + common_optimize_on_cflags + ldflags = common_optimize_on_ldflags + visibility = [ ":default_optimization" ] +@@ -2215,7 +2198,8 @@ config("win_pdbaltpath") { + } + + # Full symbols. +-config("symbols") { ++config("symbols") { } ++config("xsymbols") { + if (is_win) { + if (use_goma || is_clang) { + # Note that with VC++ this requires is_win_fastlink, enforced elsewhere. +@@ -2325,7 +2309,8 @@ config("symbols") { + # Minimal symbols. + # This config guarantees to hold symbol for stack trace which are shown to user + # when crash happens in unittests running on buildbot. +-config("minimal_symbols") { ++config("minimal_symbols") { } ++config("xminimal_symbols") { + if (is_win) { + # Linker symbols for backtraces only. + cflags = [] +@@ -2382,7 +2367,8 @@ config("minimal_symbols") { + } + + # No symbols. +-config("no_symbols") { ++config("no_symbols") { } ++config("xno_symbols") { + if (!is_win) { + cflags = [ "-g0" ] + asmflags = cflags +-- +2.21.0 + |