From c24c2049a09ab32180c42b102588002aa8303579 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Sat, 15 Feb 2020 09:53:26 -0600 Subject: [PATCH] chromium de KBrown-pub --- www-client/chromium/Manifest | 22 + .../chromium-80.0.3987.100-r100.ebuild | 738 ++++++++++++++++++ .../files/chromium-77-system-icu.patch | 20 + .../files/chromium-78-protobuf-export.patch | 13 + .../files/chromium-79-gcc-alignas.patch | 68 ++ .../files/chromium-80-gcc-abstract.patch | 41 + .../files/chromium-80-gcc-blink.patch | 45 ++ .../chromium-80-gcc-incomplete-type.patch | 229 ++++++ .../files/chromium-80-gcc-permissive.patch | 33 + .../files/chromium-80-gcc-quiche.patch | 30 + .../chromium/files/chromium-80-include.patch | 33 + .../files/chromium-80-unbundle-libxml.patch | 101 +++ .../files/chromium-81-gcc-constexpr.patch | 19 + .../files/chromium-81-gcc-noexcept.patch | 13 + .../chromium/files/chromium-browser.xml | 13 + .../files/chromium-compiler-r10.patch | 185 +++++ .../files/chromium-compiler-r11.patch | 185 +++++ .../files/chromium-fix-char_traits.patch | 14 + .../chromium/files/chromium-launcher-r3.sh | 39 + .../files/chromium-unbundle-zlib-r1.patch | 13 + www-client/chromium/files/chromium.default | 5 + www-client/chromium/metadata.xml | 21 + 22 files changed, 1880 insertions(+) create mode 100644 www-client/chromium/Manifest create mode 100644 www-client/chromium/chromium-80.0.3987.100-r100.ebuild create mode 100644 www-client/chromium/files/chromium-77-system-icu.patch create mode 100644 www-client/chromium/files/chromium-78-protobuf-export.patch create mode 100644 www-client/chromium/files/chromium-79-gcc-alignas.patch create mode 100644 www-client/chromium/files/chromium-80-gcc-abstract.patch create mode 100644 www-client/chromium/files/chromium-80-gcc-blink.patch create mode 100644 www-client/chromium/files/chromium-80-gcc-incomplete-type.patch create mode 100644 www-client/chromium/files/chromium-80-gcc-permissive.patch create mode 100644 www-client/chromium/files/chromium-80-gcc-quiche.patch create mode 100644 www-client/chromium/files/chromium-80-include.patch create mode 100644 www-client/chromium/files/chromium-80-unbundle-libxml.patch create mode 100644 www-client/chromium/files/chromium-81-gcc-constexpr.patch create mode 100644 www-client/chromium/files/chromium-81-gcc-noexcept.patch create mode 100644 www-client/chromium/files/chromium-browser.xml create mode 100644 www-client/chromium/files/chromium-compiler-r10.patch create mode 100644 www-client/chromium/files/chromium-compiler-r11.patch create mode 100644 www-client/chromium/files/chromium-fix-char_traits.patch create mode 100644 www-client/chromium/files/chromium-launcher-r3.sh create mode 100644 www-client/chromium/files/chromium-unbundle-zlib-r1.patch create mode 100644 www-client/chromium/files/chromium.default create mode 100644 www-client/chromium/metadata.xml diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest new file mode 100644 index 0000000..f1e86c4 --- /dev/null +++ b/www-client/chromium/Manifest @@ -0,0 +1,22 @@ +AUX chromium-77-system-icu.patch 649 BLAKE2B 7910fcb64460ef965eafdd05e98d41d14399fd337ac8f79bcb2c7059fccd61d552ab6efa1dbf8bdcce564716b3d12b41a587077034cb72ef610eff76f4e052d6 SHA512 7413e0cca7102008dd5bee443dcde90be69ef1d0973fee576f70544f0d0a66aa8bc7099e619c89160915d6cd6186384be46ffab4a1d747000133dda9a84e15e5 +AUX chromium-78-protobuf-export.patch 694 BLAKE2B 3fffcb6a7289bac848b89275a9f76e4302042362fa9bcf2689df01e0a00806c7e838210fa8696ee8e2134127ec4cfb5c3b632e2739c225f8e9586e01de7035ce SHA512 e3a80775d958740eedc7c3df0e9dd12b0e6a51ccf871a2085ab77246814e748428133d27c60322a102eb8f50bb65fc2c607e0d2665a92393be55befcbf566ab0 +AUX chromium-79-gcc-alignas.patch 3039 BLAKE2B 46f9d31944cf27479e3a7f33df5a0b37f11a7a761fa0a413bbbb3195de0fe62e33531f78155de5afefc9de4c051347328b61a3701380d8f8ae8895ca468efc94 SHA512 98f0d1f24acdb7572445210b3d29147e72dee06bc7c09e30320ed17926d70be0f68905682aef8f026481f71b6a98d0c5d6bf4dad87e9517e1a2ca5bd758e87c4 +AUX chromium-80-gcc-abstract.patch 3165 BLAKE2B 76142cb97cf4ea4b98275de59eabaa673fe54a355744777f7c2859bd04014be80dc5fa2f4d753f1a6185fd4cc8a9709b38ce55b5fcf139c097489e05712a7f1c SHA512 803dfa4fbf1c9a5f04efed57955c8e5694e368e655fafd7b3ad3d161927db6ce026360c27547476580756ff86b1a634607b6e841465a84daf68eb4f7ba7eeba7 +AUX chromium-80-gcc-blink.patch 3288 BLAKE2B c31a35f083945358accdbe97a0c101627413cef1f2c420275a6f87078404e4cd070b52d2ff3466e97859285f19549337251d285280e944becd86e12142310895 SHA512 ed4f507c15a9ebd324f9efbbb1aad042c953e6dbe2b7a129f4e003bb399b6a8c3f61ed5ceb4685329fd9b826c738efd92d86795e21ba6d000e9031ea65558c68 +AUX chromium-80-gcc-incomplete-type.patch 11677 BLAKE2B f0fdec52f628c491acfed9e87c4e542dab90f313cd9526c44ad422deae3ed1b25637aad78c21bda5753aaafe9bcebb5053734c8c664e59e091fb8e5f0c46c790 SHA512 121404b5a07ab066689694d4158fd34d6ee3a4c351c84a0792c01493653f40fea8f51b20ff215475bb45b0e229cc2e53b73d244df59ea716a8b051ac28984b10 +AUX chromium-80-gcc-permissive.patch 1990 BLAKE2B 2aab6ec5beb470a220d53592f6e86b9bea8f950d52ccd670ed451c2df4339eba527feb2af8566b82885414f72bd789aa806695781e77c3d691f7da2d348bebc9 SHA512 06ac6ce01936a6541334579179b6e922573c9d24cf1ba8b5311f5775dc6571d079b9b7530fa8bb633f53bd16f0ccbbaaa11b3f1b8e241c400cefd9960392eaf8 +AUX chromium-80-gcc-quiche.patch 1351 BLAKE2B 7bd967a9f3cd544368c623d3612632cd2bade48ac2c099c4570d5ead62ba28487e1fa222ee0bfe108f3d4f853744d799d2860f703eae3b7d6d36af77cd328508 SHA512 2f147e77d0737370c5dea8b575c0e631476bbce54a7b1c46d0bffeb56706d6ab695b8a9a7e61402430c57ec1f28668dd6682aa5d32d32762fc3ba1735f37542b +AUX chromium-80-include.patch 1495 BLAKE2B a5ed4a0df55a24498b3e88c191ecf8f87873b6a8d826f5daa6df3234593d5996257d31c5ce116b078990010633e8e8bbac0e66027329afea3355959d8fae3fa8 SHA512 c73c7af2612b80b110e10fe887cab442aebc1e23bc87cc5819384be9aa0283475fb957e3fd637d6b890411adde38c8206b1f1d998127938808c307bee0636e94 +AUX chromium-80-unbundle-libxml.patch 2990 BLAKE2B 63068fef2333d9d111bfe66a78efd71088c76b08b4e5014b244012df682024ceb0db8441254481189fc449f16cbeab7f650c8cab30f9d37dedf89c2dbea1bae9 SHA512 87ef07a35a103c5b4293301705a09a60199d569fceeab1e3188c7b96067d39f237441209f4448a791dc5675321f609ee5c02fdda1081af38e50adcd15de4e0b6 +AUX chromium-81-gcc-constexpr.patch 717 BLAKE2B 22a13605d2680456614e7ef53fff585b731e21b3504fc8cc5a06d87bf4edba2580a756b878069eefc4cbbc928f1c32e38b808fcb4bb36588bf81ed63d816b0df SHA512 b94847dd15f32b8b2c400eee2b461dd532b0fca8429417b648ed41270175ea7aadbc8a839ddc29c9bac8ff0d52575a696e2cb7f769b34d1ab211e97b29600107 +AUX chromium-81-gcc-noexcept.patch 732 BLAKE2B 0ec2e5b360ceeb28e9cd8ace4a94ebf8296f4d102159817c7b0f81037b0f4cb9c20cce3de5dc38559ee5e6cdcaa737d689f2bd2fe1f30c01d4e1edddfbbf5a3d SHA512 6f8f0e2662f1603c37f9b4fd10545e1860cd04abe733f427be705d198133e190693998ab96882407a48f32662cf96b2fb63b8f890b0fe1aa424e19f577f8e7bd +AUX chromium-browser.xml 407 BLAKE2B 168d78b0855546ca559cfb51aff0bc85d5e6ae974c25eb76e4a02f6d11659489c6e40397a0b2f7bc1fda336fd2c6dd8c863fccc3340719210b41c7fef51927f4 SHA512 b767fb4fd1925029d95560fc14cb7ab12ae43b2fe923e92d75e733b9723cbe1dcdf6df041a2b62554e98b79b47ef3f6028c773e72e6fd53166a021d49657aeca +AUX chromium-compiler-r10.patch 5917 BLAKE2B a16ea6a1eee56a7de06f82e161536dab19a507f675fe8268b5a455bf36b9f5e6c1df02de73b303ab61e33153f06f118e22623d01f654d4a7c88ca8c3f8326401 SHA512 e64f9f75e685868cb8da8851e84362952a18e5dbca674c853a41feb582bdd4dc59219727f2c77440ec2030e21d7b436f144c552c30b2a4960cbe0da32c6f6c5e +AUX chromium-compiler-r11.patch 5942 BLAKE2B 199efeda0e70377193fe5209f580eab6caca6bec1dc0b06fdbca0ecbb70101f6ac8187c26afa4b00bc9116aa8a85e50fbbf8e3a5461a1d6c8d74edb4a4b0a3b3 SHA512 f9080a90d064d72d375ab78250e1f0147856641953adefe09b1dee8771b464b102d6ad02ef7be384d55b0953b9a861fb41973966ad564858a71d85811f5a783f +AUX chromium-fix-char_traits.patch 355 BLAKE2B 5269c43c4d36dc1cd190aedc04e3172fbef0048484ac7e4db15fffd69009c8ba02f0ed786c64b292fbbcd2409ad70545817cd7d45a2cb51fd76bf72250ca0018 SHA512 85ab70f168f56c01e01bdf210d107bebd7c344e95dcb692a19a0f7883ed6aec5325b38c35cd3c9b37c1915820d5e8d401e8ee92c289436fb8bc8341c3c6007a8 +AUX chromium-launcher-r3.sh 1199 BLAKE2B 85f57b380cdc25bd000cf57d3c129b67f6e55d96dd958190040b0680f8d4d358ac777e0c1ebd6a1b32dd3821a377bcf9f598e073584528d0480460978c4c1fb1 SHA512 f1909314ae74985c85740d26c9bfab694f3202de8ccc392a1c4ec5c8760db21b6cc46146c78a9abebd09e6d24f37e19466f0c4d2d61815400b48d859f8ce154d +AUX chromium-unbundle-zlib-r1.patch 515 BLAKE2B f3263f7450a940449d7edc0aef46a888248e0245a71797435a985fda8ef3c1abb8823a5a363cff1db0e2d09715942322e5d5ae9ab3554a5a3aeb2db748102a97 SHA512 89d62431e11cf8f3b48afdf9a133a8532916d445676de12acb48b0aaca3aa45106e25de399e7ee37a6220b0766c0ea65f10da219d4bb9a7a02275b4364e493ad +AUX chromium.default 148 BLAKE2B 5ee5b582c59a6e4bef87bbb0e232e2470ad412b1fbbb3b9af6ef7153edb55c5b9080cc16a5a115b0c5b3c381aa87ce57a7b12bdd2070e67dac10a6c2995ddbaf SHA512 0d4849e03592fb58b05e62a43021eca7e61615616c8907c3b2e445402e03adaf9e8fa25b0a745d6c31eb037456215cc02b59e345a3a06d932e76cf990c92d739 +DIST chromium-80.0.3987.100.tar.xz 801377116 BLAKE2B 0c99b78794a0c04bcc45fd423d0fabb7db4c9e37ae446b46c33a7b4a98ecc1af9302680e84118809f01dd3bee50b68a301ff0bdd72c5704c028c7984bac812f3 SHA512 b8612693158f9a497723391ed80dd06b152ed71b29e2722a751f94b297e184f09f786405d2c5b460aff6f62c9c6292c673b36019ff72f1fb662cc418cc26127d +EBUILD chromium-80.0.3987.100-r100.ebuild 22642 BLAKE2B de89dc4c1851030db1651c46a6d1634b8073e4f13beb947b77be5a008265ce84a0ec34d8d227be1bb18cd5fa045609f225a2c8e654ee18ea185025a620c25217 SHA512 8345659b6d42f77c6ba6eea056b93f10b8722b6e35da8c1284f69c8cd6eba72036e5a4e290b3871aff7fae6f5d354a70200d801b2e93fad049700d3c9e7754a1 +MISC metadata.xml 1351 BLAKE2B fb5be12f788385e19aa41ab929c0c0f2744a61cc83b19ed973174cee564043a871f68fadb721ee91d688020aa1daba5fb2bca4535c53630bd88cc0ede527ef53 SHA512 ae812473401017ce399461a829e7182e6e28c56b01c1da926883bd3edf751fa804dc88f429c77a3f533647b2115c960a7bba21572735dcf3d039a6d87fabf51d diff --git a/www-client/chromium/chromium-80.0.3987.100-r100.ebuild b/www-client/chromium/chromium-80.0.3987.100-r100.ebuild new file mode 100644 index 0000000..5eac9bc --- /dev/null +++ b/www-client/chromium/chromium-80.0.3987.100-r100.ebuild @@ -0,0 +1,738 @@ +# Copyright 2009-2020 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 ~arm64 ~x86" +IUSE="+closure-compile component-build cups cpu_flags_arm_neon gnome-keyring +hangouts kerberos 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-65:= ) + >=dev-libs/libxml2-2.9.4-r3:=[icu] + dev-libs/libxslt:= + dev-libs/nspr:= + >=dev-libs/nss-3.26:= + >=dev-libs/re2-0.2019.08.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.4.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-1.3.1:= + ) + sys-apps/dbus:= + sys-apps/pciutils:= + 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} + ! 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)" + + 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 cpu_flags_arm_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 + + # Explicitly disable ICU data file support for system-icu builds. + if use system-icu; then + myconf_gn+=" icu_use_data_file=false" + 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 + + # Build manpage; bug #684550 + sed -e 's|@@PACKAGE@@|chromium-browser|g; + s|@@MENUNAME@@|Chromium|g;' \ + chrome/app/resources/manpage.1.in > \ + out/Release/chromium-browser.1 || die + + # Build desktop file; bug #706786 + sed -e 's|@@MENUNAME@@|Chromium|g; + s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g; + s|@@PACKAGE@@|chromium-browser|g; + s|\(^Exec=\)/usr/bin/|\1|g;' \ + chrome/installer/linux/common/desktop.template > \ + out/Release/chromium-browser-chromium.desktop || die +} + +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 + local branding size + for size in 16 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 + + # Install desktop entry + domenu out/Release/chromium-browser-chromium.desktop + + # Install GNOME default application entry (bug #303100). + insinto /usr/share/gnome-control-center/default-apps + newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml + + # Install manpage; bug #684550 + doman out/Release/chromium-browser.1 + dosym chromium-browser.1 /usr/share/man/man1/chromium.1 + + 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-77-system-icu.patch b/www-client/chromium/files/chromium-77-system-icu.patch new file mode 100644 index 0000000..1f848d7 --- /dev/null +++ b/www-client/chromium/files/chromium-77-system-icu.patch @@ -0,0 +1,20 @@ +diff --git a/build/linux/unbundle/icu.gn b/build/linux/unbundle/icu.gn +index 4450e40..9ca36dd 100644 +--- a/build/linux/unbundle/icu.gn ++++ b/build/linux/unbundle/icu.gn +@@ -96,6 +96,7 @@ shim_headers("icui18n_shim") { + "unicode/fpositer.h", + "unicode/gender.h", + "unicode/gregocal.h", ++ "unicode/listformatter.h", + "unicode/measfmt.h", + "unicode/measunit.h", + "unicode/measure.h", +@@ -178,7 +179,6 @@ shim_headers("icuuc_shim") { + "unicode/icudataver.h", + "unicode/icuplug.h", + "unicode/idna.h", +- "unicode/listformatter.h", + "unicode/localpointer.h", + "unicode/locdspnm.h", + "unicode/locid.h", diff --git a/www-client/chromium/files/chromium-78-protobuf-export.patch b/www-client/chromium/files/chromium-78-protobuf-export.patch new file mode 100644 index 0000000..ddb9e80 --- /dev/null +++ b/www-client/chromium/files/chromium-78-protobuf-export.patch @@ -0,0 +1,13 @@ +diff --git a/third_party/protobuf/src/google/protobuf/repeated_field.h b/third_party/protobuf/src/google/protobuf/repeated_field.h +index b5b193c..4434854 100644 +--- a/third_party/protobuf/src/google/protobuf/repeated_field.h ++++ b/third_party/protobuf/src/google/protobuf/repeated_field.h +@@ -804,7 +804,7 @@ class StringTypeHandler { + // RepeatedPtrField is like RepeatedField, but used for repeated strings or + // Messages. + template +-class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { ++class PROTOBUF_EXPORT RepeatedPtrField final : private internal::RepeatedPtrFieldBase { + public: + RepeatedPtrField(); + explicit RepeatedPtrField(Arena* arena); diff --git a/www-client/chromium/files/chromium-79-gcc-alignas.patch b/www-client/chromium/files/chromium-79-gcc-alignas.patch new file mode 100644 index 0000000..1e031e2 --- /dev/null +++ b/www-client/chromium/files/chromium-79-gcc-alignas.patch @@ -0,0 +1,68 @@ +Re-use chromium alignas workaround in protobuf. +--- + +diff --git a/third_party/protobuf/src/google/protobuf/arena.h b/third_party/protobuf/src/google/protobuf/arena.h +index dedc221..a8515ce 100644 +--- a/third_party/protobuf/src/google/protobuf/arena.h ++++ b/third_party/protobuf/src/google/protobuf/arena.h +@@ -245,7 +245,7 @@ struct ArenaOptions { + // well as protobuf container types like RepeatedPtrField and Map. The protocol + // is internal to protobuf and is not guaranteed to be stable. Non-proto types + // should not rely on this protocol. +-class PROTOBUF_EXPORT alignas(8) Arena final { ++class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { + public: + // Arena constructor taking custom options. See ArenaOptions below for + // descriptions of the options available. +diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc b/third_party/protobuf/src/google/protobuf/port_def.inc +index f1bd85d..6d02b53 100644 +--- a/third_party/protobuf/src/google/protobuf/port_def.inc ++++ b/third_party/protobuf/src/google/protobuf/port_def.inc +@@ -528,6 +528,35 @@ PROTOBUF_EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport)); + #undef IN + #endif // _MSC_VER + ++// Specify memory alignment for structs, classes, etc. ++// Use like: ++// class PROTOBUF_ALIGNAS(16) MyClass { ... } ++// PROTOBUF_ALIGNAS(16) int array[4]; ++// ++// In most places you can use the C++11 keyword "alignas", which is preferred. ++// ++// But compilers have trouble mixing __attribute__((...)) syntax with ++// alignas(...) syntax. ++// ++// Doesn't work in clang or gcc: ++// struct alignas(16) __attribute__((packed)) S { char c; }; ++// Works in clang but not gcc: ++// struct __attribute__((packed)) alignas(16) S2 { char c; }; ++// Works in clang and gcc: ++// struct alignas(16) S3 { char c; } __attribute__((packed)); ++// ++// There are also some attributes that must be specified *before* a class ++// definition: visibility (used for exporting functions/classes) is one of ++// these attributes. This means that it is not possible to use alignas() with a ++// class that is marked as exported. ++#if defined(_MSC_VER) ++#define PROTOBUF_ALIGNAS(byte_alignment) __declspec(align(byte_alignment)) ++#elif defined(__GNUC__) ++#define PROTOBUF_ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment))) ++#else ++#define PROTOBUF_ALIGNAS(byte_alignment) alignas(byte_alignment) ++#endif ++ + #if defined(__clang__) + #pragma clang diagnostic push + // TODO(gerbens) ideally we cleanup the code. But a cursory try shows many +diff --git a/third_party/protobuf/src/google/protobuf/port_undef.inc b/third_party/protobuf/src/google/protobuf/port_undef.inc +index b7e67fe..ba1fffc 100644 +--- a/third_party/protobuf/src/google/protobuf/port_undef.inc ++++ b/third_party/protobuf/src/google/protobuf/port_undef.inc +@@ -80,6 +80,7 @@ + #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_foj3FJo5StF0OvIzl7oMxA__declspec + #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllexport + #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllimport ++#undef PROTOBUF_ALIGNAS + + + diff --git a/www-client/chromium/files/chromium-80-gcc-abstract.patch b/www-client/chromium/files/chromium-80-gcc-abstract.patch new file mode 100644 index 0000000..190a672 --- /dev/null +++ b/www-client/chromium/files/chromium-80-gcc-abstract.patch @@ -0,0 +1,41 @@ +In file included from ../../third_party/blink/renderer/platform/heap/persistent.h:18, + from ../../third_party/blink/public/platform/web_private_ptr.h:40, + from ../../third_party/blink/public/platform/web_media_stream_track.h:33, + from ../../third_party/blink/public/platform/web_media_stream_source.h:37, + from ../../third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.h:19, + from ../../third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:5: +../../third_party/blink/renderer/platform/wtf/cross_thread_copier.h: In instantiation of 'struct WTF::CrossThreadCopierPassThrough': +../../third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h:169:14: required from here +../../third_party/blink/renderer/platform/wtf/cross_thread_copier.h:80:15: error: invalid abstract return type 'webrtc::VideoTrackInterface' + 80 | static Type Copy(const T& parameter) { return parameter; } + | ^~~~ +In file included from ../../third_party/webrtc/api/peer_connection_interface.h:88, + from ../../third_party/blink/public/platform/web_rtc_peer_connection_handler.h:39, + from ../../third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.h:20, + from ../../third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:5: +../../third_party/webrtc/api/media_stream_interface.h:174:18: note: because the following virtual functions are pure within 'webrtc::VideoTrackInterface': + 174 | class RTC_EXPORT VideoTrackInterface + | ^~~~~~~~~~~~~~~~~~~ +../../third_party/webrtc/api/media_stream_interface.h:48:16: note: 'virtual void webrtc::NotifierInterface::RegisterObserver(webrtc::ObserverInterface*)' + 48 | virtual void RegisterObserver(ObserverInterface* observer) = 0; + | ^~~~~~~~~~~~~~~~ +../../third_party/webrtc/api/media_stream_interface.h:49:16: note: 'virtual void webrtc::NotifierInterface::UnregisterObserver(webrtc::ObserverInterface*)' + 49 | virtual void UnregisterObserver(ObserverInterface* observer) = 0; + | ^~~~~~~~~~~~~~~~~~ + +diff --git a/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h b/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h +index 54cb7d1..0d6c40f 100644 +--- a/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h ++++ b/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h +@@ -165,8 +165,9 @@ struct CrossThreadCopier + }; + + template <> +-struct CrossThreadCopier +- : public CrossThreadCopierPassThrough { ++struct CrossThreadCopier> ++ : public CrossThreadCopierPassThrough< ++ rtc::scoped_refptr> { + STATIC_ONLY(CrossThreadCopier); + }; + diff --git a/www-client/chromium/files/chromium-80-gcc-blink.patch b/www-client/chromium/files/chromium-80-gcc-blink.patch new file mode 100644 index 0000000..2118b46 --- /dev/null +++ b/www-client/chromium/files/chromium-80-gcc-blink.patch @@ -0,0 +1,45 @@ +../../third_party/blink/renderer/core/editing/commands/delete_selection_command.cc: In member function 'void blink::DeleteSelectionCommand::InitializePositionData(blink::EditingState*)': +../../third_party/blink/renderer/core/editing/commands/delete_selection_command.cc:256:59: error: no matching function for call to 'EnclosingNodeOfType(blink::Position&, )' + 256 | EnclosingNodeOfType(start, &IsA)); + | ^ +In file included from ../../third_party/blink/renderer/core/editing/commands/delete_selection_command.cc:34: +../../third_party/blink/renderer/core/editing/editing_utilities.h:112:19: note: candidate: 'blink::Node* blink::EnclosingNodeOfType(const Position&, bool (*)(const blink::Node*), blink::EditingBoundaryCrossingRule)' + 112 | CORE_EXPORT Node* EnclosingNodeOfType( + | ^~~~~~~~~~~~~~~~~~~ +../../third_party/blink/renderer/core/editing/editing_utilities.h:114:12: note: no known conversion for argument 2 from '' to 'bool (*)(const blink::Node*)' + 114 | bool (*node_is_of_type)(const Node*), + | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +../../third_party/blink/renderer/core/editing/editing_utilities.h:116:19: note: candidate: 'blink::Node* blink::EnclosingNodeOfType(const PositionInFlatTree&, bool (*)(const blink::Node*), blink::EditingBoundaryCrossingRule)' + 116 | CORE_EXPORT Node* EnclosingNodeOfType( + | ^~~~~~~~~~~~~~~~~~~ +../../third_party/blink/renderer/core/editing/editing_utilities.h:117:5: note: no known conversion for argument 1 from 'blink::Position' {aka 'blink::PositionTemplate >'} to 'const PositionInFlatTree&' {aka 'const blink::PositionTemplate >&'} + 117 | const PositionInFlatTree&, + | ^~~~~~~~~~~~~~~~~~~~~~~~~ + +diff --git a/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc b/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc +index 6ff6906..dd531ae 100644 +--- a/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc ++++ b/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc +@@ -224,6 +224,10 @@ static Position TrailingWhitespacePosition(const Position& position, + return Position(); + } + ++static bool IsAHTMLTableRowElement(const Node* node) { ++ return IsA(node); ++} ++ + void DeleteSelectionCommand::InitializePositionData( + EditingState* editing_state) { + DCHECK(!GetDocument().NeedsLayoutTreeUpdate()); +@@ -253,9 +257,9 @@ void DeleteSelectionCommand::InitializePositionData( + end_root_ = RootEditableElementOf(end); + + start_table_row_ = To( +- EnclosingNodeOfType(start, &IsA)); ++ EnclosingNodeOfType(start, &IsAHTMLTableRowElement)); + end_table_row_ = To( +- EnclosingNodeOfType(end, &IsA)); ++ EnclosingNodeOfType(end, &IsAHTMLTableRowElement)); + + // Don't move content out of a table cell. + // If the cell is non-editable, enclosingNodeOfType won't return it by diff --git a/www-client/chromium/files/chromium-80-gcc-incomplete-type.patch b/www-client/chromium/files/chromium-80-gcc-incomplete-type.patch new file mode 100644 index 0000000..8d10620 --- /dev/null +++ b/www-client/chromium/files/chromium-80-gcc-incomplete-type.patch @@ -0,0 +1,229 @@ +From cdf3e81ff49b200213d67d65558f2919222b60ab Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Mon, 16 Dec 2019 11:39:11 +0000 +Subject: [PATCH] BookmarkModelMerger: Move RemoteTreeNode declaration to header. + +This fixes the build with libstdc++ after commit 8f5dad93e58 ("Fix CHECK +failure due to untracked local nodes"): + +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/stl_pair.h:215:11: error: field has incomplete type 'sync_bookmarks::BookmarkModelMerger::RemoteTreeNode' + _T2 second; /// @c second is a copy of the second object + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/ext/aligned_buffer.h:91:28: note: in instantiation of template class 'std::pair, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>' requested here + : std::aligned_storage + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:233:43: note: in instantiation of template class '__gnu_cxx::__aligned_buffer, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >' requested here + __gnu_cxx::__aligned_buffer<_Value> _M_storage; + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:264:39: note: in instantiation of template class 'std::__detail::_Hash_node_value_base, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >' requested here + struct _Hash_node<_Value, true> : _Hash_node_value_base<_Value> + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:2028:25: note: in instantiation of template class 'std::__detail::_Hash_node, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, true>' requested here + rebind_traits; + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable.h:184:15: note: in instantiation of template class 'std::__detail::_Hashtable_alloc, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, true> > > +' requested here + private __detail::_Hashtable_alloc< + ^ +/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/unordered_map.h:105:18: note: in instantiation of template class 'std::_Hashtable, std::pair, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, std::allocator, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >, std::__detail::_Select1st, std::equal_to >, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__deta +il::_Hashtable_traits >' requested here + _Hashtable _M_h; + ^ +../../components/sync_bookmarks/bookmark_model_merger.h:146:22: note: in instantiation of template class 'std::unordered_map, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode, std::hash, std::equal_to >, std::allocator, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> > >' requested here + const RemoteForest remote_forest_; + ^ +../../components/sync_bookmarks/bookmark_model_merger.h:53:9: note: forward declaration of 'sync_bookmarks::BookmarkModelMerger::RemoteTreeNode' + class RemoteTreeNode; + ^ + +Essentially, the problem is that libstdc++'s std::unordered_map +implementation requires both T and U to be fully declared. I raised the +problem in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92770, and GCC's +position is that we are relying on undefined behavior according to the C++ +standard (https://eel.is/c++draft/requirements#res.on.functions-2.5). + +Bug: 957519 +Change-Id: Ife7e435e516932a795bfbe05b2c910c3272878f0 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1960156 +Commit-Queue: Raphael Kubo da Costa +Reviewed-by: Mikel Astiz +Auto-Submit: Raphael Kubo da Costa +Cr-Commit-Position: refs/heads/master@{#725070} +--- + +diff --git a/components/sync_bookmarks/bookmark_model_merger.cc b/components/sync_bookmarks/bookmark_model_merger.cc +index eae153ef..579848e 100644 +--- a/components/sync_bookmarks/bookmark_model_merger.cc ++++ b/components/sync_bookmarks/bookmark_model_merger.cc +@@ -5,7 +5,6 @@ + #include "components/sync_bookmarks/bookmark_model_merger.h" + + #include +-#include + #include + #include + #include +@@ -205,66 +204,44 @@ + + } // namespace + +-class BookmarkModelMerger::RemoteTreeNode final { +- public: +- // Constructs a tree given |update| as root and recursively all descendants by +- // traversing |*updates_per_parent_id|. |update| and |updates_per_parent_id| +- // must not be null. All updates |*updates_per_parent_id| must represent valid +- // updates. Updates corresponding from descendant nodes are moved away from +- // |*updates_per_parent_id|. +- static RemoteTreeNode BuildTree( +- std::unique_ptr update, +- UpdatesPerParentId* updates_per_parent_id); ++BookmarkModelMerger::RemoteTreeNode::RemoteTreeNode() = default; + +- ~RemoteTreeNode() = default; ++BookmarkModelMerger::RemoteTreeNode::~RemoteTreeNode() = default; + +- // Allow moves, useful during construction. +- RemoteTreeNode(RemoteTreeNode&&) = default; +- RemoteTreeNode& operator=(RemoteTreeNode&&) = default; ++BookmarkModelMerger::RemoteTreeNode::RemoteTreeNode( ++ BookmarkModelMerger::RemoteTreeNode&&) = default; ++BookmarkModelMerger::RemoteTreeNode& BookmarkModelMerger::RemoteTreeNode:: ++operator=(BookmarkModelMerger::RemoteTreeNode&&) = default; + +- const syncer::EntityData& entity() const { return *update_->entity; } +- int64_t response_version() const { return update_->response_version; } ++void BookmarkModelMerger::RemoteTreeNode::EmplaceSelfAndDescendantsByGUID( ++ std::unordered_map* ++ guid_to_remote_node_map) const { ++ DCHECK(guid_to_remote_node_map); + +- // Direct children nodes, sorted by ascending unique position. These are +- // guaranteed to be valid updates (e.g. IsValidBookmarkSpecifics()). +- const std::vector& children() const { return children_; } ++ const std::string& guid = entity().specifics.bookmark().guid(); ++ if (!guid.empty()) { ++ DCHECK(base::IsValidGUID(guid)); + +- // Recursively emplaces all GUIDs (this node and descendants) into +- // |*guid_to_remote_node_map|, which must not be null. +- void EmplaceSelfAndDescendantsByGUID( +- std::unordered_map* +- guid_to_remote_node_map) const { +- DCHECK(guid_to_remote_node_map); +- +- const std::string& guid = entity().specifics.bookmark().guid(); +- if (!guid.empty()) { +- DCHECK(base::IsValidGUID(guid)); +- +- // Duplicate GUIDs have been sorted out before. +- bool success = guid_to_remote_node_map->emplace(guid, this).second; +- DCHECK(success); +- } +- +- for (const RemoteTreeNode& child : children_) { +- child.EmplaceSelfAndDescendantsByGUID(guid_to_remote_node_map); +- } ++ // Duplicate GUIDs have been sorted out before. ++ bool success = guid_to_remote_node_map->emplace(guid, this).second; ++ DCHECK(success); + } + +- private: +- static bool UniquePositionLessThan(const RemoteTreeNode& lhs, +- const RemoteTreeNode& rhs) { +- const syncer::UniquePosition a_pos = +- syncer::UniquePosition::FromProto(lhs.entity().unique_position); +- const syncer::UniquePosition b_pos = +- syncer::UniquePosition::FromProto(rhs.entity().unique_position); +- return a_pos.LessThan(b_pos); ++ for (const RemoteTreeNode& child : children_) { ++ child.EmplaceSelfAndDescendantsByGUID(guid_to_remote_node_map); + } ++} + +- RemoteTreeNode() = default; +- +- std::unique_ptr update_; +- std::vector children_; +-}; ++// static ++bool BookmarkModelMerger::RemoteTreeNode::UniquePositionLessThan( ++ const RemoteTreeNode& lhs, ++ const RemoteTreeNode& rhs) { ++ const syncer::UniquePosition a_pos = ++ syncer::UniquePosition::FromProto(lhs.entity().unique_position); ++ const syncer::UniquePosition b_pos = ++ syncer::UniquePosition::FromProto(rhs.entity().unique_position); ++ return a_pos.LessThan(b_pos); ++} + + // static + BookmarkModelMerger::RemoteTreeNode +diff --git a/components/sync_bookmarks/bookmark_model_merger.h b/components/sync_bookmarks/bookmark_model_merger.h +index 9b59200..bf0783ec 100644 +--- a/components/sync_bookmarks/bookmark_model_merger.h ++++ b/components/sync_bookmarks/bookmark_model_merger.h +@@ -5,6 +5,7 @@ + #ifndef COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_MODEL_MERGER_H_ + #define COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_MODEL_MERGER_H_ + ++#include + #include + #include + #include +@@ -50,7 +51,52 @@ + + private: + // Internal representation of a remote tree, composed of nodes. +- class RemoteTreeNode; ++ class RemoteTreeNode final { ++ private: ++ using UpdatesPerParentId = ++ std::unordered_map; ++ ++ public: ++ // Constructs a tree given |update| as root and recursively all descendants ++ // by traversing |*updates_per_parent_id|. |update| and ++ // |updates_per_parent_id| must not be null. All updates ++ // |*updates_per_parent_id| must represent valid updates. Updates ++ // corresponding from descendant nodes are moved away from ++ // |*updates_per_parent_id|. ++ static RemoteTreeNode BuildTree( ++ std::unique_ptr update, ++ UpdatesPerParentId* updates_per_parent_id); ++ ++ ~RemoteTreeNode(); ++ ++ // Allow moves, useful during construction. ++ RemoteTreeNode(RemoteTreeNode&&); ++ RemoteTreeNode& operator=(RemoteTreeNode&&); ++ ++ const syncer::EntityData& entity() const { return *update_->entity; } ++ int64_t response_version() const { return update_->response_version; } ++ ++ // Direct children nodes, sorted by ascending unique position. These are ++ // guaranteed to be valid updates (e.g. IsValidBookmarkSpecifics()). ++ const std::vector& children() const { return children_; } ++ ++ // Recursively emplaces all GUIDs (this node and descendants) into ++ // |*guid_to_remote_node_map|, which must not be null. ++ void EmplaceSelfAndDescendantsByGUID( ++ std::unordered_map* ++ guid_to_remote_node_map) const; ++ ++ private: ++ static bool UniquePositionLessThan(const RemoteTreeNode& lhs, ++ const RemoteTreeNode& rhs); ++ ++ RemoteTreeNode(); ++ ++ std::unique_ptr update_; ++ std::vector children_; ++ }; + + // A forest composed of multiple trees where the root of each tree represents + // a permanent node, keyed by server-defined unique tag of the root. diff --git a/www-client/chromium/files/chromium-80-gcc-permissive.patch b/www-client/chromium/files/chromium-80-gcc-permissive.patch new file mode 100644 index 0000000..c7aef49 --- /dev/null +++ b/www-client/chromium/files/chromium-80-gcc-permissive.patch @@ -0,0 +1,33 @@ +In file included from ../../media/base/media_log_properties.h:13, + from ../../media/base/media_log.h:23, + from ../../media/filters/frame_processor.h:15, + from ../../media/filters/frame_processor.cc:5: +../../media/base/media_log_properties_helper.h:86:8: error: extra qualification not allowed [-fpermissive] + 86 | struct internal::MediaLogPropertyTypeConverter { + | ^~~~~~~~ +../../media/base/media_log_properties_helper.h:86:75: error: explicit specialization of non-template 'media::internal::' + 86 | struct internal::MediaLogPropertyTypeConverter { + | ^ + +diff --git a/media/base/media_log_properties_helper.h b/media/base/media_log_properties_helper.h +index 95ff70a..549b003 100644 +--- a/media/base/media_log_properties_helper.h ++++ b/media/base/media_log_properties_helper.h +@@ -83,7 +83,7 @@ struct MediaLogPropertyTypeConverter> { + + // Specializer for sending AudioDecoderConfigs to the media tab in devtools. + template <> +-struct internal::MediaLogPropertyTypeConverter { ++struct MediaLogPropertyTypeConverter { + static base::Value Convert(const AudioDecoderConfig& value) { + base::Value result(base::Value::Type::DICTIONARY); + result.SetStringKey("codec", GetCodecName(value.codec())); +@@ -114,7 +114,7 @@ struct internal::MediaLogPropertyTypeConverter { + + // Specializer for sending VideoDecoderConfigs to the media tab in devtools. + template <> +-struct internal::MediaLogPropertyTypeConverter { ++struct MediaLogPropertyTypeConverter { + static base::Value Convert(const VideoDecoderConfig& value) { + base::Value result(base::Value::Type::DICTIONARY); + result.SetStringKey("codec", GetCodecName(value.codec())); diff --git a/www-client/chromium/files/chromium-80-gcc-quiche.patch b/www-client/chromium/files/chromium-80-gcc-quiche.patch new file mode 100644 index 0000000..aa3d541 --- /dev/null +++ b/www-client/chromium/files/chromium-80-gcc-quiche.patch @@ -0,0 +1,30 @@ +From 00f47df999c9b19e80fdc01db0ae9ca1b6a12b3a Mon Sep 17 00:00:00 2001 +From: vasilvv +Date: Wed, 03 Apr 2019 13:58:53 -0700 +Subject: [PATCH] GCC: do not delete move constructor of QuicStreamSendBuffer + +QuicStreamSendBuffer constructor is implicitely required in the +initialization of the vector of substreams in QuicCryptoStream. +Though clang apparently ignores that, GCC fails to build. + +BUG=chromium:819294 + +Originally submitted by José Dapena Paz at https://quiche-review.googlesource.com/c/quiche/+/2420 + +PiperOrigin-RevId: 241800134 +Change-Id: I4e3c97d6e5895d85340e8c1b740e6196d9104066 +--- + +diff --git a/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h b/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h +index e34514b..74e9d0d 100644 +--- a/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h ++++ b/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h +@@ -62,7 +62,7 @@ + public: + explicit QuicStreamSendBuffer(QuicBufferAllocator* allocator); + QuicStreamSendBuffer(const QuicStreamSendBuffer& other) = delete; +- QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = delete; ++ QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = default; + ~QuicStreamSendBuffer(); + + // Save |data_length| of data starts at |iov_offset| in |iov| to send buffer. diff --git a/www-client/chromium/files/chromium-80-include.patch b/www-client/chromium/files/chromium-80-include.patch new file mode 100644 index 0000000..dd85de7 --- /dev/null +++ b/www-client/chromium/files/chromium-80-include.patch @@ -0,0 +1,33 @@ +From 8273f4d3130e06fd8b6bef87b07c936304b971d9 Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Tue, 10 Dec 2019 20:59:57 +0000 +Subject: [PATCH] [cros search service]: Include for std::pow() + +IWYU. Follow up to commit 2b2ea3c09b ("[cros search service] Move shared +string matching functions to //chrome"), which broke the libstdc++ build: + + ../../chrome/common/string_matching/fuzzy_tokenized_string_match.cc:199:14: error: no member named 'pow' in namespace 'std' + std::pow(partial_match_penalty_rate, long_start - current - 1); + ~~~~~^ + +Bug: 957519 +Change-Id: I66f61cb4f93cfa0bfa3d1b00ba391ddd8f31a7fb +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1960310 +Auto-Submit: Raphael Kubo da Costa +Reviewed-by: Jia Meng +Commit-Queue: Raphael Kubo da Costa +Cr-Commit-Position: refs/heads/master@{#723499} +--- + +diff --git a/chrome/common/string_matching/fuzzy_tokenized_string_match.cc b/chrome/common/string_matching/fuzzy_tokenized_string_match.cc +index 8351fa7..884ef63 100644 +--- a/chrome/common/string_matching/fuzzy_tokenized_string_match.cc ++++ b/chrome/common/string_matching/fuzzy_tokenized_string_match.cc +@@ -5,6 +5,7 @@ + #include "chrome/common/string_matching/fuzzy_tokenized_string_match.h" + + #include ++#include + #include + + #include "base/i18n/case_conversion.h" diff --git a/www-client/chromium/files/chromium-80-unbundle-libxml.patch b/www-client/chromium/files/chromium-80-unbundle-libxml.patch new file mode 100644 index 0000000..0f36905 --- /dev/null +++ b/www-client/chromium/files/chromium-80-unbundle-libxml.patch @@ -0,0 +1,101 @@ +diff --git a/build/linux/unbundle/libxml.gn b/build/linux/unbundle/libxml.gn +index c481bd3..3aaa1a4 100644 +--- a/build/linux/unbundle/libxml.gn ++++ b/build/linux/unbundle/libxml.gn +@@ -8,11 +8,52 @@ pkg_config("system_libxml") { + packages = [ "libxml-2.0" ] + } + +-static_library("libxml") { ++source_set("libxml") { ++ public_configs = [ ":system_libxml" ] ++} ++ ++static_library("libxml_utils") { ++ # Do not expand this visibility list without first consulting with the ++ # Security Team. ++ visibility = [ ++ ":xml_reader", ++ ":xml_writer", ++ "//base/test:test_support", ++ "//services/data_decoder:xml_parser_fuzzer", ++ ] + sources = [ + "chromium/libxml_utils.cc", + "chromium/libxml_utils.h", + ] +- + public_configs = [ ":system_libxml" ] + } ++ ++static_library("xml_reader") { ++ # Do not expand this visibility list without first consulting with the ++ # Security Team. ++ visibility = [ ++ "//base/test:test_support", ++ "//components/policy/core/common:unit_tests", ++ "//services/data_decoder:*", ++ "//tools/traffic_annotation/auditor:auditor_sources", ++ ] ++ sources = [ ++ "chromium/xml_reader.cc", ++ "chromium/xml_reader.h", ++ ] ++ deps = [ ++ ":libxml_utils", ++ ] ++} ++ ++static_library("xml_writer") { ++ # The XmlWriter is considered safe to use from any target. ++ visibility = [ "*" ] ++ sources = [ ++ "chromium/xml_writer.cc", ++ "chromium/xml_writer.h", ++ ] ++ deps = [ ++ ":libxml_utils", ++ ] ++} +diff --git a/third_party/libxml/chromium/libxml_utils.h b/third_party/libxml/chromium/libxml_utils.h +index ff969fa..e0f3ecd 100644 +--- a/third_party/libxml/chromium/libxml_utils.h ++++ b/third_party/libxml/chromium/libxml_utils.h +@@ -6,8 +6,7 @@ + #define THIRD_PARTY_LIBXML_CHROMIUM_LIBXML_UTILS_H_ + + #include +- +-#include "third_party/libxml/src/include/libxml/xmlreader.h" ++#include + + // libxml uses a global error function pointer for reporting errors. + // A ScopedXmlErrorFunc object lets you change the global error pointer +diff --git a/third_party/libxml/chromium/xml_reader.cc b/third_party/libxml/chromium/xml_reader.cc +index 92464f4..4779290 100644 +--- a/third_party/libxml/chromium/xml_reader.cc ++++ b/third_party/libxml/chromium/xml_reader.cc +@@ -7,7 +7,8 @@ + #include + + #include "third_party/libxml/chromium/libxml_utils.h" +-#include "third_party/libxml/src/include/libxml/xmlreader.h" ++ ++#include + + using internal::XmlStringToStdString; + +diff --git a/third_party/libxml/chromium/xml_writer.cc b/third_party/libxml/chromium/xml_writer.cc +index 51fce8e..aa3a34f 100644 +--- a/third_party/libxml/chromium/xml_writer.cc ++++ b/third_party/libxml/chromium/xml_writer.cc +@@ -5,7 +5,8 @@ + #include "third_party/libxml/chromium/xml_writer.h" + + #include "third_party/libxml/chromium/libxml_utils.h" +-#include "third_party/libxml/src/include/libxml/xmlwriter.h" ++ ++#include + + XmlWriter::XmlWriter() : writer_(nullptr), buffer_(nullptr) {} + diff --git a/www-client/chromium/files/chromium-81-gcc-constexpr.patch b/www-client/chromium/files/chromium-81-gcc-constexpr.patch new file mode 100644 index 0000000..a9c1507 --- /dev/null +++ b/www-client/chromium/files/chromium-81-gcc-constexpr.patch @@ -0,0 +1,19 @@ +diff --git a/ui/views/layout/layout_types.h b/ui/views/layout/layout_types.h +index 8f9dbf4..ba118b9 100644 +--- a/ui/views/layout/layout_types.h ++++ b/ui/views/layout/layout_types.h +@@ -45,12 +45,12 @@ class VIEWS_EXPORT SizeBounds { + ~SizeBounds() = default; + + constexpr const base::Optional& width() const { return width_; } +- constexpr void set_width(base::Optional width) { ++ inline void set_width(base::Optional width) { + width_ = std::move(width); + } + + constexpr const base::Optional& height() const { return height_; } +- constexpr void set_height(base::Optional height) { ++ inline void set_height(base::Optional height) { + height_ = std::move(height); + } + diff --git a/www-client/chromium/files/chromium-81-gcc-noexcept.patch b/www-client/chromium/files/chromium-81-gcc-noexcept.patch new file mode 100644 index 0000000..a6fc8af --- /dev/null +++ b/www-client/chromium/files/chromium-81-gcc-noexcept.patch @@ -0,0 +1,13 @@ +diff --git a/components/paint_preview/browser/paint_preview_client.cc b/components/paint_preview/browser/paint_preview_client.cc +index 38ab6be..dccf07f 100644 +--- a/components/paint_preview/browser/paint_preview_client.cc ++++ b/components/paint_preview/browser/paint_preview_client.cc +@@ -78,7 +78,7 @@ PaintPreviewClient::PaintPreviewData::PaintPreviewData() = default; + PaintPreviewClient::PaintPreviewData::~PaintPreviewData() = default; + + PaintPreviewClient::PaintPreviewData& PaintPreviewClient::PaintPreviewData:: +-operator=(PaintPreviewData&& rhs) noexcept = default; ++operator=(PaintPreviewData&& rhs) = default; + PaintPreviewClient::PaintPreviewData::PaintPreviewData( + PaintPreviewData&& other) noexcept = default; + diff --git a/www-client/chromium/files/chromium-browser.xml b/www-client/chromium/files/chromium-browser.xml new file mode 100644 index 0000000..2c95a55 --- /dev/null +++ b/www-client/chromium/files/chromium-browser.xml @@ -0,0 +1,13 @@ + + + + + + Chromium + chromium-browser + chromium-browser %s + chromium-browser + false + + + 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 0000000..f2ecdc3 --- /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 +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 + diff --git a/www-client/chromium/files/chromium-compiler-r11.patch b/www-client/chromium/files/chromium-compiler-r11.patch new file mode 100644 index 0000000..f1b958a --- /dev/null +++ b/www-client/chromium/files/chromium-compiler-r11.patch @@ -0,0 +1,185 @@ +From 137de121a36f9349ad8435fee57940facef82878 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Thu, 6 Feb 2020 07:46:57 +0000 +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 eef1140..b34b55b 100644 +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -260,8 +260,6 @@ config("compiler") { + + configs += [ + # See the definitions below. +- ":clang_revision", +- ":compiler_cpu_abi", + ":compiler_codegen", + ":compiler_deterministic", + ] +@@ -486,20 +484,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") { +@@ -1446,6 +1430,12 @@ config("default_warnings") { + cflags_cc += [ "-Wno-class-memaccess" ] + } + ++ # -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" ] +@@ -1560,7 +1550,7 @@ config("chromium_code") { + defines = [ "_HAS_NODISCARD" ] + } + } else { +- cflags = [ "-Wall" ] ++ cflags = [] + if (treat_warnings_as_errors) { + cflags += [ "-Werror" ] + +@@ -1569,10 +1559,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. +@@ -1581,15 +1567,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" ] +@@ -1993,7 +1970,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) { +@@ -2019,7 +1997,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. +@@ -2042,7 +2021,8 @@ config("optimize_no_wpo") { + } + + # Turn off optimizations. +-config("no_optimize") { ++config("no_optimize") { } ++config("xno_optimize") { + if (is_win) { + cflags = [ + "/Od", # Disable optimization. +@@ -2076,7 +2056,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: +@@ -2115,7 +2096,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: +@@ -2145,7 +2127,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" ] +@@ -2261,7 +2244,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. +@@ -2371,7 +2355,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) { + # Functions, files, and line tables only. + cflags = [] +@@ -2426,7 +2411,8 @@ config("minimal_symbols") { + } + + # No symbols. +-config("no_symbols") { ++config("no_symbols") { } ++config("xno_symbols") { + if (!is_win) { + cflags = [ "-g0" ] + asmflags = cflags +-- +2.24.1 + diff --git a/www-client/chromium/files/chromium-fix-char_traits.patch b/www-client/chromium/files/chromium-fix-char_traits.patch new file mode 100644 index 0000000..4cb9503 --- /dev/null +++ b/www-client/chromium/files/chromium-fix-char_traits.patch @@ -0,0 +1,14 @@ +--- a/base/strings/char_traits.h ++++ b/base/strings/char_traits.h +@@ -67,9 +67,9 @@ + return __builtin_memcmp(s1, s2, n); + #else + for (; n; --n, ++s1, ++s2) { +- if (*s1 < *s2) ++ if ((unsigned char)*s1 < (unsigned char)*s2) + return -1; +- if (*s1 > *s2) ++ if ((unsigned char)*s1 > (unsigned char)*s2) + return 1; + } + return 0; diff --git a/www-client/chromium/files/chromium-launcher-r3.sh b/www-client/chromium/files/chromium-launcher-r3.sh new file mode 100644 index 0000000..a4fc1a9 --- /dev/null +++ b/www-client/chromium/files/chromium-launcher-r3.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Allow the user to override command-line flags, bug #357629. +# This is based on Debian's chromium-browser package, and is intended +# to be consistent with Debian. +for f in /etc/chromium/*; do + [[ -f ${f} ]] && source "${f}" +done + +# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system +# default CHROMIUM_FLAGS (from /etc/chromium/default). +CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"} + +# Let the wrapped binary know that it has been run through the wrapper +export CHROME_WRAPPER=$(readlink -f "$0") + +PROGDIR=${CHROME_WRAPPER%/*} + +case ":$PATH:" in + *:$PROGDIR:*) + # $PATH already contains $PROGDIR + ;; + *) + # Append $PROGDIR to $PATH + export PATH="$PATH:$PROGDIR" + ;; +esac + +if [[ ${EUID} == 0 && -O ${XDG_CONFIG_HOME:-${HOME}} ]]; then + # Running as root with HOME owned by root. + # Pass --user-data-dir to work around upstream failsafe. + CHROMIUM_FLAGS="--user-data-dir=${XDG_CONFIG_HOME:-${HOME}/.config}/chromium + ${CHROMIUM_FLAGS}" +fi + +# Set the .desktop file name +export CHROME_DESKTOP="chromium-browser-chromium.desktop" + +exec -a "chromium-browser" "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins ${CHROMIUM_FLAGS} "$@" diff --git a/www-client/chromium/files/chromium-unbundle-zlib-r1.patch b/www-client/chromium/files/chromium-unbundle-zlib-r1.patch new file mode 100644 index 0000000..951a2ad --- /dev/null +++ b/www-client/chromium/files/chromium-unbundle-zlib-r1.patch @@ -0,0 +1,13 @@ +diff --git a/third_party/perfetto/gn/BUILD.gn b/third_party/perfetto/gn/BUILD.gn +index 3bc618a..e0ddf6d 100644 +--- a/third_party/perfetto/gn/BUILD.gn ++++ b/third_party/perfetto/gn/BUILD.gn +@@ -244,7 +244,7 @@ if (enable_perfetto_trace_processor || perfetto_build_standalone || + "//buildtools:zlib", + ] + } else { +- public_configs = [ "//third_party/zlib:zlib_config" ] ++ public_configs = [ "//third_party/zlib:system_zlib" ] + public_deps = [ + "//third_party/zlib", + ] diff --git a/www-client/chromium/files/chromium.default b/www-client/chromium/files/chromium.default new file mode 100644 index 0000000..c140cde --- /dev/null +++ b/www-client/chromium/files/chromium.default @@ -0,0 +1,5 @@ +# Default settings for chromium. This file is sourced by /bin/bash from +# the chromium launcher. + +# Options to pass to chromium. +#CHROMIUM_FLAGS="" diff --git a/www-client/chromium/metadata.xml b/www-client/chromium/metadata.xml new file mode 100644 index 0000000..c54bc9e --- /dev/null +++ b/www-client/chromium/metadata.xml @@ -0,0 +1,21 @@ + + + + + chromium@gentoo.org + Chromium in Gentoo Project + + + Enable closure type-checking for Chrome's web technology-based UI. Requires Java. + Split build into more shared libraries to speed up linking. Mostly intended for debugging and development, NOT RECOMMENDED for general use. + Enable support for Google Hangouts features such as screen sharing + Disable optimized assembly code that is not PIC friendly + Enable proprietary codecs like H.264, MP3 + Build the SUID sandbox, which is only needed on CONFIG_USER_NS=n kernels + Use system ffmpeg instead of the bundled one + Use system icu instead of the bundled one + Use system libvpx instead of the bundled one + Use bundled tcmalloc instead of system malloc + Unsupported closed-source DRM capability (required by Netflix VOD) + +