Accepting request 838449 from mozilla:Factory
- Mozilla Thunderbird 78.3.1 * fix crash in nsImapProtocol::CreateNewLineFromSocket (bmo#1667120) - Mozilla Thunderbird 78.3.0 MFSA 2020-44 (bsc#1176756) * CVE-2020-15677 (bmo#1641487) Download origin spoofing via redirect * CVE-2020-15676 (bmo#1646140) XSS when pasting attacker-controlled data into a contenteditable element * CVE-2020-15678 (bmo#1660211) When recursing through layers while scrolling, an iterator may have become invalid, resulting in a potential use-after- free scenario * CVE-2020-15673 (bmo#1648493, bmo#1660800) Memory safety bugs fixed in Thunderbird 78.3 - requires NSPR >= 4.25.1 - removed obsolete thunderbird-bmo1664607.patch - Mozilla Thunderbird 78.2.2 https://www.thunderbird.net/en-US/thunderbird/78.2.2/releasenotes - added thunderbird-bmo1664607.patch required for builds w/o updater (boo#1176384) - Mozilla Thunderbird 78.2.1 * based on Mozilla's 78 ESR codebase * many new and changed features https://www.thunderbird.net/en-US/thunderbird/78.0/releasenotes/#whatsnew * built-in OpenPGP support (enigmail neither required nor supported) - added platform patches: OBS-URL: https://build.opensuse.org/request/show/838449 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/MozillaThunderbird?expand=0&rev=238
This commit is contained in:
commit
aa32e73753
@ -1,3 +1,57 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 25 06:25:54 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
|
||||||
|
|
||||||
|
- Mozilla Thunderbird 78.3.1
|
||||||
|
* fix crash in nsImapProtocol::CreateNewLineFromSocket (bmo#1667120)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 23 21:04:45 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
|
||||||
|
|
||||||
|
- Mozilla Thunderbird 78.3.0
|
||||||
|
MFSA 2020-44 (bsc#1176756)
|
||||||
|
* CVE-2020-15677 (bmo#1641487)
|
||||||
|
Download origin spoofing via redirect
|
||||||
|
* CVE-2020-15676 (bmo#1646140)
|
||||||
|
XSS when pasting attacker-controlled data into a
|
||||||
|
contenteditable element
|
||||||
|
* CVE-2020-15678 (bmo#1660211)
|
||||||
|
When recursing through layers while scrolling, an iterator
|
||||||
|
may have become invalid, resulting in a potential use-after-
|
||||||
|
free scenario
|
||||||
|
* CVE-2020-15673 (bmo#1648493, bmo#1660800)
|
||||||
|
Memory safety bugs fixed in Thunderbird 78.3
|
||||||
|
- requires NSPR >= 4.25.1
|
||||||
|
- removed obsolete thunderbird-bmo1664607.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 13 20:10:39 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
|
||||||
|
|
||||||
|
- Mozilla Thunderbird 78.2.2
|
||||||
|
https://www.thunderbird.net/en-US/thunderbird/78.2.2/releasenotes
|
||||||
|
- added thunderbird-bmo1664607.patch required for builds w/o updater
|
||||||
|
(boo#1176384)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 31 12:08:25 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
|
||||||
|
|
||||||
|
- Mozilla Thunderbird 78.2.1
|
||||||
|
* based on Mozilla's 78 ESR codebase
|
||||||
|
* many new and changed features
|
||||||
|
https://www.thunderbird.net/en-US/thunderbird/78.0/releasenotes/#whatsnew
|
||||||
|
* built-in OpenPGP support (enigmail neither required nor supported)
|
||||||
|
- added platform patches:
|
||||||
|
* mozilla-s390x-skia-gradient.patch
|
||||||
|
* mozilla-pipewire-0-3.patch
|
||||||
|
* mozilla-bmo1512162.patch
|
||||||
|
* mozilla-bmo1626236.patch
|
||||||
|
* mozilla-bmo998749.patch
|
||||||
|
* mozilla-sandbox-fips.patch
|
||||||
|
- removed obsolete platform patches
|
||||||
|
* mozilla-s390-bigendian.patch
|
||||||
|
* mozilla-nestegg-big-endian.patch
|
||||||
|
* mozilla-openaes-decl.patch
|
||||||
|
* mozilla-cubeb-noreturn.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Aug 30 11:05:01 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
|
Sun Aug 30 11:05:01 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
|
||||||
|
|
||||||
|
@ -25,14 +25,19 @@
|
|||||||
# orig_suffix b3
|
# orig_suffix b3
|
||||||
# major 69
|
# major 69
|
||||||
# mainver %major.99
|
# mainver %major.99
|
||||||
%define major 68
|
%define major 78
|
||||||
%define mainver %major.12.0
|
%define mainver %major.3.1
|
||||||
%define orig_version 68.12.0
|
%define orig_version 78.3.1
|
||||||
%define orig_suffix %{nil}
|
%define orig_suffix %{nil}
|
||||||
%define update_channel release
|
%define update_channel release
|
||||||
%define source_prefix thunderbird-%{mainver}
|
%define source_prefix thunderbird-%{orig_version}
|
||||||
|
|
||||||
# always build with GCC as SUSE Security Team requires that
|
%if 0%{?suse_version} > 1500
|
||||||
|
# PGO builds do not work in TW currently (bmo#1642410)
|
||||||
|
%define do_profiling 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# upstream default is clang (to use gcc for large parts set to 0)
|
||||||
%define clang_build 0
|
%define clang_build 0
|
||||||
|
|
||||||
# PIE, full relro
|
# PIE, full relro
|
||||||
@ -47,6 +52,7 @@
|
|||||||
# general build definitions
|
# general build definitions
|
||||||
%define progname thunderbird
|
%define progname thunderbird
|
||||||
%define pkgname MozillaThunderbird
|
%define pkgname MozillaThunderbird
|
||||||
|
%define srcname thunderbird
|
||||||
%define appname Thunderbird
|
%define appname Thunderbird
|
||||||
%define progdir %{_prefix}/%_lib/%{progname}
|
%define progdir %{_prefix}/%_lib/%{progname}
|
||||||
%define gnome_dir %{_prefix}
|
%define gnome_dir %{_prefix}
|
||||||
@ -55,8 +61,13 @@
|
|||||||
%define __requires_exclude ^(libmoz.*|liblgpllibs.*|libxul.*|libldap.*|libldif.*|libprldap.*)$
|
%define __requires_exclude ^(libmoz.*|liblgpllibs.*|libxul.*|libldap.*|libldif.*|libprldap.*)$
|
||||||
%define localize 1
|
%define localize 1
|
||||||
%define crashreporter 0
|
%define crashreporter 0
|
||||||
|
%if 0%{?sle_version} > 150100
|
||||||
%define has_system_cairo 0
|
# pipewire is too old on Leap <=15.1
|
||||||
|
# Activate only on everything newer
|
||||||
|
%define with_pipewire0_3 1
|
||||||
|
%else
|
||||||
|
%define with_pipewire0_3 0
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: %{pkgname}
|
Name: %{pkgname}
|
||||||
BuildRequires: Mesa-devel
|
BuildRequires: Mesa-devel
|
||||||
@ -64,55 +75,63 @@ BuildRequires: alsa-devel
|
|||||||
BuildRequires: autoconf213
|
BuildRequires: autoconf213
|
||||||
BuildRequires: dbus-1-glib-devel
|
BuildRequires: dbus-1-glib-devel
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: memory-constraints
|
||||||
%if 0%{?suse_version} <= 1320
|
%if 0%{?suse_version} <= 1320
|
||||||
BuildRequires: gcc7-c++
|
BuildRequires: gcc9-c++
|
||||||
%else
|
%else
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cargo >= 1.34
|
BuildRequires: cargo >= 1.41
|
||||||
#BuildRequires: hunspell-devel
|
BuildRequires: ccache
|
||||||
BuildRequires: libXcomposite-devel
|
BuildRequires: libXcomposite-devel
|
||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
BuildRequires: libidl-devel
|
BuildRequires: libidl-devel
|
||||||
BuildRequires: libnotify-devel
|
BuildRequires: mozilla-nspr-devel >= 4.25.1
|
||||||
BuildRequires: memory-constraints
|
BuildRequires: mozilla-nss-devel >= 3.53.1
|
||||||
BuildRequires: mozilla-nspr-devel >= 4.21
|
BuildRequires: nasm >= 2.14
|
||||||
BuildRequires: mozilla-nss-devel >= 3.44.4
|
BuildRequires: nodejs10 >= 10.21.0
|
||||||
BuildRequires: nasm >= 2.13
|
|
||||||
BuildRequires: nodejs10 >= 10.19.0
|
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
|
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
|
||||||
|
BuildRequires: python-libxml2
|
||||||
|
BuildRequires: python36
|
||||||
|
%else
|
||||||
BuildRequires: python2-xml
|
BuildRequires: python2-xml
|
||||||
BuildRequires: python3 >= 3.5
|
BuildRequires: python3 >= 3.5
|
||||||
BuildRequires: rust >= 1.34
|
%endif
|
||||||
BuildRequires: rust-cbindgen >= 0.8.7
|
BuildRequires: rust >= 1.41
|
||||||
BuildRequires: startup-notification-devel
|
BuildRequires: rust-cbindgen >= 0.14.1
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
BuildRequires: xorg-x11-libXt-devel
|
BuildRequires: xorg-x11-libXt-devel
|
||||||
|
%if 0%{?do_profiling}
|
||||||
|
BuildRequires: xvfb-run
|
||||||
|
%endif
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
BuildRequires: yasm
|
BuildRequires: yasm
|
||||||
BuildRequires: zip
|
BuildRequires: zip
|
||||||
%if 0%{?suse_version} < 1550
|
%if 0%{?suse_version} < 1550
|
||||||
BuildRequires: pkgconfig(gconf-2.0) >= 1.2.1
|
BuildRequires: pkgconfig(gconf-2.0) >= 1.2.1
|
||||||
%endif
|
%endif
|
||||||
|
%if (0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000)
|
||||||
|
BuildRequires: clang6-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: clang-devel >= 5
|
||||||
|
%endif
|
||||||
BuildRequires: pkgconfig(gdk-x11-2.0)
|
BuildRequires: pkgconfig(gdk-x11-2.0)
|
||||||
BuildRequires: pkgconfig(glib-2.0) >= 2.22
|
BuildRequires: pkgconfig(glib-2.0) >= 2.22
|
||||||
BuildRequires: pkgconfig(gobject-2.0)
|
BuildRequires: pkgconfig(gobject-2.0)
|
||||||
BuildRequires: pkgconfig(gtk+-2.0) >= 2.18.0
|
BuildRequires: pkgconfig(gtk+-2.0) >= 2.18.0
|
||||||
BuildRequires: pkgconfig(gtk+-3.0) >= 3.4.0
|
BuildRequires: pkgconfig(gtk+-3.0) >= 3.14.0
|
||||||
BuildRequires: pkgconfig(gtk+-unix-print-2.0)
|
BuildRequires: pkgconfig(gtk+-unix-print-2.0)
|
||||||
BuildRequires: pkgconfig(gtk+-unix-print-3.0)
|
BuildRequires: pkgconfig(gtk+-unix-print-3.0)
|
||||||
BuildRequires: pkgconfig(libffi)
|
BuildRequires: pkgconfig(libffi)
|
||||||
BuildRequires: pkgconfig(libpulse)
|
BuildRequires: pkgconfig(libpulse)
|
||||||
|
%if %{with_pipewire0_3}
|
||||||
|
BuildRequires: pkgconfig(libpipewire-0.3)
|
||||||
|
%endif
|
||||||
%if %{with mozilla_tb_valgrind}
|
%if %{with mozilla_tb_valgrind}
|
||||||
BuildRequires: pkgconfig(valgrind)
|
BuildRequires: pkgconfig(valgrind)
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} > 1320
|
|
||||||
BuildRequires: llvm-clang-devel >= 3.9.0
|
|
||||||
%else
|
|
||||||
# this covers the workaround to compile on Leap 42 in OBS
|
|
||||||
BuildRequires: clang4-devel
|
|
||||||
%endif
|
|
||||||
# libavcodec is required for H.264 support but the
|
# libavcodec is required for H.264 support but the
|
||||||
# openSUSE version is currently not able to play H.264
|
# openSUSE version is currently not able to play H.264
|
||||||
# therefore the Packman version is required
|
# therefore the Packman version is required
|
||||||
@ -136,55 +155,57 @@ License: MPL-2.0
|
|||||||
Group: Productivity/Networking/Email/Clients
|
Group: Productivity/Networking/Email/Clients
|
||||||
URL: https://www.thunderbird.net/
|
URL: https://www.thunderbird.net/
|
||||||
%if !%{with only_print_mozconfig}
|
%if !%{with only_print_mozconfig}
|
||||||
Source: http://ftp.mozilla.org/pub/%{progname}/releases/%{orig_version}%{orig_suffix}/source/%{progname}-%{orig_version}%{orig_suffix}.source.tar.xz
|
Source: http://ftp.mozilla.org/pub/%{srcname}/releases/%{version}%{orig_suffix}/source/%{srcname}-%{orig_version}%{orig_suffix}.source.tar.xz
|
||||||
Source1: thunderbird.desktop
|
Source1: thunderbird.desktop
|
||||||
Source2: thunderbird-rpmlintrc
|
Source2: thunderbird-rpmlintrc
|
||||||
Source3: mozilla.sh.in
|
Source3: mozilla.sh.in
|
||||||
Source4: tar_stamps
|
Source4: tar_stamps
|
||||||
Source6: suse-default-prefs.js
|
Source6: suse-default-prefs.js
|
||||||
Source7: l10n-%{version}.tar.xz
|
Source7: l10n-%{orig_version}%{orig_suffix}.tar.xz
|
||||||
Source9: thunderbird.appdata.xml
|
Source9: thunderbird.appdata.xml
|
||||||
|
Source13: spellcheck.js
|
||||||
Source14: https://github.com/openSUSE/firefox-scripts/raw/5e54f4a/create-tar.sh
|
Source14: https://github.com/openSUSE/firefox-scripts/raw/5e54f4a/create-tar.sh
|
||||||
Source20: https://ftp.mozilla.org/pub/%{progname}/releases/%{orig_version}%{orig_suffix}/source/%{progname}-%{orig_version}%{orig_suffix}.source.tar.xz.asc
|
Source20: https://ftp.mozilla.org/pub/%{srcname}/releases/%{version}%{orig_suffix}/source/%{srcname}-%{orig_version}%{orig_suffix}.source.tar.xz.asc
|
||||||
Source21: https://ftp.mozilla.org/pub/%{progname}/releases/%{orig_version}/KEY#/mozilla.keyring
|
Source21: https://ftp.mozilla.org/pub/%{srcname}/releases/%{version}%{orig_suffix}/KEY#/mozilla.keyring
|
||||||
# Gecko/Toolkit
|
# Gecko/Toolkit
|
||||||
Patch1: mozilla-nongnome-proxies.patch
|
Patch1: mozilla-nongnome-proxies.patch
|
||||||
Patch2: mozilla-kde.patch
|
Patch2: mozilla-kde.patch
|
||||||
Patch3: mozilla-ntlm-full-path.patch
|
Patch3: mozilla-ntlm-full-path.patch
|
||||||
Patch4: mozilla-openaes-decl.patch
|
Patch4: mozilla-aarch64-startup-crash.patch
|
||||||
Patch5: mozilla-aarch64-startup-crash.patch
|
Patch5: mozilla-bmo1463035.patch
|
||||||
Patch6: mozilla-bmo1463035.patch
|
Patch6: mozilla-sandbox-fips.patch
|
||||||
Patch7: mozilla-cubeb-noreturn.patch
|
Patch7: mozilla-fix-aarch64-libopus.patch
|
||||||
Patch8: mozilla-fix-aarch64-libopus.patch
|
Patch8: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch
|
||||||
Patch9: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch
|
Patch9: mozilla-s390-context.patch
|
||||||
Patch10: mozilla-s390-context.patch
|
Patch11: mozilla-reduce-rust-debuginfo.patch
|
||||||
Patch11: mozilla-s390-bigendian.patch
|
Patch12: mozilla-ppc-altivec_static_inline.patch
|
||||||
Patch12: mozilla-reduce-rust-debuginfo.patch
|
Patch13: mozilla-bmo1005535.patch
|
||||||
Patch13: mozilla-ppc-altivec_static_inline.patch
|
Patch14: mozilla-bmo1568145.patch
|
||||||
Patch14: mozilla-bmo1005535.patch
|
Patch15: mozilla-bmo1504834-part1.patch
|
||||||
Patch15: mozilla-bmo1568145.patch
|
Patch16: mozilla-bmo1504834-part2.patch
|
||||||
Patch16: mozilla-bmo849632.patch
|
Patch17: mozilla-bmo1504834-part3.patch
|
||||||
Patch17: mozilla-bmo1504834-part1.patch
|
Patch18: mozilla-bmo1554971.patch
|
||||||
Patch18: mozilla-bmo1504834-part2.patch
|
Patch19: mozilla-bmo1512162.patch
|
||||||
Patch19: mozilla-bmo1504834-part3.patch
|
Patch20: mozilla-fix-top-level-asm.patch
|
||||||
Patch20: mozilla-bmo1602730.patch
|
Patch21: mozilla-bmo1504834-part4.patch
|
||||||
Patch21: mozilla-bmo1554971.patch
|
Patch22: mozilla-bmo849632.patch
|
||||||
Patch22: mozilla-nestegg-big-endian.patch
|
Patch23: mozilla-pipewire-0-3.patch
|
||||||
Patch24: mozilla-fix-top-level-asm.patch
|
Patch24: mozilla-bmo1602730.patch
|
||||||
Patch25: mozilla-bmo1504834-part4.patch
|
Patch25: mozilla-bmo998749.patch
|
||||||
|
Patch26: mozilla-bmo1626236.patch
|
||||||
|
Patch27: mozilla-s390x-skia-gradient.patch
|
||||||
%endif # only_print_mozconfig
|
%endif # only_print_mozconfig
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
PreReq: coreutils fileutils textutils /bin/sh
|
PreReq: coreutils fileutils textutils /bin/sh
|
||||||
Recommends: libcanberra0
|
|
||||||
Recommends: libpulse0
|
|
||||||
### build options
|
|
||||||
%define has_system_cairo 0
|
|
||||||
### build options end
|
### build options end
|
||||||
Requires: mozilla-nspr >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nspr)
|
Requires: mozilla-nspr >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nspr)
|
||||||
Requires: mozilla-nss >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nss)
|
Requires: mozilla-nss >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nss)
|
||||||
|
Recommends: libcanberra0
|
||||||
|
Recommends: libpulse0
|
||||||
Requires(post): desktop-file-utils
|
Requires(post): desktop-file-utils
|
||||||
Requires(postun): desktop-file-utils
|
Requires(postun): desktop-file-utils
|
||||||
%define libgssapi libgssapi_krb5.so.2
|
%define libgssapi libgssapi_krb5.so.2
|
||||||
|
ExcludeArch: armv6l armv6hl
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Thunderbird is a free, open-source, cross-platform application for
|
Thunderbird is a free, open-source, cross-platform application for
|
||||||
@ -207,7 +228,7 @@ of %{appname}.
|
|||||||
%package translations-other
|
%package translations-other
|
||||||
Summary: Extra translations for %{appname}
|
Summary: Extra translations for %{appname}
|
||||||
Group: System/Localization
|
Group: System/Localization
|
||||||
Provides: locale(%{name}:ast;be;bg;br;cak;cy;dsb;et;eu;fy_NL;ga_IE;gd;gl;he;hr;hsb;hy_AM;id;is;ka;kab;kk;lt;ms;nn_NO;rm;ro;si;sk;sl;sq;sr;tr;uk;uz;vi)
|
Provides: locale(%{name}:ach;af;an;ast;az;be;bg;bn;br;bs;cak;cy;dsb;en_CA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gn;gu_IN;he;hi_IN;hr;hsb;hy_AM;ia;id;is;ka;kab;kk;km;kn;lij;lt;lv;mk;mr;ms;my;ne_NP;nn_NO;oc;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;te;th;tr;uk;ur;uz;vi;xh)
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Obsoletes: %{name}-translations < %{version}-%{release}
|
Obsoletes: %{name}-translations < %{version}-%{release}
|
||||||
|
|
||||||
@ -237,9 +258,10 @@ if (( $(stat -Lc%s "%{SOURCE7}") < MINSIZE)); then
|
|||||||
echo "Translations tarball %{SOURCE7} not generated properly."
|
echo "Translations tarball %{SOURCE7} not generated properly."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
%setup -q -n %{source_prefix} -b 7
|
|
||||||
|
%setup -q -n %{srcname}-%{orig_version} -b 7
|
||||||
%else
|
%else
|
||||||
%setup -q -n %{source_prefix}
|
%setup -q -n %{srcname}-%{orig_version}
|
||||||
%endif
|
%endif
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%if %{with mozilla_tb_kde4}
|
%if %{with mozilla_tb_kde4}
|
||||||
@ -252,10 +274,7 @@ fi
|
|||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
%patch10 -p1
|
|
||||||
%ifarch s390x ppc64
|
|
||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
%endif
|
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
@ -267,18 +286,30 @@ fi
|
|||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
%patch21 -p1
|
%patch21 -p1
|
||||||
%patch22 -p1
|
%patch22 -p1
|
||||||
|
%if %{with_pipewire0_3}
|
||||||
|
%patch23 -p1
|
||||||
|
%endif
|
||||||
%patch24 -p1
|
%patch24 -p1
|
||||||
%patch25 -p1
|
%patch25 -p1
|
||||||
|
%patch26 -p1
|
||||||
|
%patch27 -p1
|
||||||
%endif # only_print_mozconfig
|
%endif # only_print_mozconfig
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if !%{with only_print_mozconfig}
|
%if !%{with only_print_mozconfig}
|
||||||
%define _lto_cflags %{nil}
|
|
||||||
# no need to add build time to binaries
|
# no need to add build time to binaries
|
||||||
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
|
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
|
||||||
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
|
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
|
||||||
TIME="\"$(date -d "${modified}" "+%%R")\""
|
TIME="\"$(date -d "${modified}" "+%%R")\""
|
||||||
find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
|
find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
|
||||||
|
|
||||||
|
# SLE-12 provides python36, but that package does not provide a python3 binary
|
||||||
|
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
|
||||||
|
sed -i "s/python3/python36/g" configure.in
|
||||||
|
sed -i "s/python3/python36/g" mach
|
||||||
|
export PYTHON3=/usr/bin/python36
|
||||||
|
%endif
|
||||||
|
|
||||||
#
|
#
|
||||||
%if %{with mozilla_tb_kde4}
|
%if %{with mozilla_tb_kde4}
|
||||||
kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
|
kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
|
||||||
@ -291,13 +322,17 @@ fi
|
|||||||
|
|
||||||
source %{SOURCE4}
|
source %{SOURCE4}
|
||||||
|
|
||||||
export SUSE_ASNEEDED=0
|
export CARGO_HOME=${RPM_BUILD_DIR}/%{srcname}-%{orig_version}/.cargo
|
||||||
|
export MOZ_SOURCE_CHANGESET=$RELEASE_TAG
|
||||||
|
export SOURCE_REPO=$RELEASE_REPO
|
||||||
|
export source_repo=$RELEASE_REPO
|
||||||
|
export MOZ_SOURCE_REPO=$RELEASE_REPO
|
||||||
export MOZ_BUILD_DATE=$RELEASE_TIMESTAMP
|
export MOZ_BUILD_DATE=$RELEASE_TIMESTAMP
|
||||||
export MOZILLA_OFFICIAL=1
|
export MOZILLA_OFFICIAL=1
|
||||||
export BUILD_OFFICIAL=1
|
export BUILD_OFFICIAL=1
|
||||||
export MOZ_TELEMETRY_REPORTING=1
|
export MOZ_TELEMETRY_REPORTING=1
|
||||||
%if 0%{?suse_version} <= 1320
|
%if 0%{?suse_version} <= 1320
|
||||||
export CC=gcc-7
|
export CC=gcc-9
|
||||||
%else
|
%else
|
||||||
%if 0%{?clang_build} == 0
|
%if 0%{?clang_build} == 0
|
||||||
export CC=gcc
|
export CC=gcc
|
||||||
@ -322,37 +357,42 @@ export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
|
|||||||
echo "export CC=$CC"
|
echo "export CC=$CC"
|
||||||
echo "export CXX=$CXX"
|
echo "export CXX=$CXX"
|
||||||
echo "export CFLAGS=\"$CFLAGS\""
|
echo "export CFLAGS=\"$CFLAGS\""
|
||||||
|
echo "export CXXFLAGS=\"$CXXFLAGS\""
|
||||||
echo "export LDFLAGS=\"$LDFLAGS\""
|
echo "export LDFLAGS=\"$LDFLAGS\""
|
||||||
echo "export RUSTFLAGS=\"$RUSTFLAGS\""
|
echo "export RUSTFLAGS=\"$RUSTFLAGS\""
|
||||||
|
echo "export CARGO_HOME=\"$CARGO_HOME\""
|
||||||
|
echo "export PATH=\"$PATH\""
|
||||||
|
echo "export LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\""
|
||||||
|
echo "export PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\""
|
||||||
|
echo "export MOZCONFIG=\"$MOZCONFIG\""
|
||||||
|
echo "export MOZILLA_OFFICIAL=1"
|
||||||
|
echo "export BUILD_OFFICIAL=1"
|
||||||
|
echo "export MOZ_TELEMETRY_REPORTING=1"
|
||||||
echo ""
|
echo ""
|
||||||
cat << EOF
|
cat << EOF
|
||||||
%else
|
%else
|
||||||
|
%ifarch ppc64 ppc64le
|
||||||
|
%limit_build -m 2500
|
||||||
|
%else
|
||||||
%limit_build -m 2000
|
%limit_build -m 2000
|
||||||
|
%endif
|
||||||
|
# TODO: Check if this can be removed
|
||||||
export MOZ_DEBUG_FLAGS="-pipe"
|
export MOZ_DEBUG_FLAGS="-pipe"
|
||||||
cat << EOF > $MOZCONFIG
|
cat << EOF > $MOZCONFIG
|
||||||
%endif
|
%endif
|
||||||
mk_add_options MOZILLA_OFFICIAL=1
|
mk_add_options MOZILLA_OFFICIAL=1
|
||||||
mk_add_options BUILD_OFFICIAL=1
|
mk_add_options BUILD_OFFICIAL=1
|
||||||
mk_add_options MOZ_MILESTONE_RELEASE=1
|
|
||||||
%if 0%{?suse_version} > 1320
|
|
||||||
%ifarch i586
|
|
||||||
mk_add_options MOZ_MAKE_FLAGS=-j1
|
|
||||||
%else
|
|
||||||
mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
|
mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
mk_add_options MOZ_OBJDIR=$RPM_BUILD_DIR/obj
|
mk_add_options MOZ_OBJDIR=$RPM_BUILD_DIR/obj
|
||||||
ac_add_options --prefix=%{_prefix}
|
ac_add_options --prefix=%{_prefix}
|
||||||
ac_add_options --libdir=%{progdir}
|
ac_add_options --libdir=%{_libdir}
|
||||||
ac_add_options --includedir=%{_includedir}
|
ac_add_options --includedir=%{_includedir}
|
||||||
ac_add_options --enable-application=comm/mail
|
ac_add_options --enable-application=comm/mail
|
||||||
ac_add_options --enable-calendar
|
ac_add_options --enable-release
|
||||||
ac_add_options --disable-tests
|
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
|
||||||
ac_add_options --disable-debug
|
|
||||||
ac_add_options --enable-alsa
|
|
||||||
ac_add_options --enable-default-toolkit=cairo-gtk3
|
ac_add_options --enable-default-toolkit=cairo-gtk3
|
||||||
%if 0%{?suse_version} >= 1550
|
%else
|
||||||
ac_add_options --disable-gconf
|
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
|
||||||
%endif
|
%endif
|
||||||
# bmo#1441155 - Disable the generation of Rust debug symbols on Linux32
|
# bmo#1441155 - Disable the generation of Rust debug symbols on Linux32
|
||||||
%ifarch %ix86 %arm
|
%ifarch %ix86 %arm
|
||||||
@ -360,27 +400,27 @@ ac_add_options --disable-debug-symbols
|
|||||||
%else
|
%else
|
||||||
ac_add_options --enable-debug-symbols
|
ac_add_options --enable-debug-symbols
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} > 1549
|
# building with elf-hack started to fail everywhere with FF73
|
||||||
|
#%if 0%{?suse_version} > 1549
|
||||||
%ifnarch aarch64 ppc64 ppc64le s390x
|
%ifnarch aarch64 ppc64 ppc64le s390x
|
||||||
ac_add_options --disable-elf-hack
|
ac_add_options --disable-elf-hack
|
||||||
%endif
|
%endif
|
||||||
%endif
|
#%endif
|
||||||
ac_add_options --with-system-nspr
|
ac_add_options --with-system-nspr
|
||||||
ac_add_options --with-system-nss
|
ac_add_options --with-system-nss
|
||||||
ac_add_options --with-system-zlib
|
ac_add_options --with-ccache
|
||||||
%if 0%{?localize}
|
%if %{localize}
|
||||||
ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
|
ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
|
||||||
%endif
|
%endif
|
||||||
|
ac_add_options --with-system-zlib
|
||||||
ac_add_options --disable-updater
|
ac_add_options --disable-updater
|
||||||
#ac_add_options --with-system-png # no apng support
|
ac_add_options --disable-tests
|
||||||
#ac_add_options --enable-system-hunspell
|
ac_add_options --enable-alsa
|
||||||
ac_add_options --enable-startup-notification
|
ac_add_options --disable-debug
|
||||||
ac_add_options --disable-necko-wifi
|
ac_add_options --disable-necko-wifi
|
||||||
ac_add_options --enable-update-channel=%{update_channel}
|
ac_add_options --enable-update-channel=%{update_channel}
|
||||||
%if %has_system_cairo
|
|
||||||
ac_add_options --enable-system-cairo
|
|
||||||
%endif
|
|
||||||
ac_add_options --with-unsigned-addon-scopes=app
|
ac_add_options --with-unsigned-addon-scopes=app
|
||||||
|
ac_add_options --allow-addon-sideload
|
||||||
ac_add_options --enable-official-branding
|
ac_add_options --enable-official-branding
|
||||||
%if ! %crashreporter
|
%if ! %crashreporter
|
||||||
ac_add_options --disable-crashreporter
|
ac_add_options --disable-crashreporter
|
||||||
@ -402,12 +442,15 @@ ac_add_options --enable-optimize="-O1"
|
|||||||
# LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506)
|
# LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506)
|
||||||
%if 0%{?suse_version} > 1500
|
%if 0%{?suse_version} > 1500
|
||||||
ac_add_options --enable-lto
|
ac_add_options --enable-lto
|
||||||
|
%if 0%{?do_profiling}
|
||||||
|
ac_add_options MOZ_PGO=1
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if %{with mozilla_tb_valgrind}
|
%if %{with mozilla_tb_valgrind}
|
||||||
ac_add_options --disable-jemalloc
|
ac_add_options --disable-jemalloc
|
||||||
ac_add_options --enable-valgrind
|
ac_add_options --enable-valgrind
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
EOF
|
EOF
|
||||||
%if !%{with only_print_mozconfig}
|
%if !%{with only_print_mozconfig}
|
||||||
%ifarch ppc64 s390x s390
|
%ifarch ppc64 s390x s390
|
||||||
@ -420,7 +463,11 @@ echo "Generate big endian version of config/external/icu/data/icud58l.dat"
|
|||||||
ls -l config/external/icu/data
|
ls -l config/external/icu/data
|
||||||
rm -f config/external/icu/data/icudt*l.dat
|
rm -f config/external/icu/data/icudt*l.dat
|
||||||
%endif
|
%endif
|
||||||
./mach build
|
ccache -s
|
||||||
|
%if 0%{?do_profiling}
|
||||||
|
xvfb-run --server-args="-screen 0 1920x1080x24" \
|
||||||
|
%endif
|
||||||
|
./mach build -v
|
||||||
|
|
||||||
# build additional locales
|
# build additional locales
|
||||||
%if %localize
|
%if %localize
|
||||||
@ -448,32 +495,16 @@ sed -r '/^(ja-JP-mac|en-US|$)/d;s/ .*$//' $RPM_BUILD_DIR/%{source_prefix}/comm/m
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
cd $RPM_BUILD_DIR/obj
|
cd $RPM_BUILD_DIR/obj
|
||||||
|
source %{SOURCE4}
|
||||||
|
export MOZ_SOURCE_STAMP=$RELEASE_TAG
|
||||||
|
export MOZ_SOURCE_REPO=$RELEASE_REPO
|
||||||
make -C comm/mail/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0
|
make -C comm/mail/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0
|
||||||
# copy tree into RPM_BUILD_ROOT
|
# copy tree into RPM_BUILD_ROOT
|
||||||
mkdir -p %{buildroot}%{progdir}
|
mkdir -p %{buildroot}%{progdir}
|
||||||
cp -rf $RPM_BUILD_DIR/obj/dist/%{progname}/* %{buildroot}%{progdir}
|
cp -rf $RPM_BUILD_DIR/obj/dist/%{progname}/* %{buildroot}%{progdir}
|
||||||
|
|
||||||
%if %localize
|
|
||||||
# repack the lightning xpi with all available locales (boo#939153) (lp#545778)
|
|
||||||
_extid="{e2fda1a4-762b-4020-b5ad-a41df1933103}"
|
|
||||||
rm -rf _lightning
|
|
||||||
mkdir -p _lightning
|
|
||||||
unzip -q -d _lightning "%{buildroot}%{progdir}/distribution/extensions/${_extid}.xpi"
|
|
||||||
_langpacks=$(cd "%{buildroot}%{progdir}/extensions/" && find langpack-* -type d -prune -print|cut -d'-' -f2-|cut -d'@' -f1)
|
|
||||||
for _loc in $_langpacks ; do
|
|
||||||
_dir="%{buildroot}%{progdir}/extensions/langpack-${_loc}@thunderbird.mozilla.org"
|
|
||||||
_dir="${_dir}/distribution/extensions/${_extid}"
|
|
||||||
test -d "_lightning/chrome/calendar-${_loc}" && continue
|
|
||||||
test -d "_lightning/chrome/lightning-${_loc}" && continue
|
|
||||||
test -f "${_dir}/chrome.manifest" || continue
|
|
||||||
cp -rL "${_dir}"/chrome/{calendar,lightning}-"${_loc}" _lightning/chrome/
|
|
||||||
cat "${_dir}/chrome.manifest" >> _lightning/chrome.manifest
|
|
||||||
done
|
|
||||||
(cd _lightning && zip -q9r ../"${_extid}.xpi" *)
|
|
||||||
cp -p "${_extid}.xpi" %{buildroot}%{progdir}/distribution/extensions/
|
|
||||||
%endif
|
|
||||||
# remove some executable permissions
|
# remove some executable permissions
|
||||||
find %{buildroot}%{_libdir}/%{progname} \
|
find %{buildroot}%{progdir} \
|
||||||
-name "*.js" -o \
|
-name "*.js" -o \
|
||||||
-name "*.jsm" -o \
|
-name "*.jsm" -o \
|
||||||
-name "*.rdf" -o \
|
-name "*.rdf" -o \
|
||||||
@ -489,7 +520,7 @@ find %{buildroot}%{progdir} -type f -name ".mkdir.done" -delete
|
|||||||
mkdir --parents %{buildroot}%{_bindir}/
|
mkdir --parents %{buildroot}%{_bindir}/
|
||||||
sed "s:%%PREFIX:%{_prefix}:g
|
sed "s:%%PREFIX:%{_prefix}:g
|
||||||
s:%%PROGDIR:%{progdir}:g
|
s:%%PROGDIR:%{progdir}:g
|
||||||
s:%%APPNAME:thunderbird:g
|
s:%%APPNAME:%{progname}:g
|
||||||
s:%%PROFILE:.thunderbird:g" \
|
s:%%PROFILE:.thunderbird:g" \
|
||||||
%{SOURCE3} > %{buildroot}%{progdir}/%{progname}.sh
|
%{SOURCE3} > %{buildroot}%{progdir}/%{progname}.sh
|
||||||
chmod 755 %{buildroot}%{progdir}/%{progname}.sh
|
chmod 755 %{buildroot}%{progdir}/%{progname}.sh
|
||||||
@ -570,8 +601,6 @@ exit 0
|
|||||||
%attr(755,root,root) %{progdir}/%{progname}.sh
|
%attr(755,root,root) %{progdir}/%{progname}.sh
|
||||||
%dir %{progdir}
|
%dir %{progdir}
|
||||||
%{progdir}/application.ini
|
%{progdir}/application.ini
|
||||||
%{progdir}/blocklist.xml
|
|
||||||
%{progdir}/chrome.manifest
|
|
||||||
%{progdir}/dependentlibs.list
|
%{progdir}/dependentlibs.list
|
||||||
%{progdir}/fonts/
|
%{progdir}/fonts/
|
||||||
%dir %{progdir}/gtk2
|
%dir %{progdir}/gtk2
|
||||||
@ -591,7 +620,6 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
%dir %{progdir}/chrome/
|
%dir %{progdir}/chrome/
|
||||||
%{progdir}/chrome/icons/
|
%{progdir}/chrome/icons/
|
||||||
%{progdir}/distribution/
|
|
||||||
%{progdir}/defaults/
|
%{progdir}/defaults/
|
||||||
%{progdir}/features/
|
%{progdir}/features/
|
||||||
%{progdir}/isp/
|
%{progdir}/isp/
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:79be90f1bf2999d090a0dc352f8262b09f291cb97885ed75ffcc9afc49b71bd8
|
|
||||||
size 31323040
|
|
3
l10n-78.3.1.tar.xz
Normal file
3
l10n-78.3.1.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:46c46e19d52f44f7fbe31c91568f6fd408e3cd8ccf03fd697c143b3bc3b25824
|
||||||
|
size 29052792
|
@ -3,13 +3,13 @@
|
|||||||
# Date 1558451540 -7200
|
# Date 1558451540 -7200
|
||||||
# Tue May 21 17:12:20 2019 +0200
|
# Tue May 21 17:12:20 2019 +0200
|
||||||
# Node ID 433beec63e6b5f409683af20a0c1ab137cc7bfad
|
# Node ID 433beec63e6b5f409683af20a0c1ab137cc7bfad
|
||||||
# Parent 42c99b59a87b904063bad3193f10c51d068d2eac
|
# Parent 0b9b94a6526d4f1aa6e23b95c1f5f7c0bef841a7
|
||||||
Bug 1005535 - Get skia GPU building on big endian.
|
Bug 1005535 - Get skia GPU building on big endian.
|
||||||
|
|
||||||
diff -r 42c99b59a87b -r 433beec63e6b gfx/skia/skia/include/private/GrColor.h
|
diff -r 0b9b94a6526d gfx/skia/skia/src/gpu/GrColor.h
|
||||||
--- a/gfx/skia/skia/include/private/GrColor.h Wed Jun 05 08:48:08 2019 +0200
|
--- a/gfx/skia/skia/src/gpu/GrColor.h Tue May 21 17:26:58 2019 +0200
|
||||||
+++ b/gfx/skia/skia/include/private/GrColor.h Tue May 21 17:12:20 2019 +0200
|
+++ b/gfx/skia/skia/src/gpu/GrColor.h Wed Jan 08 12:14:52 2020 +0100
|
||||||
@@ -63,7 +63,7 @@
|
@@ -64,7 +64,7 @@
|
||||||
* Since premultiplied means that alpha >= color, we construct a color with
|
* Since premultiplied means that alpha >= color, we construct a color with
|
||||||
* each component==255 and alpha == 0 to be "illegal"
|
* each component==255 and alpha == 0 to be "illegal"
|
||||||
*/
|
*/
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
# HG changeset patch
|
# HG changeset patch
|
||||||
# User Mike Hommey <mh+mozilla@glandium.org>
|
# User Mike Hommey <mh+mozilla@glandium.org>
|
||||||
# Date 1526871862 -32400
|
# Date 1526871862 -32400
|
||||||
# Node ID 94f21505ff13cd089f7129cd24927cf8b31a0f43
|
# Mon May 21 12:04:22 2018 +0900
|
||||||
# Parent fc741a5ea37dbe145e0ca5f85e5dfb100f3c9091
|
# Node ID 74a0c200d7f748a3fe46bb22a38625b074da8e26
|
||||||
|
# Parent 0bf4a038a7129aa6bfd7bb27e7455ab649344ac5
|
||||||
Bug 1463035 - Remove MOZ_SIGNAL_TRAMPOLINE. r?darchons
|
Bug 1463035 - Remove MOZ_SIGNAL_TRAMPOLINE. r?darchons
|
||||||
|
|
||||||
For some reason, GNU as is not happy with the assembly generated after
|
For some reason, GNU as is not happy with the assembly generated after
|
||||||
@ -12,39 +12,10 @@ bug 1238661 anymore on Debian armel.
|
|||||||
OTOH, as mentioned in bug 1238661 comment 4, we actually don't need this
|
OTOH, as mentioned in bug 1238661 comment 4, we actually don't need this
|
||||||
workaround anymore, so let's just kill it.
|
workaround anymore, so let's just kill it.
|
||||||
|
|
||||||
diff --git a/mfbt/moz.build b/mfbt/moz.build
|
diff -r 0bf4a038a712 -r 74a0c200d7f7 mozglue/baseprofiler/core/platform-linux-android.cpp
|
||||||
--- a/mfbt/moz.build
|
--- a/mozglue/baseprofiler/core/platform-linux-android.cpp Tue May 21 14:49:58 2019 +0200
|
||||||
+++ b/mfbt/moz.build
|
+++ b/mozglue/baseprofiler/core/platform-linux-android.cpp Mon May 21 12:04:22 2018 +0900
|
||||||
@@ -122,20 +122,16 @@ EXPORTS["double-conversion"] = [
|
@@ -60,7 +60,6 @@
|
||||||
LOCAL_INCLUDES += [
|
|
||||||
'/mfbt/double-conversion',
|
|
||||||
]
|
|
||||||
|
|
||||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
||||||
EXPORTS.mozilla += [
|
|
||||||
'WindowsVersion.h',
|
|
||||||
]
|
|
||||||
-elif CONFIG['OS_ARCH'] == 'Linux':
|
|
||||||
- EXPORTS.mozilla += [
|
|
||||||
- 'LinuxSignal.h',
|
|
||||||
- ]
|
|
||||||
|
|
||||||
UNIFIED_SOURCES += [
|
|
||||||
'Assertions.cpp',
|
|
||||||
'ChaosMode.cpp',
|
|
||||||
'double-conversion/double-conversion/bignum-dtoa.cc',
|
|
||||||
'double-conversion/double-conversion/bignum.cc',
|
|
||||||
'double-conversion/double-conversion/cached-powers.cc',
|
|
||||||
'double-conversion/double-conversion/diy-fp.cc',
|
|
||||||
diff --git a/tools/profiler/core/platform-linux-android.cpp b/tools/profiler/core/platform-linux-android.cpp
|
|
||||||
--- a/tools/profiler/core/platform-linux-android.cpp
|
|
||||||
+++ b/tools/profiler/core/platform-linux-android.cpp
|
|
||||||
@@ -55,17 +55,16 @@
|
|
||||||
#ifdef __GLIBC__
|
|
||||||
# include <execinfo.h> // backtrace, backtrace_symbols
|
|
||||||
#endif // def __GLIBC__
|
|
||||||
#include <strings.h> // index
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "prenv.h"
|
#include "prenv.h"
|
||||||
@ -52,17 +23,7 @@ diff --git a/tools/profiler/core/platform-linux-android.cpp b/tools/profiler/cor
|
|||||||
#include "mozilla/PodOperations.h"
|
#include "mozilla/PodOperations.h"
|
||||||
#include "mozilla/DebugOnly.h"
|
#include "mozilla/DebugOnly.h"
|
||||||
|
|
||||||
#include <string.h>
|
@@ -271,7 +270,7 @@
|
||||||
#include <list>
|
|
||||||
|
|
||||||
using namespace mozilla;
|
|
||||||
|
|
||||||
@@ -248,17 +247,17 @@ Sampler::Sampler(PSLockRef aLock)
|
|
||||||
|
|
||||||
// NOTE: We don't initialize LUL here, instead initializing it in
|
|
||||||
// SamplerThread's constructor. This is because with the
|
|
||||||
// profiler_suspend_and_sample_thread entry point, we want to be able to
|
|
||||||
// sample without waiting for LUL to be initialized.
|
|
||||||
|
|
||||||
// Request profiling signals.
|
// Request profiling signals.
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
@ -71,8 +32,15 @@ diff --git a/tools/profiler/core/platform-linux-android.cpp b/tools/profiler/cor
|
|||||||
sigemptyset(&sa.sa_mask);
|
sigemptyset(&sa.sa_mask);
|
||||||
sa.sa_flags = SA_RESTART | SA_SIGINFO;
|
sa.sa_flags = SA_RESTART | SA_SIGINFO;
|
||||||
if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) {
|
if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) {
|
||||||
MOZ_CRASH("Error installing SIGPROF handler in the profiler");
|
diff -r 0bf4a038a712 -r 74a0c200d7f7 tools/profiler/core/platform-linux-android.cpp
|
||||||
}
|
--- a/tools/profiler/core/platform-linux-android.cpp Tue May 21 14:49:58 2019 +0200
|
||||||
}
|
+++ b/tools/profiler/core/platform-linux-android.cpp Mon May 21 12:04:22 2018 +0900
|
||||||
|
@@ -263,7 +263,7 @@
|
||||||
|
|
||||||
void Sampler::Disable(PSLockRef aLock) {
|
// Request profiling signals.
|
||||||
|
struct sigaction sa;
|
||||||
|
- sa.sa_sigaction = MOZ_SIGNAL_TRAMPOLINE(SigprofHandler);
|
||||||
|
+ sa.sa_sigaction = SigprofHandler;
|
||||||
|
sigemptyset(&sa.sa_mask);
|
||||||
|
sa.sa_flags = SA_RESTART | SA_SIGINFO;
|
||||||
|
if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) {
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
# HG changeset patch
|
# HG changeset patch
|
||||||
# Parent 051b75a600dfbf7503c3485cebfd34d4eb29be96
|
# Parent 9db312f823881c04c5c16a7623df08cf6aef371d
|
||||||
Taken from https://bugzilla.mozilla.org/show_bug.cgi?id=1504834
|
Taken from https://bugzilla.mozilla.org/show_bug.cgi?id=1504834
|
||||||
|
|
||||||
diff -r 051b75a600df gfx/2d/DrawTargetSkia.cpp
|
diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp
|
||||||
--- a/gfx/2d/DrawTargetSkia.cpp Fri Jul 05 12:42:44 2019 +0200
|
--- a/gfx/2d/DrawTargetSkia.cpp
|
||||||
+++ b/gfx/2d/DrawTargetSkia.cpp Mon Jul 08 10:59:30 2019 +0200
|
+++ b/gfx/2d/DrawTargetSkia.cpp
|
||||||
@@ -138,8 +138,7 @@
|
@@ -131,18 +131,17 @@ static IntRect CalculateSurfaceBounds(co
|
||||||
|
Rect sampledBounds = inverse.TransformBounds(*aBounds);
|
||||||
|
if (!sampledBounds.ToIntRect(&bounds)) {
|
||||||
|
return surfaceBounds;
|
||||||
|
}
|
||||||
|
|
||||||
return surfaceBounds.Intersect(bounds);
|
return surfaceBounds.Intersect(bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,38 +20,68 @@ diff -r 051b75a600df gfx/2d/DrawTargetSkia.cpp
|
|||||||
|
|
||||||
static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
|
static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
|
||||||
const int32_t aStride, SurfaceFormat aFormat) {
|
const int32_t aStride, SurfaceFormat aFormat) {
|
||||||
diff -r 051b75a600df gfx/2d/Types.h
|
if (aFormat != SurfaceFormat::B8G8R8X8 || aSize.IsEmpty()) {
|
||||||
--- a/gfx/2d/Types.h Fri Jul 05 12:42:44 2019 +0200
|
return true;
|
||||||
+++ b/gfx/2d/Types.h Mon Jul 08 10:59:30 2019 +0200
|
}
|
||||||
@@ -85,15 +85,8 @@
|
// We should've initialized the data to be opaque already
|
||||||
|
// On debug builds, verify that this is actually true.
|
||||||
|
diff --git a/gfx/2d/Types.h b/gfx/2d/Types.h
|
||||||
|
--- a/gfx/2d/Types.h
|
||||||
|
+++ b/gfx/2d/Types.h
|
||||||
|
@@ -82,25 +82,18 @@ enum class SurfaceFormat : int8_t {
|
||||||
|
Depth,
|
||||||
|
|
||||||
|
// This represents the unknown format.
|
||||||
|
UNKNOWN,
|
||||||
|
|
||||||
// The following values are endian-independent synonyms. The _UINT32 suffix
|
// The following values are endian-independent synonyms. The _UINT32 suffix
|
||||||
// indicates that the name reflects the layout when viewed as a uint32_t
|
// indicates that the name reflects the layout when viewed as a uint32_t
|
||||||
// value.
|
// value.
|
||||||
-#if MOZ_LITTLE_ENDIAN
|
-#if MOZ_LITTLE_ENDIAN()
|
||||||
A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB
|
A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB
|
||||||
X8R8G8B8_UINT32 = B8G8R8X8 // 0x00RRGGBB
|
X8R8G8B8_UINT32 = B8G8R8X8, // 0x00RRGGBB
|
||||||
-#elif MOZ_BIG_ENDIAN
|
-#elif MOZ_BIG_ENDIAN()
|
||||||
- A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB
|
- A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB
|
||||||
- X8R8G8B8_UINT32 = X8R8G8B8 // 0x00RRGGBB
|
- X8R8G8B8_UINT32 = X8R8G8B8, // 0x00RRGGBB
|
||||||
-#else
|
-#else
|
||||||
-# error "bad endianness"
|
-# error "bad endianness"
|
||||||
-#endif
|
-#endif
|
||||||
};
|
|
||||||
|
|
||||||
static inline int BytesPerPixel(SurfaceFormat aFormat) {
|
// The following values are OS and endian-independent synonyms.
|
||||||
diff -r 051b75a600df gfx/skia/skia/third_party/skcms/skcms.cc
|
//
|
||||||
--- a/gfx/skia/skia/third_party/skcms/skcms.cc Fri Jul 05 12:42:44 2019 +0200
|
// TODO(aosmond): When everything blocking bug 1581828 has been resolved, we
|
||||||
+++ b/gfx/skia/skia/third_party/skcms/skcms.cc Mon Jul 08 10:59:30 2019 +0200
|
// can make this use R8B8G8A8 and R8B8G8X8 for non-Windows platforms.
|
||||||
@@ -17,6 +17,8 @@
|
OS_RGBA = A8R8G8B8_UINT32,
|
||||||
#include <arm_neon.h>
|
OS_RGBX = X8R8G8B8_UINT32
|
||||||
#elif defined(__SSE__)
|
};
|
||||||
#include <immintrin.h>
|
diff --git a/gfx/skia/skia/third_party/skcms/skcms.cc b/gfx/skia/skia/third_party/skcms/skcms.cc
|
||||||
|
--- a/gfx/skia/skia/third_party/skcms/skcms.cc
|
||||||
|
+++ b/gfx/skia/skia/third_party/skcms/skcms.cc
|
||||||
|
@@ -25,16 +25,18 @@
|
||||||
|
// it'd be a lot slower. But we want all those headers included so we
|
||||||
|
// can use their features after runtime checks later.
|
||||||
|
#include <smmintrin.h>
|
||||||
|
#include <avxintrin.h>
|
||||||
|
#include <avx2intrin.h>
|
||||||
|
#include <avx512fintrin.h>
|
||||||
|
#include <avx512dqintrin.h>
|
||||||
|
#endif
|
||||||
+#else
|
+#else
|
||||||
+ #define SKCMS_PORTABLE
|
+ #define SKCMS_PORTABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// sizeof(x) will return size_t, which is 32-bit on some machines and 64-bit on others.
|
// sizeof(x) will return size_t, which is 32-bit on some machines and 64-bit on others.
|
||||||
@@ -124,20 +126,28 @@
|
// We have better testing on 64-bit machines, so force 32-bit machines to behave like 64-bit.
|
||||||
|
//
|
||||||
|
// Please do not use sizeof() directly, and size_t only when required.
|
||||||
|
// (We have no way of enforcing these requests...)
|
||||||
|
#define SAFE_SIZEOF(x) ((uint64_t)sizeof(x))
|
||||||
|
@@ -275,30 +277,38 @@ enum {
|
||||||
|
skcms_Signature_sf32 = 0x73663332,
|
||||||
|
// XYZ is also a PCS signature, so it's defined in skcms.h
|
||||||
|
// skcms_Signature_XYZ = 0x58595A20,
|
||||||
|
};
|
||||||
|
|
||||||
static uint16_t read_big_u16(const uint8_t* ptr) {
|
static uint16_t read_big_u16(const uint8_t* ptr) {
|
||||||
uint16_t be;
|
uint16_t be;
|
||||||
memcpy(&be, ptr, sizeof(be));
|
memcpy(&be, ptr, sizeof(be));
|
||||||
@ -79,3 +114,8 @@ diff -r 051b75a600df gfx/skia/skia/third_party/skcms/skcms.cc
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int32_t read_big_i32(const uint8_t* ptr) {
|
||||||
|
return (int32_t)read_big_u32(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
static float read_big_fixed(const uint8_t* ptr) {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# HG changeset patch
|
# HG changeset patch
|
||||||
# Parent 36563351309ddbc6c29559ba50a41d005f925abb
|
# Parent 0e579dcbf7328dda4512cbdafc9b42acec4935ea
|
||||||
Skia does not support big endian. The places to fix are too numerous and upstream (skia, not Mozilla)
|
Skia does not support big endian. The places to fix are too numerous and upstream (skia, not Mozilla)
|
||||||
has no interest in maintaining big endian.
|
has no interest in maintaining big endian.
|
||||||
So here we try to swizzle the input for skia, so that skia always works on LE, and when it comes
|
So here we try to swizzle the input for skia, so that skia always works on LE, and when it comes
|
||||||
out again, we transform back to BE.
|
out again, we transform back to BE.
|
||||||
|
|
||||||
diff -r 36563351309d gfx/2d/ConvolutionFilter.cpp
|
diff -r 0e579dcbf732 gfx/2d/ConvolutionFilter.cpp
|
||||||
--- a/gfx/2d/ConvolutionFilter.cpp Mon Sep 09 17:59:28 2019 +0200
|
--- a/gfx/2d/ConvolutionFilter.cpp Wed Jan 08 12:17:44 2020 +0100
|
||||||
+++ b/gfx/2d/ConvolutionFilter.cpp Tue Sep 10 08:25:13 2019 +0200
|
+++ b/gfx/2d/ConvolutionFilter.cpp Wed Jan 08 12:17:49 2020 +0100
|
||||||
@@ -35,9 +35,38 @@
|
@@ -35,9 +35,38 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -23,7 +23,7 @@ diff -r 36563351309d gfx/2d/ConvolutionFilter.cpp
|
|||||||
+
|
+
|
||||||
void ConvolutionFilter::ConvolveHorizontally(const uint8_t* aSrc, uint8_t* aDst,
|
void ConvolutionFilter::ConvolveHorizontally(const uint8_t* aSrc, uint8_t* aDst,
|
||||||
bool aHasAlpha) {
|
bool aHasAlpha) {
|
||||||
+#if MOZ_BIG_ENDIAN
|
+#if MOZ_BIG_ENDIAN()
|
||||||
+ int outputSize = mFilter->numValues();
|
+ int outputSize = mFilter->numValues();
|
||||||
+
|
+
|
||||||
+ // Input size isn't handed in, so we have to calculate it quickly
|
+ // Input size isn't handed in, so we have to calculate it quickly
|
||||||
@ -40,7 +40,7 @@ diff -r 36563351309d gfx/2d/ConvolutionFilter.cpp
|
|||||||
+
|
+
|
||||||
SkOpts::convolve_horizontally(aSrc, *mFilter, aDst, aHasAlpha);
|
SkOpts::convolve_horizontally(aSrc, *mFilter, aDst, aHasAlpha);
|
||||||
+
|
+
|
||||||
+#if MOZ_BIG_ENDIAN
|
+#if MOZ_BIG_ENDIAN()
|
||||||
+ ByteSwapArray((uint8_t*)aSrc, inputSize);
|
+ ByteSwapArray((uint8_t*)aSrc, inputSize);
|
||||||
+ ByteSwapArray(aDst, outputSize);
|
+ ByteSwapArray(aDst, outputSize);
|
||||||
+#endif
|
+#endif
|
||||||
@ -52,7 +52,7 @@ diff -r 36563351309d gfx/2d/ConvolutionFilter.cpp
|
|||||||
auto filterValues =
|
auto filterValues =
|
||||||
mFilter->FilterForValue(aRowIndex, &filterOffset, &filterLength);
|
mFilter->FilterForValue(aRowIndex, &filterOffset, &filterLength);
|
||||||
+
|
+
|
||||||
+#if MOZ_BIG_ENDIAN
|
+#if MOZ_BIG_ENDIAN()
|
||||||
+ for (int filterY = 0; filterY < filterLength; filterY++) {
|
+ for (int filterY = 0; filterY < filterLength; filterY++) {
|
||||||
+ // Skia only knows LE, so we have to swizzle the input
|
+ // Skia only knows LE, so we have to swizzle the input
|
||||||
+ ByteSwapArray(aSrc[filterY], aRowSize);
|
+ ByteSwapArray(aSrc[filterY], aRowSize);
|
||||||
@ -62,7 +62,7 @@ diff -r 36563351309d gfx/2d/ConvolutionFilter.cpp
|
|||||||
SkOpts::convolve_vertically(filterValues, filterLength, aSrc, aRowSize, aDst,
|
SkOpts::convolve_vertically(filterValues, filterLength, aSrc, aRowSize, aDst,
|
||||||
aHasAlpha);
|
aHasAlpha);
|
||||||
+
|
+
|
||||||
+#if MOZ_BIG_ENDIAN
|
+#if MOZ_BIG_ENDIAN()
|
||||||
+ // After skia is finished, we swizzle back to BE, in case
|
+ // After skia is finished, we swizzle back to BE, in case
|
||||||
+ // the input is used again somewhere else
|
+ // the input is used again somewhere else
|
||||||
+ for (int filterY = 0; filterY < filterLength; filterY++) {
|
+ for (int filterY = 0; filterY < filterLength; filterY++) {
|
||||||
@ -74,9 +74,9 @@ diff -r 36563351309d gfx/2d/ConvolutionFilter.cpp
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ConvolutionFilter::ComputeResizeFactor is derived from Skia's
|
/* ConvolutionFilter::ComputeResizeFactor is derived from Skia's
|
||||||
diff -r 36563351309d gfx/skia/skia/include/core/SkPreConfig.h
|
diff -r 0e579dcbf732 gfx/skia/skia/include/core/SkPreConfig.h
|
||||||
--- a/gfx/skia/skia/include/core/SkPreConfig.h Mon Sep 09 17:59:28 2019 +0200
|
--- a/gfx/skia/skia/include/core/SkPreConfig.h Wed Jan 08 12:17:44 2020 +0100
|
||||||
+++ b/gfx/skia/skia/include/core/SkPreConfig.h Tue Sep 10 08:25:13 2019 +0200
|
+++ b/gfx/skia/skia/include/core/SkPreConfig.h Wed Jan 08 12:17:49 2020 +0100
|
||||||
@@ -73,7 +73,7 @@
|
@@ -73,7 +73,7 @@
|
||||||
defined(__ppc__) || defined(__hppa) || \
|
defined(__ppc__) || defined(__hppa) || \
|
||||||
defined(__PPC__) || defined(__PPC64__) || \
|
defined(__PPC__) || defined(__PPC64__) || \
|
||||||
|
@ -17,7 +17,7 @@ diff -r 46ea866ca3ac -r 6ef20eee3f8f gfx/2d/DrawTargetSkia.cpp
|
|||||||
SkCanvas::kPreserveLCDText_SaveLayerFlag |
|
SkCanvas::kPreserveLCDText_SaveLayerFlag |
|
||||||
(aCopyBackground ? SkCanvas::kInitWithPrevious_SaveLayerFlag : 0));
|
(aCopyBackground ? SkCanvas::kInitWithPrevious_SaveLayerFlag : 0));
|
||||||
|
|
||||||
+#if MOZ_BIG_ENDIAN
|
+#if MOZ_BIG_ENDIAN()
|
||||||
+ // Pushing a layer where an aMask is defined produces wrong output.
|
+ // Pushing a layer where an aMask is defined produces wrong output.
|
||||||
+ // We _should_ endian swap the data, but I couldn't find a workable way to do so
|
+ // We _should_ endian swap the data, but I couldn't find a workable way to do so
|
||||||
+ // Therefore I deactivate those layers in the meantime.
|
+ // Therefore I deactivate those layers in the meantime.
|
||||||
|
34
mozilla-bmo1512162.patch
Normal file
34
mozilla-bmo1512162.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# Parent e5858dc7ab007042436496f7cfb9a5abf10f5082
|
||||||
|
This fixes a broken build for gcc < 9 on ppc64le.
|
||||||
|
This patch can be removed for newer gcc-versions.
|
||||||
|
|
||||||
|
diff -r e5858dc7ab00 -r 5d3469aabe61 js/xpconnect/src/XPCWrappedNative.cpp
|
||||||
|
--- a/js/xpconnect/src/XPCWrappedNative.cpp Thu Nov 29 10:07:29 2018 +0100
|
||||||
|
+++ b/js/xpconnect/src/XPCWrappedNative.cpp Tue Sep 10 12:42:13 2019 +0200
|
||||||
|
@@ -1092,7 +1092,11 @@
|
||||||
|
MOZ_ALWAYS_INLINE bool GetOutParamSource(uint8_t paramIndex,
|
||||||
|
MutableHandleValue srcp) const;
|
||||||
|
|
||||||
|
- MOZ_ALWAYS_INLINE bool GatherAndConvertResults();
|
||||||
|
+#if !(__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN)
|
||||||
|
+// Work around a compiler bug on ppc64le (bug 1512162).
|
||||||
|
+ MOZ_ALWAYS_INLINE
|
||||||
|
+#endif
|
||||||
|
+ bool GatherAndConvertResults();
|
||||||
|
|
||||||
|
MOZ_ALWAYS_INLINE bool QueryInterfaceFastPath();
|
||||||
|
|
||||||
|
@@ -1139,7 +1143,11 @@
|
||||||
|
|
||||||
|
~CallMethodHelper();
|
||||||
|
|
||||||
|
- MOZ_ALWAYS_INLINE bool Call();
|
||||||
|
+#if !(__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN)
|
||||||
|
+// Work around a compiler bug on ppc64le (bug 1512162).
|
||||||
|
+ MOZ_ALWAYS_INLINE
|
||||||
|
+#endif
|
||||||
|
+ bool Call();
|
||||||
|
|
||||||
|
// Trace implementation so we can put our CallMethodHelper in a Rooted<T>.
|
||||||
|
void trace(JSTracer* aTrc);
|
@ -1,28 +1,25 @@
|
|||||||
diff -r 6ef20eee3f8f gfx/layers/basic/BasicCompositor.cpp
|
# HG changeset patch
|
||||||
--- a/gfx/layers/basic/BasicCompositor.cpp Thu Oct 31 09:11:56 2019 +0100
|
# User msirringhaus@suse.de
|
||||||
+++ b/gfx/layers/basic/BasicCompositor.cpp Wed Dec 11 16:16:09 2019 +0100
|
# Date 1582805890 -3600
|
||||||
@@ -693,9 +693,13 @@
|
# Thu Feb 27 13:18:10 2020 +0100
|
||||||
|
# Node ID 457cbe5705f2a3759d3da36a05c0ed66ec61ea12
|
||||||
|
# Parent 7440f4b6bab85068ca2f84e9c48e0706d04330e8
|
||||||
|
imported patch mozilla-bmo1602730-FF73.patch
|
||||||
|
|
||||||
RefPtr<SourceSurface> sourceMask;
|
diff -r 7440f4b6bab8 gfx/layers/composite/CompositableHost.cpp
|
||||||
Matrix maskTransform;
|
--- a/gfx/layers/composite/CompositableHost.cpp Thu Feb 27 13:17:56 2020 +0100
|
||||||
+ // Setting an alpha-mask here breaks the URL-bar on big endian (s390x)
|
+++ b/gfx/layers/composite/CompositableHost.cpp Wed Jun 17 15:33:32 2020 +0200
|
||||||
+ // if the typed URL is too long for the textbox (automatic scrolling needed)
|
@@ -92,9 +92,13 @@
|
||||||
+#if MOZ_LITTLE_ENDIAN
|
|
||||||
if (aTransform.Is2D()) {
|
|
||||||
SetupMask(aEffectChain, dest, offset, sourceMask, maskTransform);
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
CompositionOp blendMode = CompositionOp::OP_OVER;
|
|
||||||
if (Effect* effect =
|
|
||||||
diff -r 6ef20eee3f8f gfx/layers/composite/CompositableHost.cpp
|
|
||||||
--- a/gfx/layers/composite/CompositableHost.cpp Thu Oct 31 09:11:56 2019 +0100
|
|
||||||
+++ b/gfx/layers/composite/CompositableHost.cpp Wed Dec 11 16:16:09 2019 +0100
|
|
||||||
@@ -91,6 +91,7 @@
|
|
||||||
}
|
}
|
||||||
MOZ_ASSERT(source);
|
MOZ_ASSERT(source);
|
||||||
|
|
||||||
+ // Alternatively: Comment out these lines where the alpha-mask is set
|
+ // Setting an alpha-mask here breaks the URL-bar on big endian (s390x)
|
||||||
|
+ // if the typed URL is too long for the textbox (automatic scrolling needed)
|
||||||
|
+#if MOZ_LITTLE_ENDIAN()
|
||||||
RefPtr<EffectMask> effect =
|
RefPtr<EffectMask> effect =
|
||||||
new EffectMask(source, source->GetSize(), aTransform);
|
new EffectMask(source, source->GetSize(), aTransform);
|
||||||
aEffects.mSecondaryEffects[EffectTypes::MASK] = effect;
|
aEffects.mSecondaryEffects[EffectTypes::MASK] = effect;
|
||||||
|
+#endif
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
85
mozilla-bmo1626236.patch
Normal file
85
mozilla-bmo1626236.patch
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User msirringhaus@suse.de
|
||||||
|
# Date 1582805876 -3600
|
||||||
|
# Thu Feb 27 13:17:56 2020 +0100
|
||||||
|
# Node ID cc3d09abea31068e57f1ab918782f9f86fc6a158
|
||||||
|
# Parent 9cd90914846f667f18babc491a74c164ae5d6e9f
|
||||||
|
imported patch decoder_workaround.patch
|
||||||
|
|
||||||
|
diff -r 9cd90914846f image/decoders/nsGIFDecoder2.cpp
|
||||||
|
--- a/image/decoders/nsGIFDecoder2.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||||
|
+++ b/image/decoders/nsGIFDecoder2.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||||
|
@@ -422,6 +422,9 @@
|
||||||
|
MOZ_ASSERT(mSwizzleFn);
|
||||||
|
uint8_t* data = reinterpret_cast<uint8_t*>(aColormap);
|
||||||
|
mSwizzleFn(data, data, aColors);
|
||||||
|
+#if MOZ_BIG_ENDIAN()
|
||||||
|
+ SwizzleRow(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)(data, data, aColors);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
LexerResult nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator,
|
||||||
|
diff -r 9cd90914846f image/decoders/nsJPEGDecoder.cpp
|
||||||
|
--- a/image/decoders/nsJPEGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||||
|
+++ b/image/decoders/nsJPEGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||||
|
@@ -263,6 +263,9 @@
|
||||||
|
case JCS_YCbCr:
|
||||||
|
// By default, we will output directly to BGRA. If we need to apply
|
||||||
|
// special color transforms, this may change.
|
||||||
|
+#if MOZ_BIG_ENDIAN()
|
||||||
|
+ mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
|
||||||
|
+#else
|
||||||
|
switch (SurfaceFormat::OS_RGBX) {
|
||||||
|
case SurfaceFormat::B8G8R8X8:
|
||||||
|
mInfo.out_color_space = JCS_EXT_BGRX;
|
||||||
|
@@ -277,6 +280,7 @@
|
||||||
|
mState = JPEG_ERROR;
|
||||||
|
return Transition::TerminateFailure();
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
break;
|
||||||
|
case JCS_CMYK:
|
||||||
|
case JCS_YCCK:
|
||||||
|
diff -r 9cd90914846f image/decoders/nsPNGDecoder.cpp
|
||||||
|
--- a/image/decoders/nsPNGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||||
|
+++ b/image/decoders/nsPNGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||||
|
@@ -361,7 +361,7 @@
|
||||||
|
IResumable* aOnResume) {
|
||||||
|
MOZ_ASSERT(!HasError(), "Shouldn't call DoDecode after error!");
|
||||||
|
|
||||||
|
- return mLexer.Lex(aIterator, aOnResume,
|
||||||
|
+ LexerResult res = mLexer.Lex(aIterator, aOnResume,
|
||||||
|
[=](State aState, const char* aData, size_t aLength) {
|
||||||
|
switch (aState) {
|
||||||
|
case State::PNG_DATA:
|
||||||
|
@@ -371,6 +371,14 @@
|
||||||
|
}
|
||||||
|
MOZ_CRASH("Unknown State");
|
||||||
|
});
|
||||||
|
+
|
||||||
|
+#if MOZ_BIG_ENDIAN()
|
||||||
|
+ if(res.is<TerminalState>() && res.as<TerminalState>() == TerminalState::SUCCESS) {
|
||||||
|
+ NativeEndian::swapToLittleEndianInPlace<uint32_t>((uint32_t*)(mImageData), mImageDataLength / 4);
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+ return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
LexerTransition<nsPNGDecoder::State> nsPNGDecoder::ReadPNGData(
|
||||||
|
diff -r 9cd90914846f image/decoders/nsWebPDecoder.cpp
|
||||||
|
--- a/image/decoders/nsWebPDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||||
|
+++ b/image/decoders/nsWebPDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||||
|
@@ -237,7 +237,12 @@
|
||||||
|
// WebP doesn't guarantee that the alpha generated matches the hint in the
|
||||||
|
// header, so we always need to claim the input is BGRA. If the output is
|
||||||
|
// BGRX, swizzling will mask off the alpha channel.
|
||||||
|
+#if MOZ_BIG_ENDIAN()
|
||||||
|
+ mBuffer.colorspace = MODE_ARGB;
|
||||||
|
+ SurfaceFormat inFormat = mFormat;
|
||||||
|
+#else
|
||||||
|
SurfaceFormat inFormat = SurfaceFormat::OS_RGBA;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
SurfacePipeFlags pipeFlags = SurfacePipeFlags();
|
||||||
|
if (mFormat == SurfaceFormat::OS_RGBA &&
|
@ -10,7 +10,7 @@ diff -r 6b017d3e9733 gfx/gl/GLContext.h
|
|||||||
BEFORE_GL_CALL;
|
BEFORE_GL_CALL;
|
||||||
mSymbols.fReadPixels(x, y, width, height, format, type, pixels);
|
mSymbols.fReadPixels(x, y, width, height, format, type, pixels);
|
||||||
OnSyncCall();
|
OnSyncCall();
|
||||||
+#if MOZ_BIG_ENDIAN
|
+#if MOZ_BIG_ENDIAN()
|
||||||
+ uint8_t* itr = (uint8_t*)pixels;
|
+ uint8_t* itr = (uint8_t*)pixels;
|
||||||
+ for (GLsizei i = 0; i < width * height; i++) {
|
+ for (GLsizei i = 0; i < width * height; i++) {
|
||||||
+ NativeEndian::swapToLittleEndianInPlace((uint32_t*)itr, 1);
|
+ NativeEndian::swapToLittleEndianInPlace((uint32_t*)itr, 1);
|
||||||
|
29
mozilla-bmo998749.patch
Normal file
29
mozilla-bmo998749.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User msirringhaus@suse.de
|
||||||
|
# Date 1583738770 -3600
|
||||||
|
# Mon Mar 09 08:26:10 2020 +0100
|
||||||
|
# Node ID 34676feac1a542e409e22acf5b98735f8313b1ce
|
||||||
|
# Parent 506857dace0a08d1c9685e3ac264646590b3e27f
|
||||||
|
[mq]: mozilla-bmo998749.patch
|
||||||
|
|
||||||
|
diff -r 506857dace0a -r 34676feac1a5 gfx/2d/FilterProcessing.h
|
||||||
|
--- a/gfx/2d/FilterProcessing.h Fri Feb 28 12:31:51 2020 +0100
|
||||||
|
+++ b/gfx/2d/FilterProcessing.h Mon Mar 09 08:26:10 2020 +0100
|
||||||
|
@@ -13,10 +13,17 @@
|
||||||
|
namespace mozilla {
|
||||||
|
namespace gfx {
|
||||||
|
|
||||||
|
+#if MOZ_BIG_ENDIAN()
|
||||||
|
+const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_B = 3;
|
||||||
|
+const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_G = 2;
|
||||||
|
+const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_R = 1;
|
||||||
|
+const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_A = 0;
|
||||||
|
+#else
|
||||||
|
const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_B = 0;
|
||||||
|
const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_G = 1;
|
||||||
|
const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_R = 2;
|
||||||
|
const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_A = 3;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
class FilterProcessing {
|
||||||
|
public:
|
@ -1,18 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Wolfgang Rosenauer <wr@rosenauer.org>
|
|
||||||
# Parent a9d61a2614b01b1e0ca37d00a6b11b2571868f86
|
|
||||||
|
|
||||||
diff --git a/media/libcubeb/src/cubeb_utils.cpp b/media/libcubeb/src/cubeb_utils.cpp
|
|
||||||
--- a/media/libcubeb/src/cubeb_utils.cpp
|
|
||||||
+++ b/media/libcubeb/src/cubeb_utils.cpp
|
|
||||||
@@ -15,9 +15,10 @@ size_t cubeb_sample_size(cubeb_sample_fo
|
|
||||||
return sizeof(int16_t);
|
|
||||||
case CUBEB_SAMPLE_FLOAT32LE:
|
|
||||||
case CUBEB_SAMPLE_FLOAT32BE:
|
|
||||||
return sizeof(float);
|
|
||||||
default:
|
|
||||||
// should never happen as all cases are handled above.
|
|
||||||
assert(false);
|
|
||||||
}
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,38 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# Parent 381102061fccdec40efda75c7423a766f68201ba
|
|
||||||
Bug-behavior: Youtube-videos using VP9 and opus as audio-codec started loading but did not play
|
|
||||||
Reason: While parsing the audio-stream, the sampling frequency (short rate) was wrongly parsed by
|
|
||||||
nestegg, returning 0 all the time. This led to the audio-track reporting that it neither had
|
|
||||||
valid video nor audio. Which led to an endless-loop in the video state machine.
|
|
||||||
Solution: Correct parsing of rate in nestegg, which is a float and cuts of bytes.
|
|
||||||
Link: https://github.com/kinetiknz/nestegg/issues/64
|
|
||||||
|
|
||||||
diff -r 381102061fcc -r 8da4be020b1e media/libnestegg/src/nestegg.c
|
|
||||||
--- a/media/libnestegg/src/nestegg.c Tue Aug 13 07:51:27 2019 +0200
|
|
||||||
+++ b/media/libnestegg/src/nestegg.c Tue Aug 20 07:59:54 2019 +0200
|
|
||||||
@@ -768,7 +768,15 @@
|
|
||||||
{
|
|
||||||
union {
|
|
||||||
uint64_t u;
|
|
||||||
- float f;
|
|
||||||
+ struct {
|
|
||||||
+#if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
|
|
||||||
+ uint32_t _pad;
|
|
||||||
+ float f;
|
|
||||||
+#else
|
|
||||||
+ float f;
|
|
||||||
+ uint32_t _pad;
|
|
||||||
+#endif
|
|
||||||
+ } f;
|
|
||||||
double d;
|
|
||||||
} value;
|
|
||||||
int r;
|
|
||||||
@@ -780,7 +788,7 @@
|
|
||||||
if (r != 1)
|
|
||||||
return r;
|
|
||||||
if (length == 4)
|
|
||||||
- *val = value.f;
|
|
||||||
+ *val = value.f.f;
|
|
||||||
else
|
|
||||||
*val = value.d;
|
|
||||||
return 1;
|
|
@ -1,26 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# Parent 33024abb3c58dab7239e32388df58e14f99defd5
|
|
||||||
# User Wolfgang Rosenauer <wr@rosenauer.org>
|
|
||||||
# Parent 0cfd693fdbbb0635787f1aeacee2dda43b01c495
|
|
||||||
|
|
||||||
diff --git a/media/gmp-clearkey/0.1/openaes/oaes_lib.c b/media/gmp-clearkey/0.1/openaes/oaes_lib.c
|
|
||||||
--- a/media/gmp-clearkey/0.1/openaes/oaes_lib.c
|
|
||||||
+++ b/media/gmp-clearkey/0.1/openaes/oaes_lib.c
|
|
||||||
@@ -24,16 +24,17 @@
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ---------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
+#include <stdio.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "mozilla/Sprintf.h"
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <process.h>
|
|
846
mozilla-pipewire-0-3.patch
Normal file
846
mozilla-pipewire-0-3.patch
Normal file
@ -0,0 +1,846 @@
|
|||||||
|
diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
|
||||||
|
index 2081d0c683a4..641133bf1ea4 100644
|
||||||
|
--- a/config/system-headers.mozbuild
|
||||||
|
+++ b/config/system-headers.mozbuild
|
||||||
|
@@ -314,6 +314,7 @@ system_headers = [
|
||||||
|
'Gestalt.h',
|
||||||
|
'getopt.h',
|
||||||
|
'gio/gio.h',
|
||||||
|
+ 'gio/gunixfdlist.h',
|
||||||
|
'glibconfig.h',
|
||||||
|
'glib.h',
|
||||||
|
'glib-object.h',
|
||||||
|
@@ -607,6 +608,7 @@ system_headers = [
|
||||||
|
'Pgenerr.h',
|
||||||
|
'PGenErr.h',
|
||||||
|
'Ph.h',
|
||||||
|
+ 'pipewire/pipewire.h',
|
||||||
|
'pixman.h',
|
||||||
|
'pk11func.h',
|
||||||
|
'pk11pqg.h',
|
||||||
|
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn b/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn
|
||||||
|
index ba885217b3ba..201d3b755221 100644
|
||||||
|
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn
|
||||||
|
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn
|
||||||
|
@@ -158,7 +158,7 @@ if (rtc_include_tests) {
|
||||||
|
if (is_linux) {
|
||||||
|
if (rtc_use_pipewire) {
|
||||||
|
pkg_config("pipewire") {
|
||||||
|
- packages = [ "libpipewire-0.2" ]
|
||||||
|
+ packages = [ "libpipewire-0.3" ]
|
||||||
|
|
||||||
|
defines = [ "WEBRTC_USE_PIPEWIRE" ]
|
||||||
|
}
|
||||||
|
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
|
||||||
|
index 90b40431c7e4..d844aa79d591 100644
|
||||||
|
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
|
||||||
|
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
|
||||||
|
@@ -194,6 +194,30 @@ if CONFIG["OS_TARGET"] == "Linux":
|
||||||
|
"/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc"
|
||||||
|
]
|
||||||
|
|
||||||
|
+# PipeWire specific files
|
||||||
|
+if CONFIG["OS_TARGET"] == "Linux":
|
||||||
|
+
|
||||||
|
+ DEFINES["WEBRTC_USE_PIPEWIRE"] = "1"
|
||||||
|
+
|
||||||
|
+ OS_LIBS += [
|
||||||
|
+ "rt",
|
||||||
|
+ "pipewire-0.3",
|
||||||
|
+ "glib-2.0",
|
||||||
|
+ "gio-2.0",
|
||||||
|
+ "gobject-2.0"
|
||||||
|
+ ]
|
||||||
|
+
|
||||||
|
+ CXXFLAGS += CONFIG['TK_CFLAGS']
|
||||||
|
+ CXXFLAGS += [ "-I/usr/include/pipewire-0.3" ]
|
||||||
|
+ CXXFLAGS += [ "-I/usr/include/spa-0.2" ]
|
||||||
|
+
|
||||||
|
+ UNIFIED_SOURCES += [
|
||||||
|
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc",
|
||||||
|
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc",
|
||||||
|
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc"
|
||||||
|
+ ]
|
||||||
|
+
|
||||||
|
+
|
||||||
|
if CONFIG["OS_TARGET"] == "NetBSD":
|
||||||
|
|
||||||
|
DEFINES["USE_X11"] = "1"
|
||||||
|
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h
|
||||||
|
index 1eb8ead26efa..316468eed1fc 100644
|
||||||
|
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h
|
||||||
|
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h
|
||||||
|
@@ -141,7 +141,7 @@ class DesktopCaptureOptions {
|
||||||
|
bool disable_effects_ = true;
|
||||||
|
bool detect_updated_region_ = false;
|
||||||
|
#if defined(WEBRTC_USE_PIPEWIRE)
|
||||||
|
- bool allow_pipewire_ = false;
|
||||||
|
+ bool allow_pipewire_ = true;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
|
||||||
|
index 379341c833de..76349f1fbd4d 100644
|
||||||
|
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
|
||||||
|
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
|
||||||
|
@@ -15,8 +15,11 @@
|
||||||
|
|
||||||
|
#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>
|
||||||
|
@@ -36,31 +39,36 @@ const char kSessionInterfaceName[] = "org.freedesktop.portal.Session";
|
||||||
|
const char kRequestInterfaceName[] = "org.freedesktop.portal.Request";
|
||||||
|
const char kScreenCastInterfaceName[] = "org.freedesktop.portal.ScreenCast";
|
||||||
|
|
||||||
|
-// 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);
|
||||||
|
|
||||||
|
- 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.";
|
||||||
|
+// static
|
||||||
|
+void BaseCapturerPipeWire::SyncDmaBuf(int fd, uint64_t start_or_end) {
|
||||||
|
+ struct dma_buf_sync sync = { 0 };
|
||||||
|
+
|
||||||
|
+ 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,
|
||||||
|
@@ -73,76 +81,54 @@ void BaseCapturerPipeWire::OnStreamStateChanged(void* data,
|
||||||
|
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
|
||||||
|
@@ -150,15 +136,25 @@ void BaseCapturerPipeWire::OnStreamProcess(void* data) {
|
||||||
|
BaseCapturerPipeWire* that = static_cast<BaseCapturerPipeWire*>(data);
|
||||||
|
RTC_DCHECK(that);
|
||||||
|
|
||||||
|
- pw_buffer* buf = nullptr;
|
||||||
|
+ struct pw_buffer *next_buffer;
|
||||||
|
+ struct pw_buffer *buffer = nullptr;
|
||||||
|
+
|
||||||
|
+ 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 (!(buf = 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)
|
||||||
|
@@ -169,38 +165,22 @@ BaseCapturerPipeWire::~BaseCapturerPipeWire() {
|
||||||
|
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_);
|
||||||
|
}
|
||||||
|
@@ -250,27 +230,35 @@ void BaseCapturerPipeWire::InitPortal() {
|
||||||
|
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";
|
||||||
|
@@ -278,81 +266,132 @@ void BaseCapturerPipeWire::InitPipeWire() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-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_rectangle pwMaxScreenBounds = spa_rectangle{INT32_MAX, INT32_MAX};
|
||||||
|
|
||||||
|
- spa_fraction pwFrameRateMin = spa_fraction{0, 1};
|
||||||
|
- spa_fraction pwFrameRateMax = spa_fraction{60, 1};
|
||||||
|
+ auto stream = pw_stream_new(pw_core_, "webrtc-pipewire-stream", nullptr);
|
||||||
|
|
||||||
|
- pw_properties* reuseProps = pw_properties_new("pipewire.client.reuse", "1",
|
||||||
|
- /*end of varargs*/ nullptr);
|
||||||
|
- pw_stream_ = pw_stream_new(pw_remote_, "webrtc-consume-stream", reuseProps);
|
||||||
|
+ 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));
|
||||||
|
-
|
||||||
|
- pw_stream_add_listener(pw_stream_, &spa_stream_listener_, &pw_stream_events_,
|
||||||
|
- this);
|
||||||
|
+ 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_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;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ 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;
|
||||||
|
|
||||||
|
- if (!(src = spaBuffer->datas[0].data)) {
|
||||||
|
+ 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
|
||||||
|
@@ -361,21 +400,40 @@ void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -725,10 +783,7 @@ void BaseCapturerPipeWire::OnStartRequestResponseSignal(
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
@@ -813,10 +868,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;
|
||||||
|
@@ -837,4 +897,22 @@ bool BaseCapturerPipeWire::SelectSource(SourceId id) {
|
||||||
|
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
|
||||||
|
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
|
||||||
|
index 56b101acbaa6..de54157d1a2a 100644
|
||||||
|
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
|
||||||
|
+++ b/media/webrtc/trunk/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 DesktopCapturer {
|
||||||
|
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
|
||||||
|
|
||||||
|
@@ -78,33 +78,37 @@ class BaseCapturerPipeWire : public DesktopCapturer {
|
||||||
|
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);
|
||||||
|
|
||||||
|
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc
|
||||||
|
index 26956fc67dc8..3813d697bb38 100644
|
||||||
|
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc
|
||||||
|
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc
|
||||||
|
@@ -15,7 +15,7 @@
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
ScreenCapturerPipeWire::ScreenCapturerPipeWire()
|
||||||
|
- : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Screen) {}
|
||||||
|
+ : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::kScreen) {}
|
||||||
|
ScreenCapturerPipeWire::~ScreenCapturerPipeWire() {}
|
||||||
|
|
||||||
|
// static
|
||||||
|
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc
|
||||||
|
index 35436475cb4d..c43a1f1a0c4e 100644
|
||||||
|
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc
|
||||||
|
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc
|
||||||
|
@@ -15,7 +15,7 @@
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
WindowCapturerPipeWire::WindowCapturerPipeWire()
|
||||||
|
- : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Window) {}
|
||||||
|
+ : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::kWindow) {}
|
||||||
|
WindowCapturerPipeWire::~WindowCapturerPipeWire() {}
|
||||||
|
|
||||||
|
// static
|
||||||
|
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc
|
||||||
|
index cf8a9dd0e0db..d27fab8d28d9 100644
|
||||||
|
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc
|
||||||
|
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc
|
||||||
|
@@ -26,7 +26,7 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
|
||||||
|
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)
|
||||||
|
|
||||||
|
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc
|
||||||
|
index 82359e50c2db..bb9724cf7cc2 100644
|
||||||
|
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc
|
||||||
|
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc
|
||||||
|
@@ -26,7 +26,7 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
|
||||||
|
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)
|
||||||
|
|
@ -3,13 +3,18 @@
|
|||||||
# Date 1558452418 -7200
|
# Date 1558452418 -7200
|
||||||
# Tue May 21 17:26:58 2019 +0200
|
# Tue May 21 17:26:58 2019 +0200
|
||||||
# Node ID 6cd963b6c82ea6629aaf4050851789b78f310338
|
# Node ID 6cd963b6c82ea6629aaf4050851789b78f310338
|
||||||
# Parent 602e92722e765a3c238d3b96b26c0c8063b5eeb4
|
# Parent 010a35335b4e45e222b9efdbda24fd1963202ecf
|
||||||
imported patch mozilla-ppc-altivec_static_inline.patch
|
imported patch mozilla-ppc-altivec_static_inline.patch
|
||||||
|
|
||||||
diff -r 602e92722e76 -r 6cd963b6c82e gfx/qcms/transform-altivec.c
|
diff --git a/gfx/qcms/transform-altivec.cpp b/gfx/qcms/transform-altivec.cpp
|
||||||
--- a/gfx/qcms/transform-altivec.c Tue May 21 17:26:48 2019 +0200
|
--- a/gfx/qcms/transform-altivec.cpp
|
||||||
+++ b/gfx/qcms/transform-altivec.c Tue May 21 17:26:58 2019 +0200
|
+++ b/gfx/qcms/transform-altivec.cpp
|
||||||
@@ -30,7 +30,7 @@
|
@@ -25,17 +25,17 @@
|
||||||
|
|
||||||
|
#include "qcmsint.h"
|
||||||
|
|
||||||
|
#define FLOATSCALE (float)(PRECACHE_OUTPUT_SIZE)
|
||||||
|
#define CLAMPMAXVAL (((float) (PRECACHE_OUTPUT_SIZE - 1)) / PRECACHE_OUTPUT_SIZE)
|
||||||
static const ALIGN float floatScaleX4 = FLOATSCALE;
|
static const ALIGN float floatScaleX4 = FLOATSCALE;
|
||||||
static const ALIGN float clampMaxValueX4 = CLAMPMAXVAL;
|
static const ALIGN float clampMaxValueX4 = CLAMPMAXVAL;
|
||||||
|
|
||||||
@ -18,3 +23,8 @@ diff -r 602e92722e76 -r 6cd963b6c82e gfx/qcms/transform-altivec.c
|
|||||||
{
|
{
|
||||||
vector float data = vec_lde(0, dataPtr);
|
vector float data = vec_lde(0, dataPtr);
|
||||||
vector unsigned char moveToStart = vec_lvsl(0, dataPtr);
|
vector unsigned char moveToStart = vec_lvsl(0, dataPtr);
|
||||||
|
return vec_perm(data, data, moveToStart);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <size_t kRIndex, size_t kGIndex, size_t kBIndex, size_t kAIndex = NO_A_INDEX>
|
||||||
|
static void qcms_transform_data_template_lut_altivec(const qcms_transform *transform,
|
||||||
|
@ -3,32 +3,52 @@
|
|||||||
# Date 1560754926 -7200
|
# Date 1560754926 -7200
|
||||||
# Mon Jun 17 09:02:06 2019 +0200
|
# Mon Jun 17 09:02:06 2019 +0200
|
||||||
# Node ID 428161c3b9599083e1b8710eda1760f1f707ab11
|
# Node ID 428161c3b9599083e1b8710eda1760f1f707ab11
|
||||||
# Parent 6cd963b6c82ea6629aaf4050851789b78f310338
|
# Parent fa1cf8b9cb4efdf89fe19e543fb54272b726a353
|
||||||
#Description: reduce the rust debuginfo level on selected architectures where
|
#Description: reduce the rust debuginfo level on selected architectures where
|
||||||
# compiling with debuginfo=2 causes the OOM killer to interrupt the build on
|
# compiling with debuginfo=2 causes the OOM killer to interrupt the build on
|
||||||
# launchpad builders. Initially this was only on 32 bit architectures, but with
|
# launchpad builders. Initially this was only on 32 bit architectures, but with
|
||||||
# firefox 63 it started happening frequently on arm64 and ppc64el too.
|
# firefox 63 it started happening frequently on arm64 and ppc64el too.
|
||||||
|
|
||||||
diff -r 6cd963b6c82e -r 428161c3b959 build/moz.configure/toolchain.configure
|
diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
|
||||||
--- a/build/moz.configure/toolchain.configure Tue May 21 17:26:58 2019 +0200
|
--- a/build/moz.configure/toolchain.configure
|
||||||
+++ b/build/moz.configure/toolchain.configure Mon Jun 17 09:02:06 2019 +0200
|
+++ b/build/moz.configure/toolchain.configure
|
||||||
@@ -1865,8 +1865,8 @@
|
@@ -1861,18 +1861,18 @@ imply_option('RUSTC_OPT_LEVEL', '2', whe
|
||||||
|
@depends('RUSTC_OPT_LEVEL', moz_optimize)
|
||||||
|
def rustc_opt_level(opt_level_option, moz_optimize):
|
||||||
|
if opt_level_option:
|
||||||
|
return opt_level_option[0]
|
||||||
|
else:
|
||||||
return '1' if moz_optimize.optimize else '0'
|
return '1' if moz_optimize.optimize else '0'
|
||||||
|
|
||||||
|
|
||||||
-@depends(rustc_opt_level, debug_rust, '--enable-debug-symbols')
|
-@depends(rustc_opt_level, debug_rust, '--enable-debug-symbols', '--enable-frame-pointers')
|
||||||
-def rust_compile_flags(opt_level, debug_rust, debug_symbols):
|
-def rust_compile_flags(opt_level, debug_rust, debug_symbols, frame_pointers):
|
||||||
+@depends(rustc_opt_level, debug_rust, '--enable-debug-symbols', host)
|
+@depends(rustc_opt_level, debug_rust, '--enable-debug-symbols', '--enable-frame-pointers', host)
|
||||||
+def rust_compile_flags(opt_level, debug_rust, debug_symbols, host):
|
+def rust_compile_flags(opt_level, debug_rust, debug_symbols, frame_pointers, host):
|
||||||
# Cargo currently supports only two interesting profiles for building:
|
# Cargo currently supports only two interesting profiles for building:
|
||||||
# development and release. Those map (roughly) to --enable-debug and
|
# development and release. Those map (roughly) to --enable-debug and
|
||||||
# --disable-debug in Gecko, respectively.
|
# --disable-debug in Gecko, respectively.
|
||||||
@@ -1889,6 +1889,8 @@
|
#
|
||||||
|
# But we'd also like to support an additional axis of control for
|
||||||
|
# optimization level. Since Cargo only supports 2 profiles, we're in
|
||||||
|
# a bit of a bind.
|
||||||
|
#
|
||||||
|
@@ -1885,16 +1885,18 @@ def rust_compile_flags(opt_level, debug_
|
||||||
|
|
||||||
|
# opt-level=0 implies -C debug-assertions, which may not be desired
|
||||||
|
# unless Rust debugging is enabled.
|
||||||
|
if opt_level == '0' and not debug_rust:
|
||||||
|
debug_assertions = False
|
||||||
|
|
||||||
if debug_symbols:
|
if debug_symbols:
|
||||||
debug_info = '2'
|
debug_info = '2'
|
||||||
+ if host.bitness == 32 or host.cpu == 'aarch64' or host.cpu == 'ppc64':
|
+# if host.bitness == 32 or host.cpu == 'aarch64' or host.cpu == 'ppc64': # Just reduce debug_info for all archs
|
||||||
+ debug_info = '1'
|
+ debug_info = '1'
|
||||||
|
|
||||||
opts = []
|
opts = []
|
||||||
|
|
||||||
|
if opt_level is not None:
|
||||||
|
opts.append('opt-level=%s' % opt_level)
|
||||||
|
if debug_assertions is not None:
|
||||||
|
opts.append('debug-assertions=%s' %
|
||||||
|
('yes' if debug_assertions else 'no'))
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User msirringhaus@suse.de
|
|
||||||
# Date 1558452126 -7200
|
|
||||||
# Tue May 21 17:22:06 2019 +0200
|
|
||||||
# Node ID a3cc550d25e3a04d906f516928cbcbe50efd585e
|
|
||||||
# Parent 433beec63e6b5f409683af20a0c1ab137cc7bfad
|
|
||||||
[mq]: mozilla-s390-bigendian.patch
|
|
||||||
|
|
||||||
diff -r 433beec63e6b -r a3cc550d25e3 build/autoconf/icu.m4
|
|
||||||
--- a/build/autoconf/icu.m4 Tue May 21 17:12:20 2019 +0200
|
|
||||||
+++ b/build/autoconf/icu.m4 Tue May 21 17:22:06 2019 +0200
|
|
||||||
@@ -78,7 +78,7 @@
|
|
||||||
# TODO: the l is actually endian-dependent
|
|
||||||
# We could make this set as 'l' or 'b' for little or big, respectively,
|
|
||||||
# but we'd need to check in a big-endian version of the file.
|
|
||||||
- ICU_DATA_FILE="icudt${version}l.dat"
|
|
||||||
+ ICU_DATA_FILE="icudt${version}b.dat"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_SUBST(MOZ_ICU_VERSION)
|
|
51
mozilla-s390x-skia-gradient.patch
Normal file
51
mozilla-s390x-skia-gradient.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# Parent acf59ea86dd1d878b43920832093f082dcfc61c0
|
||||||
|
|
||||||
|
diff -r acf59ea86dd1 gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp
|
||||||
|
--- a/gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp Mon Mar 09 08:26:10 2020 +0100
|
||||||
|
+++ b/gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp Fri Mar 27 13:30:28 2020 +0100
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
|
||||||
|
#include "include/core/SkPaint.h"
|
||||||
|
#include "src/shaders/gradients/Sk4fLinearGradient.h"
|
||||||
|
-
|
||||||
|
+#include "src/core/SkEndian.h"
|
||||||
|
#include <cmath>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
@@ -28,6 +28,9 @@
|
||||||
|
|
||||||
|
while (n >= 4) {
|
||||||
|
DstTraits<premul>::store4x(c0, c1, c2, c3, dst, bias0, bias1);
|
||||||
|
+#ifdef SK_CPU_BENDIAN
|
||||||
|
+ SkEndianSwap32s(dst, 4);
|
||||||
|
+#endif
|
||||||
|
dst += 4;
|
||||||
|
|
||||||
|
c0 = c0 + dc4;
|
||||||
|
@@ -37,12 +40,23 @@
|
||||||
|
n -= 4;
|
||||||
|
}
|
||||||
|
if (n & 2) {
|
||||||
|
- DstTraits<premul>::store(c0, dst++, bias0);
|
||||||
|
- DstTraits<premul>::store(c1, dst++, bias1);
|
||||||
|
+ DstTraits<premul>::store(c0, dst, bias0);
|
||||||
|
+#ifdef SK_CPU_BENDIAN
|
||||||
|
+ *dst = SkEndianSwap32(*dst);
|
||||||
|
+#endif
|
||||||
|
+ ++dst;
|
||||||
|
+ DstTraits<premul>::store(c1, dst, bias1);
|
||||||
|
+#ifdef SK_CPU_BENDIAN
|
||||||
|
+ *dst = SkEndianSwap32(*dst);
|
||||||
|
+#endif
|
||||||
|
+ ++dst;
|
||||||
|
c0 = c0 + dc2;
|
||||||
|
}
|
||||||
|
if (n & 1) {
|
||||||
|
DstTraits<premul>::store(c0, dst, bias0);
|
||||||
|
+#ifdef SK_CPU_BENDIAN
|
||||||
|
+ *dst = SkEndianSwap32(*dst);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
16
mozilla-sandbox-fips.patch
Normal file
16
mozilla-sandbox-fips.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
From: meissner@suse.com
|
||||||
|
Subject: allow Firefox to access addtional process information
|
||||||
|
Reference: http://bugzilla.suse.com/show_bug.cgi?id=1167132
|
||||||
|
|
||||||
|
Index: firefox-74.0/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
|
||||||
|
===================================================================
|
||||||
|
--- firefox-74.0.orig/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
|
||||||
|
+++ firefox-74.0/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
|
||||||
|
@@ -276,6 +276,7 @@ SandboxBrokerPolicyFactory::SandboxBroke
|
||||||
|
|
||||||
|
// Read permissions
|
||||||
|
policy->AddPath(rdonly, "/dev/urandom");
|
||||||
|
+ policy->AddPath(rdonly, "/proc/sys/crypto/fips_enabled");
|
||||||
|
policy->AddPath(rdonly, "/proc/cpuinfo");
|
||||||
|
policy->AddPath(rdonly, "/proc/meminfo");
|
||||||
|
policy->AddDir(rdonly, "/sys/devices/cpu");
|
1
spellcheck.js
Normal file
1
spellcheck.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
pref("spellchecker.dictionary_path", "/usr/share/myspell");
|
12
tar_stamps
12
tar_stamps
@ -1,10 +1,10 @@
|
|||||||
PRODUCT="thunderbird"
|
PRODUCT="thunderbird"
|
||||||
CHANNEL="esr68"
|
CHANNEL="esr78"
|
||||||
VERSION="68.12.0"
|
VERSION="78.3.1"
|
||||||
VERSION_SUFFIX=""
|
VERSION_SUFFIX=""
|
||||||
PREV_VERSION="68.11.0"
|
PREV_VERSION="78.3.0"
|
||||||
PREV_VERSION_SUFFIX=""
|
PREV_VERSION_SUFFIX=""
|
||||||
#SKIP_LOCALES="" # Uncomment to skip l10n and compare-locales-generation
|
#SKIP_LOCALES="" # Uncomment to skip l10n and compare-locales-generation
|
||||||
RELEASE_REPO="https://hg.mozilla.org/releases/comm-esr68"
|
RELEASE_REPO="https://hg.mozilla.org/releases/comm-esr78"
|
||||||
RELEASE_TAG="b41cdff70b185358d9c4c1d4a36cfad15a24f001"
|
RELEASE_TAG="00912779d73faef4277c57fe99aa5259b11d244d"
|
||||||
RELEASE_TIMESTAMP="20200820223055"
|
RELEASE_TIMESTAMP="20200925001233"
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:8cf582d03125df86044626072c0d924d4b7c3e984d9228d62acdf4e9918eec02
|
|
||||||
size 331226160
|
|
@ -1,16 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
|
|
||||||
iQIzBAABCgAdFiEECXsxMHeuYqAvhNpN8aZmj7t9Vy4FAl9EFJgACgkQ8aZmj7t9
|
|
||||||
Vy4iKg/8CyGoVX+9ZUYPKgOPwwhn4+mOnCufZ7ZisMVDSjh3jRyhgQ6pmaSsnwYs
|
|
||||||
aCeMjjf+hbA9zafXzQMFUTpQn5q3XvsZQ9StwWK+2U1vFN+MVZy3mtvrKm10E2i/
|
|
||||||
jZRiimjg87z4aa50YgBoE/UMxN6SjR11Kx++skjxNeXRsdjfq2N3b/0KMvahduLQ
|
|
||||||
gmqfdMEJjS5SC/DF7wDGMlWIEz+IO7q/V4F7bJftNe5yYwLa2hvfyXZyCvFGT1uv
|
|
||||||
1QWu5B95/63j+e8QDgHaJ9KQJitPxOIEuqIdj/vQJzIM3EzcH01hirGkG3CGoO2U
|
|
||||||
pujprKASdp9Gvd8Hsjr8JOkp49mdzTb2/HiRa34Ubju3w4LB3r9ntOTVYZmU8bat
|
|
||||||
GN84Ks3Ts+NXT6D0MZ36YSiJ64NU5N6jeSPOEXUAwTMlURmumWu1YNAJv+q5n1X+
|
|
||||||
XoElCG7pvad3J/9Q06RCST/6sGF7NtNXtTmH9ubhmsu4cE/7eWdBEs9u0j8nRL7L
|
|
||||||
5A9m+1Pw6nG5cktTb0VQyDgc9/BmebPlCrcicV9MBbE+NNNQSR3W3iaCLrDaBLXO
|
|
||||||
NG0GQrnDjjyscI+w+elkhmkl0X5qnOfuVkzzsQgmdfgFStS0D2HL8lpBbgyPhNSr
|
|
||||||
zoaiL2PcdCul7JwX0o0OQQvw6+nrkee+aBRU+onKKAdHAdIH2no=
|
|
||||||
=lUe0
|
|
||||||
-----END PGP SIGNATURE-----
|
|
3
thunderbird-78.3.1.source.tar.xz
Normal file
3
thunderbird-78.3.1.source.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4ea61f59a819f5a8a4574b0735952e23b4c86387b8da24906129c45e71bf2718
|
||||||
|
size 353920472
|
16
thunderbird-78.3.1.source.tar.xz.asc
Normal file
16
thunderbird-78.3.1.source.tar.xz.asc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iQIzBAABCgAdFiEECXsxMHeuYqAvhNpN8aZmj7t9Vy4FAl9tXX0ACgkQ8aZmj7t9
|
||||||
|
Vy6s0g/8CmgQtLeuA18WjZtV7yXMueTEYHVaqAVAKQz99aMUuvOc59GuZhPd8AIC
|
||||||
|
uaEv8tHSMJsphaIH1zR91c2fmBQitV00qr0Dn0TgV6BGhSXFecRlRR5c1syq+6wG
|
||||||
|
h4+9AzHVv9uqmXsfuTtChYOyyKv4BQOxT+zdkh4nioYQOUsFH7WvNA0pYW6Wj17O
|
||||||
|
6/u50boaLoXvN/RceJJ6oZ/PFa61MuYNSbakugzxCEKuuH0vAGjG/jwhBXvnhFY8
|
||||||
|
y7Rv6XbL46STARV008uqUVHzfxOSFFJmQHx27iO1iDJWAfvQ5GFTKh/3K05egIGY
|
||||||
|
Xgib6nkacCd3Fo6nzkLiNL48KoyAAseS1t+JxxsG3Ixf4OjyEhb+X5o8JWGJ1Ojk
|
||||||
|
poe916mbig9rXMBOM/txNrwGCPsNhz7gTInF9P6B5LmEacNgEOX2hr6+vBLox4Ne
|
||||||
|
vvnOJr5ucltKP4lFItMugQ9y6UG78yPsXZ6MUUbxddR6S4nZ++bOBUqkzxqPZcPH
|
||||||
|
UqOqx+cBf4YBuud0hnSqnpwRKpE4vUCCM7NRphZxo2MAa04U6NPZ/ZWkUwkPYCZ7
|
||||||
|
h/Up0Cn/wUkP7wJGFQIBn/e2wDj9i3I+MRqyMtAdb/Cs9vL5XIxR70hjiyFdJS//
|
||||||
|
36wryx5ogReHaMp5YL5hvRsWi6fStal82ff6ttLADRZXMfEsOM0=
|
||||||
|
=XToC
|
||||||
|
-----END PGP SIGNATURE-----
|
Loading…
Reference in New Issue
Block a user