Adding isort

This commit is contained in:
Gerardo J. Puerta
2020-09-15 10:56:07 +02:00
parent 20d0f8b41c
commit 73dd5b7bae
66 changed files with 6453 additions and 1 deletions

View File

@ -0,0 +1,13 @@
AUX 01-chromium.conf 967 BLAKE2B d5da500872d5fdca245420942e1a5718ebd1bd4d47d0496306910c5929d4336b69082b48a6190e4617efebdbec68fd5fe8c67be3f8f3a2a943f42b778adafe71 SHA512 e66bc79027cf2311cea810ab02e59ffeac9698f3a83d773ebf96d14e4e95e62a96cf16e416b3638681c0be7d4b72da47091d4f8933dc3388c7f9dc5cafae5505
AUX chromium-83-vaapi.patch 8203 BLAKE2B c36a2c695b4ffe00fff585d1f260d06ca0fc686a6d05442e746806b8a1d1a35396f4334ab480d4e3aa851d2d7cfff373606bcd8e15330e51f96d49779a25f98c SHA512 e0e930e4e5713b86ad87c9d5e901ed608dd982ab6cb6c0e8fa2cc7033a6d10dd85968a1e21d377ee35ba4b75068f7aadeda42fc11a85de3121a58e28bffd3cdf
AUX chromium-84-mediaalloc.patch 1242 BLAKE2B 3545ea4f8d71a062f71c20f4fa3e1460dbd02d3512ce6445ac4f948582a51bdcbd98829eff9b01cb7b920313d1f849534c46a942eed209a56ca373da8e938b6b SHA512 7799be695afe24844aad35ee4ed2aeb338b36a06e29a7f8d8a9c5d2b2769167469b8cdfa3f8814e6976c26a2731fc73741dc1c0b095695e1a21bfd3db166f7b4
AUX chromium-84-pipewire.patch 31734 BLAKE2B 72b756453dd761ad1023e35797bd718ce44ce96eeb91c52478e161f859beb31e11a3167572c2039cdabcf614ef59d1112f0f3315e24c0755470a3b1e74957922 SHA512 da211745e2300f2619997c6a277ebcd103c17eb37d9bad4ced163d5dafb3f67e06f47eadd6415ffde24cfec6754577c93ee0177507fa7b1a98a81f98dc98ebcd
AUX chromium-browser.xml 408 BLAKE2B f780619ee2c179c84a5b636f773801c0b9ea718d5b63aac84554bb77cf32e1e59b01156e18d99bd84cd11708c8df4b828a68848348da4c6c9abd3877ad18466b SHA512 12c42129e3146c88264c85abdb0e20281eb36fd62dc4f3626f2534dd21e385acf46e21f7940911ea49182293cbcc72e6e76efde3e0056de3ae9e97064a68252c
AUX chromium-launcher-r4.sh 1609 BLAKE2B 77d840d6195a83859539e061f5cc304beccf8a20d1ab947c73cb858b44b3d4bd2930ae7f25c08e972cda18616601a6f5dc66cf3c61988813e99e4d4c9d50c942 SHA512 1d6211bf0703aa8df6ff9e584040470f004d84de9c81d38caee52bb96e38aa2bbd8e495dfcb85105275b53eaf6a4f1de5b89eaab9995e94f8cf313d74061c923
AUX chromium.default 148 BLAKE2B 5ee5b582c59a6e4bef87bbb0e232e2470ad412b1fbbb3b9af6ef7153edb55c5b9080cc16a5a115b0c5b3c381aa87ce57a7b12bdd2070e67dac10a6c2995ddbaf SHA512 0d4849e03592fb58b05e62a43021eca7e61615616c8907c3b2e445402e03adaf9e8fa25b0a745d6c31eb037456215cc02b59e345a3a06d932e76cf990c92d739
DIST chromium-84-patchset-3.tar.xz 20148 BLAKE2B d910570b43f63bcf4ead90ca4e4005a08d7c85b5b4e7af2a70ec4bc18265cbe8b075523878710075cfee4e0631eb3374e1e6d06251f4bf03377954807b1951e9 SHA512 316db8b0359b10a988242a0d665475d912fa9b610a547478d8c39b337afc02780a54d7024e231eb4fd402063cf439f6e2b4bb92a4968c8e0c3e69d84a2ae1664
DIST chromium-84.0.4147.89.tar.xz 845153972 BLAKE2B e8101805af6278fc9c49041071e7cd6d53fe79ba74b83b636584db57f459f003559758a51a1cd155d7fe3d5d0d21c95d37f84e638644c6e08b39ea02cce902be SHA512 cc207a5f09a89e42bc12fd491d5d0ef11c04daaa324aa696d2f8a37679b8f2171d3b265296968c3312e158b0fd2c059e12727a7463d3bd2f640d5bbd43c4f676
DIST setuptools-44.1.0.zip 858569 BLAKE2B f59f154e121502a731e51294ccd293d60ffccadacf51e23b53bf7ceba38858948b86783238061136c827ac3373ea7ea8e6253d4bb53f3f1dd69284568ec65a68 SHA512 4dfb0f42d334b835758e865a26ecd1e725711fa2b9c38ddc273b8b3849fba04527bc97436d11ba1e98f1a42922aa0f0b9032e32998273c705fac6e10735eacbf
DIST xcb-proto-1.14.tar.xz 143384 BLAKE2B 60212b0f0ce039a64a2e6cbbc78564eeffc57cff20987b37dc780d8d97ae888a7dbfbbaadc6e0e4bedfc5d1e360f16318e3825ad8406de668d9c7c66cf7f4b5d SHA512 de66d568163b6da2be9d6c59984f3afa3acd119a781378638045fd68018665ef5c9af98f024e9962ba3eb7c7a4d85c27ba70ffafceb2324ccc6940f34de16690
EBUILD chromium-84.0.4147.89.ebuild 27404 BLAKE2B cd207fc3b0f0164f6142a69769e7a1fab4c2f2706b04f7611659e23e5e988814ae25b663b528915a2e1965784d18d9df163ff64f9be16ece3fa6dc5701fe3ab4 SHA512 198046b4eab1f246f9ab6b9d0e012e0877cfcbadd62ca227bf70f17ff830b98f652a22f1be5e4d0f30fd9c7410b3b1ea69603225f0171afaa4a561fb97805a27
MISC metadata.xml 1351 BLAKE2B fb5be12f788385e19aa41ab929c0c0f2744a61cc83b19ed973174cee564043a871f68fadb721ee91d688020aa1daba5fb2bca4535c53630bd88cc0ede527ef53 SHA512 ae812473401017ce399461a829e7182e6e28c56b01c1da926883bd3edf751fa804dc88f429c77a3f533647b2115c960a7bba21572735dcf3d039a6d87fabf51d

View File

