Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (4685575402e2919e93faf95e97c773c9ec1f4b09)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (4685575402e2919e93faf95e97c773c9ec1f4b09)
  • Date: Tue, 17 Jan 2023 23:14:45 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

http/firefox/DEPENDS
| 2
http/firefox/DETAILS
| 4
http/firefox/HISTORY
| 5
http/firefox/patches/0018-Fix-building-with-PGO-when-using-GCC.patch
| 84 ---

http/firefox/patches/0018-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
| 28 +
http/firefox/patches/0019-build-Disable-Werror.patch
| 24

http/firefox/patches/0019-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
| 28 -

http/firefox/patches/0020-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
| 34 +
http/firefox/patches/0020-build-Disable-Werror.patch
| 24

http/firefox/patches/0021-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
| 23

http/firefox/patches/0021-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
| 34 -

http/firefox/patches/0022-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
| 23

http/firefox/patches/0022-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
| 96 +++

http/firefox/patches/0023-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
| 37 +

http/firefox/patches/0023-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
| 96 ---
http/firefox/patches/0024-bgo-816975-fix-build-on-x86.patch
| 16

http/firefox/patches/0024-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
| 37 -
http/firefox/patches/0025-bgo-816975-fix-build-on-x86.patch
| 16
http/firefox/patches/0025-bmo-1559213-fix-system-av1-libs.patch
| 23
http/firefox/patches/0026-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 13
http/firefox/patches/0026-bmo-1559213-fix-system-av1-libs.patch
| 23
http/firefox/patches/0027-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
| 13
http/firefox/patches/0027-bmo-1754469-memory_mozalloc_throw.patch
| 69 ++
http/firefox/patches/0028-bmo-1754469-memory_mozalloc_throw.patch
| 69 --
http/firefox/patches/0028-rhbz-2115253-vaapi-fixes.patch
| 20
http/firefox/patches/0029-bgo-860033-firefox-wayland-no-dbus.patch
| 49 +
http/firefox/patches/0029-rhbz-2115253-vaapi-fixes.patch
| 20
http/firefox/patches/0030-bgo-860033-firefox-wayland-no-dbus.patch
| 49 -
http/firefox/patches/0030-bmo-1775202-ppc64-webrtc-missing-conditions.patch
| 17
http/firefox/patches/0031-bmo-1775202-ppc64-webrtc-missing-conditions.patch
| 17
http/firefox/patches/0031-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
| 55 ++
http/firefox/patches/0032-fix-building-gcc-pgo.patch
| 50 +
http/firefox/patches/0032-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
| 55 --
http/firefox/patches/0033-bmo-1787405-fix-offsets-for-row_neon-on-arm.patch
| 22
http/firefox/patches/0034-bgo-877267-rust-opaque-binding-type.patch
| 253 ----------

http/firefox/patches/0035-bmo-1805371-avoid-building-and-running-FaultyServer-tests-with-system-NSS.patch
| 25
36 files changed, 562 insertions(+), 891 deletions(-)

New commits:
commit 4685575402e2919e93faf95e97c773c9ec1f4b09
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

http/firefox: version 109.0, SECURITY_PATCH++

diff --git a/http/firefox/DEPENDS b/http/firefox/DEPENDS
index 01e85b3..f4af6dc 100755
--- a/http/firefox/DEPENDS
+++ b/http/firefox/DEPENDS
@@ -40,7 +40,7 @@ depends libwebp "--with-system-webp"
&&

depends nspr "--with-system-nspr" &&

-local NSS_BRANCH="3.85" &&
+local NSS_BRANCH="3.86" &&
if spell_ok nss &&
is_version_less "$(installed_version nss)" "${NSS_BRANCH}"; then
depends -sub "${NSS_BRANCH}" nss "--with-system-nss"
diff --git a/http/firefox/DETAILS b/http/firefox/DETAILS
index 300b866..923bc96 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,6 +1,6 @@
SPELL=firefox
- VERSION=108.0.2
- SECURITY_PATCH=171
+ VERSION=109.0
+ SECURITY_PATCH=172
SOURCE="${SPELL}-${VERSION}.source.tar.xz"

