diff options
Diffstat (limited to 'www-client')
29 files changed, 5263 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 + diff --git a/www-client/firefox-bin/firefox-bin-60.7.2.ebuild b/www-client/firefox-bin/firefox-bin-60.7.2.ebuild new file mode 100644 index 000000000000..ff208f5fe26d --- /dev/null +++ b/www-client/firefox-bin/firefox-bin-60.7.2.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +MOZ_ESR=1 + +# Can be updated using scripts/get_langs.sh from mozilla overlay +# Missing when bumped : be +MOZ_LANGS=( ach af an ar as ast az bg bn-BD bn-IN br bs ca cs cy da de +el en en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL +ga-IE gd gl gu-IN he hi-IN hr hsb hu hy-AM id is it ja kk km kn ko lt +lv mai mk ml mr ms nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl +son sq sr sv-SE ta te th tr uk uz vi xh zh-CN zh-TW ) + +# Must be removed next bump +MOZ_LANGPACK_PREFIX="60.6.1esr/linux-i686/xpi/" + +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas +MOZ_PV="${PV/_beta/b}" # Handle beta for SRC_URI +MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI +MOZ_PN="${PN/-bin}" +if [[ ${MOZ_ESR} == 1 ]]; then + # ESR releases have slightly version numbers + MOZ_PV="${MOZ_PV}esr" +fi +MOZ_P="${MOZ_PN}-${MOZ_PV}" + +MOZ_HTTP_URI="https://archive.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/" + +inherit eutils pax-utils xdg-utils gnome2-utils mozlinguas-v2 nsplugins + +DESCRIPTION="Firefox Web Browser" +SRC_URI="${SRC_URI} + amd64? ( ${MOZ_HTTP_URI%/}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 ) + x86? ( ${MOZ_HTTP_URI%/}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )" +HOMEPAGE="https://www.mozilla.org/en-US/firefox/" +RESTRICT="strip mirror" + +KEYWORDS="-* amd64 x86" +SLOT="0" +LICENSE="MPL-2.0 GPL-2 LGPL-2.1" +IUSE="+ffmpeg +pulseaudio selinux startup-notification" + +DEPEND="app-arch/unzip" +RDEPEND="dev-libs/atk + >=sys-apps/dbus-0.60 + >=dev-libs/dbus-glib-0.72 + >=dev-libs/glib-2.26:2 + media-libs/fontconfig + >=media-libs/freetype-2.4.10 + >=x11-libs/cairo-1.10[X] + x11-libs/gdk-pixbuf + >=x11-libs/gtk+-2.18:2 + >=x11-libs/gtk+-3.4.0:3 + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXrender + x11-libs/libXt + >=x11-libs/pango-1.22.0 + virtual/freedesktop-icon-theme + pulseaudio? ( !<media-sound/apulse-0.1.9 + || ( media-sound/pulseaudio media-sound/apulse ) ) + ffmpeg? ( media-video/ffmpeg ) + selinux? ( sec-policy/selinux-mozilla ) +" + +QA_PREBUILT=" + opt/${MOZ_PN}/*.so + opt/${MOZ_PN}/${MOZ_PN} + opt/${MOZ_PN}/${PN} + opt/${MOZ_PN}/crashreporter + opt/${MOZ_PN}/webapprt-stub + opt/${MOZ_PN}/plugin-container + opt/${MOZ_PN}/mozilla-xremote-client + opt/${MOZ_PN}/updater + opt/${MOZ_PN}/minidump-analyzer + opt/${MOZ_PN}/pingsender +" + +S="${WORKDIR}/${MOZ_PN}" + +src_unpack() { + unpack ${A} + + # Unpack language packs + mozlinguas_src_unpack +} + +src_install() { + declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN} + + local size sizes icon_path icon name + sizes="16 32 48 128" + icon_path="${S}/browser/chrome/icons/default" + icon="${PN}" + name="Mozilla Firefox" + + # Install icons and .desktop for menu entry + for size in ${sizes}; do + insinto "/usr/share/icons/hicolor/${size}x${size}/apps" + newins "${icon_path}/default${size}.png" "${icon}.png" || die + done + # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs + newicon "${S}"/browser/chrome/icons/default/default48.png ${PN}.png + domenu "${FILESDIR}"/${PN}.desktop + sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ + "${ED}usr/share/applications/${PN}.desktop" || die + + # Add StartupNotify=true bug 237317 + if use startup-notification; then + echo "StartupNotify=true" >> "${ED}"usr/share/applications/${PN}.desktop + fi + + # Install firefox in /opt + dodir ${MOZILLA_FIVE_HOME%/*} + mv "${S}" "${ED}"${MOZILLA_FIVE_HOME} || die + + # Disable built-in auto-update because we update firefox-bin through package manager + insinto ${MOZILLA_FIVE_HOME}/distribution/ + newins "${FILESDIR}"/disable-auto-update.policy.json policies.json + + # Fix prefs that make no sense for a system-wide install + insinto ${MOZILLA_FIVE_HOME}/defaults/pref/ + doins "${FILESDIR}"/local-settings.js + insinto ${MOZILLA_FIVE_HOME} + newins "${FILESDIR}"/all-gentoo-2.js all-gentoo.js + + # Install language packs + MOZEXTENSION_TARGET="distribution/extensions" \ + MOZ_INSTALL_L10N_XPIFILE="1" \ + mozlinguas_src_install + + # Create /usr/bin/firefox-bin + dodir /usr/bin/ + local apulselib=$(usex pulseaudio "/usr/$(get_libdir)/apulse:" "") + cat <<-EOF >"${ED}"usr/bin/${PN} + #!/bin/sh + unset LD_PRELOAD + LD_LIBRARY_PATH="${apulselib}/opt/firefox/" \\ + GTK_PATH=/usr/$(get_libdir)/gtk-3.0/ \\ + exec /opt/${MOZ_PN}/${MOZ_PN} "\$@" + EOF + fperms 0755 /usr/bin/${PN} + + # revdep-rebuild entry + insinto /etc/revdep-rebuild + echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10${PN} + doins "${T}"/10${PN} || die + + # Plugins dir, still used for flash + share_plugins_dir + + # Required in order to use plugins and even run firefox on hardened. + pax-mark mr "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + if ! has_version 'gnome-base/gconf' || ! has_version 'gnome-base/orbit' \ + || ! has_version 'net-misc/curl'; then + einfo + einfo "For using the crashreporter, you need gnome-base/gconf," + einfo "gnome-base/orbit and net-misc/curl emerged." + einfo + fi + use ffmpeg || ewarn "USE=-ffmpeg : HTML5 video will not render without media-video/ffmpeg installed" + use pulseaudio || ewarn "USE=-pulseaudio : audio will not play without pulseaudio installed" + + # Update mimedb for the new .desktop file + xdg_desktop_database_update + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/www-client/firefox-bin/firefox-bin-67.0.4.ebuild b/www-client/firefox-bin/firefox-bin-67.0.4.ebuild new file mode 100644 index 000000000000..0567f8c5f39f --- /dev/null +++ b/www-client/firefox-bin/firefox-bin-67.0.4.ebuild @@ -0,0 +1,179 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +MOZ_ESR=0 + +# Can be updated using scripts/get_langs.sh from mozilla overlay +# Missing when bumped : be +MOZ_LANGS=( ach af an ar as ast az bg bn-BD bn-IN br bs ca cs cy da de +el en en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL +ga-IE gd gl gu-IN he hi-IN hr hsb hu hy-AM id is it ja kk km kn ko lt +lv mai mk ml mr ms nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl +son sq sr sv-SE ta te th tr uk uz vi xh zh-CN zh-TW ) + +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas +MOZ_PV="${PV/_beta/b}" # Handle beta for SRC_URI +MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI +MOZ_PN="${PN/-bin}" +if [[ ${MOZ_ESR} == 1 ]]; then + # ESR releases have slightly version numbers + MOZ_PV="${MOZ_PV}esr" +fi +MOZ_P="${MOZ_PN}-${MOZ_PV}" + +MOZ_HTTP_URI="https://archive.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/" + +inherit eutils pax-utils xdg-utils gnome2-utils mozlinguas-v2 nsplugins + +DESCRIPTION="Firefox Web Browser" +SRC_URI="${SRC_URI} + amd64? ( ${MOZ_HTTP_URI%/}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 ) + x86? ( ${MOZ_HTTP_URI%/}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )" +HOMEPAGE="https://www.mozilla.org/en-US/firefox/" +RESTRICT="strip mirror" + +KEYWORDS="-* amd64 x86" +SLOT="0" +LICENSE="MPL-2.0 GPL-2 LGPL-2.1" +IUSE="+ffmpeg +pulseaudio selinux startup-notification" + +DEPEND="app-arch/unzip" +RDEPEND="dev-libs/atk + >=sys-apps/dbus-0.60 + >=dev-libs/dbus-glib-0.72 + >=dev-libs/glib-2.26:2 + media-libs/fontconfig + >=media-libs/freetype-2.4.10 + >=x11-libs/cairo-1.10[X] + x11-libs/gdk-pixbuf + >=x11-libs/gtk+-2.18:2 + >=x11-libs/gtk+-3.4.0:3 + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXrender + x11-libs/libXt + >=x11-libs/pango-1.22.0 + virtual/freedesktop-icon-theme + pulseaudio? ( !<media-sound/apulse-0.1.9 + || ( media-sound/pulseaudio media-sound/apulse ) ) + ffmpeg? ( media-video/ffmpeg ) + selinux? ( sec-policy/selinux-mozilla ) +" + +QA_PREBUILT=" + opt/${MOZ_PN}/*.so + opt/${MOZ_PN}/${MOZ_PN} + opt/${MOZ_PN}/${PN} + opt/${MOZ_PN}/crashreporter + opt/${MOZ_PN}/webapprt-stub + opt/${MOZ_PN}/plugin-container + opt/${MOZ_PN}/mozilla-xremote-client + opt/${MOZ_PN}/updater + opt/${MOZ_PN}/minidump-analyzer + opt/${MOZ_PN}/pingsender +" + +S="${WORKDIR}/${MOZ_PN}" + +src_unpack() { + unpack ${A} + + # Unpack language packs + mozlinguas_src_unpack +} + +src_install() { + declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN} + + local size sizes icon_path icon name + sizes="16 32 48 128" + icon_path="${S}/browser/chrome/icons/default" + icon="${PN}" + name="Mozilla Firefox" + + # Install icons and .desktop for menu entry + for size in ${sizes}; do + insinto "/usr/share/icons/hicolor/${size}x${size}/apps" + newins "${icon_path}/default${size}.png" "${icon}.png" || die + done + # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs + newicon "${S}"/browser/chrome/icons/default/default48.png ${PN}.png + domenu "${FILESDIR}"/${PN}.desktop + sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ + "${ED}usr/share/applications/${PN}.desktop" || die + + # Add StartupNotify=true bug 237317 + if use startup-notification; then + echo "StartupNotify=true" >> "${ED}"usr/share/applications/${PN}.desktop + fi + + # Install firefox in /opt + dodir ${MOZILLA_FIVE_HOME%/*} + mv "${S}" "${ED}"${MOZILLA_FIVE_HOME} || die + + # Disable built-in auto-update because we update firefox-bin through package manager + insinto ${MOZILLA_FIVE_HOME}/distribution/ + newins "${FILESDIR}"/disable-auto-update.policy.json policies.json + + # Fix prefs that make no sense for a system-wide install + insinto ${MOZILLA_FIVE_HOME}/defaults/pref/ + doins "${FILESDIR}"/local-settings.js + insinto ${MOZILLA_FIVE_HOME} + newins "${FILESDIR}"/all-gentoo-2.js all-gentoo.js + + # Install language packs + MOZEXTENSION_TARGET="distribution/extensions" \ + MOZ_INSTALL_L10N_XPIFILE="1" \ + mozlinguas_src_install + + # Create /usr/bin/firefox-bin + dodir /usr/bin/ + local apulselib=$(usex pulseaudio "/usr/$(get_libdir)/apulse:" "") + cat <<-EOF >"${ED}"usr/bin/${PN} + #!/bin/sh + unset LD_PRELOAD + LD_LIBRARY_PATH="${apulselib}/opt/firefox/" \\ + GTK_PATH=/usr/$(get_libdir)/gtk-3.0/ \\ + exec /opt/${MOZ_PN}/${MOZ_PN} "\$@" + EOF + fperms 0755 /usr/bin/${PN} + + # revdep-rebuild entry + insinto /etc/revdep-rebuild + echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10${PN} + doins "${T}"/10${PN} || die + + # Plugins dir, still used for flash + share_plugins_dir + + # Required in order to use plugins and even run firefox on hardened. + pax-mark mr "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + if ! has_version 'gnome-base/gconf' || ! has_version 'gnome-base/orbit' \ + || ! has_version 'net-misc/curl'; then + einfo + einfo "For using the crashreporter, you need gnome-base/gconf," + einfo "gnome-base/orbit and net-misc/curl emerged." + einfo + fi + use ffmpeg || ewarn "USE=-ffmpeg : HTML5 video will not render without media-video/ffmpeg installed" + use pulseaudio || ewarn "USE=-pulseaudio : audio will not play without pulseaudio installed" + + # Update mimedb for the new .desktop file + xdg_desktop_database_update + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/www-client/firefox/firefox-60.7.2.ebuild b/www-client/firefox/firefox-60.7.2.ebuild new file mode 100644 index 000000000000..5622d52d0447 --- /dev/null +++ b/www-client/firefox/firefox-60.7.2.ebuild @@ -0,0 +1,436 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +VIRTUALX_REQUIRED="pgo" +WANT_AUTOCONF="2.1" +MOZ_ESR="1" + +PYTHON_COMPAT=( python3_{5,6,7} ) +PYTHON_REQ_USE='ncurses,sqlite,ssl,threads(+)' + +# This list can be updated with scripts/get_langs.sh from the mozilla overlay +MOZ_LANGS=( ach af an ar as ast az bg bn-BD bn-IN br bs ca cak cs cy da de dsb +el en en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa ff fi fr fy-NL ga-IE +gd gl gn gu-IN he hi-IN hr hsb hu hy-AM id is it ja ka kab kk km kn ko lij lt lv +mai mk ml mr ms nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq +sr sv-SE ta te th tr uk uz vi xh zh-CN zh-TW ) + +# Must be removed next bump +MOZ_LANGPACK_PREFIX="60.6.1esr/linux-i686/xpi/" + +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas +MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI +MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI +MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI + +if [[ ${MOZ_ESR} == 1 ]]; then + # ESR releases have slightly different version numbers + MOZ_PV="${MOZ_PV}esr" +fi + +# Patch version +PATCH="${PN}-60.6-patches-07" +MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases" + +MOZCONFIG_OPTIONAL_WIFI=1 + +LLVM_MAX_SLOT=8 + +inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils llvm \ + mozconfig-v6.60 pax-utils xdg-utils autotools mozlinguas-v2 + +DESCRIPTION="Firefox Web Browser" +HOMEPAGE="https://www.mozilla.com/firefox" + +KEYWORDS="amd64 arm64 x86" + +SLOT="0" +LICENSE="MPL-2.0 GPL-2 LGPL-2.1" +IUSE="bindist eme-free geckodriver +gmp-autoupdate hardened hwaccel jack +screenshot selinux test" +RESTRICT="!bindist? ( bindist )" + +SDIR="release" +[[ ${PV} = *_beta* ]] && SDIR="beta" + +PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c,whissi}/mozilla/patchsets/${PATCH}.tar.xz ) +SRC_URI="${SRC_URI} + ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz + ${PATCH_URIS[@]}" + +ASM_DEPEND=">=dev-lang/yasm-1.1" + +RDEPEND=" + system-icu? ( >=dev-libs/icu-60.2 ) + jack? ( virtual/jack ) + >=dev-libs/nss-3.36.7 + >=dev-libs/nspr-4.19 + selinux? ( sec-policy/selinux-mozilla )" + +DEPEND="${RDEPEND} + amd64? ( ${ASM_DEPEND} virtual/opengl ) + x86? ( ${ASM_DEPEND} virtual/opengl )" + +S="${WORKDIR}/firefox-${PV%_*}" + +QA_PRESTRIPPED="usr/lib*/${PN}/firefox" + +BUILD_OBJ_DIR="${S}/ff" + +# allow GMP_PLUGIN_LIST to be set in an eclass or +# overridden in the enviromnent (advanced hackers only) +if [[ -z $GMP_PLUGIN_LIST ]]; then + GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) +fi + +llvm_check_deps() { + if ! has_version --host-root "sys-devel/clang:${LLVM_SLOT}" ; then + ewarn "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." + return 1 + fi + + if use clang ; then + if ! has_version --host-root "=sys-devel/lld-${LLVM_SLOT}*" ; then + ewarn "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." + return 1 + fi + fi + + einfo "Will use LLVM slot ${LLVM_SLOT}!" +} + +pkg_setup() { + moz_pkgsetup + + # Avoid PGO profiling problems due to enviroment leakage + # These should *always* be cleaned up anyway + unset DBUS_SESSION_BUS_ADDRESS \ + DISPLAY \ + ORBIT_SOCKETDIR \ + SESSION_MANAGER \ + XDG_SESSION_COOKIE \ + XAUTHORITY + + if ! use bindist; then + einfo + elog "You are enabling official branding. You may not redistribute this build" + elog "to any users on your network or the internet. Doing so puts yourself into" + elog "a legal problem with Mozilla Foundation" + elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" + fi + + addpredict /proc/self/oom_score_adj + + llvm_pkg_setup +} + +pkg_pretend() { + # Ensure we have enough disk space to compile + CHECKREQS_DISK_BUILD="4G" + + check-reqs_pkg_setup +} + +src_unpack() { + unpack ${A} + + # Unpack language packs + mozlinguas_src_unpack +} + +src_prepare() { + eapply "${WORKDIR}/firefox" + + # Enable gnomebreakpad + if use debug ; then + sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ + "${S}"/build/unix/run-mozilla.sh || die "sed failed!" + fi + + # Drop -Wl,--as-needed related manipulation for ia64 as it causes ld sefgaults, bug #582432 + if use ia64 ; then + sed -i \ + -e '/^OS_LIBS += no_as_needed/d' \ + -e '/^OS_LIBS += as_needed/d' \ + "${S}"/widget/gtk/mozgtk/gtk2/moz.build \ + "${S}"/widget/gtk/mozgtk/gtk3/moz.build \ + || die "sed failed to drop --as-needed for ia64" + fi + + # Ensure that our plugins dir is enabled as default + sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \ + "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!" + sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \ + "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!" + + # Fix sandbox violations during make clean, bug 372817 + sed -e "s:\(/no-such-file\):${T}\1:g" \ + -i "${S}"/config/rules.mk \ + -i "${S}"/nsprpub/configure{.in,} \ + || die + + # Don't exit with error when some libs are missing which we have in + # system. + sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ + -i "${S}"/browser/installer/Makefile.in || die + + # Don't error out when there's no files to be removed: + sed 's@\(xargs rm\)$@\1 -f@' \ + -i "${S}"/toolkit/mozapps/installer/packager.mk || die + + # Keep codebase the same even if not using official branding + sed '/^MOZ_DEV_EDITION=1/d' \ + -i "${S}"/browser/branding/aurora/configure.sh || die + + # Allow user to apply any additional patches without modifing ebuild + eapply_user + + # Autotools configure is now called old-configure.in + # This works because there is still a configure.in that happens to be for the + # shell wrapper configure script + eautoreconf old-configure.in + + # Must run autoconf in js/src + cd "${S}"/js/src || die + eautoconf old-configure.in +} + +src_configure() { + MEXTENSIONS="default" + # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) + # Note: These are for Gentoo Linux use ONLY. For your own distribution, please + # get your own set of keys. + _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc + + # Add information about TERM to output (build.log) to aid debugging + # blessings problems + if [[ -n "${TERM}" ]] ; then + einfo "TERM is set to: \"${TERM}\"" + else + einfo "TERM is unset." + fi + + #################################### + # + # mozconfig, CFLAGS and CXXFLAGS setup + # + #################################### + + mozconfig_init + mozconfig_config + + mozconfig_use_enable geckodriver + + # enable JACK, bug 600002 + mozconfig_use_enable jack + + # Enable/Disable eme support + use eme-free && mozconfig_annotate '+eme-free' --disable-eme + + # It doesn't compile on alpha without this LDFLAGS + use alpha && append-ldflags "-Wl,--no-relax" + + # Add full relro support for hardened + if use hardened; then + append-ldflags "-Wl,-z,relro,-z,now" + mozconfig_use_enable hardened hardening + fi + + # Disable built-in ccache support to avoid sandbox violation, #665420 + # Use FEATURES=ccache instead! + mozconfig_annotate '' --without-ccache + sed -i -e 's/ccache_stats = None/return None/' \ + python/mozbuild/mozbuild/controller/building.py || \ + die "Failed to disable ccache stats call" + + # Setup api key for location services and safebrowsing, https://bugzilla.mozilla.org/show_bug.cgi?id=1531176#c34 + echo -n "${_google_api_key}" > "${S}"/google-api-key + mozconfig_annotate '' --with-google-location-service-api-keyfile="${S}/google-api-key" + mozconfig_annotate '' --with-google-safebrowsing-api-keyfile="${S}/google-api-key" + + mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" + + # allow elfhack to work in combination with unstripped binaries + # when they would normally be larger than 2GiB. + append-ldflags "-Wl,--compress-debug-sections=zlib" + + if use clang ; then + # https://bugzilla.mozilla.org/show_bug.cgi?id=1423822 + mozconfig_annotate 'elf-hack is broken when using Clang' --disable-elf-hack + fi + + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig + echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig + + # Default mozilla_five_home no longer valid option + sed '/with-default-mozilla-five-home=/d' -i "${S}"/.mozconfig + + # Finalize and report settings + mozconfig_final + + # workaround for funky/broken upstream configure... + SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ + ./mach configure || die +} + +src_compile() { + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ + ./mach build --verbose || die +} + +src_install() { + cd "${BUILD_OBJ_DIR}" || die + + # Pax mark xpcshell for hardened support, only used for startupcache creation. + pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell + + # Add our default prefs for firefox + cp "${FILESDIR}"/gentoo-default-prefs.js-2 \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + + mozconfig_install_prefs \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" + + # Augment this with hwaccel prefs + if use hwaccel ; then + cat "${FILESDIR}"/gentoo-hwaccel-prefs.js-1 >> \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + fi + + if ! use screenshot; then + echo "pref(\"extensions.screenshots.disabled\", true);" >> \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + fi + + echo "pref(\"extensions.autoDisableScopes\", 3);" >> \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + + local plugin + use gmp-autoupdate || use eme-free || for plugin in "${GMP_PLUGIN_LIST[@]}" ; do + echo "pref(\"media.${plugin}.autoupdate\", false);" >> \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + done + + cd "${S}" + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ + DESTDIR="${D}" ./mach install || die + + if use geckodriver ; then + cp "${BUILD_OBJ_DIR}"/dist/bin/geckodriver "${ED%/}"${MOZILLA_FIVE_HOME} || die + pax-mark m "${ED%/}"${MOZILLA_FIVE_HOME}/geckodriver + + dosym ${MOZILLA_FIVE_HOME}/geckodriver /usr/bin/geckodriver + fi + + # Install language packs + mozlinguas_src_install + + local size sizes icon_path icon name + if use bindist; then + sizes="16 32 48" + icon_path="${S}/browser/branding/aurora" + # Firefox's new rapid release cycle means no more codenames + # Let's just stick with this one... + icon="aurora" + name="Aurora" + + # Override preferences to set the MOZ_DEV_EDITION defaults, since we + # don't define MOZ_DEV_EDITION to avoid profile debaucles. + # (source: browser/app/profile/firefox.js) + cat >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" <<PROFILE_EOF +pref("app.feedback.baseURL", "https://input.mozilla.org/%LOCALE%/feedback/firefoxdev/%VERSION%/"); +sticky_pref("lightweightThemes.selectedThemeID", "firefox-devedition@mozilla.org"); +sticky_pref("browser.devedition.theme.enabled", true); +sticky_pref("devtools.theme", "dark"); +PROFILE_EOF + + else + sizes="16 22 24 32 48 64 128 256" + icon_path="${S}/browser/branding/official" + icon="${PN}" + name="Mozilla Firefox" + fi + + # Disable built-in auto-update because we update firefox through package manager + insinto ${MOZILLA_FIVE_HOME}/distribution/ + newins "${FILESDIR}"/disable-auto-update.policy.json policies.json + + # Install icons and .desktop for menu entry + for size in ${sizes}; do + insinto "/usr/share/icons/hicolor/${size}x${size}/apps" + newins "${icon_path}/default${size}.png" "${icon}.png" + done + # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs + newicon "${icon_path}/default48.png" "${icon}.png" + newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" + sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ + "${ED}/usr/share/applications/${PN}.desktop" || die + + # Add StartupNotify=true bug 237317 + if use startup-notification ; then + echo "StartupNotify=true"\ + >> "${ED}/usr/share/applications/${PN}.desktop" \ + || die + fi + + # Don't install llvm-symbolizer from sys-devel/llvm package + [[ -f "${ED%/}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] && \ + rm "${ED%/}${MOZILLA_FIVE_HOME}/llvm-symbolizer" + + # firefox and firefox-bin are identical + rm "${ED%/}"${MOZILLA_FIVE_HOME}/firefox-bin || die + dosym firefox ${MOZILLA_FIVE_HOME}/firefox-bin + + # Required in order to use plugins and even run firefox on hardened. + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,plugin-container} +} + +pkg_preinst() { + gnome2_icon_savelist + + # if the apulse libs are available in MOZILLA_FIVE_HOME then apulse + # doesn't need to be forced into the LD_LIBRARY_PATH + if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then + einfo "APULSE found - Generating library symlinks for sound support" + local lib + pushd "${ED}"${MOZILLA_FIVE_HOME} &>/dev/null || die + for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do + # a quickpkg rolled by hand will grab symlinks as part of the package, + # so we need to avoid creating them if they already exist. + if ! [ -L ${lib##*/} ]; then + ln -s "${lib}" ${lib##*/} || die + fi + done + popd &>/dev/null || die + fi +} + +pkg_postinst() { + gnome2_icon_cache_update + xdg_desktop_database_update + + if ! use gmp-autoupdate && ! use eme-free ; then + elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" + elog "installing into new profiles:" + local plugin + for plugin in "${GMP_PLUGIN_LIST[@]}"; do elog "\t ${plugin}" ; done + elog + fi + + if use pulseaudio && has_version ">=media-sound/apulse-0.1.9"; then + elog "Apulse was detected at merge time on this system and so it will always be" + elog "used for sound. If you wish to use pulseaudio instead please unmerge" + elog "media-sound/apulse." + elog + fi +} + +pkg_postrm() { + gnome2_icon_cache_update + xdg_desktop_database_update +} diff --git a/www-client/firefox/firefox-67.0.4.ebuild b/www-client/firefox/firefox-67.0.4.ebuild new file mode 100644 index 000000000000..7f5184eeb318 --- /dev/null +++ b/www-client/firefox/firefox-67.0.4.ebuild @@ -0,0 +1,752 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +VIRTUALX_REQUIRED="pgo" +WANT_AUTOCONF="2.1" +MOZ_ESR="" + +PYTHON_COMPAT=( python3_{5,6,7} ) +PYTHON_REQ_USE='ncurses,sqlite,ssl,threads(+)' + +# This list can be updated with scripts/get_langs.sh from the mozilla overlay +MOZ_LANGS=( ach af an ar as ast az bg bn-BD bn-IN br bs ca cak cs cy da de dsb +el en en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa ff fi fr fy-NL ga-IE +gd gl gn gu-IN he hi-IN hr hsb hu hy-AM id is it ja ka kab kk km kn ko lij lt lv +mai mk ml mr ms nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq +sr sv-SE ta te th tr uk uz vi xh zh-CN zh-TW ) + +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas +MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI +MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI +MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI + +if [[ ${MOZ_ESR} == 1 ]] ; then + # ESR releases have slightly different version numbers + MOZ_PV="${MOZ_PV}esr" +fi + +# Patch version +PATCH="${PN}-67.0-patches-05" + +MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases" +MOZ_SRC_URI="${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz" + +if [[ "${PV}" == *_rc* ]]; then + MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}" + MOZ_LANGPACK_PREFIX="linux-i686/xpi/" + MOZ_SRC_URI="${MOZ_HTTP_URI}/source/${PN}-${MOZ_PV}.source.tar.xz -> $P.tar.xz" +fi + +LLVM_MAX_SLOT=8 + +inherit check-reqs eapi7-ver flag-o-matic toolchain-funcs eutils \ + gnome2-utils llvm mozcoreconf-v6 pax-utils xdg-utils \ + autotools mozlinguas-v2 virtualx + +DESCRIPTION="Firefox Web Browser" +HOMEPAGE="https://www.mozilla.com/firefox" + +KEYWORDS="~amd64 ~x86" + +SLOT="0" +LICENSE="MPL-2.0 GPL-2 LGPL-2.1" +IUSE="bindist clang cpu_flags_x86_avx2 dbus debug eme-free geckodriver + +gmp-autoupdate hardened hwaccel jack lto neon pgo pulseaudio + +screenshot selinux startup-notification +system-av1 + +system-harfbuzz +system-icu +system-jpeg +system-libevent + +system-sqlite +system-libvpx +system-webp test wayland wifi" +RESTRICT="!bindist? ( bindist )" + +PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c,whissi}/mozilla/patchsets/${PATCH}.tar.xz ) +SRC_URI="${SRC_URI} + ${MOZ_SRC_URI} + ${PATCH_URIS[@]}" + +CDEPEND=" + >=dev-libs/nss-3.43 + >=dev-libs/nspr-4.21 + dev-libs/atk + dev-libs/expat + >=x11-libs/cairo-1.10[X] + >=x11-libs/gtk+-2.18:2 + >=x11-libs/gtk+-3.4.0:3=[X] + x11-libs/gdk-pixbuf + >=x11-libs/pango-1.22.0 + >=media-libs/libpng-1.6.35:0=[apng] + >=media-libs/mesa-10.2:* + media-libs/fontconfig + >=media-libs/freetype-2.4.10 + kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) ) + virtual/freedesktop-icon-theme + dbus? ( >=sys-apps/dbus-0.60 + >=dev-libs/dbus-glib-0.72 ) + startup-notification? ( >=x11-libs/startup-notification-0.8 ) + >=x11-libs/pixman-0.19.2 + >=dev-libs/glib-2.26:2 + >=sys-libs/zlib-1.2.3 + >=virtual/libffi-3.0.10:= + virtual/ffmpeg + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXrender + x11-libs/libXt + system-av1? ( + >=media-libs/dav1d-0.2.0:= + >=media-libs/libaom-1.0.0:= + ) + system-harfbuzz? ( >=media-libs/harfbuzz-2.3.1:0= >=media-gfx/graphite2-1.3.13 ) + system-icu? ( >=dev-libs/icu-63.1:= ) + system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) + system-libevent? ( >=dev-libs/libevent-2.0:0=[threads] ) + system-libvpx? ( + >=media-libs/libvpx-1.7.0:0=[postproc] + <media-libs/libvpx-1.8:0=[postproc] + ) + system-sqlite? ( >=dev-db/sqlite-3.27.2:3[secure-delete,debug=] ) + system-webp? ( >=media-libs/libwebp-1.0.2:0= ) + wifi? ( kernel_linux? ( >=sys-apps/dbus-0.60 + >=dev-libs/dbus-glib-0.72 + net-misc/networkmanager ) ) + jack? ( virtual/jack ) + selinux? ( sec-policy/selinux-mozilla )" + +RDEPEND="${CDEPEND} + jack? ( virtual/jack ) + pulseaudio? ( || ( media-sound/pulseaudio + >=media-sound/apulse-0.1.9 ) ) + selinux? ( sec-policy/selinux-mozilla )" + +DEPEND="${CDEPEND} + app-arch/zip + app-arch/unzip + >=dev-util/cbindgen-0.8.2 + >=net-libs/nodejs-8.11.0 + >=sys-devel/binutils-2.30 + sys-apps/findutils + || ( + ( + sys-devel/clang:8 + !clang? ( sys-devel/llvm:8 ) + clang? ( + =sys-devel/lld-8* + sys-devel/llvm:8[gold] + pgo? ( =sys-libs/compiler-rt-sanitizers-8*[profile] ) + ) + ) + ( + sys-devel/clang:7 + !clang? ( sys-devel/llvm:7 ) + clang? ( + =sys-devel/lld-7* + sys-devel/llvm:7[gold] + pgo? ( =sys-libs/compiler-rt-sanitizers-7*[profile] ) + ) + ) + ( + sys-devel/clang:6 + !clang? ( sys-devel/llvm:6 ) + clang? ( + =sys-devel/lld-6* + sys-devel/llvm:6[gold] + pgo? ( =sys-libs/compiler-rt-sanitizers-6*[profile] ) + ) + ) + ) + pulseaudio? ( media-sound/pulseaudio ) + >=virtual/cargo-1.31.0 + >=virtual/rust-1.31.0 + wayland? ( >=x11-libs/gtk+-3.11:3[wayland] ) + amd64? ( >=dev-lang/yasm-1.1 virtual/opengl ) + x86? ( >=dev-lang/yasm-1.1 virtual/opengl ) + !system-av1? ( dev-lang/nasm )" + +# Due to a bug in GCC, profile guided optimization will produce +# AVX2 instructions, bug #677052 +REQUIRED_USE="wifi? ( dbus ) + pgo? ( lto )" + +S="${WORKDIR}/firefox-${PV%_*}" + +QA_PRESTRIPPED="usr/lib*/${PN}/firefox" + +BUILD_OBJ_DIR="${S}/ff" + +# allow GMP_PLUGIN_LIST to be set in an eclass or +# overridden in the enviromnent (advanced hackers only) +if [[ -z $GMP_PLUGIN_LIST ]] ; then + GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) +fi + +llvm_check_deps() { + if ! has_version --host-root "sys-devel/clang:${LLVM_SLOT}" ; then + ewarn "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." + return 1 + fi + + if use clang ; then + if ! has_version --host-root "=sys-devel/lld-${LLVM_SLOT}*" ; then + ewarn "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." + return 1 + fi + + if use pgo ; then + if ! has_version --host-root "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*" ; then + ewarn "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." + return 1 + fi + fi + fi + + einfo "Will use LLVM slot ${LLVM_SLOT}!" +} + +pkg_setup() { + moz_pkgsetup + + # Avoid PGO profiling problems due to enviroment leakage + # These should *always* be cleaned up anyway + unset DBUS_SESSION_BUS_ADDRESS \ + DISPLAY \ + ORBIT_SOCKETDIR \ + SESSION_MANAGER \ + XDG_SESSION_COOKIE \ + XAUTHORITY + + if ! use bindist ; then + einfo + elog "You are enabling official branding. You may not redistribute this build" + elog "to any users on your network or the internet. Doing so puts yourself into" + elog "a legal problem with Mozilla Foundation." + elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag." + fi + + addpredict /proc/self/oom_score_adj + + llvm_pkg_setup +} + +pkg_pretend() { + # Ensure we have enough disk space to compile + if use pgo || use debug || use test ; then + CHECKREQS_DISK_BUILD="8G" + else + CHECKREQS_DISK_BUILD="4G" + fi + + check-reqs_pkg_setup +} + +src_unpack() { + unpack ${A} + + # Unpack language packs + mozlinguas_src_unpack +} + +src_prepare() { + use !wayland && rm -f "${WORKDIR}/firefox/2019_mozilla-bug1539471.patch" + eapply "${WORKDIR}/firefox" + + # Allow user to apply any additional patches without modifing ebuild + eapply_user + + # Enable gnomebreakpad + if use debug ; then + sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ + "${S}"/build/unix/run-mozilla.sh || die "sed failed!" + fi + + # Drop -Wl,--as-needed related manipulation for ia64 as it causes ld sefgaults, bug #582432 + if use ia64 ; then + sed -i \ + -e '/^OS_LIBS += no_as_needed/d' \ + -e '/^OS_LIBS += as_needed/d' \ + "${S}"/widget/gtk/mozgtk/gtk2/moz.build \ + "${S}"/widget/gtk/mozgtk/gtk3/moz.build \ + || die "sed failed to drop --as-needed for ia64" + fi + + # Ensure that our plugins dir is enabled as default + sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \ + "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!" + sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \ + "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!" + + # Fix sandbox violations during make clean, bug 372817 + sed -e "s:\(/no-such-file\):${T}\1:g" \ + -i "${S}"/config/rules.mk \ + -i "${S}"/nsprpub/configure{.in,} \ + || die + + # Don't exit with error when some libs are missing which we have in + # system. + sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ + -i "${S}"/browser/installer/Makefile.in || die + + # Don't error out when there's no files to be removed: + sed 's@\(xargs rm\)$@\1 -f@' \ + -i "${S}"/toolkit/mozapps/installer/packager.mk || die + + # Keep codebase the same even if not using official branding + sed '/^MOZ_DEV_EDITION=1/d' \ + -i "${S}"/browser/branding/aurora/configure.sh || die + + # rustfmt, a tool to format Rust code, is optional and not required to build Firefox. + # However, when available, an unsupported version can cause problems, bug #669548 + sed -i -e "s@check_prog('RUSTFMT', add_rustup_path('rustfmt')@check_prog('RUSTFMT', add_rustup_path('rustfmt_do_not_use')@" \ + "${S}"/build/moz.configure/rust.configure || die + + # Autotools configure is now called old-configure.in + # This works because there is still a configure.in that happens to be for the + # shell wrapper configure script + eautoreconf old-configure.in + + # Must run autoconf in js/src + cd "${S}"/js/src || die + eautoconf old-configure.in +} + +src_configure() { + MEXTENSIONS="default" + # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) + # Note: These are for Gentoo Linux use ONLY. For your own distribution, please + # get your own set of keys. + _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc + + # Add information about TERM to output (build.log) to aid debugging + # blessings problems + if [[ -n "${TERM}" ]] ; then + einfo "TERM is set to: \"${TERM}\"" + else + einfo "TERM is unset." + fi + + if use clang && ! tc-is-clang ; then + # Force clang + einfo "Enforcing the use of clang due to USE=clang ..." + CC=${CHOST}-clang + CXX=${CHOST}-clang++ + strip-unsupported-flags + elif ! use clang && ! tc-is-gcc ; then + # Force gcc + einfo "Enforcing the use of gcc due to USE=-clang ..." + CC=${CHOST}-gcc + CXX=${CHOST}-g++ + strip-unsupported-flags + fi + + #################################### + # + # mozconfig, CFLAGS and CXXFLAGS setup + # + #################################### + + mozconfig_init + # common config components + mozconfig_annotate 'system_libs' \ + --with-system-zlib \ + --with-system-bz2 + + # Must pass release in order to properly select linker + mozconfig_annotate 'Enable by Gentoo' --enable-release + + # Don't let user's LTO flags clash with upstream's flags + filter-flags -flto* + + if use lto ; then + local show_old_compiler_warning= + + if use clang ; then + # At this stage CC is adjusted and the following check will + # will work + if [[ $(clang-major-version) -lt 7 ]] ; then + show_old_compiler_warning=1 + fi + + # Upstream only supports lld when using clang + mozconfig_annotate "forcing ld=lld due to USE=clang and USE=lto" --enable-linker=lld + else + if [[ $(gcc-major-version) -lt 8 ]] ; then + show_old_compiler_warning=1 + fi + + if ! use cpu_flags_x86_avx2 ; then + local _gcc_version_with_ipa_cdtor_fix="8.3" + local _current_gcc_version="$(gcc-major-version).$(gcc-minor-version)" + + if ver_test "${_current_gcc_version}" -lt "${_gcc_version_with_ipa_cdtor_fix}" ; then + # due to a GCC bug, GCC will produce AVX2 instructions + # even if the CPU doesn't support AVX2, https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01142.html + einfo "Disable IPA cdtor due to bug in GCC and missing AVX2 support -- triggered by USE=lto" + append-ldflags -fdisable-ipa-cdtor + else + einfo "No GCC workaround required, GCC version is already patched!" + fi + else + einfo "No GCC workaround required, system supports AVX2" + fi + + # Linking only works when using ld.gold when LTO is enabled + mozconfig_annotate "forcing ld=gold due to USE=lto" --enable-linker=gold + fi + + if [[ -n "${show_old_compiler_warning}" ]] ; then + # Checking compiler's major version uses CC variable. Because we allow + # user to control used compiler via USE=clang flag, we cannot use + # initial value. So this is the earliest stage where we can do this check + # because pkg_pretend is not called in the main phase function sequence + # environment saving is not guaranteed so we don't know if we will have + # correct compiler until now. + ewarn "" + ewarn "USE=lto requires up-to-date compiler (>=gcc-8 or >=clang-7)." + ewarn "You are on your own -- expect build failures. Don't file bugs using that unsupported configuration!" + ewarn "" + sleep 5 + fi + + mozconfig_annotate '+lto' --enable-lto=thin + + if use pgo ; then + mozconfig_annotate '+pgo' MOZ_PGO=1 + fi + else + # Avoid auto-magic on linker + if use clang ; then + # This is upstream's default + mozconfig_annotate "forcing ld=lld due to USE=clang" --enable-linker=lld + elif tc-ld-is-gold ; then + mozconfig_annotate "linker is set to gold" --enable-linker=gold + else + mozconfig_annotate "linker is set to bfd" --enable-linker=bfd + fi + fi + + # It doesn't compile on alpha without this LDFLAGS + use alpha && append-ldflags "-Wl,--no-relax" + + # Add full relro support for hardened + if use hardened ; then + append-ldflags "-Wl,-z,relro,-z,now" + mozconfig_use_enable hardened hardening + fi + + # Modifications to better support ARM, bug 553364 + if use neon ; then + mozconfig_annotate '' --with-fpu=neon + + if ! tc-is-clang ; then + # thumb options aren't supported when using clang, bug 666966 + mozconfig_annotate '' --with-thumb=yes + mozconfig_annotate '' --with-thumb-interwork=no + fi + fi + if [[ ${CHOST} == armv*h* ]] ; then + mozconfig_annotate '' --with-float-abi=hard + if ! use system-libvpx ; then + sed -i -e "s|softfp|hard|" \ + "${S}"/media/libvpx/moz.build + fi + fi + + mozconfig_use_enable !bindist official-branding + + mozconfig_use_enable debug + mozconfig_use_enable debug tests + if ! use debug ; then + mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols + else + mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols + fi + # These are enabled by default in all mozilla applications + mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr + mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr + mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include \ + --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir) + mozconfig_annotate '' --prefix="${EPREFIX}"/usr + mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) + mozconfig_annotate '' --disable-crashreporter + mozconfig_annotate 'Gentoo default' --with-system-png + mozconfig_annotate '' --enable-system-ffi + mozconfig_annotate '' --disable-gconf + mozconfig_annotate '' --with-intl-api + mozconfig_annotate '' --enable-system-pixman + # Instead of the standard --build= and --host=, mozilla uses --host instead + # of --build, and --target intstead of --host. + # Note, mozilla also has --build but it does not do what you think it does. + # Set both --target and --host as mozilla uses python to guess values otherwise + mozconfig_annotate '' --target="${CHOST}" + mozconfig_annotate '' --host="${CBUILD:-${CHOST}}" + if use system-libevent ; then + mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr + fi + + if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then + mozconfig_annotate '' --enable-rust-simd + fi + + # use the gtk3 toolkit (the only one supported at this point) + # TODO: Will this result in automagic dependency on x11-libs/gtk+[wayland]? + if use wayland ; then + mozconfig_annotate '' --enable-default-toolkit=cairo-gtk3-wayland + else + mozconfig_annotate '' --enable-default-toolkit=cairo-gtk3 + fi + + mozconfig_use_enable startup-notification + mozconfig_use_enable system-sqlite + mozconfig_use_with system-av1 + mozconfig_use_with system-harfbuzz + mozconfig_use_with system-harfbuzz system-graphite2 + mozconfig_use_with system-icu + mozconfig_use_with system-jpeg + mozconfig_use_with system-libvpx + mozconfig_use_with system-webp + mozconfig_use_enable pulseaudio + # force the deprecated alsa sound code if pulseaudio is disabled + if use kernel_linux && ! use pulseaudio ; then + mozconfig_annotate '-pulseaudio' --enable-alsa + fi + + # Disable built-in ccache support to avoid sandbox violation, #665420 + # Use FEATURES=ccache instead! + mozconfig_annotate '' --without-ccache + sed -i -e 's/ccache_stats = None/return None/' \ + python/mozbuild/mozbuild/controller/building.py || \ + die "Failed to disable ccache stats call" + + mozconfig_use_enable dbus + + mozconfig_use_enable wifi necko-wifi + + mozconfig_use_enable geckodriver + + # enable JACK, bug 600002 + mozconfig_use_enable jack + + # Enable/Disable eme support + use eme-free && mozconfig_annotate '+eme-free' --disable-eme + + # Setup api key for location services and safebrowsing, https://bugzilla.mozilla.org/show_bug.cgi?id=1531176#c34 + echo -n "${_google_api_key}" > "${S}"/google-api-key + mozconfig_annotate '' --with-google-location-service-api-keyfile="${S}/google-api-key" + mozconfig_annotate '' --with-google-safebrowsing-api-keyfile="${S}/google-api-key" + + mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" + + # disable webrtc for now, bug 667642 + use arm && mozconfig_annotate 'broken on arm' --disable-webrtc + + # allow elfhack to work in combination with unstripped binaries + # when they would normally be larger than 2GiB. + append-ldflags "-Wl,--compress-debug-sections=zlib" + + if use clang ; then + # https://bugzilla.mozilla.org/show_bug.cgi?id=1482204 + # https://bugzilla.mozilla.org/show_bug.cgi?id=1483822 + mozconfig_annotate 'elf-hack is broken when using Clang' --disable-elf-hack + fi + + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig + echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig + + # Finalize and report settings + mozconfig_final + + mkdir -p "${S}"/third_party/rust/libloading/.deps + + # workaround for funky/broken upstream configure... + SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ + ./mach configure || die +} + +src_compile() { + local _virtx= + if use pgo ; then + _virtx=virtx + + # Reset and cleanup environment variables used by GNOME/XDG + gnome2_environment_reset + + addpredict /root + addpredict /etc/gconf + fi + + MOZ_MAKE_FLAGS="${MAKEOPTS} -O" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 ${_virtx} \ + ./mach build --verbose || die +} + +src_install() { + cd "${BUILD_OBJ_DIR}" || die + + # Pax mark xpcshell for hardened support, only used for startupcache creation. + pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell + + # Add our default prefs for firefox + cp "${FILESDIR}"/gentoo-default-prefs.js-2 \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + + # set dictionary path, to use system hunspell + echo "pref(\"spellchecker.dictionary_path\", \"${EPREFIX}/usr/share/myspell\");" \ + >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die + + # force the graphite pref if system-harfbuzz is enabled, since the pref cant disable it + if use system-harfbuzz ; then + echo "sticky_pref(\"gfx.font_rendering.graphite.enabled\",true);" \ + >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die + fi + + # force cairo as the canvas renderer on platforms without skia support + if [[ $(tc-endian) == "big" ]] ; then + echo "sticky_pref(\"gfx.canvas.azure.backends\",\"cairo\");" \ + >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die + echo "sticky_pref(\"gfx.content.azure.backends\",\"cairo\");" \ + >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die + fi + + # Augment this with hwaccel prefs + if use hwaccel ; then + cat "${FILESDIR}"/gentoo-hwaccel-prefs.js-1 >> \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + fi + + if ! use screenshot ; then + echo "pref(\"extensions.screenshots.disabled\", true);" >> \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + fi + + echo "pref(\"extensions.autoDisableScopes\", 3);" >> \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + + local plugin + use gmp-autoupdate || use eme-free || for plugin in "${GMP_PLUGIN_LIST[@]}" ; do + echo "pref(\"media.${plugin}.autoupdate\", false);" >> \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ + || die + done + + cd "${S}" + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ + DESTDIR="${D}" ./mach install || die + + if use geckodriver ; then + cp "${BUILD_OBJ_DIR}"/dist/bin/geckodriver "${ED%/}"${MOZILLA_FIVE_HOME} || die + pax-mark m "${ED%/}"${MOZILLA_FIVE_HOME}/geckodriver + + dosym ${MOZILLA_FIVE_HOME}/geckodriver /usr/bin/geckodriver + fi + + # Install language packs + MOZ_INSTALL_L10N_XPIFILE="1" mozlinguas_src_install + + local size sizes icon_path icon name + if use bindist ; then + sizes="16 32 48" + icon_path="${S}/browser/branding/aurora" + # Firefox's new rapid release cycle means no more codenames + # Let's just stick with this one... + icon="aurora" + name="Aurora" + + # Override preferences to set the MOZ_DEV_EDITION defaults, since we + # don't define MOZ_DEV_EDITION to avoid profile debaucles. + # (source: browser/app/profile/firefox.js) + cat >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" <<PROFILE_EOF +pref("app.feedback.baseURL", "https://input.mozilla.org/%LOCALE%/feedback/firefoxdev/%VERSION%/"); +sticky_pref("lightweightThemes.selectedThemeID", "firefox-devedition@mozilla.org"); +sticky_pref("browser.devedition.theme.enabled", true); +sticky_pref("devtools.theme", "dark"); +PROFILE_EOF + + else + sizes="16 22 24 32 48 64 128 256" + icon_path="${S}/browser/branding/official" + icon="${PN}" + name="Mozilla Firefox" + fi + + # Disable built-in auto-update because we update firefox through package manager + insinto ${MOZILLA_FIVE_HOME}/distribution/ + newins "${FILESDIR}"/disable-auto-update.policy.json policies.json + + # Install icons and .desktop for menu entry + for size in ${sizes}; do + insinto "/usr/share/icons/hicolor/${size}x${size}/apps" + newins "${icon_path}/default${size}.png" "${icon}.png" + done + # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs + newicon "${icon_path}/default48.png" "${icon}.png" + newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" + sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ + "${ED}/usr/share/applications/${PN}.desktop" || die + + # Add StartupNotify=true bug 237317 + if use startup-notification ; then + echo "StartupNotify=true"\ + >> "${ED}/usr/share/applications/${PN}.desktop" \ + || die + fi + + # Don't install llvm-symbolizer from sys-devel/llvm package + [[ -f "${ED%/}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] && \ + rm "${ED%/}${MOZILLA_FIVE_HOME}/llvm-symbolizer" + + # firefox and firefox-bin are identical + rm "${ED%/}"${MOZILLA_FIVE_HOME}/firefox-bin || die + dosym firefox ${MOZILLA_FIVE_HOME}/firefox-bin + + # Required in order to use plugins and even run firefox on hardened. + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,plugin-container} +} + +pkg_preinst() { + gnome2_icon_savelist + + # if the apulse libs are available in MOZILLA_FIVE_HOME then apulse + # doesn't need to be forced into the LD_LIBRARY_PATH + if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then + einfo "APULSE found - Generating library symlinks for sound support" + local lib + pushd "${ED}"${MOZILLA_FIVE_HOME} &>/dev/null || die + for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do + # a quickpkg rolled by hand will grab symlinks as part of the package, + # so we need to avoid creating them if they already exist. + if [[ ! -L ${lib##*/} ]] ; then + ln -s "${lib}" ${lib##*/} || die + fi + done + popd &>/dev/null || die + fi +} + +pkg_postinst() { + gnome2_icon_cache_update + xdg_desktop_database_update + + if ! use gmp-autoupdate && ! use eme-free ; then + elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" + elog "installing into new profiles:" + local plugin + for plugin in "${GMP_PLUGIN_LIST[@]}"; do elog "\t ${plugin}" ; done + elog + fi + + if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then + elog "Apulse was detected at merge time on this system and so it will always be" + elog "used for sound. If you wish to use pulseaudio instead please unmerge" + elog "media-sound/apulse." + elog + fi +} + +pkg_postrm() { + gnome2_icon_cache_update + xdg_desktop_database_update +} diff --git a/www-client/opera-beta/opera-beta-62.0.3331.10.ebuild b/www-client/opera-beta/opera-beta-62.0.3331.10.ebuild new file mode 100644 index 000000000000..59a8587ec4bd --- /dev/null +++ b/www-client/opera-beta/opera-beta-62.0.3331.10.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +CHROMIUM_LANGS=" + be bg bn ca cs da de el en-GB es es-419 fi fil fr fr-CA hi hr hu id it + ja ko lt lv ms nb nl pl pt-BR pt-PT ro ru sk sr sv sw ta te th tr uk vi + zh-CN zh-TW +" +inherit chromium-2 multilib unpacker xdg-utils + +DESCRIPTION="A fast and secure web browser" +HOMEPAGE="https://www.opera.com/" +LICENSE="OPERA-2014" +SLOT="0" +SRC_URI_BASE=" + https://download1.operacdn.com/pub/ + https://download2.operacdn.com/pub/ + https://download3.operacdn.com/pub/ + https://download4.operacdn.com/pub/ +" +SRC_URI="amd64? (" +for uri in ${SRC_URI_BASE}; do +SRC_URI+=" + "${uri}${PN}/${PV}/linux/${PN}_${PV}_amd64.deb" +" +done +SRC_URI+=")" +KEYWORDS="~amd64" + +RDEPEND=" + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + gnome-base/gconf:2 + media-libs/alsa-lib + media-libs/fontconfig + media-libs/freetype + net-misc/curl + net-print/cups + sys-apps/dbus + x11-libs/cairo + x11-libs/gdk-pixbuf + x11-libs/gtk+:3 + x11-libs/libX11 + x11-libs/libXScrnSaver + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXtst + x11-libs/libnotify + x11-libs/pango[X] +" + +QA_PREBUILT="*" +S=${WORKDIR} + +pkg_setup() { + OPERA_HOME="usr/$(get_libdir)/${PN}" +} + +src_unpack() { + unpack_deb ${A} +} + +src_prepare() { + default + + case ${ARCH} in + amd64) + mv usr/lib/x86_64-linux-gnu usr/$(get_libdir) || die + rm -r usr/lib || die + ;; + x86) + mv usr/lib/i386-linux-gnu/${PN} usr/$(get_libdir)/ || die + ;; + esac + + mv usr/share/doc/${PN} usr/share/doc/${PF} || die + gunzip usr/share/doc/${PF}/changelog.gz || die + + rm usr/bin/${PN} || die + + pushd "${OPERA_HOME}/localization" > /dev/null || die + chromium_remove_language_paks + popd > /dev/null || die + + sed -i \ + -e 's|^TargetEnvironment|X-&|g' \ + usr/share/applications/${PN}.desktop || die +} + +src_install() { + mv * "${D}" || die + dosym ../$(get_libdir)/${PN}/${PN} /usr/bin/${PN} + fperms 4711 /usr/$(get_libdir)/${PN}/opera_sandbox +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} diff --git a/www-client/opera-beta/opera-beta-62.0.3331.14.ebuild b/www-client/opera-beta/opera-beta-62.0.3331.14.ebuild new file mode 100644 index 000000000000..59a8587ec4bd --- /dev/null +++ b/www-client/opera-beta/opera-beta-62.0.3331.14.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +CHROMIUM_LANGS=" + be bg bn ca cs da de el en-GB es es-419 fi fil fr fr-CA hi hr hu id it + ja ko lt lv ms nb nl pl pt-BR pt-PT ro ru sk sr sv sw ta te th tr uk vi + zh-CN zh-TW +" +inherit chromium-2 multilib unpacker xdg-utils + +DESCRIPTION="A fast and secure web browser" +HOMEPAGE="https://www.opera.com/" +LICENSE="OPERA-2014" +SLOT="0" +SRC_URI_BASE=" + https://download1.operacdn.com/pub/ + https://download2.operacdn.com/pub/ + https://download3.operacdn.com/pub/ + https://download4.operacdn.com/pub/ +" +SRC_URI="amd64? (" +for uri in ${SRC_URI_BASE}; do +SRC_URI+=" + "${uri}${PN}/${PV}/linux/${PN}_${PV}_amd64.deb" +" +done +SRC_URI+=")" +KEYWORDS="~amd64" + +RDEPEND=" + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + gnome-base/gconf:2 + media-libs/alsa-lib + media-libs/fontconfig + media-libs/freetype + net-misc/curl + net-print/cups + sys-apps/dbus + x11-libs/cairo + x11-libs/gdk-pixbuf + x11-libs/gtk+:3 + x11-libs/libX11 + x11-libs/libXScrnSaver + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXtst + x11-libs/libnotify + x11-libs/pango[X] +" + +QA_PREBUILT="*" +S=${WORKDIR} + +pkg_setup() { + OPERA_HOME="usr/$(get_libdir)/${PN}" +} + +src_unpack() { + unpack_deb ${A} +} + +src_prepare() { + default + + case ${ARCH} in + amd64) + mv usr/lib/x86_64-linux-gnu usr/$(get_libdir) || die + rm -r usr/lib || die + ;; + x86) + mv usr/lib/i386-linux-gnu/${PN} usr/$(get_libdir)/ || die + ;; + esac + + mv usr/share/doc/${PN} usr/share/doc/${PF} || die + gunzip usr/share/doc/${PF}/changelog.gz || die + + rm usr/bin/${PN} || die + + pushd "${OPERA_HOME}/localization" > /dev/null || die + chromium_remove_language_paks + popd > /dev/null || die + + sed -i \ + -e 's|^TargetEnvironment|X-&|g' \ + usr/share/applications/${PN}.desktop || die +} + +src_install() { + mv * "${D}" || die + dosym ../$(get_libdir)/${PN}/${PN} /usr/bin/${PN} + fperms 4711 /usr/$(get_libdir)/${PN}/opera_sandbox +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} diff --git a/www-client/opera-developer/opera-developer-63.0.3349.0.ebuild b/www-client/opera-developer/opera-developer-63.0.3349.0.ebuild new file mode 100644 index 000000000000..132f88d22363 --- /dev/null +++ b/www-client/opera-developer/opera-developer-63.0.3349.0.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +CHROMIUM_LANGS=" + be bg bn ca cs da de el en-GB es es-419 fi fil fr fr-CA hi hr hu id it + ja ko lt lv ms nb nl pl pt-BR pt-PT ro ru sk sr sv sw ta te th tr uk vi + zh-CN zh-TW +" +inherit chromium-2 multilib unpacker xdg-utils + +DESCRIPTION="A fast and secure web browser" +HOMEPAGE="https://www.opera.com/" +LICENSE="OPERA-2014" +SLOT="0" +SRC_URI_BASE=" + https://download1.operacdn.com/pub/ + https://download2.operacdn.com/pub/ + https://download3.operacdn.com/pub/ + https://download4.operacdn.com/pub/ +" +SRC_URI="amd64? (" +for uri in ${SRC_URI_BASE}; do +SRC_URI+=" + "${uri}${PN}/${PV}/linux/${PN}_${PV}_amd64.deb" +" +done +SRC_URI+=")" +KEYWORDS="~amd64" + +RDEPEND=" + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + gnome-base/gconf:2 + media-libs/alsa-lib + media-libs/fontconfig + media-libs/freetype + net-misc/curl + net-print/cups + sys-apps/dbus + x11-libs/cairo + x11-libs/gdk-pixbuf + x11-libs/gtk+:3 + x11-libs/libX11 + x11-libs/libXScrnSaver + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXtst + x11-libs/libnotify + x11-libs/pango[X] +" + +QA_PREBUILT="*" +S=${WORKDIR} + +src_unpack() { + unpack_deb ${A} +} + +pkg_setup() { + OPERA_HOME="usr/$(get_libdir)/${PN}" +} + +src_prepare() { + default + + case ${ARCH} in + amd64) + mv usr/lib/x86_64-linux-gnu usr/$(get_libdir) || die + rm -r usr/lib || die + ;; + x86) + mv usr/lib/i386-linux-gnu/${PN} usr/$(get_libdir)/ || die + ;; + esac + + mv usr/share/doc/${PN} usr/share/doc/${PF} || die + gunzip usr/share/doc/${PF}/changelog.gz || die + + rm usr/bin/${PN} || die + + pushd "${OPERA_HOME}/localization" > /dev/null || die + chromium_remove_language_paks + popd > /dev/null || die + + sed -i \ + -e 's|^TargetEnvironment|X-&|g' \ + usr/share/applications/${PN}.desktop || die +} + +src_install() { + mv * "${D}" || die + dosym ../$(get_libdir)/${PN}/${PN} /usr/bin/${PN} + fperms 4711 /usr/$(get_libdir)/${PN}/opera_sandbox +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} diff --git a/www-client/opera/opera-60.0.3255.170.ebuild b/www-client/opera/opera-60.0.3255.170.ebuild new file mode 100644 index 000000000000..fbf25ee7c636 --- /dev/null +++ b/www-client/opera/opera-60.0.3255.170.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +CHROMIUM_LANGS=" + be bg bn ca cs da de el en-GB en-US es-419 es fil fi fr-CA fr hi hr hu id + it ja ko lt lv ms nb nl pl pt-BR pt-PT ro ru sk sr sv sw ta te th tr uk vi + zh-CN zh-TW + +" +inherit chromium-2 multilib unpacker xdg-utils + +DESCRIPTION="A fast and secure web browser" +HOMEPAGE="https://www.opera.com/" +LICENSE="OPERA-2014" +SLOT="0" +SRC_URI_BASE=" + https://download1.operacdn.com/pub/ + https://download2.operacdn.com/pub/ + https://download3.operacdn.com/pub/ + https://download4.operacdn.com/pub/ +" +for uri in ${SRC_URI_BASE}; do +SRC_URI+=" + "${uri}${PN}/desktop/${PV}/linux/${PN}-stable_${PV}_amd64.deb" +" +done +KEYWORDS="~amd64" + +RDEPEND=" + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + gnome-base/gconf:2 + media-libs/alsa-lib + media-libs/fontconfig + media-libs/freetype + net-misc/curl + net-print/cups + sys-apps/dbus + x11-libs/cairo + x11-libs/gdk-pixbuf + x11-libs/gtk+:3 + x11-libs/libX11 + x11-libs/libXScrnSaver + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXtst + x11-libs/libnotify + x11-libs/pango[X] +" + +QA_PREBUILT="*" +S=${WORKDIR} + +src_unpack() { + unpack_deb ${A} +} + +src_prepare() { + default + + OPERA_HOME="usr/$(get_libdir)/${PN}" + + case ${ARCH} in + amd64) + mv usr/lib/x86_64-linux-gnu usr/$(get_libdir) || die + rm -r usr/lib || die + ;; + esac + + rm usr/bin/${PN} || die + + rm usr/share/doc/${PN}-stable/copyright || die + mv usr/share/doc/${PN}-stable usr/share/doc/${PF} || die + gunzip usr/share/doc/${PF}/changelog.gz || die + + pushd "${OPERA_HOME}"/localization > /dev/null || die + chromium_remove_language_paks + popd > /dev/null || die + + sed -i \ + -e 's|^TargetEnvironment|X-&|g' \ + usr/share/applications/${PN}.desktop || die +} + +src_install() { + rm "${OPERA_HOME}"/${PN}_autoupdate || die + mv * "${D}" || die + dosym ../$(get_libdir)/${PN}/${PN} /usr/bin/${PN} + fperms 4711 /"${OPERA_HOME}"/opera_sandbox +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update +} + +pkg_postinst() { + xdg_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update +} diff --git a/www-client/qutebrowser/qutebrowser-1.6.3.ebuild b/www-client/qutebrowser/qutebrowser-1.6.3.ebuild new file mode 100644 index 000000000000..6cc99d532db9 --- /dev/null +++ b/www-client/qutebrowser/qutebrowser-1.6.3.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python{3_5,3_6} ) + +inherit distutils-r1 eutils gnome2-utils xdg-utils + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="A keyboard-driven, vim-like browser based on PyQt5 and QtWebEngine" +HOMEPAGE="https://www.qutebrowser.org/ https://github.com/qutebrowser/qutebrowser" + +LICENSE="GPL-3" +SLOT="0" +IUSE="scripts test" + +COMMON_DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +DEPEND="${COMMON_DEPEND} + app-text/asciidoc + test? ( dev-python/pytest[${PYTHON_USEDEP}] )" +RDEPEND="${COMMON_DEPEND} + dev-python/attrs[${PYTHON_USEDEP}] + >=dev-python/jinja-2.8[${PYTHON_USEDEP}] + >=dev-python/pygments-2.1.3[${PYTHON_USEDEP}] + >=dev-python/pypeg2-2.15.2[${PYTHON_USEDEP}] + || ( ( + >=dev-python/PyQt5-5.12[${PYTHON_USEDEP},declarative,multimedia,gui,network,opengl,printsupport,sql,widgets] + dev-python/PyQtWebEngine[${PYTHON_USEDEP}] ) + <dev-python/PyQt5-5.12[${PYTHON_USEDEP},declarative,multimedia,gui,network,opengl,printsupport,sql,webengine,widgets] + ) + >=dev-python/pyyaml-3.12[${PYTHON_USEDEP},libyaml] +" + +# Tests restricted as the deplist (misc/requirements/requirements-tests.txt) +# isn't complete and X11 is required in order to start up qutebrowser. +RESTRICT="test" + +python_compile_all() { + if [[ ${PV} == "9999" ]]; then + "${PYTHON}" scripts/asciidoc2html.py || die "Failed generating docs" + fi + + a2x -f manpage doc/${PN}.1.asciidoc || die "Failed generating man page" +} + +python_test() { + py.test tests || die "Tests failed with ${EPYTHON}" +} + +python_install_all() { + doman doc/${PN}.1 + domenu misc/${PN}.desktop + doicon -s scalable icons/${PN}.svg + + if use scripts; then + # Install only those userscripts that have an explicit license header + exeinto /usr/share/qutebrowser/userscripts/ + doexe misc/userscripts/dmenu_qutebrowser + doexe misc/userscripts/openfeeds + doexe misc/userscripts/qute-keepass + doexe misc/userscripts/qute-pass + doexe misc/userscripts/rss + doexe misc/userscripts/tor_identity + fi + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "PDF display support" www-plugins/pdfjs + xdg_desktop_database_update + xdg_mimeinfo_database_update + gnome2_icon_cache_update +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_mimeinfo_database_update + gnome2_icon_cache_update +} diff --git a/www-client/seamonkey/files/seamonkey-gcc9.patch b/www-client/seamonkey/files/seamonkey-gcc9.patch new file mode 100644 index 000000000000..87d14e6a16c4 --- /dev/null +++ b/www-client/seamonkey/files/seamonkey-gcc9.patch @@ -0,0 +1,22 @@ +--- a/mozilla/js/xpconnect/src/XPCWrappedNative.cpp.ORIG 2018-07-09 21:54:43.000000000 +0200 ++++ b/mozilla/js/xpconnect/src/XPCWrappedNative.cpp 2019-05-04 17:49:23.893560494 +0200 +@@ -2218,15 +2218,16 @@ + const char* fmt = (i == 0) ? + "(%s" : (i == count-1) ? + ", %s)" : ", %s"; ++ ++ if (!name) { ++ return nullptr; ++ } + name = JS_sprintf_append(name, fmt, + array[i]->GetNameString()); + } + } + } + +- if (!name) { +- return nullptr; +- } + const char* fmt = "[xpconnect wrapped %s" FMT_ADDR FMT_STR(" (native") + FMT_ADDR FMT_STR(")") "]"; + if (si) { diff --git a/www-client/vivaldi-snapshot/vivaldi-snapshot-2.6.1566.38_p1.ebuild b/www-client/vivaldi-snapshot/vivaldi-snapshot-2.6.1566.38_p1.ebuild new file mode 100644 index 000000000000..76ff637ebaa0 --- /dev/null +++ b/www-client/vivaldi-snapshot/vivaldi-snapshot-2.6.1566.38_p1.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +CHROMIUM_LANGS=" + am ar be bg bn ca cs da de el en-GB en-US eo es es-419 es-PE et eu fa fi + fil fr fy gl gu he hi hr hu hy id io is it ja jbo ka kn ko ku lt lv mk ml + mr ms nb nl nn pl pt-BR pt-PT ro ru sc sk sl sq sr sv sw ta te th tr uk vi + zh-CN zh-TW +" +inherit chromium-2 multilib unpacker toolchain-funcs xdg-utils + +VIVALDI_HOME="opt/${PN}" +DESCRIPTION="A browser for our friends" +HOMEPAGE="https://vivaldi.com/" +VIVALDI_BASE_URI="https://downloads.vivaldi.com/snapshot/${PN}_${PV/_p/-}_" +SRC_URI=" + amd64? ( ${VIVALDI_BASE_URI}amd64.deb -> ${P}-amd64.deb ) + arm64? ( ${VIVALDI_BASE_URI}arm64.deb -> ${P}-arm64.deb ) + arm? ( ${VIVALDI_BASE_URI}armhf.deb -> ${P}-armhf.deb ) + x86? ( ${VIVALDI_BASE_URI}i386.deb -> ${P}-i386.deb ) +" + +LICENSE="Vivaldi" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86" +RESTRICT="bindist mirror" + +DEPEND=" + virtual/libiconv +" +RDEPEND=" + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + media-libs/alsa-lib + media-libs/fontconfig + media-libs/freetype + media-libs/speex + net-print/cups + sys-apps/dbus + sys-libs/libcap + x11-libs/cairo + x11-libs/gdk-pixbuf + x11-libs/gtk+:3 + x11-libs/libX11 + x11-libs/libXScrnSaver + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXtst + x11-libs/pango[X] +" +QA_PREBUILT="*" +S=${WORKDIR} + +src_unpack() { + unpack_deb ${A} +} + +src_prepare() { + iconv -c -t UTF-8 usr/share/applications/${PN}.desktop > "${T}"/${PN}.desktop || die + mv "${T}"/${PN}.desktop usr/share/applications/${PN}.desktop || die + + mv usr/share/doc/${PN} usr/share/doc/${PF} || die + chmod 0755 usr/share/doc/${PF} || die + + gunzip usr/share/doc/${PF}/changelog.gz || die + + rm \ + _gpgbuilder \ + etc/cron.daily/${PN} \ + ${VIVALDI_HOME}/libwidevinecdm.so \ + || die + rmdir \ + etc/cron.daily/ \ + etc/ \ + || die + + local c d + for d in 16 22 24 32 48 64 128 256; do + mkdir -p usr/share/icons/hicolor/${d}x${d}/apps || die + cp \ + ${VIVALDI_HOME}/product_logo_${d}.png \ + usr/share/icons/hicolor/${d}x${d}/apps/${PN}.png || die + done + + pushd "${VIVALDI_HOME}/locales" > /dev/null || die + chromium_remove_language_paks + popd > /dev/null || die + + eapply_user +} + +src_install() { + mv * "${D}" || die + dosym /${VIVALDI_HOME}/${PN} /usr/bin/${PN} + + fperms 4711 /${VIVALDI_HOME}/vivaldi-sandbox +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update +} diff --git a/www-client/vivaldi-snapshot/vivaldi-snapshot-2.6.1581.5_p1.ebuild b/www-client/vivaldi-snapshot/vivaldi-snapshot-2.6.1581.5_p1.ebuild new file mode 100644 index 000000000000..76ff637ebaa0 --- /dev/null +++ b/www-client/vivaldi-snapshot/vivaldi-snapshot-2.6.1581.5_p1.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +CHROMIUM_LANGS=" + am ar be bg bn ca cs da de el en-GB en-US eo es es-419 es-PE et eu fa fi + fil fr fy gl gu he hi hr hu hy id io is it ja jbo ka kn ko ku lt lv mk ml + mr ms nb nl nn pl pt-BR pt-PT ro ru sc sk sl sq sr sv sw ta te th tr uk vi + zh-CN zh-TW +" +inherit chromium-2 multilib unpacker toolchain-funcs xdg-utils + +VIVALDI_HOME="opt/${PN}" +DESCRIPTION="A browser for our friends" +HOMEPAGE="https://vivaldi.com/" +VIVALDI_BASE_URI="https://downloads.vivaldi.com/snapshot/${PN}_${PV/_p/-}_" +SRC_URI=" + amd64? ( ${VIVALDI_BASE_URI}amd64.deb -> ${P}-amd64.deb ) + arm64? ( ${VIVALDI_BASE_URI}arm64.deb -> ${P}-arm64.deb ) + arm? ( ${VIVALDI_BASE_URI}armhf.deb -> ${P}-armhf.deb ) + x86? ( ${VIVALDI_BASE_URI}i386.deb -> ${P}-i386.deb ) +" + +LICENSE="Vivaldi" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86" +RESTRICT="bindist mirror" + +DEPEND=" + virtual/libiconv +" +RDEPEND=" + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + media-libs/alsa-lib + media-libs/fontconfig + media-libs/freetype + media-libs/speex + net-print/cups + sys-apps/dbus + sys-libs/libcap + x11-libs/cairo + x11-libs/gdk-pixbuf + x11-libs/gtk+:3 + x11-libs/libX11 + x11-libs/libXScrnSaver + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXtst + x11-libs/pango[X] +" +QA_PREBUILT="*" +S=${WORKDIR} + +src_unpack() { + unpack_deb ${A} +} + +src_prepare() { + iconv -c -t UTF-8 usr/share/applications/${PN}.desktop > "${T}"/${PN}.desktop || die + mv "${T}"/${PN}.desktop usr/share/applications/${PN}.desktop || die + + mv usr/share/doc/${PN} usr/share/doc/${PF} || die + chmod 0755 usr/share/doc/${PF} || die + + gunzip usr/share/doc/${PF}/changelog.gz || die + + rm \ + _gpgbuilder \ + etc/cron.daily/${PN} \ + ${VIVALDI_HOME}/libwidevinecdm.so \ + || die + rmdir \ + etc/cron.daily/ \ + etc/ \ + || die + + local c d + for d in 16 22 24 32 48 64 128 256; do + mkdir -p usr/share/icons/hicolor/${d}x${d}/apps || die + cp \ + ${VIVALDI_HOME}/product_logo_${d}.png \ + usr/share/icons/hicolor/${d}x${d}/apps/${PN}.png || die + done + + pushd "${VIVALDI_HOME}/locales" > /dev/null || die + chromium_remove_language_paks + popd > /dev/null || die + + eapply_user +} + +src_install() { + mv * "${D}" || die + dosym /${VIVALDI_HOME}/${PN} /usr/bin/${PN} + + fperms 4711 /${VIVALDI_HOME}/vivaldi-sandbox +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update +} diff --git a/www-client/vivaldi/vivaldi-2.6.1566.40_p1.ebuild b/www-client/vivaldi/vivaldi-2.6.1566.40_p1.ebuild new file mode 100644 index 000000000000..69ed6a41d087 --- /dev/null +++ b/www-client/vivaldi/vivaldi-2.6.1566.40_p1.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +CHROMIUM_LANGS=" + am ar be bg bn ca cs da de el en-GB en-US eo es es-419 es-PE et eu fa fi + fil fr fy gl gu he hi hr hu hy id io is it ja jbo ka kn ko ku lt lv mk ml + mr ms nb nl nn pl pt-BR pt-PT ro ru sc sk sl sq sr sv sw ta te th tr uk vi + zh-CN zh-TW +" +inherit chromium-2 multilib unpacker toolchain-funcs xdg-utils + +#VIVALDI_BRANCH="snapshot" + +VIVALDI_PN="${PN}-${VIVALDI_BRANCH:-stable}" +VIVALDI_BIN="${PN}${VIVALDI_BRANCH/snapshot/-snapshot}" +VIVALDI_HOME="opt/${VIVALDI_BIN}" +DESCRIPTION="A browser for our friends" +HOMEPAGE="https://vivaldi.com/" +VIVALDI_BASE_URI="https://downloads.${PN}.com/${VIVALDI_BRANCH:-stable}/${VIVALDI_PN}_${PV/_p/-}_" +SRC_URI=" + amd64? ( ${VIVALDI_BASE_URI}amd64.deb -> ${P}-amd64.deb ) + arm? ( ${VIVALDI_BASE_URI}armhf.deb -> ${P}-armhf.deb ) + x86? ( ${VIVALDI_BASE_URI}i386.deb -> ${P}-i386.deb ) +" + +LICENSE="Vivaldi" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~x86" +RESTRICT="bindist mirror" + +DEPEND=" + virtual/libiconv +" +RDEPEND=" + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + media-libs/alsa-lib + media-libs/fontconfig + media-libs/freetype + media-libs/speex + net-print/cups + sys-apps/dbus + sys-libs/libcap + x11-libs/cairo + x11-libs/gdk-pixbuf + x11-libs/gtk+:3 + x11-libs/libX11 + x11-libs/libXScrnSaver + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXtst + x11-libs/pango[X] +" +QA_PREBUILT="*" +S=${WORKDIR} + +src_unpack() { + unpack_deb ${A} +} + +src_prepare() { + iconv -c -t UTF-8 usr/share/applications/${VIVALDI_PN}.desktop > "${T}"/${VIVALDI_PN}.desktop || die + mv "${T}"/${VIVALDI_PN}.desktop usr/share/applications/${VIVALDI_PN}.desktop || die + + sed -i \ + -e "s|${VIVALDI_BIN}|${PN}|g" \ + usr/share/applications/${VIVALDI_PN}.desktop \ + usr/share/xfce4/helpers/${VIVALDI_BIN}.desktop || die + + mv usr/share/doc/${VIVALDI_PN} usr/share/doc/${PF} || die + chmod 0755 usr/share/doc/${PF} || die + + gunzip usr/share/doc/${PF}/changelog.gz || die + + rm \ + _gpgbuilder \ + etc/cron.daily/${VIVALDI_BIN} \ + ${VIVALDI_HOME}/libwidevinecdm.so \ + || die + rmdir \ + etc/cron.daily/ \ + etc/ \ + || die + + local c d + for d in 16 22 24 32 48 64 128 256; do + mkdir -p usr/share/icons/hicolor/${d}x${d}/apps || die + cp \ + ${VIVALDI_HOME}/product_logo_${d}.png \ + usr/share/icons/hicolor/${d}x${d}/apps/${PN}.png || die + done + + pushd "${VIVALDI_HOME}/locales" > /dev/null || die + chromium_remove_language_paks + popd > /dev/null || die + + eapply_user +} + +src_install() { + mv * "${D}" || die + dosym /${VIVALDI_HOME}/${PN} /usr/bin/${PN} + + fperms 4711 /${VIVALDI_HOME}/${PN}-sandbox +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update +} |