@ -0,0 +1,890 @@
# 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="https://chromium.org/"
XCB_PROTO_VERSION="1.14"
PATCHSET="3"
PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}"
SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
https://files.pythonhosted.org/packages/ed/7b/bbf89ca71e722b7f9464ebffe4b5ee20a9e5c9a555a56e2d3914bb9119a6/setuptools-44.1.0.zip
https://www.x.org/releases/individual/proto/xcb-proto-${XCB_PROTO_VERSION}.tar.xz
https://github.com/stha09/chromium-patches/releases/download/${PATCHSET_NAME}/${PATCHSET_NAME}.tar.xz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 arm64 ~x86"
IUSE="+closure-compile component-build cups cpu_flags_arm_neon +hangouts headless kerberos +memsaver ozone pic +proprietary-codecs pulseaudio screencast selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc vaapi wayland widevine"
RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
REQUIRED_USE="
component-build? ( !suid )
wayland? ( ozone )
vaapi? ( !ozone )
"
COMMON_X_DEPEND="
media-libs/mesa:=[gbm]
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/libXtst:=
x11-libs/libXScrnSaver:=
x11-libs/libxcb:=
"
COMMON_DEPEND="
app-arch/bzip2:=
cups? ( >=net-print/cups-1.3.11:= )
dev-libs/expat:=
dev-libs/glib:2
>=dev-libs/libxml2-2.9.4-r3:=[icu]
dev-libs/nspr:=
>=dev-libs/nss-3.26:=
>=media-libs/alsa-lib-1.0.19:=
media-libs/fontconfig:=
media-libs/freetype:=
>=media-libs/harfbuzz-2.4.0:0=[icu(-)]
media-libs/libjpeg-turbo:=
media-libs/libpng:=
system-libvpx? ( >=media-libs/libvpx-1.8.2:=[postproc,svc] )
pulseaudio? ( media-sound/pulseaudio:= )
system-ffmpeg? (
>=media-video/ffmpeg-4:=
|| (
media-video/ffmpeg[-samba]
>=net-fs/samba-4.5.10-r1[-debug(-)]
)
>=media-libs/opus-1.3.1:=
)
sys-apps/dbus:=
sys-apps/pciutils:=
virtual/udev
x11-libs/cairo:=
x11-libs/gdk-pixbuf:2
x11-libs/pango:=
media-libs/flac:=
>=media-libs/libwebp-0.4.0:=
sys-libs/zlib:=[minizip]
kerberos? ( virtual/krb5 )
vaapi? ( x11-libs/libva:= )
ozone? (
!headless? (
${COMMON_X_DEPEND}
x11-libs/gtk+:3[wayland?,X]
wayland? (
dev-libs/wayland:=
dev-libs/libffi:=
x11-libs/libdrm:=
x11-libs/libxkbcommon:=
)
)
)
!ozone? (
>=app-accessibility/at-spi2-atk-2.26:2
>=app-accessibility/at-spi2-core-2.26:2
>=dev-libs/atk-2.26
x11-libs/gtk+:3[X]
${COMMON_X_DEPEND}
)
"
# For nvidia-drivers blocker, see bug #413637 .
RDEPEND="${COMMON_DEPEND}
x11-misc/xdg-utils
virtual/opengl
virtual/ttf-fonts
selinux? ( sec-policy/selinux-chromium )
tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )
"
DEPEND="${COMMON_DEPEND}
"
# dev-vcs/git - https://bugs.gentoo.org/593476
BDEPEND="
${PYTHON_DEPS}
>=app-arch/gzip-1.7
app-arch/unzip
dev-lang/perl
>=dev-util/gn-0.1726
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
virtual/pkgconfig
closure-compile? ( virtual/jre )
"
: ${CHROMIUM_FORCE_CLANG=no}
: ${CHROMIUM_FORCE_LIBCXX=no}
if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
BDEPEND+=" >=sys-devel/clang-9"
fi
if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
RDEPEND+=" >=sys-libs/libcxx-9"
DEPEND+=" >=sys-libs/libcxx-9"
else
COMMON_DEPEND="
app-arch/snappy:=
dev-libs/libxslt:=
>=dev-libs/re2-0.2019.08.01:=
>=media-libs/openh264-1.6.0:=
system-icu? ( >=dev-libs/icu-67.1:= )
"
RDEPEND+="${COMMON_DEPEND}"
DEPEND+="${COMMON_DEPEND}"
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.
To make password storage work with your desktop environment you may
have install one of the supported credentials management applications:
- app-crypt/libsecret (GNOME)
- kde-frameworks/kwallet (KDE)
If you have one of above packages installed, but don't want to use
them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
in /etc/chromium/default.
"
PATCHES=(
"${FILESDIR}/chromium-84-mediaalloc.patch"
"${FILESDIR}/chromium-83-vaapi.patch"
"${FILESDIR}/chromium-84-pipewire.patch"
)
pre_build_checks() {
if [[ ${MERGE_TYPE} != binary ]]; then
local -x CPP="$(tc-getCXX) -E"
if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then
die "At least gcc 9.2 is required"
fi
# component build hangs with tcmalloc enabled due to sandbox issue, bug #695976.
if has usersandbox ${FEATURES} && use tcmalloc && use component-build; then
die "Component build with tcmalloc requires FEATURES=-usersandbox."
fi
if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then
if use component-build; then
die "Component build with clang requires fuzzer headers."
fi
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
if use custom-cflags || use component-build; then
CHECKREQS_DISK_BUILD="25G"
fi
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
eapply "${WORKDIR}/patches"
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/double_conversion
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/src/third_party/volk
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/jpeg-js
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/lss
third_party/crashpad/crashpad/third_party/zlib
third_party/crc32c
third_party/cros_system_api
third_party/dav1d
third_party/dawn
third_party/depot_tools
third_party/devscripts
third_party/devtools-frontend
third_party/devtools-frontend/src/front_end/third_party/acorn
third_party/devtools-frontend/src/front_end/third_party/codemirror
third_party/devtools-frontend/src/front_end/third_party/fabricjs
third_party/devtools-frontend/src/front_end/third_party/lighthouse
third_party/devtools-frontend/src/front_end/third_party/wasmparser
third_party/devtools-frontend/src/third_party
third_party/dom_distiller_js
third_party/emoji-segmenter
third_party/flatbuffers
third_party/freetype
third_party/libgifcodec
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/harfbuzz-ng/utils
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/libavif
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/lottie
third_party/lss
third_party/lzma_sdk
third_party/mako
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/one_euro_filter
third_party/openscreen
third_party/openscreen/src/third_party/mozilla
third_party/openscreen/src/third_party/tinycbor/src/src
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/private-join-and-compute
third_party/protobuf
third_party/protobuf/third_party/six
third_party/pyjson5
third_party/qcms
third_party/rnnoise
third_party/s2cellid
third_party/schema_org
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/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/astc-encoder
third_party/swiftshader/third_party/llvm-7.0
third_party/swiftshader/third_party/llvm-subzero
third_party/swiftshader/third_party/marl
third_party/swiftshader/third_party/subzero
third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1
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/ooura
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/wuffs
third_party/zlib/google
tools/grit/third_party/six
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
)
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 )
# we need to generate ppc64 stuff because upstream does not ship it yet
# it has to be done before unbundling.
if use ppc64; then
pushd third_party/libvpx >/dev/null || die
mkdir -p source/config/linux/ppc64 || die
./generate_gni.sh || die
popd >/dev/null || die
fi
fi
if use tcmalloc; then
keeplibs+=( third_party/tcmalloc )
fi
if use ozone && use wayland && ! use headless ; then
keeplibs+=( third_party/wayland )
fi
if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
keeplibs+=( third_party/libxml )
keeplibs+=( third_party/libxslt )
keeplibs+=( third_party/openh264 )
keeplibs+=( third_party/re2 )
keeplibs+=( third_party/snappy )
if use system-icu; then
keeplibs+=( third_party/icu )
fi
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
if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
die "Compiling with sys-libs/libcxx requires clang."
fi
myconf_gn+=" is_clang=false"
fi
# Define a custom toolchain for GN
myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
if tc-is-cross-compiler; then
tc-export BUILD_{AR,CC,CXX,NM}
myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
else
myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
fi
# GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
myconf_gn+=" is_debug=false"
# Component build isn't generally intended for use by end users. It's mostly useful
# for development and debugging.
myconf_gn+=" is_component_build=$(usex component-build true false)"
myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")"
# Disable nacl, we can't build without pnacl (http://crbug.com/269560).
myconf_gn+=" enable_nacl=false"
# Use system-provided libraries.
# TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
# TODO: use_system_hunspell (upstream changes needed).
# TODO: use_system_libsrtp (bug #459932).
# TODO: use_system_protobuf (bug #525560).
# TODO: use_system_ssl (http://crbug.com/58087).
# TODO: use_system_sqlite (http://crbug.com/22208).
# libevent: https://bugs.gentoo.org/593458
local gn_system_libraries=(
flac
fontconfig
freetype
# Need harfbuzz_from_pkgconfig target
#harfbuzz-ng
libdrm
libjpeg
libpng
libwebp
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
if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then
# unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++
gn_system_libraries+=( libxml )
gn_system_libraries+=( libxslt )
gn_system_libraries+=( openh264 )
gn_system_libraries+=( re2 )
gn_system_libraries+=( snappy )
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"
# Disable deprecated libgnome-keyring dependency, bug #713012
myconf_gn+=" use_gnome_keyring=false"
# 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_kerberos=$(usex kerberos true false)"
myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
myconf_gn+=" use_vaapi=$(usex vaapi 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 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
# Debug info section overflows without component build
# Prevent linker from running out of address space, bug #471810 .
if ! use component-build || 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 -mno-fma -mno-fma4
fi
fi
if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
append-flags -stdlib=libc++
append-ldflags -stdlib=libc++
fi
if [[ $myarch = amd64 ]] ; then
myconf_gn+=" target_cpu=\"x64\""
ffmpeg_target_arch=x64
elif [[ $myarch = x86 ]] ; then
myconf_gn+=" target_cpu=\"x86\""
ffmpeg_target_arch=ia32
# This is normally defined by compiler_cpu_abi in
# build/config/compiler/BUILD.gn, but we patch that part out.
append-flags -msse2 -mfpmath=sse -mmmx
elif [[ $myarch = arm64 ]] ; then
myconf_gn+=" target_cpu=\"arm64\""
ffmpeg_target_arch=arm64
elif [[ $myarch = arm ]] ; then
myconf_gn+=" target_cpu=\"arm\""
ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm)
elif [[ $myarch = ppc64 ]] ; then
myconf_gn+=" target_cpu=\"ppc64\""
ffmpeg_target_arch=ppc64
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
# Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470
append-cxxflags $(test-flags-CXX -flax-vector-conversions=all)
# Explicitly disable ICU data file support for system-icu builds.
if use system-icu; then
myconf_gn+=" icu_use_data_file=false"
fi
# Use bundled xcb-proto, bug #727000
myconf_gn+=" xcbproto_path=\"${WORKDIR}/xcb-proto-${XCB_PROTO_VERSION}/src\""
# Enable ozone support
if use ozone; then
myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
myconf_gn+=" ozone_platform_headless=true"
if ! use headless; then
myconf_gn+=" use_system_libdrm=true"
myconf_gn+=" ozone_platform_wayland=$(usex wayland true false)"
myconf_gn+=" ozone_platform_x11=true"
myconf_gn+=" ozone_platform_headless=true"
if use wayland; then
myconf_gn+=" use_system_minigbm=true use_xkbcommon=true"
myconf_gn+=" ozone_platform=\"wayland\""
else
myconf_gn+=" ozone_platform=\"x11\""
fi
else
myconf_gn+=" ozone_platform=\"headless\""
fi
fi
if use screencast; then
myconf_gn+=" rtc_use_pipewire=true rtc_link_pipewire=true"
myconf_gn+=" rtc_use_pipewire_version=\"0.3\""
fi
einfo "Configuring Chromium..."
set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
echo "$@"
"$@" || die
}
src_compile() {
if use memsaver; then
# limit number of jobs based on available memory:
mem=$(grep ^MemTotal /proc/meminfo | awk '{print $2}')
jobs=$((mem/2500000))
if [ ${jobs} -lt 1 ]; then
jobs=-j1
else
jobs=-j${jobs}
fi
einfo "Using jobs setting of ${jobs}"
else
jobs=""
einfo "Using default Portage jobs setting."
fi
# Final link uses lots of file descriptors.
ulimit -n 2048
# Calling this here supports resumption via FEATURES=keepwork
python_setup
# https://bugs.gentoo.org/717456
# Use bundled xcb-proto, because system xcb-proto doesn't have Python 2.7 support
local -x PYTHONPATH="${WORKDIR}/setuptools-44.1.0:${WORKDIR}/xcb-proto-${XCB_PROTO_VERSION}${PYTHONPATH+:}${PYTHONPATH}"
#"${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 ${jobs} -C out/Release "host/${x}"
pax-mark m "out/Release/host/${x}"
else
eninja ${jobs} -C out/Release "${x}"
pax-mark m "out/Release/${x}"
fi
done
eninja ${jobs} -C out/Release chrome chromedriver
use suid && eninja ${jobs} -C out/Release chrome_sandbox
pax-mark m out/Release/chrome
# Build manpage; bug #684550
sed -e 's|@@PACKAGE@@|chromium-browser|g;
s|@@MENUNAME@@|Chromium|g;' \
chrome/app/resources/manpage.1.in > \
out/Release/chromium-browser.1 || die
# Build desktop file; bug #706786
sed -e 's|@@MENUNAME@@|Chromium|g;
s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
s|@@PACKAGE@@|chromium-browser|g;
s|\(^Exec=\)/usr/bin/|\1|g;' \
chrome/installer/linux/common/desktop.template > \
out/Release/chromium-browser-chromium.desktop || die
}
src_install() {
local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
exeinto "${CHROMIUM_HOME}"
doexe out/Release/chrome
if use suid; then
newexe out/Release/chrome_sandbox chrome-sandbox
fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
fi
doexe out/Release/chromedriver
ozone_auto_session () {
use ozone && use wayland && ! use headless && echo true || echo false
}
local sedargs=( -e
"s:/usr/lib/:/usr/$(get_libdir)/:g;
s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g"
)
sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r4.sh" > chromium-launcher.sh || die
doexe chromium-launcher.sh
if use vaapi; then
insinto /usr/share/drirc.d
newins "${FILESDIR}"/01-chromium.conf 01-chromium.conf
fi
# 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
(
shopt -s nullglob
local files=(out/Release/*.so)
[[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
)
if ! use system-icu; then
doins out/Release/icudtl.dat
fi
doins -r out/Release/locales
doins -r out/Release/resources
if [[ -d out/Release/swiftshader ]]; then
insinto "${CHROMIUM_HOME}/swiftshader"
doins out/Release/swiftshader/*.so
fi
# Install icons
local branding size
for size in 16 24 32 48 64 128 256 ; do
case ${size} in
16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
*) branding="chrome/app/theme/chromium" ;;
esac
newicon -s ${size} "${branding}/product_logo_${size}.png" \
chromium-browser.png
done
# Install desktop entry
domenu out/Release/chromium-browser-chromium.desktop
# Install GNOME default application entry (bug #303100).
insinto /usr/share/gnome-control-center/default-apps
newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
# Install manpage; bug #684550
doman out/Release/chromium-browser.1
dosym chromium-browser.1 /usr/share/man/man1/chromium.1
readme.gentoo_create_doc
}
pkg_postrm() {
xdg_icon_cache_update
xdg_desktop_database_update
}
pkg_postinst() {
xdg_icon_cache_update
xdg_desktop_database_update
readme.gentoo_print_elog
}

View File

@ -0,0 +1,33 @@
<?xml version="1.0" standalone="yes"?>
<!--
============================================
Application bugs worked around in this file:
============================================
* Work around misrendering with Chromium and vaapi on gallium drivers
-->
<!DOCTYPE driconf [
<!ELEMENT driconf (device+)>
<!ELEMENT device (application+)>
<!ATTLIST device driver CDATA #IMPLIED>
<!ELEMENT application (option+)>
<!ATTLIST application name CDATA #REQUIRED
executable CDATA #REQUIRED>
<!ELEMENT option EMPTY>
<!ATTLIST option name CDATA #REQUIRED
value CDATA #REQUIRED>
]>
<driconf>
<!-- Please always enable app-specific workarounds for all drivers and
screens. -->
<device>
<application name="Chromium" executable="chrome">
<option name="allow_rgb10_configs" value="false" />
</application>
</device>
</driconf>

View File

@ -0,0 +1,183 @@
From 7cda9be20eedac2f972f4b99d71a7732d87f1b9b Mon Sep 17 00:00:00 2001
From: Mike Lothian <mike@fireburn.co.uk>
Date: Thu, 23 Apr 2020 09:51:10 +0100
Subject: [PATCH] Enable VAVDA, VAVEA and VAJDA on linux with VAAPI only
This patch contains all the changes necessary to use VA-API along with
vaapi-driver to run all media use cases supported with hardware acceleration.
It is intended to remain as experimental accessible from chrome://flags on linux.
It requires libva/intel-vaapi-driver to be installed on the system path where
chrome is executed. Other drivers could be tested if available. Flags are
kept independent for linux, where this feature has to be enabled before
actually using it. This should not change how other OSes use the flags
already, the new flags will show at the buttom on the section of unavailable
experiments
The changes cover a range of compiler pre-processor flags to enable the stack.
It moves the presandbox operations to the vaapi_wrapper class as the hook function
is available there. vaInit will open driver on the correct installed folder.
chrome flags consolidtation into only two flags for linux. Mjpeg and accelerated
video are used. The other flags are kept for ChromeOS and other OSes.
Developer testing was made on skylake hardware, ChromeOS and Ubuntu.
BUG=NONE
TEST="subjective testing with VAVDA,VAVEA and VAJDA, autotest for encoder"
TEST="and decoder hardware accelerated"
TEST="have libva/intel-vaapi-driver installed and not installed in the system"
TEST="repeat on different hardware families"
R=posciak@chromium.org
R=kcwu@chromium.org
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ifbbf5c9e5221a8b5733fc6d4d0cf984a1f103171
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
---
chrome/browser/about_flags.cc | 8 ++++----
chrome/browser/flag_descriptions.cc | 9 ++++++---
chrome/browser/flag_descriptions.h | 10 ++++++++--
gpu/config/software_rendering_list.json | 3 ++-
media/gpu/vaapi/vaapi_video_decode_accelerator.cc | 5 +++++
5 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 65f76461ec12..5820726d7ad5 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2153,7 +2153,7 @@ const FeatureEntry kFeatureEntries[] = {
"disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName,
flag_descriptions::kAcceleratedVideoDecodeDescription,
- kOsMac | kOsWin | kOsCrOS | kOsAndroid,
+ kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
{
@@ -2585,12 +2585,12 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kWebXrForceRuntimeDescription, kOsDesktop,
MULTI_VALUE_TYPE(kWebXrForceRuntimeChoices)},
#endif // ENABLE_VR
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
{"disable-accelerated-mjpeg-decode",
flag_descriptions::kAcceleratedMjpegDecodeName,
- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
-#endif // OS_CHROMEOS
+#endif // OS_CHROMEOS | OS_LINUX
{"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop,
FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)},
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index e80fab827621..98b36fa0bcca 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2980,16 +2980,19 @@ const char kMetalDescription[] =
#endif
-// Chrome OS -------------------------------------------------------------------
-
-#if defined(OS_CHROMEOS)
+// Chrome OS and Linux -------------------------------------------------------------------
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
const char kAcceleratedMjpegDecodeName[] =
"Hardware-accelerated mjpeg decode for captured frame";
const char kAcceleratedMjpegDecodeDescription[] =
"Enable hardware-accelerated mjpeg decode for captured frame where "
"available.";
+#endif
+// Chrome OS -----------------------------------------------------------------------------
+
+#if defined(OS_CHROMEOS)
const char kAggregatedMlAppRankingName[] = "Rank suggested apps with ML.";
const char kAggregatedMlAppRankingDescription[] =
"Use the aggregated ML model to rank the suggested apps.";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index 7672b58e6a25..a3baa084c5a0 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1711,13 +1711,19 @@ extern const char kMetalDescription[];
#endif // defined(OS_MACOSX)
-// Chrome OS ------------------------------------------------------------------
+// Chrome OS and Linux ---------------------------------------------------------
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
extern const char kAcceleratedMjpegDecodeName[];
extern const char kAcceleratedMjpegDecodeDescription[];
+#endif
+
+// Chrome OS -------------------------------------------------------------------
+
+#if defined(OS_CHROMEOS)
+
extern const char kAggregatedMlAppRankingName[];
extern const char kAggregatedMlAppRankingDescription[];
diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
index 68bed9e49ddf..5e7fe9cf433b 100644
--- a/gpu/config/software_rendering_list.json
+++ b/gpu/config/software_rendering_list.json
@@ -337,11 +337,12 @@
},
{
"id": 48,
- "description": "Accelerated video decode is unavailable on Linux",
+ "description": "Accelerated VA-API video decode is not supported on NVIDIA platforms",
"cr_bugs": [137247, 1032907],
"os": {
"type": "linux"
},
+ "vendor_id": "0x10de",
"exceptions": [
{
"machine_model_name": ["Chromecast"]
diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
index 5020b2b8bf96..a6f1d681b851 100644
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
@@ -66,6 +66,7 @@ void ReportToUMA(VAVDADecoderFailure failure) {
VAVDA_DECODER_FAILURES_MAX + 1);
}
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
// Returns true if the CPU is an Intel Gemini Lake or later (including Kaby
// Lake) Cpu platform id's are referenced from the following file in kernel
// source arch/x86/include/asm/intel-family.h
@@ -78,6 +79,7 @@ bool IsGeminiLakeOrLater() {
cpuid.model() >= kGeminiLakeModelId;
return is_geminilake_or_later;
}
+#endif
} // namespace
@@ -1155,6 +1157,8 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
return BufferAllocationMode::kNormal;
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
+ // Move this to chromeOs only as it is causing problem in some intel linux drivers
// On Gemini Lake, Kaby Lake and later we can pass to libva the client's
// PictureBuffers to decode onto, which skips the use of the Vpp unit and its
// associated format reconciliation copy, avoiding all internal buffer
@@ -1171,6 +1175,7 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
num_extra_pics_ = 3;
return BufferAllocationMode::kNone;
}
+#endif
// If we're here, we have to use the Vpp unit and allocate buffers for
// |decoder_|; usually we'd have to allocate the |decoder_|s
--
2.26.2

View File

@ -0,0 +1,41 @@
https://bugs.chromium.org/p/chromium/issues/detail?id=1095962
--- /media/base/media.cc
+++ /media/base/media.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <limits>
+
#include "media/base/media.h"
#include "base/allocator/buildflags.h"
@@ -41,7 +43,7 @@
#if BUILDFLAG(USE_ALLOCATOR_SHIM)
// Remove allocation limit from ffmpeg, so calls go down to shim layer.
- av_max_alloc(0);
+ av_max_alloc(std::numeric_limits<size_t>::max());
#endif // BUILDFLAG(USE_ALLOCATOR_SHIM)
#endif // BUILDFLAG(ENABLE_FFMPEG)
--- /third_party/ffmpeg/chromium/dllmain.cc
+++ /third_party/ffmpeg/chromium/dllmain.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <intrin.h>
+#include <limits>
#include <new.h>
#include <stdlib.h>
#include <windows.h>
@@ -28,7 +29,7 @@
if (reason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(instance);
// Remove allocation limit from ffmpeg, so calls go down to shim layer.
- av_max_alloc(0);
+ av_max_alloc(std::numeric_limits<size_t>::max());
// Enable OOM crashes in the shim for all malloc calls that fail.
_set_new_mode(1);
_set_new_handler(&OnNoMemory);

View File

@ -0,0 +1,792 @@
Index: chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/BUILD.gn
===================================================================
--- chromium-83.0.4103.116.orig/third_party/webrtc/modules/desktop_capture/BUILD.gn
+++ chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/BUILD.gn
@@ -196,7 +196,7 @@ if (is_linux) {
if (rtc_link_pipewire) {
pkg_config("pipewire") {
- packages = [ "libpipewire-0.2" ]
+ packages = [ "libpipewire-${rtc_use_pipewire_version}", "libspa-${rtc_use_spa_version}" ]
}
} else {
# When libpipewire is not directly linked, use stubs to allow for dlopening of
Index: chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
===================================================================
--- chromium-83.0.4103.116.orig/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
+++ chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
@@ -14,8 +14,11 @@
#include <glib-object.h>
#include <spa/param/format-utils.h>
#include <spa/param/props.h>
-#include <spa/param/video/raw-utils.h>
-#include <spa/support/type-map.h>
+
+#include <linux/dma-buf.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <sys/syscall.h>
#include <memory>
#include <utility>
@@ -51,31 +54,35 @@ const char kPipeWireLib[] = "libpipewire
#endif
// static
-void BaseCapturerPipeWire::OnStateChanged(void* data,
- pw_remote_state old_state,
- pw_remote_state state,
- const char* error_message) {
- BaseCapturerPipeWire* that = static_cast<BaseCapturerPipeWire*>(data);
- RTC_DCHECK(that);
+void BaseCapturerPipeWire::SyncDmaBuf(int fd, uint64_t start_or_end) {
+ struct dma_buf_sync sync = { 0 };
- switch (state) {
- case PW_REMOTE_STATE_ERROR:
- RTC_LOG(LS_ERROR) << "PipeWire remote state error: " << error_message;
- break;
- case PW_REMOTE_STATE_CONNECTED:
- RTC_LOG(LS_INFO) << "PipeWire remote state: connected.";
- that->CreateReceivingStream();
- break;
- case PW_REMOTE_STATE_CONNECTING:
- RTC_LOG(LS_INFO) << "PipeWire remote state: connecting.";
+ sync.flags = start_or_end | DMA_BUF_SYNC_READ;
+
+ while(true) {
+ int ret;
+ ret = ioctl (fd, DMA_BUF_IOCTL_SYNC, &sync);
+ if (ret == -1 && errno == EINTR) {
+ continue;
+ } else if (ret == -1) {
+ RTC_LOG(LS_ERROR) << "Failed to synchronize DMA buffer: " << g_strerror(errno);
break;
- case PW_REMOTE_STATE_UNCONNECTED:
- RTC_LOG(LS_INFO) << "PipeWire remote state: unconnected.";
+ } else {
break;
+ }
}
}
// static
+void BaseCapturerPipeWire::OnCoreError(void *data,
+ uint32_t id,
+ int seq,
+ int res,
+ const char *message) {
+ RTC_LOG(LS_ERROR) << "core error: " << message;
+}
+
+// static
void BaseCapturerPipeWire::OnStreamStateChanged(void* data,
pw_stream_state old_state,
pw_stream_state state,
@@ -87,76 +94,54 @@ void BaseCapturerPipeWire::OnStreamState
case PW_STREAM_STATE_ERROR:
RTC_LOG(LS_ERROR) << "PipeWire stream state error: " << error_message;
break;
- case PW_STREAM_STATE_CONFIGURE:
- pw_stream_set_active(that->pw_stream_, true);
- break;
- case PW_STREAM_STATE_UNCONNECTED:
- case PW_STREAM_STATE_CONNECTING:
- case PW_STREAM_STATE_READY:
case PW_STREAM_STATE_PAUSED:
case PW_STREAM_STATE_STREAMING:
+ case PW_STREAM_STATE_UNCONNECTED:
+ case PW_STREAM_STATE_CONNECTING:
break;
}
}
// static
-void BaseCapturerPipeWire::OnStreamFormatChanged(void* data,
- const struct spa_pod* format) {
+void BaseCapturerPipeWire::OnStreamParamChanged(void *data, uint32_t id,
+ const struct spa_pod *format) {
BaseCapturerPipeWire* that = static_cast<BaseCapturerPipeWire*>(data);
RTC_DCHECK(that);
- RTC_LOG(LS_INFO) << "PipeWire stream format changed.";
+ RTC_LOG(LS_INFO) << "PipeWire stream param changed.";
- if (!format) {
- pw_stream_finish_format(that->pw_stream_, /*res=*/0, /*params=*/nullptr,
- /*n_params=*/0);
+ if (!format || id != SPA_PARAM_Format) {
return;
}
- that->spa_video_format_ = new spa_video_info_raw();
- spa_format_video_raw_parse(format, that->spa_video_format_,
- &that->pw_type_->format_video);
+ spa_format_video_raw_parse(format, &that->spa_video_format_);
- auto width = that->spa_video_format_->size.width;
- auto height = that->spa_video_format_->size.height;
+ auto width = that->spa_video_format_.size.width;
+ auto height = that->spa_video_format_.size.height;
auto stride = SPA_ROUND_UP_N(width * kBytesPerPixel, 4);
auto size = height * stride;
+ that->desktop_size_ = DesktopSize(width, height);
+
uint8_t buffer[1024] = {};
auto builder = spa_pod_builder{buffer, sizeof(buffer)};
// Setup buffers and meta header for new format.
- const struct spa_pod* params[2];
- params[0] = reinterpret_cast<spa_pod*>(spa_pod_builder_object(
- &builder,
- // id to enumerate buffer requirements
- that->pw_core_type_->param.idBuffers,
- that->pw_core_type_->param_buffers.Buffers,
- // Size: specified as integer (i) and set to specified size
- ":", that->pw_core_type_->param_buffers.size, "i", size,
- // Stride: specified as integer (i) and set to specified stride
- ":", that->pw_core_type_->param_buffers.stride, "i", stride,
- // Buffers: specifies how many buffers we want to deal with, set as
- // integer (i) where preferred number is 8, then allowed number is defined
- // as range (r) from min and max values and it is undecided (u) to allow
- // negotiation
- ":", that->pw_core_type_->param_buffers.buffers, "iru", 8,
- SPA_POD_PROP_MIN_MAX(1, 32),
- // Align: memory alignment of the buffer, set as integer (i) to specified
- // value
- ":", that->pw_core_type_->param_buffers.align, "i", 16));
- params[1] = reinterpret_cast<spa_pod*>(spa_pod_builder_object(
- &builder,
- // id to enumerate supported metadata
- that->pw_core_type_->param.idMeta, that->pw_core_type_->param_meta.Meta,
- // Type: specified as id or enum (I)
- ":", that->pw_core_type_->param_meta.type, "I",
- that->pw_core_type_->meta.Header,
- // Size: size of the metadata, specified as integer (i)
- ":", that->pw_core_type_->param_meta.size, "i",
- sizeof(struct spa_meta_header)));
-
- pw_stream_finish_format(that->pw_stream_, /*res=*/0, params, /*n_params=*/2);
+ const struct spa_pod* params[3];
+ params[0] = reinterpret_cast<spa_pod *>(spa_pod_builder_add_object(&builder,
+ SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers,
+ SPA_PARAM_BUFFERS_size, SPA_POD_Int(size),
+ SPA_PARAM_BUFFERS_stride, SPA_POD_Int(stride),
+ SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(8, 1, 32)));
+ params[1] = reinterpret_cast<spa_pod *>(spa_pod_builder_add_object(&builder,
+ SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
+ SPA_PARAM_META_type, SPA_POD_Id(SPA_META_Header),
+ SPA_PARAM_META_size, SPA_POD_Int(sizeof(struct spa_meta_header))));
+ params[2] = reinterpret_cast<spa_pod *>(spa_pod_builder_add_object(&builder,
+ SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
+ SPA_PARAM_META_type, SPA_POD_Id (SPA_META_VideoCrop),
+ SPA_PARAM_META_size, SPA_POD_Int (sizeof(struct spa_meta_region))));
+ pw_stream_update_params(that->pw_stream_, params, 3);
}
// static
@@ -164,15 +149,25 @@ void BaseCapturerPipeWire::OnStreamProce
BaseCapturerPipeWire* that = static_cast<BaseCapturerPipeWire*>(data);
RTC_DCHECK(that);
- pw_buffer* buf = nullptr;
+ struct pw_buffer *next_buffer;
+ struct pw_buffer *buffer = nullptr;
- if (!(buf = pw_stream_dequeue_buffer(that->pw_stream_))) {
+ next_buffer = pw_stream_dequeue_buffer(that->pw_stream_);
+ while (next_buffer) {
+ buffer = next_buffer;
+ next_buffer = pw_stream_dequeue_buffer(that->pw_stream_);
+
+ if (next_buffer)
+ pw_stream_queue_buffer (that->pw_stream_, buffer);
+ }
+
+ if (!buffer) {
return;
}
- that->HandleBuffer(buf);
+ that->HandleBuffer(buffer);
- pw_stream_queue_buffer(that->pw_stream_, buf);
+ pw_stream_queue_buffer(that->pw_stream_, buffer);
}
BaseCapturerPipeWire::BaseCapturerPipeWire(CaptureSourceType source_type)
@@ -183,38 +178,22 @@ BaseCapturerPipeWire::~BaseCapturerPipeW
pw_thread_loop_stop(pw_main_loop_);
}
- if (pw_type_) {
- delete pw_type_;
- }
-
- if (spa_video_format_) {
- delete spa_video_format_;
- }
-
if (pw_stream_) {
pw_stream_destroy(pw_stream_);
}
- if (pw_remote_) {
- pw_remote_destroy(pw_remote_);
+ if (pw_core_) {
+ pw_core_disconnect(pw_core_);
}
- if (pw_core_) {
- pw_core_destroy(pw_core_);
+ if (pw_context_) {
+ pw_context_destroy(pw_context_);
}
if (pw_main_loop_) {
pw_thread_loop_destroy(pw_main_loop_);
}
- if (pw_loop_) {
- pw_loop_destroy(pw_loop_);
- }
-
- if (current_frame_) {
- free(current_frame_);
- }
-
if (start_request_signal_id_) {
g_dbus_connection_signal_unsubscribe(connection_, start_request_signal_id_);
}
@@ -284,27 +263,35 @@ void BaseCapturerPipeWire::InitPipeWire(
pw_init(/*argc=*/nullptr, /*argc=*/nullptr);
- pw_loop_ = pw_loop_new(/*properties=*/nullptr);
- pw_main_loop_ = pw_thread_loop_new(pw_loop_, "pipewire-main-loop");
-
- pw_core_ = pw_core_new(pw_loop_, /*properties=*/nullptr);
- pw_core_type_ = pw_core_get_type(pw_core_);
- pw_remote_ = pw_remote_new(pw_core_, nullptr, /*user_data_size=*/0);
+ pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr);
+ pw_context_ = pw_context_new(pw_thread_loop_get_loop(pw_main_loop_), nullptr, 0);
+ if (!pw_context_) {
+ RTC_LOG(LS_ERROR) << "Failed to create PipeWire context";
+ return;
+ }
- InitPipeWireTypes();
+ pw_core_ = pw_context_connect(pw_context_, nullptr, 0);
+ if (!pw_core_) {
+ RTC_LOG(LS_ERROR) << "Failed to connect PipeWire context";
+ return;
+ }
// Initialize event handlers, remote end and stream-related.
- pw_remote_events_.version = PW_VERSION_REMOTE_EVENTS;
- pw_remote_events_.state_changed = &OnStateChanged;
+ pw_core_events_.version = PW_VERSION_CORE_EVENTS;
+ pw_core_events_.error = &OnCoreError;
pw_stream_events_.version = PW_VERSION_STREAM_EVENTS;
pw_stream_events_.state_changed = &OnStreamStateChanged;
- pw_stream_events_.format_changed = &OnStreamFormatChanged;
+ pw_stream_events_.param_changed = &OnStreamParamChanged;
pw_stream_events_.process = &OnStreamProcess;
- pw_remote_add_listener(pw_remote_, &spa_remote_listener_, &pw_remote_events_,
- this);
- pw_remote_connect_fd(pw_remote_, pw_fd_);
+ pw_core_add_listener(pw_core_, &spa_core_listener_, &pw_core_events_, this);
+
+ pw_stream_ = CreateReceivingStream();
+ if (!pw_stream_) {
+ RTC_LOG(LS_ERROR) << "Failed to create PipeWire stream";
+ return;
+ }
if (pw_thread_loop_start(pw_main_loop_) < 0) {
RTC_LOG(LS_ERROR) << "Failed to start main PipeWire loop";
@@ -314,81 +301,131 @@ void BaseCapturerPipeWire::InitPipeWire(
RTC_LOG(LS_INFO) << "PipeWire remote opened.";
}
-void BaseCapturerPipeWire::InitPipeWireTypes() {
- spa_type_map* map = pw_core_type_->map;
- pw_type_ = new PipeWireType();
-
- spa_type_media_type_map(map, &pw_type_->media_type);
- spa_type_media_subtype_map(map, &pw_type_->media_subtype);
- spa_type_format_video_map(map, &pw_type_->format_video);
- spa_type_video_format_map(map, &pw_type_->video_format);
-}
-
-void BaseCapturerPipeWire::CreateReceivingStream() {
+pw_stream* BaseCapturerPipeWire::CreateReceivingStream() {
spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1};
- spa_rectangle pwScreenBounds =
- spa_rectangle{static_cast<uint32_t>(desktop_size_.width()),
- static_cast<uint32_t>(desktop_size_.height())};
-
- spa_fraction pwFrameRateMin = spa_fraction{0, 1};
- spa_fraction pwFrameRateMax = spa_fraction{60, 1};
-
- pw_properties* reuseProps =
- pw_properties_new_string("pipewire.client.reuse=1");
- pw_stream_ = pw_stream_new(pw_remote_, "webrtc-consume-stream", reuseProps);
+ spa_rectangle pwMaxScreenBounds = spa_rectangle{INT32_MAX, INT32_MAX};
+ auto stream = pw_stream_new(pw_core_, "webrtc-pipewire-stream", nullptr);
+
+ if (!stream) {
+ RTC_LOG(LS_ERROR) << "Could not create receiving stream.";
+ return nullptr;
+ }
uint8_t buffer[1024] = {};
- const spa_pod* params[1];
- spa_pod_builder builder = spa_pod_builder{buffer, sizeof(buffer)};
- params[0] = reinterpret_cast<spa_pod*>(spa_pod_builder_object(
- &builder,
- // id to enumerate formats
- pw_core_type_->param.idEnumFormat, pw_core_type_->spa_format, "I",
- pw_type_->media_type.video, "I", pw_type_->media_subtype.raw,
- // Video format: specified as id or enum (I), preferred format is BGRx,
- // then allowed formats are enumerated (e) and the format is undecided (u)
- // to allow negotiation
- ":", pw_type_->format_video.format, "Ieu", pw_type_->video_format.BGRx,
- SPA_POD_PROP_ENUM(2, pw_type_->video_format.RGBx,
- pw_type_->video_format.BGRx),
- // Video size: specified as rectangle (R), preferred size is specified as
- // first parameter, then allowed size is defined as range (r) from min and
- // max values and the format is undecided (u) to allow negotiation
- ":", pw_type_->format_video.size, "Rru", &pwScreenBounds, 2,
- &pwMinScreenBounds, &pwScreenBounds,
- // Frame rate: specified as fraction (F) and set to minimum frame rate
- // value
- ":", pw_type_->format_video.framerate, "F", &pwFrameRateMin,
- // Max frame rate: specified as fraction (F), preferred frame rate is set
- // to maximum value, then allowed frame rate is defined as range (r) from
- // min and max values and it is undecided (u) to allow negotiation
- ":", pw_type_->format_video.max_framerate, "Fru", &pwFrameRateMax, 2,
- &pwFrameRateMin, &pwFrameRateMax));
+ const spa_pod* params[2];
+ spa_pod_builder builder = SPA_POD_BUILDER_INIT(buffer, sizeof (buffer));
+
+ params[0] = reinterpret_cast<spa_pod *>(spa_pod_builder_add_object(&builder,
+ SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
+ SPA_FORMAT_mediaType, SPA_POD_Id(SPA_MEDIA_TYPE_video),
+ SPA_FORMAT_mediaSubtype, SPA_POD_Id(SPA_MEDIA_SUBTYPE_raw),
+ SPA_FORMAT_VIDEO_format, SPA_POD_CHOICE_ENUM_Id(5, SPA_VIDEO_FORMAT_BGRx, SPA_VIDEO_FORMAT_RGBx, SPA_VIDEO_FORMAT_RGBA,
+ SPA_VIDEO_FORMAT_BGRx, SPA_VIDEO_FORMAT_BGRA),
+ SPA_FORMAT_VIDEO_size, SPA_POD_CHOICE_RANGE_Rectangle(&pwMinScreenBounds,
+ &pwMinScreenBounds,
+ &pwMaxScreenBounds),
+ 0));
+ pw_stream_add_listener(stream, &spa_stream_listener_, &pw_stream_events_, this);
- pw_stream_add_listener(pw_stream_, &spa_stream_listener_, &pw_stream_events_,
- this);
pw_stream_flags flags = static_cast<pw_stream_flags>(
- PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE |
- PW_STREAM_FLAG_MAP_BUFFERS);
- if (pw_stream_connect(pw_stream_, PW_DIRECTION_INPUT, /*port_path=*/nullptr,
- flags, params,
- /*n_params=*/1) != 0) {
+ PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE);
+
+ if (pw_stream_connect(stream, PW_DIRECTION_INPUT, pw_stream_node_id_, PW_STREAM_FLAG_AUTOCONNECT, params, 1) != 0) {
RTC_LOG(LS_ERROR) << "Could not connect receiving stream.";
portal_init_failed_ = true;
- return;
}
+
+ return stream;
}
void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) {
+ struct spa_meta_region* video_crop;
spa_buffer* spaBuffer = buffer->buffer;
- void* src = nullptr;
+ uint8_t *map = nullptr;
+ uint8_t* src = nullptr;
+ uint8_t* dst = nullptr;
+
+ if (spaBuffer->datas[0].chunk->size == 0) {
+ map = nullptr;
+ src = nullptr;
+ } else if (spaBuffer->datas[0].type == SPA_DATA_MemFd) {
+ map = static_cast<uint8_t*>(mmap(
+ nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset,
+ PROT_READ, MAP_PRIVATE, spaBuffer->datas[0].fd, 0));
+
+ if (map == MAP_FAILED) {
+ RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " << std::strerror(errno);
+ return;
+ }
- if (!(src = spaBuffer->datas[0].data)) {
+ src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t);
+ } else if (spaBuffer->datas[0].type == SPA_DATA_DmaBuf) {
+ int fd;
+ fd = spaBuffer->datas[0].fd;
+
+ map = static_cast<uint8_t*>(mmap(
+ nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset,
+ PROT_READ, MAP_PRIVATE, fd, 0));
+
+ if (map == MAP_FAILED) {
+ RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " << std::strerror(errno);
+ return;
+ }
+
+ SyncDmaBuf(fd, DMA_BUF_SYNC_START);
+
+ src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t);
+ } else if (spaBuffer->datas[0].type == SPA_DATA_MemPtr) {
+ map = nullptr;
+ src = static_cast<uint8_t*>(spaBuffer->datas[0].data);
+ } else {
return;
}
- uint32_t maxSize = spaBuffer->datas[0].maxsize;
- int32_t srcStride = spaBuffer->datas[0].chunk->stride;
+ if (!src) {
+ return;
+ }
+
+ DesktopSize prev_crop_size = DesktopSize(0, 0);
+ if (video_crop_size_initialized_) {
+ prev_crop_size = video_crop_size_;
+ }
+
+ if ((video_crop = static_cast<struct spa_meta_region*>(
+ spa_buffer_find_meta_data(spaBuffer, SPA_META_VideoCrop, sizeof(*video_crop))))) {
+ RTC_DCHECK(video_crop->region.size.width <= desktop_size_.width() &&
+ video_crop->region.size.height <= desktop_size_.height());
+ if ((video_crop->region.size.width != desktop_size_.width() ||
+ video_crop->region.size.height != desktop_size_.height()) && video_crop->region.size.width && video_crop->region.size.height) {
+ video_crop_size_ = DesktopSize(video_crop->region.size.width, video_crop->region.size.height);
+ video_crop_size_initialized_ = true;
+ } else {
+ video_crop_size_initialized_ = false;
+ }
+ } else {
+ video_crop_size_initialized_ = false;
+ }
+
+ size_t frame_size;
+ if (video_crop_size_initialized_) {
+ frame_size =
+ video_crop_size_.width() * video_crop_size_.height() * kBytesPerPixel;
+ } else {
+ frame_size =
+ desktop_size_.width() * desktop_size_.height() * kBytesPerPixel;
+ }
+
+ if (!current_frame_ ||
+ (video_crop_size_initialized_ && !video_crop_size_.equals(prev_crop_size))) {
+ current_frame_ = std::make_unique<uint8_t[]>(frame_size);
+ }
+ RTC_DCHECK(current_frame_ != nullptr);
+
+ const int32_t dstStride = video_crop_size_initialized_
+ ? video_crop_size_.width() * kBytesPerPixel
+ : desktop_size_.width() * kBytesPerPixel;
+ const int32_t srcStride = spaBuffer->datas[0].chunk->stride;
+
if (srcStride != (desktop_size_.width() * kBytesPerPixel)) {
RTC_LOG(LS_ERROR) << "Got buffer with stride different from screen stride: "
<< srcStride
@@ -397,21 +434,40 @@ void BaseCapturerPipeWire::HandleBuffer(
return;
}
- if (!current_frame_) {
- current_frame_ = static_cast<uint8_t*>(malloc(maxSize));
+ dst = current_frame_.get();
+
+ // Adjust source content based on crop video position
+ if (video_crop_size_initialized_ &&
+ (video_crop->region.position.y + video_crop_size_.height() <= desktop_size_.height())) {
+ for (int i = 0; i < video_crop->region.position.y; ++i) {
+ src += srcStride;
+ }
+ }
+ const int xOffset =
+ video_crop_size_initialized_ && (video_crop->region.position.x + video_crop_size_.width() <=
+ desktop_size_.width())
+ ? video_crop->region.position.x * kBytesPerPixel
+ : 0;
+ const int height = video_crop_size_initialized_ ? video_crop_size_.height() : desktop_size_.height();
+ for (int i = 0; i < height; ++i) {
+ // Adjust source content based on crop video position if needed
+ src += xOffset;
+ std::memcpy(dst, src, dstStride);
+ // If both sides decided to go with the RGBx format we need to convert it to
+ // BGRx to match color format expected by WebRTC.
+ if (spa_video_format_.format == SPA_VIDEO_FORMAT_RGBx ||
+ spa_video_format_.format == SPA_VIDEO_FORMAT_RGBA) {
+ ConvertRGBxToBGRx(dst, dstStride);
+ }
+ src += srcStride - xOffset;
+ dst += dstStride;
}
- RTC_DCHECK(current_frame_ != nullptr);
- // If both sides decided to go with the RGBx format we need to convert it to
- // BGRx to match color format expected by WebRTC.
- if (spa_video_format_->format == pw_type_->video_format.RGBx) {
- uint8_t* tempFrame = static_cast<uint8_t*>(malloc(maxSize));
- std::memcpy(tempFrame, src, maxSize);
- ConvertRGBxToBGRx(tempFrame, maxSize);
- std::memcpy(current_frame_, tempFrame, maxSize);
- free(tempFrame);
- } else {
- std::memcpy(current_frame_, src, maxSize);
+ if (map) {
+ if (spaBuffer->datas[0].type == SPA_DATA_DmaBuf) {
+ SyncDmaBuf(spaBuffer->datas[0].fd, DMA_BUF_SYNC_END);
+ }
+ munmap(map, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset);
}
}
@@ -770,10 +826,7 @@ void BaseCapturerPipeWire::OnStartReques
g_variant_get(variant, "(u@a{sv})", &stream_id, &options);
RTC_DCHECK(options != nullptr);
- g_variant_lookup(options, "size", "(ii)", &width, &height);
-
- that->desktop_size_.set(width, height);
-
+ that->pw_stream_node_id_ = stream_id;
g_variant_unref(options);
g_variant_unref(variant);
}
@@ -859,10 +912,15 @@ void BaseCapturerPipeWire::CaptureFrame(
return;
}
- std::unique_ptr<DesktopFrame> result(new BasicDesktopFrame(desktop_size_));
+ DesktopSize frame_size = desktop_size_;
+ if (video_crop_size_initialized_) {
+ frame_size = video_crop_size_;
+ }
+
+ std::unique_ptr<DesktopFrame> result(new BasicDesktopFrame(frame_size));
result->CopyPixelsFrom(
- current_frame_, (desktop_size_.width() * kBytesPerPixel),
- DesktopRect::MakeWH(desktop_size_.width(), desktop_size_.height()));
+ current_frame_.get(), (frame_size.width() * kBytesPerPixel),
+ DesktopRect::MakeWH(frame_size.width(), frame_size.height()));
if (!result) {
callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr);
return;
@@ -887,4 +945,22 @@ bool BaseCapturerPipeWire::SelectSource(
return true;
}
+// static
+std::unique_ptr<DesktopCapturer>
+BaseCapturerPipeWire::CreateRawScreenCapturer(
+ const DesktopCaptureOptions& options) {
+ std::unique_ptr<BaseCapturerPipeWire> capturer =
+ std::make_unique<BaseCapturerPipeWire>(BaseCapturerPipeWire::CaptureSourceType::kAny);
+ return std::move(capturer);}
+
+// static
+std::unique_ptr<DesktopCapturer>
+BaseCapturerPipeWire::CreateRawWindowCapturer(
+ const DesktopCaptureOptions& options) {
+
+ std::unique_ptr<BaseCapturerPipeWire> capturer =
+ std::make_unique<BaseCapturerPipeWire>(BaseCapturerPipeWire::CaptureSourceType::kAny);
+ return std::move(capturer);
+}
+
} // namespace webrtc
Index: chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc
===================================================================
--- chromium-83.0.4103.116.orig/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc
+++ chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc
@@ -16,7 +16,7 @@
namespace webrtc {
WindowCapturerPipeWire::WindowCapturerPipeWire()
- : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Window) {}
+ : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::kWindow) {}
WindowCapturerPipeWire::~WindowCapturerPipeWire() {}
// static
Index: chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/window_capturer_linux.cc
===================================================================
--- chromium-83.0.4103.116.orig/third_party/webrtc/modules/desktop_capture/window_capturer_linux.cc
+++ chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/window_capturer_linux.cc
@@ -28,7 +28,7 @@ std::unique_ptr<DesktopCapturer> Desktop
const DesktopCaptureOptions& options) {
#if defined(WEBRTC_USE_PIPEWIRE)
if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) {
- return WindowCapturerPipeWire::CreateRawWindowCapturer(options);
+ return BaseCapturerPipeWire::CreateRawWindowCapturer(options);
}
#endif // defined(WEBRTC_USE_PIPEWIRE)
Index: chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc
===================================================================
--- chromium-83.0.4103.116.orig/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc
+++ chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc
@@ -16,7 +16,7 @@
namespace webrtc {
ScreenCapturerPipeWire::ScreenCapturerPipeWire()
- : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Screen) {}
+ : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::kScreen) {}
ScreenCapturerPipeWire::~ScreenCapturerPipeWire() {}
// static
Index: chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/screen_capturer_linux.cc
===================================================================
--- chromium-83.0.4103.116.orig/third_party/webrtc/modules/desktop_capture/screen_capturer_linux.cc
+++ chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/screen_capturer_linux.cc
@@ -28,8 +28,8 @@ std::unique_ptr<DesktopCapturer> Desktop
const DesktopCaptureOptions& options) {
#if defined(WEBRTC_USE_PIPEWIRE)
if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) {
- return ScreenCapturerPipeWire::CreateRawScreenCapturer(options);
- }
+ return BaseCapturerPipeWire::CreateRawScreenCapturer(options);
+}
#endif // defined(WEBRTC_USE_PIPEWIRE)
#if defined(WEBRTC_USE_X11)
Index: chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
===================================================================
--- chromium-83.0.4103.116.orig/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
+++ chromium-83.0.4103.116/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
@@ -22,17 +22,13 @@
namespace webrtc {
-class PipeWireType {
- public:
- spa_type_media_type media_type;
- spa_type_media_subtype media_subtype;
- spa_type_format_video format_video;
- spa_type_video_format video_format;
-};
-
class BaseCapturerPipeWire : public DesktopCapturer {
public:
- enum CaptureSourceType { Screen = 1, Window };
+ enum CaptureSourceType : uint32_t {
+ kScreen = 0b01,
+ kWindow = 0b10,
+ kAny = 0b11
+ };
explicit BaseCapturerPipeWire(CaptureSourceType source_type);
~BaseCapturerPipeWire() override;
@@ -43,28 +39,32 @@ class BaseCapturerPipeWire : public Desk
bool GetSourceList(SourceList* sources) override;
bool SelectSource(SourceId id) override;
+ static std::unique_ptr<DesktopCapturer> CreateRawScreenCapturer(
+ const DesktopCaptureOptions& options);
+
+ static std::unique_ptr<DesktopCapturer> CreateRawWindowCapturer(
+ const DesktopCaptureOptions& options);
+
private:
// PipeWire types -->
+ pw_context* pw_context_ = nullptr;
pw_core* pw_core_ = nullptr;
- pw_type* pw_core_type_ = nullptr;
pw_stream* pw_stream_ = nullptr;
- pw_remote* pw_remote_ = nullptr;
- pw_loop* pw_loop_ = nullptr;
pw_thread_loop* pw_main_loop_ = nullptr;
- PipeWireType* pw_type_ = nullptr;
+ spa_hook spa_core_listener_ = {};
spa_hook spa_stream_listener_ = {};
- spa_hook spa_remote_listener_ = {};
+ pw_core_events pw_core_events_ = {};
pw_stream_events pw_stream_events_ = {};
- pw_remote_events pw_remote_events_ = {};
- spa_video_info_raw* spa_video_format_ = nullptr;
+ struct spa_video_info_raw spa_video_format_;
+ guint32 pw_stream_node_id_ = 0;
gint32 pw_fd_ = -1;
CaptureSourceType capture_source_type_ =
- BaseCapturerPipeWire::CaptureSourceType::Screen;
+ BaseCapturerPipeWire::CaptureSourceType::kAny;
// <-- end of PipeWire types
@@ -79,33 +79,38 @@ class BaseCapturerPipeWire : public Desk
guint sources_request_signal_id_ = 0;
guint start_request_signal_id_ = 0;
+ bool video_crop_size_initialized_ = false;
+ DesktopSize video_crop_size_;;
DesktopSize desktop_size_ = {};
DesktopCaptureOptions options_ = {};
- uint8_t* current_frame_ = nullptr;
+ std::unique_ptr<uint8_t[]> current_frame_;
Callback* callback_ = nullptr;
bool portal_init_failed_ = false;
void InitPortal();
void InitPipeWire();
- void InitPipeWireTypes();
- void CreateReceivingStream();
+ pw_stream* CreateReceivingStream();
void HandleBuffer(pw_buffer* buffer);
void ConvertRGBxToBGRx(uint8_t* frame, uint32_t size);
- static void OnStateChanged(void* data,
- pw_remote_state old_state,
- pw_remote_state state,
- const char* error);
+ static void SyncDmaBuf(int fd, uint64_t start_or_end);
+ static void OnCoreError(void *data,
+ uint32_t id,
+ int seq,
+ int res,
+ const char *message);
+ static void OnStreamParamChanged(void *data,
+ uint32_t id,
+ const struct spa_pod *format);
static void OnStreamStateChanged(void* data,
pw_stream_state old_state,
pw_stream_state state,
const char* error_message);
- static void OnStreamFormatChanged(void* data, const struct spa_pod* format);
static void OnStreamProcess(void* data);
static void OnNewBuffer(void* data, uint32_t id);
Index: chromium-83.0.4103.116/third_party/webrtc/webrtc.gni
===================================================================
--- chromium-83.0.4103.116.orig/third_party/webrtc/webrtc.gni
+++ chromium-83.0.4103.116/third_party/webrtc/webrtc.gni
@@ -114,6 +114,10 @@ declare_args() {
# supported Ubuntu and Debian distributions.
rtc_use_pipewire = is_desktop_linux && use_sysroot
+ # Sets the pipewire pkg-config version to use if rtc_use_pipewire is true
+ rtc_use_pipewire_version = "0.3"
+ rtc_use_spa_version = "0.2"
+
# Set this to link PipeWire directly instead of using the dlopen.
rtc_link_pipewire = false

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd">
<default-apps>
<web-browsers>
<web-browser>
<name>Chromium</name>
<executable>chromium-browser</executable>
<command>chromium-browser %s</command>
<icon-name>chromium-browser</icon-name>
<run-in-terminal>false</run-in-terminal>
</web-browser>
</web-browsers>
</default-apps>

View File

@ -0,0 +1,53 @@
#!/bin/bash
# Allow the user to override command-line flags, bug #357629.
# This is based on Debian's chromium-browser package, and is intended
# to be consistent with Debian.
for f in /etc/chromium/*; do
[[ -f ${f} ]] && source "${f}"
done
# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system
# default CHROMIUM_FLAGS (from /etc/chromium/default).
CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"}
# Let the wrapped binary know that it has been run through the wrapper
export CHROME_WRAPPER=$(readlink -f "$0")
PROGDIR=${CHROME_WRAPPER%/*}
case ":$PATH:" in
*:$PROGDIR:*)
# $PATH already contains $PROGDIR
;;
*)
# Append $PROGDIR to $PATH
export PATH="$PATH:$PROGDIR"
;;
esac
if [[ ${EUID} == 0 && -O ${XDG_CONFIG_HOME:-${HOME}} ]]; then
# Running as root with HOME owned by root.
# Pass --user-data-dir to work around upstream failsafe.
CHROMIUM_FLAGS="--user-data-dir=${XDG_CONFIG_HOME:-${HOME}/.config}/chromium
${CHROMIUM_FLAGS}"
fi
# Select session type
if @@OZONE_AUTO_SESSION@@; then
if [[ -z ${XDG_SESSION_TYPE+x} ]]; then
if [[ -z ${WAYLAND_DISPLAY+x} ]]; then
CHROMIUM_FLAGS="--ozone-platform=x11 ${CHROMIUM_FLAGS}"
else
CHROMIUM_FLAGS="--ozone-platform=wayland ${CHROMIUM_FLAGS}"
fi
else
CHROMIUM_FLAGS="--ozone-platform=${XDG_SESSION_TYPE} ${CHROMIUM_FLAGS}"
fi
fi
# Set the .desktop file name
export CHROME_DESKTOP="chromium-browser-chromium.desktop"
exec -a "chromium-browser" "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins ${CHROMIUM_FLAGS} "$@"

View File

@ -0,0 +1,5 @@
# Default settings for chromium. This file is sourced by /bin/bash from
# the chromium launcher.
# Options to pass to chromium.
#CHROMIUM_FLAGS=""

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>chromium@gentoo.org</email>
<name>Chromium in Gentoo Project</name>
</maintainer>
<use>
<flag name="closure-compile">Enable closure type-checking for Chrome's web technology-based UI. Requires Java.</flag>
<flag name="component-build">Split build into more shared libraries to speed up linking. Mostly intended for debugging and development, NOT RECOMMENDED for general use.</flag>
<flag name="hangouts">Enable support for Google Hangouts features such as screen sharing</flag>
<flag name="pic">Disable optimized assembly code that is not PIC friendly</flag>
<flag name="proprietary-codecs">Enable proprietary codecs like H.264, MP3</flag>
<flag name="suid">Build the SUID sandbox, which is only needed on CONFIG_USER_NS=n kernels</flag>
<flag name="system-ffmpeg">Use system ffmpeg instead of the bundled one</flag>
<flag name="system-icu">Use system icu instead of the bundled one</flag>
<flag name="system-libvpx">Use system libvpx instead of the bundled one</flag>
<flag name="tcmalloc">Use bundled tcmalloc instead of system malloc</flag>
<flag name="widevine">Unsupported closed-source DRM capability (required by Netflix VOD)</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,94 @@
DIST firefox-80.0-patches-02.tar.xz 26280 BLAKE2B 11445bae206ed9e8cbadb7f9c2a2ca143c50d4924e663e3b83533f5b6b2aab4e1c760c9c21e1c7ed7d324443ce5df50d1f6b1284184ddaaacbe6c040c5835dee SHA512 51ea389c14757636eea87d9cdb64015072b85ca79e86c68a299568b2a02a8225116c40f0b6306bb15cb73ea9ba18e1767d5e0c21e0aa6dd202cf6ae3d74c304a
DIST firefox-80.0.1-ach.xpi 504583 BLAKE2B d885d46f9eafa9e4c390318b4d01a9c3bd6ffe559c5a619fa7fddd8edd17599c61162499e7ef6b24a68e067ac1e5434e428519bb2dcec1d1b288ba22b7547be4 SHA512 ac19b518cc92f39e8fe16eb86f9c1a273db0f7ba4bf9ce001c41dac2b33400ebe3131ad5205009ffe96ff1e067212f7edc2f083f8cab29f8457af77efc299335
DIST firefox-80.0.1-af.xpi 444291 BLAKE2B c71a2cc6c6e56855ced7a4a85dacdb11265bdde39e5e0f5337f35a031cec45487a71fdc1ad35530fdb71360a38dcc81dec789a54da41f653db5dc0bb36a34b31 SHA512 29bd2b91adf1976a7d9a40ee0db8a8fb17036bfa28a2ea2eaff2f17ea91cc3ac49b4bf99259315e3ed8e38cc229a68a1c68212e4c13fa851d6e94efa01a3e410
DIST firefox-80.0.1-an.xpi 542426 BLAKE2B 7d9d8d305c9819d2840b29876aa4074971887904e172f3d5ebc090dfc5ebf5ca9d6e7cbca490fbe0c4e53eb41952732d047e235ed18a344315bd198566a92a3e SHA512 b6e490f206b4d20e6bc652b9daa24f78f1b4447e32ea77394b92e73ec0de6f21d30e22ca3ee87f2a95e437cdf7cab6a6a81307a8ec1451e69f761671cc03a5b0
DIST firefox-80.0.1-ar.xpi 591816 BLAKE2B 4d8aceaa4e7e44394be8961a3515dc98dab892bf3ff15a3cc93d35501db33f8764a8579fbb6196ce85d68134f3cdead11549946e2f73a986d49731594c9e762b SHA512 412181e35fc61a871076867c00133670c4b04e199ac4bf0909923f850cc60825cf8411eb42a449c0d921b5702d2463a485826731b53b76302e06702c44ca7c8b
DIST firefox-80.0.1-ast.xpi 502149 BLAKE2B 1e196ecdf387c4769f8a5000df918679b95d83d1d06306b60a7146d4b11328e6883baf85c6ea04023cafa4e50f67301f6276dcd4e70593a9149e3f06f25dedea SHA512 1dba93dec0eafd28b13ced483d098e57b77816d9a64f6fc7089516d1adc23c8834c672fa2ba52e53ce8b1599f55779c24fac0a54151f3cf84d3ebfd0265065ea
DIST firefox-80.0.1-az.xpi 539349 BLAKE2B fbda6488399d8dc1e9f5d9dad3be9b6ba7d32bfd826a3ec28d6b0b020ca83505b2ef5121e36636ca837d3675d1aa7dffe57f3df3b85094d91e75b24339d599bd SHA512 7a044fc2cfc7e36f0e8407e804ce29deb6441c33e69e11458f010b614edc5f01bd4d03086eb4e81c2fce970878b16b294520e3c6309d1398552dc39d5adbc106
DIST firefox-80.0.1-be.xpi 652311 BLAKE2B 14299f1248968272127d6562a85b049e0a4da11da7f8f30169e569fcee9a6c9ead73f807a4a216622d100005b9d7af5ad8279352e8c02e9c56aa2eef69111e6d SHA512 96a02f58e3a9604342cb0b755c6ae4bc35c8e48adecaf407566cf10bf2ef5ab7dd1c83951377cc21d631912811b25cff1ca40a1dff74271c29f71c7ab0b390f3
DIST firefox-80.0.1-bg.xpi 614701 BLAKE2B 872d0bf0598f4f942278bee24d497c846e65e8ebf9217eaab0ca2a3fdcdac43a0cac71c044e86a8fb7671a5d3c6ce630ee674ff41e7c9738d3419090ffe79e92 SHA512 974fbe862f264b98a8045e306ef09817e739f8a1d6c092b60503f73d8667702df88a090abc4f492982ce11ff3b0e138a4c615bd400622a3901b63531155c1d64
DIST firefox-80.0.1-bn.xpi 635296 BLAKE2B 4a08afd0d38908cea8040f872d9763e19466538229168fd7c75e993c3b2b8f8eaff0dfac5e7b6fda86c34abff7795f1a9af0b2cc71c9062168d6ac9faecfd7d2 SHA512 64bdd07e317c5aa04cec65fff262982aadd7aeabdfe7ae07068807e2bc6ff62042cc051d7422b7df5904a0e3ab32697f46f4ac6f9cfa118b19fc475de2373651
DIST firefox-80.0.1-br.xpi 555844 BLAKE2B 480f327adf194a66dab2b4c5ecbd8f3d3dee3cce7b2b83710fa9628a584e062ec210f857caedb950209fe71524242a8efe9660daf209ff27110c9cd87e8ee5ee SHA512 9f199d06d38f4dee320bd818d3c0dd570faab221beeb4f8029b1ef4a69e385c8b7d58db7926ced1fbf65c8f20bf4406c1545dd4ba42cc2a1144d2aed6e8623b2
DIST firefox-80.0.1-bs.xpi 513421 BLAKE2B f231f7007833bf3e1d874e7b7fd95e07c5c31c8a155b4017f8b00a34bc409944922b06f05e65753984ac5fdd18177a0c190a0c5396a9866b03fe45a24e670823 SHA512 c6e0ef8fcdaca6988ebbc8fa44ca1c32489c8c6667d0e30f560eef525a813789a0b6f5c721632909a936863f29320ea0054fbbdb41328a9594cc541f5fcd5d2a
DIST firefox-80.0.1-ca.xpi 564258 BLAKE2B 547a8d2fb678dc8eb6198f761fa45df2538dd0d6584d7734c28267a30532158e7b37702c60033724e083ddad9727bb61fc8ac1b782e3b60af601838fe3dc9ed5 SHA512 26c71d36c773dcae5dbd42af3075722a40e7e763a9a00529837f8847dd59683d7404ab6bdf90543f8fadd1aac35658a93f143051cae1c12a36bbe1ba8a95578d
DIST firefox-80.0.1-cak.xpi 589532 BLAKE2B be2d5d21657c1bffe4538130458715c1a36c709c6452ecba8894ac47cc3cccacbe23f62195221ceede8a89a96787f46db68308ed953fba3cc6c6f90e87d17451 SHA512 bd4299a8940c187b502555955c5fd7a52b52ea785bedacfbd115f2933c4c34a0a18425cd5bb5e0861abd986e125d83ff05d277c223863a6db1b6a8bedf8a8df9
DIST firefox-80.0.1-cs.xpi 590314 BLAKE2B fa0a9d9d8544437b1513ed0b8fc07757e5ec34bae697dfdf15ab9b44aa262635b0d1a56877181f5ab3e5dd32ac22bee0195546b32ddbac02ecc5de716c5966ae SHA512 65b1b5824424017d3819e789a8951095c0cf7dba3f0671c501a5344f3a91cab6fe0cf0c3940685156b961489fa6b65b279f33a1cb4ae59328d00ee7e393d824d
DIST firefox-80.0.1-cy.xpi 574272 BLAKE2B 3ab8d320bf2fd48f5825d24975ca1266d726f50181a61b5cec28bcfce96d8159c24da05da83d57187c2f46ef998d914ad4c3fea9f793b26dc12dd27530009468 SHA512 81400a51bcb20feba7300b2ec8143d788e8962284852a15b1702345b344aae62b1403c8ebf4a808d2a4ff55674284b827db8ba81d0c77928f701bd7cd6287812
DIST firefox-80.0.1-da.xpi 564645 BLAKE2B 375f10fee6b2af1cddfd145fbc7616e8289a17c6273a509cfc8c42bd94c3dac161517c536cb94763ef317df9aaf34d195db6af8d4fa950f06060f2a5f51c707d SHA512 b1e8748883ab511f7023b52846b19633e17ed49d9d5e96cc0a1062dc5eb7f60094d39b542c947190eb07d2be00e87192615a4015cac5700565a7247dcfbe0fd6
DIST firefox-80.0.1-de.xpi 588247 BLAKE2B ba6a54fabc42338259e01a658dec8e090cdc0bae1482ff1841ddd7499ae4cb2a10c83e4dd1ab33d0101762126f454a44e4b083142deff0a44d48c0c112a17902 SHA512 a23868386debc06a8f4c1dde2625bba796c59a9898bf560ddffbcff0035b84832faca828d3b507c63437372097a818b4b51dca51304131bc8f21694a6b54adeb
DIST firefox-80.0.1-dsb.xpi 598372 BLAKE2B fff3b0e5f2c93e9cf12781742f6b00dd4347a2ab4ef5eec05e81ca14c470a658a27b22f1c6bd3d9956716a0e0f98f8c3b8e7dd5d0247162c16b38a4f3a33feaf SHA512 615ec77f46da620ec1d4ef9fc96bf8ef43edc4a3c1476737cbf2403d73220b9224316cc6924146ed5f9ac17e40e0f6a03b90053015be74c9fcba055b05e45a85
DIST firefox-80.0.1-el.xpi 673926 BLAKE2B 8dd6b2a74c10f711fadde537242e6de9394513853639d3766a2f88b2eb6e9bc06e195389b0813424254a9409abac80a574abdd48f2164bdad6d1544dbc57fcc5 SHA512 3ea62e7ba20503446f7231d594d84b6d81380d0614c38ba0a1a1f9f873a5860feeba791b7bcad626064bd2194b86492be182ec94fdbcb53a4cbad7650d7003c1
DIST firefox-80.0.1-en-CA.xpi 541479 BLAKE2B cc38108b9165fced8ca6e04aa794f9ae6226b9ed7ea645650ee066e4f2054c84ab9ba386c89ecd71783ee21f837c06def205b7fc780a9273cfd8fa9843515903 SHA512 0122922c50c2254ac7d64361552d5c5c10c3492f97525857bb00f64d99ea9681f00143f8d7a521dd05ea26b6b3450bf2b8a0a9c98aea1d7535321798375f085e
DIST firefox-80.0.1-en-GB.xpi 539266 BLAKE2B f90521d2352332c006041ed22b1d180a74c504cc1a61a9a6dde4b76e77fbc5cc9750152d409835349f508f04a2bebc39f491313a5bf770af785ada0251766e8a SHA512 4eaaeabe1a86165700c78f160d379e14df40330b17fa83c89b63fdddd65f39ea18104b9684b582357bb946dec6fdc224511874ef7167fcb9c8f5f8dbbdec2cbe
DIST firefox-80.0.1-eo.xpi 566633 BLAKE2B fe5e6bbee2e655cfc05487809f07f532b548b43751d649ca24a1a5b285101d366c82770b3dc729364f6b11c9b805881df39e153f5c7492f17e2a1e25c876d521 SHA512 e6df7e49d3f2a85311883cca891eceaacd96a6ca8e37a4d800cabb0da846b576379a3ed1824fb35a27794696527dd421571a3982d4a6008033c41cc4ced4733a
DIST firefox-80.0.1-es-AR.xpi 579597 BLAKE2B 3fc4229892c3faceee2e303e94cd14601f0c6132bed513e2f2b9e57b05fbbf7ac48521fc56af4048330e526d9d6b3fa506caaa54b8837f92a5c2f3c3df890b6f SHA512 202b95ccdebe79cffa5c7b911829ee819170f2ee5ea1f9a86cb11c81b392c2481c8ce6dd75a87efb7451e80bde0faeea51d2130efe863cfea10afd882ccf8632
DIST firefox-80.0.1-es-CL.xpi 577631 BLAKE2B 8e44e19d6be3356d9a7f0d561ad07adf148b27fd57aa5f07d9f0512c2e3ffa2fe36a4f8634ab3aa4a84c6e90b8936d1a69e4e62b01adeac5a0d70171db1e6c1b SHA512 9902c486aa1950ebbca5800732da224f4d0a6c212d5a439158830d2b49d3a0cb199d336e112c5393dc28b585e5ea459d24d0628691b8f44b6e852ab3529a5ca3
DIST firefox-80.0.1-es-ES.xpi 562989 BLAKE2B cab474e30600e0e3a8950544febf8ee3cdc8a3ed06a2dfd5d0489ecf9b6a1b742fe27933d5dc7eeae5ac2b7ee0430ebfd85cfbb0721acc33863f22eb1e8ec90d SHA512 dd895d61f68998630196c1b67827b6391faf9aa67692496ff457cdb609ecea22472598fff3a8efd969e1f7bf6917e6e87bb230cf9ea2d14dbdab033c2202020b
DIST firefox-80.0.1-es-MX.xpi 575053 BLAKE2B 21c9ae4af67530b975a018607c1d83f12ff670a06f5f13afff4bbc79a2ef397624f6329939fbb516ba150a78c1080fa29b8443480162c0c213d5034bce916961 SHA512 c7d1750afa49e066bf991a36307f46c5207204eb1899faa52cdf9a148566270ad98fa4e392292805b7fbbc2847d7990a91fd6b5d759d18ba4d4feaac9614b089
DIST firefox-80.0.1-et.xpi 537589 BLAKE2B 591615c642322acfc71d4c082d70977ffe5bef875dfa5423451cd6b15bebca9f0f71c725f90474f7c86b77662779f802621dc7467e4210690ba7b0ab275b2fc1 SHA512 aa1b000d1cda7c6386e433f58e818b526b4a00fb2c6cd52e314b9df73428d9b1727c36b563e8f74f3be95e269ddd683069ec977dc0418489fed262694afd5d9b
DIST firefox-80.0.1-eu.xpi 558572 BLAKE2B 624888cb8367888a76d6d33c0ed9a72b7cbd903df5f50466c1c99af59456ab40327f630fabd16318bffab3f085f1518ab735dcc335162b3270f26774df22c382 SHA512 445129660e64aaeee890ed17817e07f1b81396e56c7825d42d820461d35431e063d52638a8e70628fc0ddcc3c95f70ce6c6147f73926cd13117d21c3e4400756
DIST firefox-80.0.1-fa.xpi 597158 BLAKE2B 56cdef645e9ffa0985ee1d19d3a690a5e20748789272c01469609b9e557bfbcd8c765a5e894aef6e50408c5fae9b201285b326ad25b4f53096966d62c65ce198 SHA512 618edb84fe834b0a07d6f92e474a8daa6f6020131af4a650e67b53cb209dae073e41c7ecf3d3106a02c6a0a8d763ef1c7c115e3ffab8893c1fdf5c651c1c450b
DIST firefox-80.0.1-ff.xpi 533516 BLAKE2B 04d8d9942fedf9036656aeb5e9a72122bfbb8849963b849e811b53fd20ec8f44f28bffe707f0321e3c75e102bdd88e7e83bbc46871bc76e29a5f28ef20dcb4a4 SHA512 9c88ea9c89335148ed8e4e7921c20362d1081aead5a4bf9cdf20bbfbb62de9b30e73ea4b5e7a7608617810cca02cca666293f18af2e27906c4b3663109258639
DIST firefox-80.0.1-fi.xpi 564288 BLAKE2B 3064fd38df3fdd759679b946875b74e0095229c42772fd1669f495fed787dfb11b7bf6b7d8b7fc4bc4093c094699df7555d350d267badd1680078ab085baf567 SHA512 75cffb30b10e3a65bc1005bc07ad8d2bd2322a86979ba8076c181f4172ac24b50ef2705a50edf005baa55fbe43f20f9d3966d8efe626954a4de5cee9a4495c19
DIST firefox-80.0.1-fr.xpi 588643 BLAKE2B c82dce22ffe0967cdb3634be383fa7be466d43593c52d5f9c8c632a41c4d59471023efe6bdfea48c7825bea7ef81e5205933ce264af66dde7052395323a0f4e1 SHA512 97c1d0630ebdda03e82bae7f05460ac01d259349168795893552e519c4cbbaee5e510c5873769a7689f65a3ea8a42e6b57e1803b6ed931efd8af4fb504744edf
DIST firefox-80.0.1-fy-NL.xpi 573865 BLAKE2B ea8138bd570e2464526f612e9f16a83de673f4f48954f0052950ec907ac83a9e837f3351ef91dcc6f04d4b48f5f7d581086a1d2aae310de6281a8a4bef81bcc2 SHA512 7b3c109910b9430bbc5e03903af418eab74e7f6dfd190ae896814c724bcdf77717561e5afacb871280789952a4fc13f6b9358ce39ebe47f1a105ee717e4e8f55
DIST firefox-80.0.1-ga-IE.xpi 516236 BLAKE2B 0d81cc6ece708e073c25b514451f7f555f6d24f8bcf91862e28df88881267896fb0f39a62f6281b1440cb78ce151716f460efc74d3349001ef1567f7bbcc65ee SHA512 65e5b043cdad51329c4895ab6fe8e80cf29afad58ffca585a77d827ca70f03259c86c3383e260438a47e993af93fcd05198a102dff2efe0e47d1b836c7af6e25
DIST firefox-80.0.1-gd.xpi 546276 BLAKE2B 0031948453692579fc83cccf78ce642820fcfc7626b8063ee443bb2c45d0c41cf99521af45d4e41adce736ba65be08e4113afade05ee9cb15c900e653890c883 SHA512 017bffbc2748785a83c3068d472e53d4ca6aec335b1aaba2b25371172353463657c87a4f255e892282373c6499a38d154790a0a9db146637f71839bc2a3e6311
DIST firefox-80.0.1-gl.xpi 510190 BLAKE2B c43f142183f552a622709a4bbebbe6c70fe5717de979713095bd5a284787a3fedef5ad361a2212bd4e269ae36ea3d9fc05503d0531041e6b20ab15c4e7ef274e SHA512 8bdef6d9a9dc93291103ecf086e54a2f1b5c825b5b16a799ed7e289c27e40afa33203cbdc06737410010bd5d63395f56762967474f19029d3fd448ce3bf01bec
DIST firefox-80.0.1-gn.xpi 590791 BLAKE2B 1ddbce705dbe7d8376dc85572cddc622aa5b3bc0fa7558bdf4a3ed6460b4778a4917f586bf7ac9d2685dbbd807cc175331bdfe47e45d35fba4b6cc9eb1ea9ad2 SHA512 7b0ba306f99c4b1b184d691a8dbc850d3dc6163f98c0a06b702396bb4779a97fa766ead27da314e4a0e77e8bcfb62c99bac08c9f4d6c7e69479f3d4db43454e1
DIST firefox-80.0.1-gu-IN.xpi 604461 BLAKE2B 20af1b1f004c2ca8e2fe0c253e79d2c0b74ac063d447040d5681e73f87a9eab87b30c0e6f3872ea7b3a66bd4a0ca5655dcb2de890ee6d815b395262f71676bc1 SHA512 f6ed907d915b5247becc4bdde4c0162ead1e23bb09503bf97e18f7308fe54d22436f0166618b1456ee586d72fc7fa30ed787910a21c0443881d379710e42d969
DIST firefox-80.0.1-he.xpi 592098 BLAKE2B c68b749791ebde80692f2de63da6ce4da9a1f42025bb9d8db468c2980ff0c0a8e37d11c3cd56d0066d4aa7e95cf89ece27ecec90c68d4c7bcdf709b19266058a SHA512 35c343af1655da469a40841f47b2d55be613593ea6dc7d919e8a92cbe0397c5c6846964788f4b5352947daa804c6fa33f5d18445c10188715de9a74ed53f4027
DIST firefox-80.0.1-hi-IN.xpi 625903 BLAKE2B 58eee14246b5bd011dd5d8b80f6e550062091c11a6ac9bd68a2e0440fd976fad9be85d1fb48dda4cf84ee77ebff5a2ae0647a976098c828154fb986f7f94d782 SHA512 910c22111eddc6cba2089876ae726b580c6883d7fdbef6cce12b41977abb8aab69447a262aa748c35de77476eb015141ead769925d1d06a10fc671290d0db493
DIST firefox-80.0.1-hr.xpi 570021 BLAKE2B 08bbee83abbfa45bfbccb6665cee2c28c9725e0a47cda940575a552fec7d08b26161d878731ae36c3f2d6973329d342920a7e65bafc48bf6fb5fe587cff0ee8d SHA512 2be01411f887388770afc99efdc2fd77ca02327d51c8f4d1a717f13f0dbc147ba7fc39a56a686512cbf4cbef3d4b6a5ad85c0d03c878eb5b44386c47fe15eb8b
DIST firefox-80.0.1-hsb.xpi 595914 BLAKE2B f755c918266cdf4e052729deba5d5a325878489438eeed30523eb6e3c7896df07c33172286e8313e7e4f4c6045187e6b5a615d1f7deba4a38daa63b49745a9dd SHA512 4084e9a4c65e57d6efc16d1f7927772ac6fa87c7c136ed4f7a82fa19db76d236ab06e08eec234612702d42e32968fd1699836b314c2ff7770f8cd84db209dbc5
DIST firefox-80.0.1-hu.xpi 600741 BLAKE2B ffd3bbcbca34377f2ec0d9ef7ff183a4fd62bd99e53317806f1419b6859804b3b9d7926cf09cff7bd6e1ce2f621c307cf0142aad68cde00c1d1800e4fe6d9888 SHA512 066da2326aefcaa07433083230debc48689be0aa82701111e9b7dfc2ac45724047029a0332401d66cab53b90bba243839f28014f773cea442a5e25ea8b387e23
DIST firefox-80.0.1-hy-AM.xpi 651784 BLAKE2B 874cd0c9c62087d131382b1be57a30536ec45e5c58886fb79ba1315dd6bf8fce68330b2046cf0d16c6e7e4390e46f6fe1e7a6dd62e6ca32007dbe58a7129f3a9 SHA512 7689b2fdccd31f057c69ef02ec2ff925cdbf02fdde70e929879ef4ce426458b51ad5576ce99af58b2aa250e1c497c333d21648effe254e8310a666cc07564718
DIST firefox-80.0.1-ia.xpi 565290 BLAKE2B 75e6b194b15b16cf46339c48ea24775bc5dd113170a0aba9078446a9b40c4dc208f9f81045bb4ba8928d2d0f1319b6620235e2b228fa9b923b405ce93f993b81 SHA512 d14576bf7bd9c686e3e5cd9fb1b0477f95db0cc02040e00b66939e494743779ba705eeb01e1f8a6730b079e9c6a1aa40f5bc6874f3c708c2d4a0614f15fdb13c
DIST firefox-80.0.1-id.xpi 558440 BLAKE2B 5fc4cd0ff0b7a4338be2de63a5ef45febc6a0fd203e5a4c50a622b4b6a3c82d2e244bcc80460dac87ee8049310f5dd83ef9b1be4cd9f1c27902640e5a52f26e0 SHA512 d7606b3422e6cba126dab8ebe68d3d4fc77c93eafddc118191a7dad474dafa402907388bb269f9a6654a44be06aa61f72698e893b608e944afa8ed524b2e5605
DIST firefox-80.0.1-is.xpi 529509 BLAKE2B 8b96219b2cd711d13b23cdd1f3d3d59ae603dabcfcab31eb98961f0482b61e930ebcf074a008fed654fe958b94dc0861c8521b0094c282cbfdb4c5282efa90c1 SHA512 5fa2a46a70ad0b88ba40a495ae9c1687aef359fdab8f721185352b124f15c755af8fa0ee6fff3abb5dc79daa5b560fc12e671438280b03a5e1523460409d5a30
DIST firefox-80.0.1-it.xpi 463581 BLAKE2B 05c9459abdbc3808fb959cfffae271868b8aa1952fe3af48ec1481f032ddd53b1e3aaa62b28ff7b4ae44dc90e15b3aafa5900dd46f1473fcb6c2dcbf16cc6ba2 SHA512 a5d20ee02f37575457af1ed9a1ddd40cee0cc1b85dc6ce79e033550abafccc85f0f8436ef04f28683fee777e391644d10b812fdd308be5f967079b13eda19e92
DIST firefox-80.0.1-ja.xpi 601243 BLAKE2B 404e4004234e9e81665dbfa6a2014ef8e3e8b72d1f143400c3fa097c7c3ad4e66f5d3cb84e1d846a104eb041c5a10884bd25a3218081402ab97ca91d65db0f13 SHA512 073f13c1ad5287adfd3602791547a544d6cbba24720e7d7ee205bd11fcca2a458d32370a41443a46732599b8286132787a7618ab18363b20adf39b9962afab55
DIST firefox-80.0.1-ka.xpi 626403 BLAKE2B 63217d95585b900ad6a6e13d41067f394c4d2eea5f249745c4b82ca75fc440f1f3b521b50d7c47da3d2ff332cfd5df9327206a0176c0a224d08becb4391e2fe7 SHA512 b30c64ce4272816dc9d7d88f6e0e1a6bd45b85eac63823182a85b6eb176219c74ab024394b7016961dab4516af1973de845085d1bdc5ce8c4c76e8cba4ac3bca
DIST firefox-80.0.1-kab.xpi 583640 BLAKE2B 265db8138bff8e07f11963cda3f1b4ede8156f96bdea9709bf71fd518244f7f3be144df52e25f6ea2db7aac70fcbfafdbd1da0fcce42bce372438c456ac3dbf2 SHA512 e123117fc4dd8469e244de5f1714e2d4438413b2370dd6659e074fc6738ef558d8e0a566a028d8e87062fea8cbe153403fe4d231ead32cb7d4043ec6aad3384a
DIST firefox-80.0.1-kk.xpi 649669 BLAKE2B 677335f9c33159810f6a73d4e0c080efd3d294e2c1bdcac8d5fec4bcfba61ddb504ca6943af83c8dc4d82ea86ab16df29eedffa326f712b1d7fa1c93da5c918e SHA512 20af3efbe6269624422f1ee7a9254528febef20c09c402152da9a86cc076fdc4fa51e730df7ef154edb1ffc048553675a3d2ad356c9e06a0e0e0107e7823a797
DIST firefox-80.0.1-km.xpi 568463 BLAKE2B 9daa1e7bbe2ca082578b8cd9484b3574a9112f66300c198ed5c9cb6e40dfe4261ee6115c7207676646baecbe0fcb085e48cb6edbc7a6607aabb6b4e0009be7aa SHA512 b9e4c78612d2ce6d20c8628aa2fbfd0edae3e175852c14ed4489e72e0036a1627f3218425a72862b4bf2745b3299caf6e5306751fccd083211153e472dea2b45
DIST firefox-80.0.1-kn.xpi 559704 BLAKE2B ea4c2031c7efc41556de3356e64270ae9a2f964e38f28f97138ecf26b146cc39b8a58ba2d90fca5c851139aefc443aa78921429f7a11d0e52d020efe6b80768d SHA512 526b88bfec9b1c33a120e7ec2f045d20e19704b48db87d84faeca5c8ee5ef56159e12601869b2d2233c293b599907f76333789a1d3c503ff6377a1c76caa5be5
DIST firefox-80.0.1-ko.xpi 614390 BLAKE2B 56fd747d8eb0eb5da2b102a55e202c5d5c7f5cbfe38509ba26808240bde470d432878a3e689fe6afd67364556ca2768a3f096ec55cda5b64bade4400e037c325 SHA512 50f6484898aaf1a9bdd91eae4c5ffaf55c05a5b28aa4af825dcadc64ebe18db77ec97108648bebf87aa1273ba1855a0c2f405820643f98a31c604e7a6b04e942
DIST firefox-80.0.1-lij.xpi 528971 BLAKE2B cbdd1aef2f7377915a7d8db05695d105c473eed6503f225b702539650488d80e61ed04abf165185802e8f661b6fda160c9cc733992b4d479809c35c641718077 SHA512 66feafb6d43fc5099083d25d8462850a575f2f43b4755e5c3e3bdcaf33c554f462a4df0b199a93486f3bf24950b0ed5415bb835df0520f5c7a62a81547ef30ee
DIST firefox-80.0.1-lt.xpi 587840 BLAKE2B 5c51f5aa2c97e17f01ee6ab29bbbbb91afb312f2ad89c76bffe03762aaf2140ecd98bdad75333a975900dbf6759ff31f0738c5ab5aef42a1d6fc3af01492bea6 SHA512 5d38561dcb9312dc62dd4f06a7674b277d0be1317f9fb1b6e1eeaa889f0d0466a7c1ad529b2f8d58de65f51d5abd9829999f33db30fefe9a5a3b54014c60208f
DIST firefox-80.0.1-lv.xpi 519818 BLAKE2B fe825a830cedb1b40b903be1a17031f0f52f8bb79005aedeba0691f54c6cdd02a315d0ba5d17da3abb2ef79aed52ee56828010fe0916a9c21466ca859b48a412 SHA512 789d712a7c399178f43e5c108e2727ee6be58b999df4248f2669d2837299da79d0cdd20f3dbdbccfc1656056573470633ed3f65fd1903e2e509b5645298e48ac
DIST firefox-80.0.1-mk.xpi 482548 BLAKE2B 53d581e920ed2f790a7184f37b2bd2b4d312b45e629a8dc2753d21bae585cc2ad072e2773adcf5e96a38a669e8a04d1a5647395fcd00fed961f116fd34f06459 SHA512 a31bd6b70316f986b9c7edd3dc797103d49a193f180371dd875eb17391fe94b92103606cb06fba2378b8fe1329475c54b8296969496eaacd0f140e83038ec49d
DIST firefox-80.0.1-mr.xpi 601274 BLAKE2B 7cf25f0a127183d79ba5bb1c4181cd0d5e799dbfc96d7dca1da2cedb7d1498a5068443df6acf2a6820c5281ad1378cc21d1fb27e734be968dc8a1980a8962ccb SHA512 4d9ccad61a868483ce700b28ace409c7907822c0c5bf261bf8f4497aecd685fc760226ebc5af08d8678a8a582ab59a282ecb73c595ffa62e404f39bf37f73c6d
DIST firefox-80.0.1-ms.xpi 502900 BLAKE2B 904cdf465d8015a73584a98c97d4ed168f2bec898c02762a87a82f2cfc621d0d8bc25d6bdaacf0ee4803f43a3f1f0fb71655d0aef7990e0ac2b0581c3ce59253 SHA512 1c83be4e5c2b7267f8956a534596c31bedd9680539f5b93731c92c42012d987024dc1785fa647e9db9ef5554e5ea469e132906b4d41789e2d31d7539b0c698a6
DIST firefox-80.0.1-my.xpi 557148 BLAKE2B fa611100ac7fffa5c5538493679aa7b6a257ab8300ad583928601ec8332e13f811bed34274b03a75a5ba84253dd54703dbad7f477fd82708b11fb951dfdd3ffe SHA512 bce7f873f4379d3ad12804894c0d52ef38f0f4addb43e556cc8370fbd8c5b2d8a5370a9007a6808192223d51aba6413d3596db8c262f22347d7d27d2027a41cd
DIST firefox-80.0.1-nb-NO.xpi 559668 BLAKE2B 02bc6ca754b8402bc452789fe92f9042e9c3cb8cbd55831b9b89300765cfd92ab231aab452b2958444cc591e5b70da38a97c464d64fe9246f7f88afca463f070 SHA512 85cef35f5c975b313db2ff28c7b432957a96de41fd87fa727ed30363b72fea30926d4893d65d877b6a9f65c195ec4381cc56eceaf825afae9a95efabe8c612b5
DIST firefox-80.0.1-nl.xpi 567581 BLAKE2B 10ed307f355c46ab738ff303b9ef7de255b22805dca76b6edb62b0831ebef44ab8d591b572e74c72483d0d2ebd02dad0e111d42529dc36ace894f5ac3e63caa8 SHA512 c83f5444ef5e10ea9f8578674bba1f1e957d93703177adb1abb13d191f202df184ec2e91ea15f559e9f350f5edd3e7ae61f0b79a3709ea9380f0c9902a8b9554
DIST firefox-80.0.1-nn-NO.xpi 562491 BLAKE2B 06b2608a77a3f548433a504257c16abfe35634383ccc469568da9ecb28524dda1cbf4dfdfcb26812a5f43fb8d3930c422e6c77d68b4a326094f1dc2fea034ec8 SHA512 42a57f7927029864e682db3507dad6189d2518649b4520de0ffdbfb8f7ec687ce3df50630859832fb0ec2f3f0f45a5998e8cbce11999ff6b02d17276c3b1e026
DIST firefox-80.0.1-oc.xpi 584239 BLAKE2B aae9400ba32879130cfc1b80b4d5a2a78fccf17e31d76e29ddb38d241f3adb5dcad3e36761d742560151f0916e6e897d9a31846262ac386d2802ea478a06262e SHA512 b78f228736a66e0f9378a80dfd41aa5c8bf33d80271f38ce65c41f956f7d8c06fa84e7089e3e14073966c60de6bab11dd1f0c3f9f3400f1448d792171d0f21d9
DIST firefox-80.0.1-pa-IN.xpi 613847 BLAKE2B c8af3f2ca1d007225ccd274aff221f4a9006a9f451fa8ffcf949f8027ad82ba09e985127afb26a12bb02865d8d417a7320b2e1a537bd4d9322c5c31025921c43 SHA512 39080e2f2c4522b699cdbc4f118423e1a10d2f5ac2b18fd5e90af85cefdcb76d1ca04c31a8e1174e1b79773ebd76f0c10c08b61e328cf620f706af130b40e4b8
DIST firefox-80.0.1-pl.xpi 588634 BLAKE2B d360327bf88a7ec2578759a7f42d015d4dad50324ca08c77bfadbe21c3524cc0e16842e3ad491a8774093f8bda8ebaece0704331871ee6dffb8dd827be32be66 SHA512 26264d3e7a26b4fd24d7e1fa36efe1989308a814a062033f9f45d6c4ed7ff2e32272eadf1382a14c04cdf83da961b6f6bfd0f5fb472bf86d2a8d2124fbfdb12d
DIST firefox-80.0.1-pt-BR.xpi 569418 BLAKE2B e72d3bdf4bd3a9eb2c36f0adb0d623373d466cb2b2a8366fc8b85ffc8c5647a83e41d3585c108721d860b8b7c26fc127470025da634076b115ee88da4b9aa2ba SHA512 35610b0e440cf5b0ba2757eefeb4f02a1e50488e4be983c80bf09f7bf97e26b7a21143aac672277e33b784908b9f261b54fa3239f989d4130f5aa62a17da2ece
DIST firefox-80.0.1-pt-PT.xpi 579182 BLAKE2B 798376fbe011db8102010f868127c914d0d1cc8b43dd7a860321dffac88e42140cfbf82aed048ab0b4d42d7ac7375196719930f1df72f94ef3e91dc5b857b81c SHA512 8f7681c7518299f0373db051be6ad5928148dd6b2c0032312683b114e524ef2ff8dc5501c17dbb02b7aeb5185c19d550eb8475a361006ceeb54299563fbbe87b
DIST firefox-80.0.1-rm.xpi 566373 BLAKE2B 89d577b27425f5d11958d40b3d91005af652232d682d97fd471152e2189b6f6bebf82ebdb78f01bf22eb073dbd3c4c11f691cb0f39126b84e0df67ad4fc1d07d SHA512 0bce2deb89c88f7a65fc8690b9db5086d5d985075db69c3994f949158ac0cde7de7bba2814317ba42d60bf48d9e3f7723d7864dbabd9d9029f6f026efcd2af20
DIST firefox-80.0.1-ro.xpi 586939 BLAKE2B e4cfb3cfd2e0c058709aa5da299725802c8297ead947715f2bd3f5e9f44ad3ed6f985721365d63f9a3876b4dae7b397c17f3ec5ec200a8f3ef1abd3038682236 SHA512 a5561578101ac24e94458b3b55e0386716b4d33da5427bc58385832bd49e033f7d4ff2c6887952e4e3004f21e4efcde6e672439c36ef7503c3099ab4730ec39f
DIST firefox-80.0.1-ru.xpi 666218 BLAKE2B 8cfb67d44e0e9faf5d4c4ecb2a651ea89a5d75d8372360ea89663783bc0c759277b405867d53d7f5397ef31564e4bca502d2111ab5bae7b3ccd2b652cff15009 SHA512 3d425e8b742463548c97d9c268975fc58320708e17572d99adf1ed4a6f787bcdc6ad9b3722edbd2664eeae6a998dfced00b385d664749c0ce261871da987023e
DIST firefox-80.0.1-si.xpi 534116 BLAKE2B 26f5fcc5514eddcea5666beaa8761720e833d0eddee23dba117d45eac921aa1a97ce31f9a3d70c27c30403639a88ad379d4bc63f2c21b049dd471a6980d8dab8 SHA512 4ad417d78c783a95c87bbf3deb05586a4accb204785c049c75a89f3b49bcfa1464319223e0a25cdf10c99028e5530937d199abbb5dfd87933eba1b086e60d67c
DIST firefox-80.0.1-sk.xpi 587987 BLAKE2B a63ab967999d3acadc8f6cf6f84e4bebcecba5e94b3a89e0d0c169f36b36febd01d6ee17dd08700467dde01db780eafa3de9bd4fc3a1d8d05ea344bf6555e078 SHA512 6d2288823d4f2a254afea66b1ea8712d10f55d8b31793eb8bd29211a2ac68f31265f1e9de6ab0e20e2d60bc70584de7044a63b925bf77b9a91bf084a8e9a79e2
DIST firefox-80.0.1-sl.xpi 569766 BLAKE2B e75cf413532d4745c52bc93dff95a7f5fcdbc695ea1752013f42cbca936a50f1f059c97ea42839e2df27414d9815863bb82500a7266659f52552ad7eb2588e72 SHA512 55e6bc7d0e3fef21b4a0f04080a87a441f6c5e064cc98cad0f43620b58a44ccd7279f7d2dd658cde1bcba760cf0883f69677161f098b2de4d190f783e1ea54ec
DIST firefox-80.0.1-son.xpi 454608 BLAKE2B 97a9c1ab015fc47e42a6c3d0b5287fcbf0248282be45ce9818e74bb39ddda493afd2f876a18ecde61e6c804d7697baa861886081f37966a7d87d2d0c79b3df83 SHA512 c9ab1150312d4ab20f269a92d09d9fd9942382ba6aadc0d4d039c5c877b44151269314c52c5e026a0ee1005e8fcc0f2cc2972c42e8fc6863a25520e1b7f2681f
DIST firefox-80.0.1-sq.xpi 580208 BLAKE2B 78b9c0dea75df234c4f0b6aad3c689c3e151571fc002d76946c31fd0c34392eab04ece2f4bf3aa270ff6d575c96de9178de56b40c4d5b0ce2191e8313da26717 SHA512 a9a1bfbfe224f5beec6157225b942067ebf1037349a644bfe2c2bf1b08e3c48346f620d68d70079ba309e2a6649b98dbbe3339f87d1c4a32af3ed7ac945be90e
DIST firefox-80.0.1-sr.xpi 614268 BLAKE2B c71628dffd7c1e9c261979457dba2e33f8d3ef1b5793d9856f1eedec58322ee889418982623a197a747037e63ce1a77563b6503b045a81c7ad5a4b6ac6240349 SHA512 f87036a3c1dab96891618a940991c36302265ca7dcd2a4db387701b607ec91aca38e3f5ebd086c36b16b0326c0fdb9c03bb5b3cccf4f4d1281d9ecaca306b493
DIST firefox-80.0.1-sv-SE.xpi 573128 BLAKE2B e29abcfd0d6726316d0eb19b3b1e97e9421f34157eb6428eb56c54fa4f7ec5edfb0af513fa2a3082cfb6aa96e0c6a84504f3f3536d8bf982e0cc011f0698edf1 SHA512 710d65786c8ed82fec8ea627e789deb6a065859c19eccbaecf9ce5012f58740b2781fbe7f2b5724dcd7be38db8f01721c7ea7d354a4409acf9b84d511bb6dc3d
DIST firefox-80.0.1-ta.xpi 573981 BLAKE2B 379297acd4f411840c69b726e88ced981e781bb7c58460d59024b0b2b3a859c7a3226106b6e6b4411543360202a44cf1264a2957ccc5d28aecc37ed824fce5e2 SHA512 2b819f416ca0958a841977853f7179c6ed0f8377f4c6b8912cafe21179f3485ba84db48f49912d3730c31ae83ddcde84ef0e2695250f8067aeb5641677f7a2ef
DIST firefox-80.0.1-te.xpi 612546 BLAKE2B c231b2923e2e160b37bd1b58adb63403f627729ebb8c632fc1e9a74a6022c781b576354e0e0228f386c784a70b9920f66a31b0893781c5d8d46b23fcb24a8a73 SHA512 d1302b4069a9cce98b1079f7167db9e6b80f094a33dde214bfb23ad3a19dd17f8d044e0dd0926f3570ec1d0bf19856457fb9cfe69e65cfcb162c66153ee619e8
DIST firefox-80.0.1-th.xpi 639043 BLAKE2B 562417f922589f396a756a94606036ca460c4dd0ff2e27cd40163639f1f5c35debd2302e1c4f23d8df86d5a9b0a0e7bd0a6e79303d6b1d8e423639352b12ab46 SHA512 e051e224e9f7cb29f1a85aed2b0c4b73238c1ef01e3d7777ae47a71fbbe4f32402999a5fd918d3a486348621e48a28d21ea92b2af14f251107995e3f860a3f69
DIST firefox-80.0.1-tr.xpi 584648 BLAKE2B a3f7c00083deb58d03179c6765083b70e70b0de472cfd600156d9c0e6a588e94a0c7d62b75dd6ada47b4f1bd2b25bff6b4b6073f167c25736033cbe5fb23b0cb SHA512 094c89edfad656766cfb03cd057dfa14bb93ecc61ae69ab7f7bdc654247f0daa08c35f1011667f7c3db27676ba92d973c1bf5b5ea4668995786f159cd428a13b
DIST firefox-80.0.1-uk.xpi 659416 BLAKE2B 8f72b0c16dea0d6448a193c3064cb9aef5d6572055750de4f642e857702934bf21555f318f67d64665111012ce5ffacabb7e1a052d11e5059ac260fe120806ce SHA512 6e08758c438a8200b23a32c61929f9624cb208ff2501de66af5b4abc8e5c4c49507ebf0213d267803db5284724677b43d4eb662759fdf9970b3637def24c296d
DIST firefox-80.0.1-ur.xpi 615360 BLAKE2B 0cc5e0080d42743f830bafc5606375ec624e722203586c7c6be3cbcbf50fdcdffcc9e7c14a9c78e24adaf3988b9969f987178bf839670ded7e495008435f0c82 SHA512 229ab1aa8f403250ced2d247d21f3e17b484420352a830a8bb7633228e4bac4712b5d2b8ee93c82da0974046afab104eb68cbea3d0dc03a8abef756e2c4138ab
DIST firefox-80.0.1-uz.xpi 522574 BLAKE2B a7f23d146defbcd0b2450d3bc9f7ecbec013caa1c5f742e969ead1834a9056cefdf274837b11606a8fa590cd50437c41f32bef412dc9d14e991375b1a161cac0 SHA512 e163e411c3e3bd767144ece491ce31a422d6b30d1d457298a884fff695d011fa8450e9886c681c7a8541a704373c4cdeb73493d8e941a1e630ebb9918a43876e
DIST firefox-80.0.1-vi.xpi 609394 BLAKE2B 080fcf58e2a1478ed2fda6aa2e19f39880534aae830a9ddc1ed892970e984d55dae5154004871b8c68d4ed46c5f709ccabcdbad8158f86a95f247398bb68cfc4 SHA512 5febff5088076d865fdeb389980472a054045d9a2b18bbd19dbff7c9bf6544934f4de87f1b7d09e8f43c8f3006df9f86823dde82e68d595474bb96ee430bf6bc
DIST firefox-80.0.1-xh.xpi 458212 BLAKE2B 9f82a968b99bfaac375486e1f15a860433dcdda451ee8d46e80e7aeedfced39f0984f26142b46f318c6890ed917a1d92e6d44e5a084932160274167b718497d6 SHA512 454d7eb2bcdc5fda55c6376d77147e0f9e00f3b0b96c3b09521393e1a2516f97339533c35d08f456bc344a76ba72da42d99a0bae24c24f103eb9675967a23790
DIST firefox-80.0.1-zh-CN.xpi 611635 BLAKE2B 3263f493ddc0ad7f5ae018f5dba479e9daa64ff9c119bb9e8aff13076ac55fc654519d78837c68beb89219848e134211d95c12be302b079e913ab58ff36a5ee2 SHA512 ab90e7c21368a78c3eda23325b138fd2da02be577856f4ebee59d1988a2b2799876bdbd8c54040c6c45ff45804a4659a52b276df6da1424dc2a48b295b3699db
DIST firefox-80.0.1-zh-TW.xpi 611178 BLAKE2B e84b0defc7990b6c775a9ee9a5ba7dd54a60a41ca1e618d87b72c1033eb08a814de335a1d59b9aa84fff70d164f8755f2143b188128da5c84fd2eb4ea08b4b77 SHA512 253f80d60eb05d05d366642e2ebb78430b3b9acb36baa553b3cffa5a1d4773e1a422e770557a3ae791d7704ed22f5ded6713313886b696548bf49c91bfb7dfbf
DIST firefox-80.0.1.source.tar.xz 334690792 BLAKE2B 47c8cdb2c8c0088b5dc8abbdfba8be685dfdd4d079b155aebb1431a5f8b448b94d90e188d08426053be961f228d3b4e7852626f502397099e99e4a897e7dadfa SHA512 97a54e5f0ff0e34d0994b9ea67250fda1e9a51acb1129a5f6ce632ca5d15132ae4e5eb18c1a9a609a14f5012daf87c6e1a5049e096dd1c32cac9e2c981381d10
EBUILD firefox-80.0.1.ebuild 28853 BLAKE2B 5b48db6f1c2434ce1dd57dc57b79ed18266b74478dcef62fc34ab062ec5e264c07b0fe196549f743691e1a4c05186322f52627331e76ecd232320429a65904a5 SHA512 c8323a71a8cd774f8831c04e65dc648ba15fb90e9cfef69e71a2c05cb90a4b9391d3fdf066003e096084efa9ec84eeb640fb0c47a2dfcbb85741e07cb56d936a

View File

@ -0,0 +1,933 @@
# Copyright 1999-2020 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_{7,8,9} )
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 ast az be bg bn br bs ca cak cs cy da de dsb
el en en-CA en-GB en-US 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 ia id is it ja ka
kab kk km kn ko lij lt lv mk mr ms my nb-NO nl nn-NO oc pa-IN pl pt-BR
pt-PT rm ro ru si sk sl son sq sr sv-SE ta te th tr uk ur 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}-80.0-patches-02"
MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases"
MOZ_SRC_URI="${MOZ_HTTP_URI}/${MOZ_PV}/source/${PN}-${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=10
inherit check-reqs eapi7-ver flag-o-matic toolchain-funcs eutils \
gnome2-utils llvm mozcoreconf-v6 pax-utils xdg-utils \
autotools mozlinguas-v2 multiprocessing virtualx
DESCRIPTION="Firefox Web Browser"
HOMEPAGE="https://www.mozilla.com/firefox"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~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 cpu_flags_arm_neon
+openh264 pgo pulseaudio screencast +screenshot selinux +system-av1
+system-harfbuzz +system-icu +system-jpeg +system-libevent
+system-libvpx +system-webp test wayland wifi"
REQUIRED_USE="pgo? ( lto )
screencast? ( wayland )"
RESTRICT="!bindist? ( bindist )
!test? ( test )"
PATCH_URIS=( https://dev.gentoo.org/~{whissi,polynomial-c,axs}/mozilla/patchsets/${PATCH}.tar.xz )
SRC_URI="${SRC_URI}
${MOZ_SRC_URI}
${PATCH_URIS[@]}"
CDEPEND="
>=dev-libs/nss-3.55
>=dev-libs/nspr-4.26
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
>=x11-libs/pixman-0.19.2
>=dev-libs/glib-2.26:2
>=sys-libs/zlib-1.2.3
>=dev-libs/libffi-3.0.10:=
media-video/ffmpeg
x11-libs/libX11
x11-libs/libXcomposite
x11-libs/libXdamage
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXrender
x11-libs/libXt
dbus? (
sys-apps/dbus
dev-libs/dbus-glib
)
screencast? ( media-video/pipewire:0/0.3 )
system-av1? (
>=media-libs/dav1d-0.3.0:=
>=media-libs/libaom-1.0.0:=
)
system-harfbuzz? (
>=media-libs/harfbuzz-2.6.8:0=
>=media-gfx/graphite2-1.3.13
)
system-icu? ( >=dev-libs/icu-67.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.8.2:0=[postproc] )
system-webp? ( >=media-libs/libwebp-1.1.0:0= )
wifi? (
kernel_linux? (
sys-apps/dbus
dev-libs/dbus-glib
net-misc/networkmanager
)
)
jack? ( virtual/jack )
selinux? ( sec-policy/selinux-mozilla )"
RDEPEND="${CDEPEND}
jack? ( virtual/jack )
openh264? ( media-libs/openh264:*[plugin] )
pulseaudio? (
|| (
media-sound/pulseaudio
>=media-sound/apulse-0.1.12-r4
)
)
selinux? ( sec-policy/selinux-mozilla )"
DEPEND="${CDEPEND}
app-arch/zip
app-arch/unzip
>=dev-util/cbindgen-0.14.3
>=net-libs/nodejs-10.19.0
>=sys-devel/binutils-2.30
sys-apps/findutils
virtual/pkgconfig
>=virtual/rust-1.43.0
|| (
(
sys-devel/clang:10
!clang? ( sys-devel/llvm:10 )
clang? (
=sys-devel/lld-10*
sys-devel/llvm:10[gold]
pgo? ( =sys-libs/compiler-rt-sanitizers-10*[profile] )
)
)
(
sys-devel/clang:9
!clang? ( sys-devel/llvm:9 )
clang? (
=sys-devel/lld-9*
sys-devel/llvm:9[gold]
pgo? ( =sys-libs/compiler-rt-sanitizers-9*[profile] )
)
)
(
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] )
)
)
)
pulseaudio? (
|| (
media-sound/pulseaudio
>=media-sound/apulse-0.1.12-r4[sdk]
)
)
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? (
amd64? ( >=dev-lang/nasm-2.13 )
x86? ( >=dev-lang/nasm-2.13 )
)"
S="${WORKDIR}/firefox-${PV%_*}"
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} ..." >&2
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} ..." >&2
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} ..." >&2
return 1
fi
fi
fi
einfo "Will use LLVM slot ${LLVM_SLOT}!" >&2
}
pkg_pretend() {
if [[ ${MERGE_TYPE} != binary ]] ; then
if use pgo ; then
if ! has usersandbox $FEATURES ; then
die "You must enable usersandbox as X server can not run as root!"
fi
fi
# Ensure we have enough disk space to compile
if use pgo || use lto || use debug || use test ; then
CHECKREQS_DISK_BUILD="11G"
else
CHECKREQS_DISK_BUILD="5G"
fi
check-reqs_pkg_pretend
fi
}
pkg_setup() {
moz_pkgsetup
if [[ ${MERGE_TYPE} != binary ]] ; then
# Ensure we have enough disk space to compile
if use pgo || use lto || use debug || use test ; then
CHECKREQS_DISK_BUILD="11G"
else
CHECKREQS_DISK_BUILD="5G"
fi
check-reqs_pkg_setup
# 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_CACHE_HOME \
XDG_SESSION_COOKIE \
XAUTHORITY
addpredict /proc/self/oom_score_adj
llvm_pkg_setup
fi
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
}
src_unpack() {
default
# Unpack language packs
mozlinguas_src_unpack
}
src_prepare() {
use pgo && rm "${WORKDIR}"/firefox/0032-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
eapply "${WORKDIR}/firefox"
# Make LTO respect MAKEOPTS
sed -i \
-e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
"${S}"/build/moz.configure/lto-pgo.configure \
|| die "sed failed to set num_cores"
# Make ICU respect MAKEOPTS
sed -i \
-e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
"${S}"/intl/icu_sources_data.py \
|| die "sed failed to set num_cores"
# sed-in toolchain prefix
sed -i \
-e "s/objdump/${CHOST}-objdump/" \
"${S}"/python/mozbuild/mozbuild/configure/check_debug_ranges.py \
|| die "sed failed to set toolchain prefix"
# Allow user to apply any additional patches without modifing ebuild
eapply_user
einfo "Removing pre-built binaries ..."
find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die
# 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
# 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
# Clear checksums that present a problem
sed -i 's/\("files":{\)[^}]*/\1/' "${S}"/third_party/rust/target-lexicon-0.9.0/.cargo-checksum.json || die
}
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
# Must pass release in order to properly select linker
mozconfig_annotate 'Enable by Gentoo' --enable-release
# libclang.so is not properly detected work around issue
mozconfig_annotate '' --with-libclang-path="$(llvm-config --libdir)"
if use pgo ; then
if ! has userpriv $FEATURES ; then
eerror "Building firefox with USE=pgo and FEATURES=-userpriv is not supported!"
fi
fi
# 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
use hardened && append-ldflags "-Wl,-z,now"
# Modifications to better support ARM, bug 553364
if use cpu_flags_arm_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
mozconfig_annotate '' --with-system-nss
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 '' --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}}"
mozconfig_annotate '' --with-toolchain-prefix="${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_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
mozconfig_use_enable screencast pipewire
# 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}"
# 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
# toolkit/moz.configure Elfhack section: target.cpu in ('arm', 'x86', 'x86_64')
local disable_elf_hack=
if use amd64 ; then
disable_elf_hack=yes
elif use x86 ; then
disable_elf_hack=yes
elif use arm ; then
disable_elf_hack=yes
fi
if [[ -n ${disable_elf_hack} ]] ; then
mozconfig_annotate 'elf-hack is broken when using Clang' --disable-elf-hack
fi
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
fi
GDK_BACKEND=x11 \
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-3 \
"${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
if ! use gmp-autoupdate ; then
local plugin
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
fi
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
MOZEXTENSION_TARGET="distribution/extensions" 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"
local display_protocols="auto X11" use_wayland="false"
if use wayland ; then
display_protocols+=" Wayland"
use_wayland="true"
fi
local app_name desktop_filename display_protocol exec_command
for display_protocol in ${display_protocols} ; do
app_name="${name} on ${display_protocol}"
desktop_filename="${PN}-${display_protocol,,}.desktop"
case ${display_protocol} in
Wayland)
exec_command='firefox-wayland --name firefox-wayland'
newbin "${FILESDIR}"/firefox-wayland.sh firefox-wayland
;;
X11)
if ! use wayland ; then
# Exit loop here because there's no choice so
# we don't need wrapper/.desktop file for X11.
continue
fi
exec_command='firefox-x11 --name firefox-x11'
newbin "${FILESDIR}"/firefox-x11.sh firefox-x11
;;
*)
app_name="${name}"
desktop_filename="${PN}.desktop"
exec_command='firefox'
;;
esac
newmenu "${FILESDIR}/icon/${PN}-r2.desktop" "${desktop_filename}"
sed -i \
-e "s:@NAME@:${app_name}:" \
-e "s:@EXEC@:${exec_command}:" \
-e "s:@ICON@:${icon}:" \
"${ED%/}/usr/share/applications/${desktop_filename}" || die
done
rm "${ED%/}"/usr/bin/firefox || die
newbin "${FILESDIR}"/firefox.sh firefox
local wrapper
for wrapper in \
"${ED%/}"/usr/bin/firefox \
"${ED%/}"/usr/bin/firefox-x11 \
"${ED%/}"/usr/bin/firefox-wayland \
; do
[[ ! -f "${wrapper}" ]] && continue
sed -i \
-e "s:@PREFIX@:${EPREFIX%/}/usr:" \
-e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \
"${wrapper}" || die
done
# 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() {
# 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.12-r4" ; 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() {
xdg_desktop_database_update
xdg_icon_cache_update
if ! use gmp-autoupdate ; 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.12-r4" ; 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
local show_doh_information show_normandy_information
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
# New install; Tell user that DoH is disabled by default
show_doh_information=yes
show_normandy_information=yes
else
local replacing_version
for replacing_version in ${REPLACING_VERSIONS} ; do
if ver_test "${replacing_version}" -lt 70 ; then
# Tell user only once about our DoH default
show_doh_information=yes
fi
if ver_test "${replacing_version}" -lt 74.0-r2 ; then
# Tell user only once about our Normandy default
show_normandy_information=yes
fi
done
fi
if [[ -n "${show_doh_information}" ]] ; then
elog
elog "Note regarding Trusted Recursive Resolver aka DNS-over-HTTPS (DoH):"
elog "Due to privacy concerns (encrypting DNS might be a good thing, sending all"
elog "DNS traffic to Cloudflare by default is not a good idea and applications"
elog "should respect OS configured settings), \"network.trr.mode\" was set to 5"
elog "(\"Off by choice\") by default."
elog "You can enable DNS-over-HTTPS in ${PN^}'s preferences."
fi
# bug 713782
if [[ -n "${show_normandy_information}" ]] ; then
elog
elog "Upstream operates a service named Normandy which allows Mozilla to"
elog "push changes for default settings or even install new add-ons remotely."
elog "While this can be useful to address problems like 'Armagadd-on 2.0' or"
elog "revert previous decisions to disable TLS 1.0/1.1, privacy and security"
elog "concerns prevail, which is why we have switched off the use of this"
elog "service by default."
elog
elog "To re-enable this service set"
elog
elog " app.normandy.enabled=true"
elog
elog "in about:config."
fi
}
pkg_postrm() {
xdg_desktop_database_update
xdg_icon_cache_update
}