SOURCE_URL[0]="http://releases.mozilla.org/pub/${SPELL}/releases/${VERSION}/source/${SOURCE}";
SOURCE2="${SOURCE}.asc"
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index 3e984a7..f4e388e 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,8 @@
+2023-01-17 Pavel Vinpgradov <public AT sourcemage.org>
+ * DETAILS: version 109.0, SECURITY_PATCH++
+ * DEPENDS: nss >= 3.86
+ * patches/*: updated
+
2023-01-05 Pavel Vinpgradov <public AT sourcemage.org>
* DETAILS: version 108.0.2
* patches/*: updated
diff --git
a/http/firefox/patches/0018-Fix-building-with-PGO-when-using-GCC.patch
b/http/firefox/patches/0018-Fix-building-with-PGO-when-using-GCC.patch
deleted file mode 100644
index 81de54b..0000000
--- a/http/firefox/patches/0018-Fix-building-with-PGO-when-using-GCC.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 98e1e605c8fdf7b021d6f1888ce6baed5c1097b5 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Thu, 2 Jul 2020 18:05:03 +0200
-Subject: [PATCH 22/30] Fix building with PGO when using GCC
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- build/moz.configure/lto-pgo.configure | 5 +++--
- build/pgo/profileserver.py | 26 ++++++++++++++++++++++----
- 2 files changed, 25 insertions(+), 6 deletions(-)
-
-diff --git a/build/moz.configure/lto-pgo.configure
b/build/moz.configure/lto-pgo.configure
-index 567ccf0ba4..c6470ef829 100644
---- a/build/moz.configure/lto-pgo.configure
-+++ b/build/moz.configure/lto-pgo.configure
-@@ -83,11 +83,12 @@ set_config("PGO_PROFILE_PATH", pgo_profile_path)
- @imports("multiprocessing")
- def pgo_flags(compiler, profdata, target_is_windows):
- if compiler.type == "gcc":
-+ profile_use = "-fprofile-use"
- return namespace(
- gen_cflags=["-fprofile-generate",
"-DMOZ_PROFILE_INSTRUMENTATION"],
- gen_ldflags=["-fprofile-generate"],
-- use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wcoverage-mismatch"],
-- use_ldflags=["-fprofile-use"],
-+ use_cflags=[profile_use, "-fprofile-correction",
"-Wcoverage-mismatch"],
-+ use_ldflags=[profile_use],
- )
-
- if compiler.type in ("clang-cl", "clang"):
-diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
-index 7f3de106ab..89289a7756 100755
---- a/build/pgo/profileserver.py
-+++ b/build/pgo/profileserver.py
-@@ -11,7 +11,7 @@ import glob
- import subprocess
-
- import mozcrash
--from mozbuild.base import MozbuildObject, BinaryNotFoundException
-+from mozbuild.base import MozbuildObject, BinaryNotFoundException,
BuildEnvironmentNotFoundException
- from mozfile import TemporaryDirectory
- from mozhttpd import MozHttpd
- from mozprofile import FirefoxProfile, Preferences
-@@ -87,9 +87,22 @@ if __name__ == "__main__":
- locations = ServerLocations()
- locations.add_host(host="127.0.0.1", port=PORT,
options="primary,privileged")
-
-- old_profraw_files = glob.glob("*.profraw")
-- for f in old_profraw_files:
-- os.remove(f)
-+ using_gcc = False
-+ try:
-+ if build.config_environment.substs.get("CC_TYPE") == "gcc":
-+ using_gcc = True
-+ except BuildEnvironmentNotFoundException:
-+ pass
-+
-+ if using_gcc:
-+ for dirpath, _, filenames in os.walk("."):
-+ for f in filenames:
-+ if f.endswith(".gcda"):
-+ os.remove(os.path.join(dirpath, f))
-+ else:
-+ old_profraw_files = glob.glob("*.profraw")
-+ for f in old_profraw_files:
-+ os.remove(f)
-
- with TemporaryDirectory() as profilePath:
- # TODO: refactor this into mozprofile
-@@ -212,6 +225,11 @@ if __name__ == "__main__":
- print("Firefox exited successfully, but produced a crashreport")
- sys.exit(1)
-
-+ if using_gcc:
-+ print("Copying profile data...")
-+ os.system("pwd");
-+ os.system('tar cf profdata.tar.gz `find . -name "*.gcda"`; cd
..; tar xf instrumented/profdata.tar.gz;');
-+
- llvm_profdata = env.get("LLVM_PROFDATA")
- if llvm_profdata:
- profraw_files = glob.glob("*.profraw")
---
-2.34.1
-
diff --git
a/http/firefox/patches/0018-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch

b/http/firefox/patches/0018-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
new file mode 100644
index 0000000..85c305f
--- /dev/null
+++
b/http/firefox/patches/0018-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
@@ -0,0 +1,28 @@
+From 6e220b49aee7dbdcafd255f6260517c5c551f9b1 Mon Sep 17 00:00:00 2001
+From: Mike Hommey <mh AT glandium.org>
+Date: Mon, 26 Nov 2018 09:59:56 +0900
+Subject: [PATCH 23/30] libaom: Use NEON_FLAGS instead of VPX_ASFLAGS for
+ libaom neon code
+
+Bug: https://bugs.gentoo.org/730606
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ media/libaom/moz.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/media/libaom/moz.build b/media/libaom/moz.build
+index fd8c7f2b33..db3f9ca6ec 100644
+--- a/media/libaom/moz.build
++++ b/media/libaom/moz.build
+@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
+
+ for f in SOURCES:
+ if f.endswith('neon.c'):
+- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
++ SOURCES[f].flags += CONFIG['NEON_FLAGS']
+
+ if CONFIG['OS_TARGET'] == 'Android':
+ # For cpu-features.h
+--
+2.34.1
+
diff --git a/http/firefox/patches/0019-build-Disable-Werror.patch
b/http/firefox/patches/0019-build-Disable-Werror.patch
new file mode 100644
index 0000000..e1df117
--- /dev/null
+++ b/http/firefox/patches/0019-build-Disable-Werror.patch
@@ -0,0 +1,24 @@
+diff -Naur a/build/moz.configure/warnings.configure
b/build/moz.configure/warnings.configure
+--- a/build/moz.configure/warnings.configure 2022-10-10 19:05:25.000000000
+0300
++++ b/build/moz.configure/warnings.configure 2022-10-18 13:59:24.514026407
+0300
+@@ -160,6 +160,9 @@
+ # false positives depending on optimization
+ check_and_add_warning("-Wno-error=array-bounds")
+
++# can't get rid of those PGO warnings
++check_and_add_warning("-Wno-error=coverage-mismatch")
++
+ # false positives depending on optimizations
+ check_and_add_warning("-Wno-error=free-nonheap-object")
+
+@@ -279,8 +282,8 @@
+ # build, but we're not sure why.
+ check_and_add_warning("-Wno-enum-compare")
+
+-# Make it an error to be missing function declarations for C code.
+-check_and_add_warning("-Werror=implicit-function-declaration", c_compiler)
++check_and_add_warning("-Werror=implicit-function-declaration",
++ when="--enable-warnings-as-errors")
+
+ # New in clang 11. We can't really do anything about this warning.
+ check_and_add_warning("-Wno-psabi")
diff --git
a/http/firefox/patches/0019-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch

b/http/firefox/patches/0019-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
deleted file mode 100644
index 85c305f..0000000
---
a/http/firefox/patches/0019-libaom-Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-lib.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6e220b49aee7dbdcafd255f6260517c5c551f9b1 Mon Sep 17 00:00:00 2001
-From: Mike Hommey <mh AT glandium.org>
-Date: Mon, 26 Nov 2018 09:59:56 +0900
-Subject: [PATCH 23/30] libaom: Use NEON_FLAGS instead of VPX_ASFLAGS for
- libaom neon code
-
-Bug: https://bugs.gentoo.org/730606
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- media/libaom/moz.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/media/libaom/moz.build b/media/libaom/moz.build
-index fd8c7f2b33..db3f9ca6ec 100644
---- a/media/libaom/moz.build
-+++ b/media/libaom/moz.build
-@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
-
- for f in SOURCES:
- if f.endswith('neon.c'):
-- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
-+ SOURCES[f].flags += CONFIG['NEON_FLAGS']
-
- if CONFIG['OS_TARGET'] == 'Android':
- # For cpu-features.h
---
-2.34.1
-
diff --git
a/http/firefox/patches/0020-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0020-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
new file mode 100644
index 0000000..32bd0eb
--- /dev/null
+++
b/http/firefox/patches/0020-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
@@ -0,0 +1,34 @@
+From 685e82ac82921720c6cd9c6c45703ff034f081e7 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Sat, 29 Aug 2020 22:30:59 +0200
+Subject: [PATCH 25/30] LTO: Only enable LTO for Rust when complete build uses
+ LTO
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ config/makefiles/rust.mk | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
+index 75570d32b9..924722a506 100644
+--- a/config/makefiles/rust.mk
++++ b/config/makefiles/rust.mk
+@@ -87,6 +87,7 @@ endif
+ # These flags are passed via `cargo rustc` and only apply to the final rustc
+ # invocation (i.e., only the top-level crate, not its dependencies).
+ cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
++ifdef MOZ_LTO
+ ifndef DEVELOPER_OPTIONS
+ ifndef MOZ_DEBUG_RUST
+ # Enable link-time optimization for release builds, but not when linking
+@@ -106,6 +107,7 @@ endif
+ endif
+ endif
+ endif
++endif
+
+ ifdef CARGO_INCREMENTAL
+ export CARGO_INCREMENTAL
+--
+2.34.1
+
diff --git a/http/firefox/patches/0020-build-Disable-Werror.patch
b/http/firefox/patches/0020-build-Disable-Werror.patch
deleted file mode 100644
index e1df117..0000000
--- a/http/firefox/patches/0020-build-Disable-Werror.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Naur a/build/moz.configure/warnings.configure
b/build/moz.configure/warnings.configure
---- a/build/moz.configure/warnings.configure 2022-10-10 19:05:25.000000000
+0300
-+++ b/build/moz.configure/warnings.configure 2022-10-18 13:59:24.514026407
+0300
-@@ -160,6 +160,9 @@
- # false positives depending on optimization
- check_and_add_warning("-Wno-error=array-bounds")
-
-+# can't get rid of those PGO warnings
-+check_and_add_warning("-Wno-error=coverage-mismatch")
-+
- # false positives depending on optimizations
- check_and_add_warning("-Wno-error=free-nonheap-object")
-
-@@ -279,8 +282,8 @@
- # build, but we're not sure why.
- check_and_add_warning("-Wno-enum-compare")
-
--# Make it an error to be missing function declarations for C code.
--check_and_add_warning("-Werror=implicit-function-declaration", c_compiler)
-+check_and_add_warning("-Werror=implicit-function-declaration",
-+ when="--enable-warnings-as-errors")
-
- # New in clang 11. We can't really do anything about this warning.
- check_and_add_warning("-Wno-psabi")
diff --git
a/http/firefox/patches/0021-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch

b/http/firefox/patches/0021-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
new file mode 100644
index 0000000..5e48dd2
--- /dev/null
+++
b/http/firefox/patches/0021-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
@@ -0,0 +1,23 @@
+Enable FLAC on platforms without ffvpx like powerpc*
+
+--- a/dom/media/flac/FlacDecoder.cpp
++++ b/dom/media/flac/FlacDecoder.cpp
+@@ -7,6 +7,7 @@
+ #include "FlacDecoder.h"
+ #include "MediaContainerType.h"
+ #include "mozilla/StaticPrefs_media.h"
++#include "PDMFactory.h"
+
+ namespace mozilla {
+
+@@ -14,6 +15,10 @@ namespace mozilla {
+ bool FlacDecoder::IsEnabled() {
+ #ifdef MOZ_FFVPX
+ return StaticPrefs::media_flac_enabled();
++#elif defined(MOZ_FFMPEG)
++ RefPtr<PDMFactory> platform = new PDMFactory();
++ return StaticPrefs::media_flac_enabled() &&
++ (platform->SupportsMimeType("audio/flac"_ns) !=
media::DecodeSupport::Unsupported);
+ #else
+ return false;
+ #endif
diff --git
a/http/firefox/patches/0021-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch

b/http/firefox/patches/0021-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
deleted file mode 100644
index 32bd0eb..0000000
---
a/http/firefox/patches/0021-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 685e82ac82921720c6cd9c6c45703ff034f081e7 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Sat, 29 Aug 2020 22:30:59 +0200
-Subject: [PATCH 25/30] LTO: Only enable LTO for Rust when complete build uses
- LTO
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- config/makefiles/rust.mk | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
-index 75570d32b9..924722a506 100644
---- a/config/makefiles/rust.mk
-+++ b/config/makefiles/rust.mk
-@@ -87,6 +87,7 @@ endif
- # These flags are passed via `cargo rustc` and only apply to the final rustc
- # invocation (i.e., only the top-level crate, not its dependencies).
- cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
-+ifdef MOZ_LTO
- ifndef DEVELOPER_OPTIONS
- ifndef MOZ_DEBUG_RUST
- # Enable link-time optimization for release builds, but not when linking
-@@ -106,6 +107,7 @@ endif
- endif
- endif
- endif
-+endif
-
- ifdef CARGO_INCREMENTAL
- export CARGO_INCREMENTAL
---
-2.34.1
-
diff --git
a/http/firefox/patches/0022-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch

b/http/firefox/patches/0022-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
deleted file mode 100644
index 5e48dd2..0000000
---
a/http/firefox/patches/0022-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Enable FLAC on platforms without ffvpx like powerpc*
-
---- a/dom/media/flac/FlacDecoder.cpp
-+++ b/dom/media/flac/FlacDecoder.cpp
-@@ -7,6 +7,7 @@
- #include "FlacDecoder.h"
- #include "MediaContainerType.h"
- #include "mozilla/StaticPrefs_media.h"
-+#include "PDMFactory.h"
-
- namespace mozilla {
-
-@@ -14,6 +15,10 @@ namespace mozilla {
- bool FlacDecoder::IsEnabled() {
- #ifdef MOZ_FFVPX
- return StaticPrefs::media_flac_enabled();
-+#elif defined(MOZ_FFMPEG)
-+ RefPtr<PDMFactory> platform = new PDMFactory();
-+ return StaticPrefs::media_flac_enabled() &&
-+ (platform->SupportsMimeType("audio/flac"_ns) !=
media::DecodeSupport::Unsupported);
- #else
- return false;
- #endif
diff --git
a/http/firefox/patches/0022-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch

b/http/firefox/patches/0022-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
new file mode 100644
index 0000000..856361d
--- /dev/null
+++
b/http/firefox/patches/0022-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
@@ -0,0 +1,96 @@
+From 0b53fcfa8ee76ccc2d77abb947810f631efaecd9 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi AT gentoo.org>
+Date: Fri, 11 Dec 2020 15:37:38 +0100
+Subject: [PATCH 29/30] bmo#1670333: OpenH264: Fix decoding if it starts on
non
+ IDR I-frame
+
+Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
+---
+ dom/media/mp4/MP4Demuxer.cpp | 8 ++++++++
+ dom/media/platforms/PDMFactory.cpp | 15 ++++++++++-----
+ dom/media/platforms/PDMFactory.h | 2 ++
+ 3 files changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/dom/media/mp4/MP4Demuxer.cpp b/dom/media/mp4/MP4Demuxer.cpp
+index 59bba16577..0304e3e89f 100644
+--- a/dom/media/mp4/MP4Demuxer.cpp
++++ b/dom/media/mp4/MP4Demuxer.cpp
+@@ -31,6 +31,8 @@ mozilla::LogModule* GetDemuxerLog() { return
gMediaDemuxerLog; }
+ DDMOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, "::%s: " arg, \
+ __func__, ##__VA_ARGS__)
+
++extern bool gUseKeyframeFromContainer;
++
+ namespace mozilla {
+
+ DDLoggedTypeDeclNameAndBase(MP4TrackDemuxer, MediaTrackDemuxer);
+@@ -394,6 +396,12 @@ already_AddRefed<MediaRawData>
MP4TrackDemuxer::GetNextSample() {
+ [[fallthrough]];
+ case H264::FrameType::OTHER: {
+ bool keyframe = type == H264::FrameType::I_FRAME;
++ if (gUseKeyframeFromContainer) {
++ if (sample->mKeyframe && sample->mKeyframe != keyframe) {
++ sample->mKeyframe = keyframe;
++ }
++ break;
++ }
+ if (sample->mKeyframe != keyframe) {
+ NS_WARNING(nsPrintfCString("Frame incorrectly marked as
%skeyframe "
+ "@ pts:%" PRId64 " dur:%" PRId64
+diff --git a/dom/media/platforms/PDMFactory.cpp
b/dom/media/platforms/PDMFactory.cpp
+index 4e377082ae..e778eb9948 100644
+--- a/dom/media/platforms/PDMFactory.cpp
++++ b/dom/media/platforms/PDMFactory.cpp
+@@ -58,6 +58,8 @@
+
+ #include <functional>
+
++bool gUseKeyframeFromContainer = false;
++
+ namespace mozilla {
+
+ #define PDM_INIT_LOG(msg, ...) \
+@@ -536,10 +538,12 @@ void PDMFactory::CreateContentPDMs() {
+ }
+ #endif
+ #ifdef MOZ_FFMPEG
+- if (StaticPrefs::media_ffmpeg_enabled() &&
+- !CreateAndStartupPDM<FFmpegRuntimeLinker>()) {
+- mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
+- FFmpegRuntimeLinker::LinkStatusCode());
++ if (StaticPrefs::media_ffmpeg_enabled()) {
++ mFFmpegUsed = CreateAndStartupPDM<FFmpegRuntimeLinker>();
++ if (!mFFmpegUsed) {
++ mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
++ FFmpegRuntimeLinker::LinkStatusCode());
++ }
+ }
+ #endif
+ #ifdef MOZ_FFVPX
+@@ -556,8 +560,9 @@ void PDMFactory::CreateContentPDMs() {
+
+ CreateAndStartupPDM<AgnosticDecoderModule>();
+
+- if (StaticPrefs::media_gmp_decoder_enabled() &&
++ if (StaticPrefs::media_gmp_decoder_enabled() && !mFFmpegUsed &&
+ !CreateAndStartupPDM<GMPDecoderModule>()) {
++ gUseKeyframeFromContainer = true;
+ mFailureFlags += DecoderDoctorDiagnostics::Flags::GMPPDMFailedToStartup;
+ }
+ }
+diff --git a/dom/media/platforms/PDMFactory.h
b/dom/media/platforms/PDMFactory.h
+index 4fc81c0b37..72f3255b6f 100644
+--- a/dom/media/platforms/PDMFactory.h
++++ b/dom/media/platforms/PDMFactory.h
+@@ -122,6 +122,8 @@ class PDMFactory final {
+
+ DecoderDoctorDiagnostics::FlagsSet mFailureFlags;
+
++ bool mFFmpegUsed = false;
++
+ friend class RemoteVideoDecoderParent;
+ static void EnsureInit();
+ };
+--
+2.34.1
+
diff --git
a/http/firefox/patches/0023-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch

b/http/firefox/patches/0023-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
new file mode 100644
index 0000000..4cc43ea
--- /dev/null
+++
b/http/firefox/patches/0023-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
@@ -0,0 +1,37 @@
+diff -up firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844
firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h
+--- firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844
2022-06-08 23:06:36.000000000 +0200
++++ firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h 2022-06-09
17:17:04.775008085 +0200
+@@ -27,7 +27,7 @@ class GMPSharedMem {
+ // returned to the parent pool (which is not included). If more than
+ // this are needed, we presume the client has either crashed or hung
+ // (perhaps temporarily).
+- static const uint32_t kGMPBufLimit = 20;
++ static const uint32_t kGMPBufLimit = 40;
+
+ GMPSharedMem() {
+ for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]);
+diff -up
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
+---
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844
2022-06-08 16:10:21.000000000 +0200
++++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
2022-06-09 20:31:25.120035588 +0200
+@@ -84,6 +84,9 @@ media::DecodeSupportSet GMPDecoderModule
+
+ media::DecodeSupportSet GMPDecoderModule::SupportsMimeType(
+ const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics)
const {
++ if (MP4Decoder::IsH264(aMimeType)) {
++ return media::DecodeSupport::SoftwareDecode;
++ }
+ return media::DecodeSupport::Unsupported;
+ }
+
+diff -up
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
+---
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844
2022-06-08 16:10:21.000000000 +0200
++++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
2022-06-09 17:17:04.776008117 +0200
+@@ -70,6 +70,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4
+ RefPtr<GMPVideoDecoder> self = this;
+ if (v) {
+ mDecodedData.AppendElement(std::move(v));
++ mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__);
++ mDecodedData = DecodedData();
+ } else {
+ mDecodedData.Clear();
+ mDecodePromise.RejectIfExists(
diff --git
a/http/firefox/patches/0023-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch

b/http/firefox/patches/0023-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
deleted file mode 100644
index 856361d..0000000
---
a/http/firefox/patches/0023-bmo-1670333-OpenH264-Fix-decoding-if-it-starts-on-no.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 0b53fcfa8ee76ccc2d77abb947810f631efaecd9 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi AT gentoo.org>
-Date: Fri, 11 Dec 2020 15:37:38 +0100
-Subject: [PATCH 29/30] bmo#1670333: OpenH264: Fix decoding if it starts on
non
- IDR I-frame
-
-Signed-off-by: Thomas Deutschmann <whissi AT gentoo.org>
----
- dom/media/mp4/MP4Demuxer.cpp | 8 ++++++++
- dom/media/platforms/PDMFactory.cpp | 15 ++++++++++-----
- dom/media/platforms/PDMFactory.h | 2 ++
- 3 files changed, 20 insertions(+), 5 deletions(-)
-
-diff --git a/dom/media/mp4/MP4Demuxer.cpp b/dom/media/mp4/MP4Demuxer.cpp
-index 59bba16577..0304e3e89f 100644
---- a/dom/media/mp4/MP4Demuxer.cpp
-+++ b/dom/media/mp4/MP4Demuxer.cpp
-@@ -31,6 +31,8 @@ mozilla::LogModule* GetDemuxerLog() { return
gMediaDemuxerLog; }
- DDMOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, "::%s: " arg, \
- __func__, ##__VA_ARGS__)
-
-+extern bool gUseKeyframeFromContainer;
-+
- namespace mozilla {
-
- DDLoggedTypeDeclNameAndBase(MP4TrackDemuxer, MediaTrackDemuxer);
-@@ -394,6 +396,12 @@ already_AddRefed<MediaRawData>
MP4TrackDemuxer::GetNextSample() {
- [[fallthrough]];
- case H264::FrameType::OTHER: {
- bool keyframe = type == H264::FrameType::I_FRAME;
-+ if (gUseKeyframeFromContainer) {
-+ if (sample->mKeyframe && sample->mKeyframe != keyframe) {
-+ sample->mKeyframe = keyframe;
-+ }
-+ break;
-+ }
- if (sample->mKeyframe != keyframe) {
- NS_WARNING(nsPrintfCString("Frame incorrectly marked as
%skeyframe "
- "@ pts:%" PRId64 " dur:%" PRId64
-diff --git a/dom/media/platforms/PDMFactory.cpp
b/dom/media/platforms/PDMFactory.cpp
-index 4e377082ae..e778eb9948 100644
---- a/dom/media/platforms/PDMFactory.cpp
-+++ b/dom/media/platforms/PDMFactory.cpp
-@@ -58,6 +58,8 @@
-
- #include <functional>
-
-+bool gUseKeyframeFromContainer = false;
-+
- namespace mozilla {
-
- #define PDM_INIT_LOG(msg, ...) \
-@@ -536,10 +538,12 @@ void PDMFactory::CreateContentPDMs() {
- }
- #endif
- #ifdef MOZ_FFMPEG
-- if (StaticPrefs::media_ffmpeg_enabled() &&
-- !CreateAndStartupPDM<FFmpegRuntimeLinker>()) {
-- mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
-- FFmpegRuntimeLinker::LinkStatusCode());
-+ if (StaticPrefs::media_ffmpeg_enabled()) {
-+ mFFmpegUsed = CreateAndStartupPDM<FFmpegRuntimeLinker>();
-+ if (!mFFmpegUsed) {
-+ mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
-+ FFmpegRuntimeLinker::LinkStatusCode());
-+ }
- }
- #endif
- #ifdef MOZ_FFVPX
-@@ -556,8 +560,9 @@ void PDMFactory::CreateContentPDMs() {
-
- CreateAndStartupPDM<AgnosticDecoderModule>();
-
-- if (StaticPrefs::media_gmp_decoder_enabled() &&
-+ if (StaticPrefs::media_gmp_decoder_enabled() && !mFFmpegUsed &&
- !CreateAndStartupPDM<GMPDecoderModule>()) {
-+ gUseKeyframeFromContainer = true;
- mFailureFlags += DecoderDoctorDiagnostics::Flags::GMPPDMFailedToStartup;
- }
- }
-diff --git a/dom/media/platforms/PDMFactory.h
b/dom/media/platforms/PDMFactory.h
-index 4fc81c0b37..72f3255b6f 100644
---- a/dom/media/platforms/PDMFactory.h
-+++ b/dom/media/platforms/PDMFactory.h
-@@ -122,6 +122,8 @@ class PDMFactory final {
-
- DecoderDoctorDiagnostics::FlagsSet mFailureFlags;
-
-+ bool mFFmpegUsed = false;
-+
- friend class RemoteVideoDecoderParent;
- static void EnsureInit();
- };
---
-2.34.1
-
diff --git a/http/firefox/patches/0024-bgo-816975-fix-build-on-x86.patch
b/http/firefox/patches/0024-bgo-816975-fix-build-on-x86.patch
new file mode 100644
index 0000000..4b2289f
--- /dev/null
+++ b/http/firefox/patches/0024-bgo-816975-fix-build-on-x86.patch
@@ -0,0 +1,16 @@
+diff --git a/modules/fdlibm/src/math_private.h
b/modules/fdlibm/src/math_private.h
+index 51d79f9c2ec59..fafd7d6fc1e0d 100644
+--- a/modules/fdlibm/src/math_private.h
++++ b/modules/fdlibm/src/math_private.h
+@@ -30,7 +30,11 @@
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
++#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
++typedef long double __double_t;
++#else
+ typedef double __double_t;
++#endif
+ typedef __double_t double_t;
+
+ /*
diff --git
a/http/firefox/patches/0024-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch

b/http/firefox/patches/0024-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
deleted file mode 100644
index 4cc43ea..0000000
---
a/http/firefox/patches/0024-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -up firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844
firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h
---- firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844
2022-06-08 23:06:36.000000000 +0200
-+++ firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h 2022-06-09
17:17:04.775008085 +0200
-@@ -27,7 +27,7 @@ class GMPSharedMem {
- // returned to the parent pool (which is not included). If more than
- // this are needed, we presume the client has either crashed or hung
- // (perhaps temporarily).
-- static const uint32_t kGMPBufLimit = 20;
-+ static const uint32_t kGMPBufLimit = 40;
-
- GMPSharedMem() {
- for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]);
-diff -up
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
----
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844
2022-06-08 16:10:21.000000000 +0200
-+++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
2022-06-09 20:31:25.120035588 +0200
-@@ -84,6 +84,9 @@ media::DecodeSupportSet GMPDecoderModule
-
- media::DecodeSupportSet GMPDecoderModule::SupportsMimeType(
- const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics)
const {
-+ if (MP4Decoder::IsH264(aMimeType)) {
-+ return media::DecodeSupport::SoftwareDecode;
-+ }
- return media::DecodeSupport::Unsupported;
- }
-
-diff -up
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
----
firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844
2022-06-08 16:10:21.000000000 +0200
-+++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
2022-06-09 17:17:04.776008117 +0200
-@@ -70,6 +70,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4
- RefPtr<GMPVideoDecoder> self = this;
- if (v) {
- mDecodedData.AppendElement(std::move(v));
-+ mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__);
-+ mDecodedData = DecodedData();
- } else {
- mDecodedData.Clear();
- mDecodePromise.RejectIfExists(
diff --git a/http/firefox/patches/0025-bgo-816975-fix-build-on-x86.patch
b/http/firefox/patches/0025-bgo-816975-fix-build-on-x86.patch
deleted file mode 100644
index 4b2289f..0000000
--- a/http/firefox/patches/0025-bgo-816975-fix-build-on-x86.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/modules/fdlibm/src/math_private.h
b/modules/fdlibm/src/math_private.h
-index 51d79f9c2ec59..fafd7d6fc1e0d 100644
---- a/modules/fdlibm/src/math_private.h
-+++ b/modules/fdlibm/src/math_private.h
-@@ -30,7 +30,11 @@
- * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
- */
-
-+#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
-+typedef long double __double_t;
-+#else
- typedef double __double_t;
-+#endif
- typedef __double_t double_t;
-
- /*
diff --git a/http/firefox/patches/0025-bmo-1559213-fix-system-av1-libs.patch
b/http/firefox/patches/0025-bmo-1559213-fix-system-av1-libs.patch
new file mode 100644
index 0000000..361c0b6
--- /dev/null
+++ b/http/firefox/patches/0025-bmo-1559213-fix-system-av1-libs.patch
@@ -0,0 +1,23 @@
+diff --git a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
+index 0069865..e806fc8 100644
+--- a/media/ffvpx/libavcodec/moz.build
++++ b/media/ffvpx/libavcodec/moz.build
+@@ -108,10 +108,14 @@
+ 'vp9prob.c',
+ 'vp9recon.c'
+ ]
+- USE_LIBS += [
+- 'dav1d',
+- 'media_libdav1d_asm',
+- ]
++ if CONFIG["MOZ_SYSTEM_AV1"]:
++ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
++ else:
++ USE_LIBS += [
++ 'dav1d',
++ 'media_libdav1d_asm',
++ ]
+ if CONFIG['MOZ_WAYLAND']:
+ LOCAL_INCLUDES += ['/media/mozva']
+ SOURCES += [
diff --git
a/http/firefox/patches/0026-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0026-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
new file mode 100644
index 0000000..864741e
--- /dev/null
+++ b/http/firefox/patches/0026-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
@@ -0,0 +1,13 @@
+diff -up firefox-100.0/widget/gtk/nsWindow.cpp.1196777
firefox-100.0/widget/gtk/nsWindow.cpp
+--- firefox-100.0/widget/gtk/nsWindow.cpp.1196777 2022-05-02
11:29:06.763325015 +0200
++++ firefox-100.0/widget/gtk/nsWindow.cpp 2022-05-02 11:30:49.100717334
+0200
+@@ -163,7 +163,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTUR
+ GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
+ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
+ GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK |
GDK_SCROLL_MASK |
+- GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK;
++ GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK |
++ GDK_FOCUS_CHANGE_MASK;
+
+ /* utility functions */
+ static bool is_mouse_in_window(GdkWindow* aWindow, gdouble aMouseX,
diff --git a/http/firefox/patches/0026-bmo-1559213-fix-system-av1-libs.patch
b/http/firefox/patches/0026-bmo-1559213-fix-system-av1-libs.patch
deleted file mode 100644
index 361c0b6..0000000
--- a/http/firefox/patches/0026-bmo-1559213-fix-system-av1-libs.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
-index 0069865..e806fc8 100644
---- a/media/ffvpx/libavcodec/moz.build
-+++ b/media/ffvpx/libavcodec/moz.build
-@@ -108,10 +108,14 @@
- 'vp9prob.c',
- 'vp9recon.c'
- ]
-- USE_LIBS += [
-- 'dav1d',
-- 'media_libdav1d_asm',
-- ]
-+ if CONFIG["MOZ_SYSTEM_AV1"]:
-+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
-+ else:
-+ USE_LIBS += [
-+ 'dav1d',
-+ 'media_libdav1d_asm',
-+ ]
- if CONFIG['MOZ_WAYLAND']:
- LOCAL_INCLUDES += ['/media/mozva']
- SOURCES += [
diff --git
a/http/firefox/patches/0027-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
b/http/firefox/patches/0027-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
deleted file mode 100644
index 864741e..0000000
--- a/http/firefox/patches/0027-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -up firefox-100.0/widget/gtk/nsWindow.cpp.1196777
firefox-100.0/widget/gtk/nsWindow.cpp
---- firefox-100.0/widget/gtk/nsWindow.cpp.1196777 2022-05-02
11:29:06.763325015 +0200
-+++ firefox-100.0/widget/gtk/nsWindow.cpp 2022-05-02 11:30:49.100717334
+0200
-@@ -163,7 +163,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTUR
- GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
- GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
- GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK |
GDK_SCROLL_MASK |
-- GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK;
-+ GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK |
-+ GDK_FOCUS_CHANGE_MASK;
-
- /* utility functions */
- static bool is_mouse_in_window(GdkWindow* aWindow, gdouble aMouseX,
diff --git
a/http/firefox/patches/0027-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0027-bmo-1754469-memory_mozalloc_throw.patch
new file mode 100644
index 0000000..634892be
--- /dev/null
+++ b/http/firefox/patches/0027-bmo-1754469-memory_mozalloc_throw.patch
@@ -0,0 +1,69 @@
+--- a/memory/mozalloc/throw_gcc.h 2022-02-02 17:33:38 UTC
++++ b/memory/mozalloc/throw_gcc.h
+@@ -74,50 +74,66 @@ __throw_bad_function_call(void) {
+ mozalloc_abort("fatal: STL threw bad_function_call");
+ }
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_logic_error(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_domain_error(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
+ __throw_invalid_argument(const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_length_error(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_out_of_range(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_runtime_error(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_range_error(
+ const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
+ __throw_overflow_error(const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
++#if !defined(_LIBCPP_VERSION)
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
+ __throw_underflow_error(const char* msg) {
+ mozalloc_abort(msg);
+ }
++#endif // _LIBCPP_VERSION
+
+ MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_ios_failure(
+ const char* msg) {
diff --git
a/http/firefox/patches/0028-bmo-1754469-memory_mozalloc_throw.patch
b/http/firefox/patches/0028-bmo-1754469-memory_mozalloc_throw.patch
deleted file mode 100644
index 634892be..0000000
--- a/http/firefox/patches/0028-bmo-1754469-memory_mozalloc_throw.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/memory/mozalloc/throw_gcc.h 2022-02-02 17:33:38 UTC
-+++ b/memory/mozalloc/throw_gcc.h
-@@ -74,50 +74,66 @@ __throw_bad_function_call(void) {
- mozalloc_abort("fatal: STL threw bad_function_call");
- }
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_logic_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_domain_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
- __throw_invalid_argument(const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_length_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_out_of_range(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_runtime_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_range_error(
- const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
- __throw_overflow_error(const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
-+#if !defined(_LIBCPP_VERSION)
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
- __throw_underflow_error(const char* msg) {
- mozalloc_abort(msg);
- }
-+#endif // _LIBCPP_VERSION
-
- MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
__throw_ios_failure(
- const char* msg) {
diff --git a/http/firefox/patches/0028-rhbz-2115253-vaapi-fixes.patch
b/http/firefox/patches/0028-rhbz-2115253-vaapi-fixes.patch
new file mode 100644
index 0000000..ddf30d1
--- /dev/null
+++ b/http/firefox/patches/0028-rhbz-2115253-vaapi-fixes.patch
@@ -0,0 +1,20 @@
+diff -up firefox-104.0/gfx/thebes/gfxPlatformGtk.cpp.firefox-enable-vaapi
firefox-104.0/gfx/thebes/gfxPlatformGtk.cpp
+diff -up firefox-104.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi
firefox-104.0/widget/gtk/GfxInfo.cpp
+--- firefox-104.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2022-08-16
15:14:53.014042400 +0200
++++ firefox-104.0/widget/gtk/GfxInfo.cpp 2022-08-16 15:15:30.482301677
+0200
+@@ -873,15 +873,6 @@ const nsTArray<GfxDriverInfo>& GfxInfo::
+ nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
+ V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_LINUX_AMD", "");
+
+- // Disable on Release/late Beta
+-#if !defined(EARLY_BETA_OR_EARLIER)
+- APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::All,
+- nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
+- nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
+- DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
+- "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE",
"");
+-#endif
+-
+ ////////////////////////////////////
+ // FEATURE_WEBRENDER_PARTIAL_PRESENT
+ APPEND_TO_DRIVER_BLOCKLIST_EXT(
diff --git
a/http/firefox/patches/0029-bgo-860033-firefox-wayland-no-dbus.patch
b/http/firefox/patches/0029-bgo-860033-firefox-wayland-no-dbus.patch
new file mode 100644
index 0000000..7cf532a
--- /dev/null
+++ b/http/firefox/patches/0029-bgo-860033-firefox-wayland-no-dbus.patch
@@ -0,0 +1,49 @@
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -2353,18 +2353,6 @@ with only_when(compile_environment & tar
+ )
+ set_config("MOZ_D3DCOMPILER_VISTA_DLL_PATH", d3d_compiler_dll.path)
+
+-# Remoting protocol support
+-# ==============================================================
+-
+-
+-@depends(toolkit)
+-def has_remote(toolkit):
+- if toolkit in ("gtk", "windows", "cocoa"):
+- return True
+-
+-
+-set_config("MOZ_HAS_REMOTE", has_remote)
+-set_define("MOZ_HAS_REMOTE", has_remote)
+
+ # RLBox Library Sandboxing wasm support
+ # ==============================================================
+@@ -2900,6 +2888,26 @@ with only_when(toolkit_gtk):
+ set_config("MOZ_ENABLE_DBUS", True)
+ set_define("MOZ_ENABLE_DBUS", True)
+
++# Remoting protocol support
++# ==============================================================
++
++@depends(
++ toolkit,
++ depends("--enable-dbus", when=toolkit_gtk)(lambda x: x),
++ depends(wayland_headers, when=toolkit_gtk)(lambda x: x),
++ depends(x11_headers, when=toolkit_gtk)(lambda x: x),
++)
++def has_remote(toolkit, dbus, wayland, x11):
++ if toolkit in ("windows", "cocoa"):
++ return True
++ if toolkit == "gtk":
++ if not dbus and wayland and not x11:
++ return
++ return True
++
++
++set_config("MOZ_HAS_REMOTE", has_remote)
++set_define("MOZ_HAS_REMOTE", has_remote)
+
+ # Necko's wifi scanner
+ # ==============================================================
diff --git a/http/firefox/patches/0029-rhbz-2115253-vaapi-fixes.patch
b/http/firefox/patches/0029-rhbz-2115253-vaapi-fixes.patch
deleted file mode 100644
index ddf30d1..0000000
--- a/http/firefox/patches/0029-rhbz-2115253-vaapi-fixes.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -up firefox-104.0/gfx/thebes/gfxPlatformGtk.cpp.firefox-enable-vaapi
firefox-104.0/gfx/thebes/gfxPlatformGtk.cpp
-diff -up firefox-104.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi
firefox-104.0/widget/gtk/GfxInfo.cpp
---- firefox-104.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2022-08-16
15:14:53.014042400 +0200
-+++ firefox-104.0/widget/gtk/GfxInfo.cpp 2022-08-16 15:15:30.482301677
+0200
-@@ -873,15 +873,6 @@ const nsTArray<GfxDriverInfo>& GfxInfo::
- nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
- V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_LINUX_AMD", "");
-
-- // Disable on Release/late Beta
--#if !defined(EARLY_BETA_OR_EARLIER)
-- APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::All,
-- nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
-- nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
-- DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
-- "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE",
"");
--#endif
--
- ////////////////////////////////////
- // FEATURE_WEBRENDER_PARTIAL_PRESENT
- APPEND_TO_DRIVER_BLOCKLIST_EXT(
diff --git
a/http/firefox/patches/0030-bgo-860033-firefox-wayland-no-dbus.patch
b/http/firefox/patches/0030-bgo-860033-firefox-wayland-no-dbus.patch
deleted file mode 100644
index 7cf532a..0000000
--- a/http/firefox/patches/0030-bgo-860033-firefox-wayland-no-dbus.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff --git a/toolkit/moz.configure b/toolkit/moz.configure
---- a/toolkit/moz.configure
-+++ b/toolkit/moz.configure
-@@ -2353,18 +2353,6 @@ with only_when(compile_environment & tar
- )
- set_config("MOZ_D3DCOMPILER_VISTA_DLL_PATH", d3d_compiler_dll.path)
-
--# Remoting protocol support
--# ==============================================================
--
--
--@depends(toolkit)
--def has_remote(toolkit):
-- if toolkit in ("gtk", "windows", "cocoa"):
-- return True
--
--
--set_config("MOZ_HAS_REMOTE", has_remote)
--set_define("MOZ_HAS_REMOTE", has_remote)
-
- # RLBox Library Sandboxing wasm support
- # ==============================================================
-@@ -2900,6 +2888,26 @@ with only_when(toolkit_gtk):
- set_config("MOZ_ENABLE_DBUS", True)
- set_define("MOZ_ENABLE_DBUS", True)
-
-+# Remoting protocol support
-+# ==============================================================
-+
-+@depends(
-+ toolkit,
-+ depends("--enable-dbus", when=toolkit_gtk)(lambda x: x),
-+ depends(wayland_headers, when=toolkit_gtk)(lambda x: x),
-+ depends(x11_headers, when=toolkit_gtk)(lambda x: x),
-+)
-+def has_remote(toolkit, dbus, wayland, x11):
-+ if toolkit in ("windows", "cocoa"):
-+ return True
-+ if toolkit == "gtk":
-+ if not dbus and wayland and not x11:
-+ return
-+ return True
-+
-+
-+set_config("MOZ_HAS_REMOTE", has_remote)
-+set_define("MOZ_HAS_REMOTE", has_remote)
-
- # Necko's wifi scanner
- # ==============================================================
diff --git
a/http/firefox/patches/0030-bmo-1775202-ppc64-webrtc-missing-conditions.patch
b/http/firefox/patches/0030-bmo-1775202-ppc64-webrtc-missing-conditions.patch
new file mode 100644
index 0000000..b1748de
--- /dev/null
+++
b/http/firefox/patches/0030-bmo-1775202-ppc64-webrtc-missing-conditions.patch
@@ -0,0 +1,17 @@
+diff --git a/third_party/libwebrtc/moz.build
b/third_party/libwebrtc/moz.build
+index 8579f8bb3622..d9ca79d4fcb8 100644
+--- a/third_party/libwebrtc/moz.build
++++ b/third_party/libwebrtc/moz.build
+@@ -520,7 +520,10 @@ if CONFIG["CPU_ARCH"] == "ppc64" and
CONFIG["OS_TARGET"] == "Linux":
+
"/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn",
+
"/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn",
+ "/third_party/libwebrtc/modules/audio_coding/isac_c_gn",
+- "/third_party/libwebrtc/modules/audio_coding/isac_gn"
++ "/third_party/libwebrtc/modules/audio_coding/isac_gn",
++
"/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn",
++ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn",
++ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn"
+ ]
+
+ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
diff --git
a/http/firefox/patches/0031-bmo-1775202-ppc64-webrtc-missing-conditions.patch
b/http/firefox/patches/0031-bmo-1775202-ppc64-webrtc-missing-conditions.patch
deleted file mode 100644
index b1748de..0000000
---
a/http/firefox/patches/0031-bmo-1775202-ppc64-webrtc-missing-conditions.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/third_party/libwebrtc/moz.build
b/third_party/libwebrtc/moz.build
-index 8579f8bb3622..d9ca79d4fcb8 100644
---- a/third_party/libwebrtc/moz.build
-+++ b/third_party/libwebrtc/moz.build
-@@ -520,7 +520,10 @@ if CONFIG["CPU_ARCH"] == "ppc64" and
CONFIG["OS_TARGET"] == "Linux":
-
"/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn",
-
"/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn",
- "/third_party/libwebrtc/modules/audio_coding/isac_c_gn",
-- "/third_party/libwebrtc/modules/audio_coding/isac_gn"
-+ "/third_party/libwebrtc/modules/audio_coding/isac_gn",
-+
"/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn",
-+ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn",
-+ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn"
- ]
-
- if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
-
diff --git
a/http/firefox/patches/0031-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
b/http/firefox/patches/0031-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
new file mode 100644
index 0000000..51f7faa
--- /dev/null
+++ b/http/firefox/patches/0031-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
@@ -0,0 +1,55 @@
+From 67157b1aa7da0a146b7d2d5abb9237eea1f434ec Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel AT octaforge.org>
+Date: Fri, 23 Sep 2022 02:38:29 +0200
+Subject: [PATCH] fix sqlite3 on ppc with clang
+
+The __ppc__ macro is always defined on clang but not gcc, which
+results in sqlite mistakenly thinking that ppc64le with clang
+is big endian.
+
+Also disable some inline assembly stuff on ppc that is never used
+with gcc and probably was never tested with modern machines.
+---
+ third_party/sqlite3/src/sqlite3.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/third_party/sqlite3/src/sqlite3.c
b/third_party/sqlite3/src/sqlite3.c
+index 4f3dc68..9017062 100644
+--- a/third_party/sqlite3/src/sqlite3.c
++++ b/third_party/sqlite3/src/sqlite3.c
+@@ -14317,9 +14317,9 @@ typedef INT16_TYPE LogEst;
+ # if defined(i386) || defined(__i386__) || defined(_M_IX86) ||
\
+ defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) ||
\
+ defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) ||
\
+- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
++ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) ||
defined(__LITTLE_ENDIAN__)
+ # define SQLITE_BYTEORDER 1234
+-# elif defined(sparc) || defined(__ppc__) || \
++# elif defined(sparc) || defined(__BIG_ENDIAN__) || \
+ defined(__ARMEB__) || defined(__AARCH64EB__)
+ # define SQLITE_BYTEORDER 4321
+ # else
+@@ -20713,7 +20713,7 @@ SQLITE_PRIVATE const char
**sqlite3CompileOptions(int *pnOpt);
+ return val;
+ }
+
+-#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__))
++#elif 0
+
+ __inline__ sqlite_uint64 sqlite3Hwtime(void){
+ unsigned long long retval;
+@@ -196385,9 +196385,9 @@ struct RtreeMatchArg {
+ #if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
+ defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
+ defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
+- defined(__arm__)
++ defined(__arm__) || defined(__LITTLE_ENDIAN__)
+ # define SQLITE_BYTEORDER 1234
+-#elif defined(sparc) || defined(__ppc__)
++#elif defined(sparc) || defined(__BIG_ENDIAN__)
+ # define SQLITE_BYTEORDER 4321
+ #else
+ # define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */
+--
+2.37.3
+
diff --git a/http/firefox/patches/0032-fix-building-gcc-pgo.patch
b/http/firefox/patches/0032-fix-building-gcc-pgo.patch
new file mode 100644
index 0000000..eb520b4
--- /dev/null
+++ b/http/firefox/patches/0032-fix-building-gcc-pgo.patch
@@ -0,0 +1,50 @@
+diff -Naur a/build/pgo/profileserver.py b/build/pgo/profileserver.py
+--- a/build/pgo/profileserver.py 2023-01-12 22:01:59.000000000 +0200
++++ b/build/pgo/profileserver.py 2023-01-17 06:56:38.260296740 +0200
+@@ -11,7 +11,7 @@
+ import sys
+
+ import mozcrash
+-from mozbuild.base import BinaryNotFoundException, MozbuildObject
++from mozbuild.base import BinaryNotFoundException, MozbuildObject,
BuildEnvironmentNotFoundException
+ from mozfile import TemporaryDirectory
+ from mozhttpd import MozHttpd
+ from mozprofile import FirefoxProfile, Preferences
+@@ -87,9 +87,22 @@
+ locations = ServerLocations()
+ locations.add_host(host="127.0.0.1", port=PORT,
options="primary,privileged")
+
+- old_profraw_files = glob.glob("*.profraw")
+- for f in old_profraw_files:
+- os.remove(f)
++ using_gcc = False
++ try:
++ if build.config_environment.substs.get("CC_TYPE") == "gcc":
++ using_gcc = True
++ except BuildEnvironmentNotFoundException:
++ pass
++
++ if using_gcc:
++ for dirpath, _, filenames in os.walk("."):
++ for f in filenames:
++ if f.endswith(".gcda"):
++ os.remove(os.path.join(dirpath, f))
++ else:
++ old_profraw_files = glob.glob("*.profraw")
++ for f in old_profraw_files:
++ os.remove(f)
+
+ with TemporaryDirectory() as profilePath:
+ # TODO: refactor this into mozprofile
+@@ -213,6 +226,11 @@
+ print("Firefox exited successfully, but produced a crashreport")
+ sys.exit(1)
+
++ if using_gcc:
++ print("Copying profile data...")
++ os.system("pwd");
++ os.system('tar cf profdata.tar.gz `find . -name "*.gcda"`; cd
..; tar xf instrumented/profdata.tar.gz;');
++
+ llvm_profdata = env.get("LLVM_PROFDATA")
+ if llvm_profdata:
+ profraw_files = glob.glob("*.profraw")
diff --git
a/http/firefox/patches/0032-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
b/http/firefox/patches/0032-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
deleted file mode 100644
index 51f7faa..0000000
--- a/http/firefox/patches/0032-qm-qm-fix-sqlite3-on-ppc-with-clang.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 67157b1aa7da0a146b7d2d5abb9237eea1f434ec Mon Sep 17 00:00:00 2001
-From: Daniel Kolesa <daniel AT octaforge.org>
-Date: Fri, 23 Sep 2022 02:38:29 +0200
-Subject: [PATCH] fix sqlite3 on ppc with clang
-
-The __ppc__ macro is always defined on clang but not gcc, which
-results in sqlite mistakenly thinking that ppc64le with clang
-is big endian.
-
-Also disable some inline assembly stuff on ppc that is never used
-with gcc and probably was never tested with modern machines.
----
- third_party/sqlite3/src/sqlite3.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/third_party/sqlite3/src/sqlite3.c
b/third_party/sqlite3/src/sqlite3.c
-index 4f3dc68..9017062 100644
---- a/third_party/sqlite3/src/sqlite3.c
-+++ b/third_party/sqlite3/src/sqlite3.c
-@@ -14317,9 +14317,9 @@ typedef INT16_TYPE LogEst;
- # if defined(i386) || defined(__i386__) || defined(_M_IX86) ||
\
- defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) ||
\
- defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) ||
\
-- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
-+ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) ||
defined(__LITTLE_ENDIAN__)
- # define SQLITE_BYTEORDER 1234
--# elif defined(sparc) || defined(__ppc__) || \
-+# elif defined(sparc) || defined(__BIG_ENDIAN__) || \
- defined(__ARMEB__) || defined(__AARCH64EB__)
- # define SQLITE_BYTEORDER 4321
- # else
-@@ -20713,7 +20713,7 @@ SQLITE_PRIVATE const char
**sqlite3CompileOptions(int *pnOpt);
- return val;
- }
-
--#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__))
-+#elif 0
-
- __inline__ sqlite_uint64 sqlite3Hwtime(void){
- unsigned long long retval;
-@@ -196385,9 +196385,9 @@ struct RtreeMatchArg {
- #if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
- defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
- defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
-- defined(__arm__)
-+ defined(__arm__) || defined(__LITTLE_ENDIAN__)
- # define SQLITE_BYTEORDER 1234
--#elif defined(sparc) || defined(__ppc__)
-+#elif defined(sparc) || defined(__BIG_ENDIAN__)
- # define SQLITE_BYTEORDER 4321
- #else
- # define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */
---
-2.37.3
-
diff --git
a/http/firefox/patches/0033-bmo-1787405-fix-offsets-for-row_neon-on-arm.patch
b/http/firefox/patches/0033-bmo-1787405-fix-offsets-for-row_neon-on-arm.patch
deleted file mode 100644
index 3dd71d7..0000000
---
a/http/firefox/patches/0033-bmo-1787405-fix-offsets-for-row_neon-on-arm.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/media/libyuv/libyuv/source/row_neon.cc
b/media/libyuv/libyuv/source/row_neon.cc
-index 14eed6f..89d4d9d 100644
---- a/media/libyuv/libyuv/source/row_neon.cc
-+++ b/media/libyuv/libyuv/source/row_neon.cc
-@@ -588,7 +588,7 @@ void DetileRow_NEON(const uint8_t* src,
- "1: \n"
- "vld1.16 {q0}, [%0], %3 \n" // load 16 bytes
- "subs %2, %2, #16 \n" // 16 processed per
loop
-- "pld [%0, 1792] \n"
-+ "pld [%0, #1792] \n"
- "vst1.16 {q0}, [%1]! \n" // store 16 bytes
- "bgt 1b \n"
- : "+r"(src), // %0
-@@ -609,7 +609,7 @@ void DetileSplitUVRow_NEON(const uint8_t* src_uv,
- "1: \n"
- "vld2.8 {d0, d1}, [%0], %4 \n"
- "subs %3, %3, #16 \n"
-- "pld [%0, 1792] \n"
-+ "pld [%0, #1792] \n"
- "vst1.8 {d0}, [%1]! \n"
- "vst1.8 {d1}, [%2]! \n"
- "bgt 1b \n"
diff --git
a/http/firefox/patches/0034-bgo-877267-rust-opaque-binding-type.patch
b/http/firefox/patches/0034-bgo-877267-rust-opaque-binding-type.patch
deleted file mode 100644
index 8bd2e53..0000000
--- a/http/firefox/patches/0034-bgo-877267-rust-opaque-binding-type.patch
+++ /dev/null
@@ -1,253 +0,0 @@
-From a5848cf44e02645cddf020609ea67340cf6e3d24 Mon Sep 17 00:00:00 2001
-From: Collin Baker <collinbaker AT chromium.org>
-Date: Wed, 20 Jul 2022 11:57:16 -0400
-Subject: [PATCH] Generate opaque type for template param dependent bit field
- width
-
-libclang's API does not provide a straightforward way to check for
-this, and calling clang_getFieldDeclBitWidth is actively unsafe in
-this case. See https://github.com/llvm/llvm-project/issues/56644
-
-We probably can't generate reasonable bindings for such a type, so
-make the binding opaque.
-
-Ideally libclang would report if the bit width could not be
-evaluated. Unfortunately making such a change would mean bumping the
-minimum libclang version from 6.0 to 15.0.
-
-Instead, add logic to traverse the AST subtree starting from the
-field's bit width specifier looking for template parameters. If we
-find one, we make the resulting type opaque.
----
- src/clang.rs | 96 ++++++++++++++++++-
- src/ir/comp.rs | 26 ++++-
- ...issue-2239-template-dependent-bit-width.rs | 19 ++++
- ...ssue-2239-template-dependent-bit-width.hpp | 10 ++
- 4 files changed, 147 insertions(+), 4 deletions(-)
- create mode 100644
tests/expectations/tests/issue-2239-template-dependent-bit-width.rs
- create mode 100644 tests/headers/issue-2239-template-dependent-bit-width.hpp
-
-diff --git a/third_party/rust/bindgen/src/clang.rs
b/third_party/rust/bindgen/src/clang.rs
-index 587cc0ba7..00716a1bd 100644
---- a/third_party/rust/bindgen/src/clang.rs
-+++ b/third_party/rust/bindgen/src/clang.rs
-@@ -276,6 +276,56 @@ impl Cursor {
- true
- }
-
-+ /// Is the referent any kind of template parameter?
-+ pub fn is_template_parameter(&self) -> bool {
-+ match self.kind() {
-+ CXCursor_TemplateTemplateParameter |
-+ CXCursor_TemplateTypeParameter |
-+ CXCursor_NonTypeTemplateParameter => true,
-+ _ => false,
-+ }
-+ }
-+
-+ /// Does the referent's type or value depend on a template parameter?
-+ pub fn is_dependent_on_template_parameter(&self) -> bool {
-+ fn visitor(
-+ found_template_parameter: &mut bool,
-+ cur: Cursor,
-+ ) -> CXChildVisitResult {
-+ // If we found a template parameter, it is dependent.
-+ if cur.is_template_parameter() {
-+ *found_template_parameter = true;
-+ return CXChildVisit_Break;
-+ }
-+
-+ // Get the referent and traverse it as well.
-+ if let Some(referenced) = cur.referenced() {
-+ if referenced.is_template_parameter() {
-+ *found_template_parameter = true;
-+ return CXChildVisit_Break;
-+ }
-+
-+ referenced
-+ .visit(|next| visitor(found_template_parameter, next));
-+ if *found_template_parameter {
-+ return CXChildVisit_Break;
-+ }
-+ }
-+
-+ // Continue traversing the AST at the original cursor.
-+ CXChildVisit_Recurse
-+ }
-+
-+ if self.is_template_parameter() {
-+ return true;
-+ }
-+
-+ let mut found_template_parameter = false;
-+ self.visit(|next| visitor(&mut found_template_parameter, next));
-+
-+ found_template_parameter
-+ }
-+
- /// Is this cursor pointing a valid referent?
- pub fn is_valid(&self) -> bool {
- unsafe { clang_isInvalid(self.kind()) == 0 }
-@@ -485,9 +535,45 @@ impl Cursor {
- !self.is_defaulted_function()
- }
-
-+ /// Is the referent a bit field declaration?
-+ pub fn is_bit_field(&self) -> bool {
-+ unsafe { clang_Cursor_isBitField(self.x) != 0 }
-+ }
-+
-+ /// Get a cursor to the bit field's width expression, or `None` if it's
not
-+ /// a bit field.
-+ pub fn bit_width_expr(&self) -> Option<Cursor> {
-+ if !self.is_bit_field() {
-+ return None;
-+ }
-+
-+ let mut result = None;
-+ self.visit(|cur| {
-+ // The first child may or may not be a TypeRef, depending on
whether
-+ // the field's type is builtin. Skip it.
-+ if cur.kind() == CXCursor_TypeRef {
-+ return CXChildVisit_Continue;
-+ }
-+
-+ // The next expression or literal is the bit width.
-+ result = Some(cur);
-+
-+ CXChildVisit_Break
-+ });
-+
-+ result
-+ }
-+
- /// Get the width of this cursor's referent bit field, or `None` if the
-- /// referent is not a bit field.
-+ /// referent is not a bit field or if the width could not be evaluated.
- pub fn bit_width(&self) -> Option<u32> {
-+ // It is not safe to check the bit width without ensuring it doesn't
-+ // depend on a template parameter. See
-+ // https://github.com/rust-lang/rust-bindgen/issues/2239
-+ if self.bit_width_expr()?.is_dependent_on_template_parameter() {
-+ return None;
-+ }
-+
- unsafe {
- let w = clang_getFieldDeclBitWidth(self.x);
- if w == -1 {
-@@ -1789,9 +1875,15 @@ pub fn ast_dump(c: &Cursor, depth: isize) ->
CXChildVisitResult {
- format!(" {}number-of-template-args = {}", prefix, num),
- );
- }
-- if let Some(width) = c.bit_width() {
-+
-+ if c.is_bit_field() {
-+ let width = match c.bit_width() {
-+ Some(w) => w.to_string(),
-+ None => "<unevaluable>".to_string(),
-+ };
- print_indent(depth, format!(" {}bit-width = {}", prefix,
width));
- }
-+
- if let Some(ty) = c.enum_type() {
- print_indent(
- depth,
-diff --git a/third_party/rust/bindgen/src/ir/comp.rs
b/third_party/rust/bindgen/src/ir/comp.rs
-index a221e5207..9808d5986 100644
---- a/third_party/rust/bindgen/src/ir/comp.rs
-+++ b/third_party/rust/bindgen/src/ir/comp.rs
-@@ -1045,6 +1045,11 @@ pub struct CompInfo {
- /// size_t)
- has_non_type_template_params: bool,
-
-+ /// Whether this type has a bit field member whose width couldn't be
-+ /// evaluated (e.g. if it depends on a template parameter). We generate
an
-+ /// opaque type in this case.
-+ has_unevaluable_bit_field_width: bool,
-+
- /// Whether we saw `__attribute__((packed))` on or within this type.
- packed_attr: bool,
-
-@@ -1078,6 +1083,7 @@ impl CompInfo {
- has_destructor: false,
- has_nonempty_base: false,
- has_non_type_template_params: false,
-+ has_unevaluable_bit_field_width: false,
- packed_attr: false,
- found_unknown_attr: false,
- is_forward_declaration: false,
-@@ -1317,7 +1323,21 @@ impl CompInfo {
- }
- }
-
-- let bit_width = cur.bit_width();
-+ let bit_width = if cur.is_bit_field() {
-+ let width = cur.bit_width();
-+
-+ // Make opaque type if the bit width couldn't be
-+ // evaluated.
-+ if width.is_none() {
-+ ci.has_unevaluable_bit_field_width = true;
-+ return CXChildVisit_Break;
-+ }
-+
-+ width
-+ } else {
-+ None
-+ };
-+
- let field_type = Item::from_ty_or_ref(
- cur.cur_type(),
- cur,
-@@ -1753,7 +1773,9 @@ impl IsOpaque for CompInfo {
- type Extra = Option<Layout>;
-
- fn is_opaque(&self, ctx: &BindgenContext, layout: &Option<Layout>) ->
bool {
-- if self.has_non_type_template_params {
-+ if self.has_non_type_template_params ||
-+ self.has_unevaluable_bit_field_width
-+ {
- return true;
- }
-
-diff --git
a/third_party/rust/bindgen/tests/expectations/tests/issue-2239-template-dependent-bit-width.rs

b/third_party/rust/bindgen/tests/expectations/tests/issue-2239-template-dependent-bit-width.rs
-new file mode 100644
-index 000000000..75ec9e439
---- /dev/null
-+++
b/third_party/rust/bindgen/tests/expectations/tests/issue-2239-template-dependent-bit-width.rs
-@@ -0,0 +1,19 @@
-+#![allow(
-+ dead_code,
-+ non_snake_case,
-+ non_camel_case_types,
-+ non_upper_case_globals
-+)]
-+
-+#[repr(C)]
-+#[derive(Debug, Default, Copy, Clone)]
-+pub struct b {
-+ pub _address: u8,
-+}
-+pub type b_td<a> = a;
-+pub type b_ta<a> = a;
-+#[repr(C)]
-+#[derive(Debug, Default, Copy, Clone)]
-+pub struct b_foo {
-+ pub _address: u8,
-+}
-diff --git
a/third_party/rust/bindgen/tests/headers/issue-2239-template-dependent-bit-width.hpp

b/third_party/rust/bindgen/tests/headers/issue-2239-template-dependent-bit-width.hpp
-new file mode 100644
-index 000000000..4e6feb3f1
---- /dev/null
-+++
b/third_party/rust/bindgen/tests/headers/issue-2239-template-dependent-bit-width.hpp
-@@ -0,0 +1,10 @@
-+template <class a> class b {
-+ typedef a td;
-+ using ta = a;
-+ struct foo {
-+ a foo : sizeof(a);
-+ a : sizeof(a);
-+ td : sizeof(td);
-+ ta : sizeof(ta);
-+ };
-+};
diff --git
a/http/firefox/patches/0035-bmo-1805371-avoid-building-and-running-FaultyServer-tests-with-system-NSS.patch

b/http/firefox/patches/0035-bmo-1805371-avoid-building-and-running-FaultyServer-tests-with-system-NSS.patch
deleted file mode 100644
index 8d593cf..0000000
---
a/http/firefox/patches/0035-bmo-1805371-avoid-building-and-running-FaultyServer-tests-with-system-NSS.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/security/moz.build b/security/moz.build
---- a/security/moz.build
-+++ b/security/moz.build
-@@ -58,14 +58,16 @@
- "ssl3",
- ]
- gyp_vars["nspr_libs"] = "nspr"
- else:
- gyp_vars["nspr_libs"] = "nspr"
-- if not CONFIG["ENABLE_TESTS"]:
-- # If we're not building tests, then we don't need a static copy
-- # of NSS. Build mozpkix only.
-- gyp_vars["mozpkix_only"] = 1
-+ # Bug 1805371: We need a static copy of NSS for the tlsserver test
-+ # binaries even when building with system NSS. But there's no good
-+ # way to build NSS that does not pollute dist/bin with shared
-+ # object files. For now, we have to build mozpkix only and disable
-+ # the affected tests.
-+ gyp_vars["mozpkix_only"] = 1
-
- # This disables building some NSS tools.
- gyp_vars["mozilla_client"] = 1
-
- # This builds NSS tools in COMM applications that Firefox doesn't build.
-



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (4685575402e2919e93faf95e97c773c9ec1f4b09), Pavel Vinogradov, 01/17/2023

Archive powered by MHonArc 2.6.24.

Top of Page