From 0530928105b4bfb506b6e982069913fe4598fc3a Mon Sep 17 00:00:00 2001 From: Johannes Date: Tue, 3 Dec 2019 22:36:30 +0100 Subject: [PATCH] firefox: update to 71.0. --- .../patches/firefox-70.0.1-rust-1.39+.patch | 165 ------------------ srcpkgs/firefox/patches/format_warning.patch | 23 --- .../patches/rust_audio-thread-priority.patch | 39 +++++ srcpkgs/firefox/patches/sndio.patch | 37 ++-- srcpkgs/firefox/patches/yuv-be.patch | 48 ----- srcpkgs/firefox/template | 6 +- 6 files changed, 53 insertions(+), 265 deletions(-) delete mode 100644 srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch delete mode 100644 srcpkgs/firefox/patches/format_warning.patch create mode 100644 srcpkgs/firefox/patches/rust_audio-thread-priority.patch delete mode 100644 srcpkgs/firefox/patches/yuv-be.patch diff --git a/srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch b/srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch deleted file mode 100644 index d4c9fe3a94..0000000000 --- a/srcpkgs/firefox/patches/firefox-70.0.1-rust-1.39+.patch +++ /dev/null @@ -1,165 +0,0 @@ -Source: Gentoo - -Based on https://github.com/rust-lang/rust/issues/64710 - ---- third_party/rust/bindgen/.cargo-checksum.json.orig -+++ third_party/rust/bindgen/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"a970d1a9e47f029fe3e3ce43ae4292054ad60c4490e035b86b669fcf32015624","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"5a1f556c6a57c0a6ccc65e19c27718e0f4b32381a8efcc80f6601b33c58c5d59","build.rs":"a9f6915c54d75f357ce32f96327bf4df53dc81a505b70831978f9dac6f43841d","csmith-fuzzing/README.md":"7107b70fedb0c0a0cadb3c439a49c1bd0119a6d38dc63b1aecc74d1942256ef2","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"0009b8b6e3f6c33ec2776ec4cb8de2625ae8be22c9f0433c39b06bdd9fc7db4d","src/codegen/bitfield_unit.rs":"87be2d7f7774327a1608c2c4d64df869e17fb34b7efdacb4030b6794d98e40f3","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"aa0daff2061c6de31acfbd113190889e0f7ca2d2b8d4f46740bfd5832c33e4d2","src/codegen/impl_debug.rs":"f82969461d522fb758eca552ceaf189122a404cbb47fcc16008bfe52fc62aefa","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"ad116e2af755219bd556e8ee00ca48562f64a161d0b2c94846ae01297446ea0d","src/codegen/struct_layout.rs":"3fa5524aff82365ce292b0cc85080514c85a6dbd31bce90f001773b995dda28e","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"82511f1bb8cbd04d98f57b000903b0264237962af93a72a58220437213eba1ef","src/ir/analysis/derive.rs":"325d4c1c1e6194e743f42a2316f1501b0ef852fe309f2e9cac3434825ad235f0","src/ir/analysis/has_destructor.rs":"63644f479738df35e531d3324ff892614083c3656e0747aa34d9f20dada878ec","src/ir/analysis/has_float.rs":"76162a309e4285a806755a08c687a3e7bc894a100a63da4e88584035e215b11d","src/ir/analysis/has_type_param_in_array.rs":"fdbc0af28a144c88ea2de83e6e6da5e1ffb40e3dd63fd7a708095d085bb06f94","src/ir/analysis/has_vtable.rs":"5788372d27bdbaaf0454bc17be31a5480918bc41a8a1c4832e8c61185c07f9cd","src/ir/analysis/mod.rs":"1f218e15c19f6666512908abc853fa7ff9ca5d0fafd94f026d9e4b0ce287ec3c","src/ir/analysis/sizedness.rs":"b73865b6689d4f3546edd91909a47c329c4ae630ea97715d29bc683ae1dc17ad","src/ir/analysis/template_params.rs":"6312c008bbc80f50e72a766756c8daddea0b6eeb31ec924b83a231df931e170e","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"c48abe01c5af0f09f583a89f1394bc6c161b40f6c8f0f600bbfe3c907b47969b","src/ir/comp.rs":"78e245835efcd22b5cc878a8a7031171116c708408bdb48b0c9284a067041e56","src/ir/context.rs":"8fd64654343295e0e4a43efe5db6f64315dcd50a5015c3d86e90aae992e2fa9f","src/ir/derive.rs":"34f9aa76b6c9c05136bb69dcd6455397faef571a567254d2c541d50a962994db","src/ir/dot.rs":"95ed2968fc3239d87892e9f1edf1ed6dd18630d949564961765967ea1d16960c","src/ir/enum_ty.rs":"7658cf68c00b1732dfa599c2d6b6a93a82de8401142591c3afe5fcb27d901a66","src/ir/function.rs":"c2feb2e26d47aa96a74af9912ada26be077e2b0c36d46fa10167da7109590500","src/ir/int.rs":"5b8d5bcedb04f39dc2d7e571bc04114b1f1e09cf294afe944c2e7879451c4378","src/ir/item.rs":"3bcdb69b793350e5744aec3577cdbb1e5068ece5220c38763cecd82dfb5e8f03","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"d49582081f5f86f7595afbe4845f38fb3b969a840b568f4a49b265e7d790bb5b","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"758aa955a0c5d6ad82606c88a1f4cd1d93e666b71e82d43b18b1aaae96cf888a","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"e6771c8102b9f01b0c4b664bf1151b4773b599634a83895376ce122ca9f74f8b","src/ir/var.rs":"8bdafb6d02f2c55ae11c28d88b19fb7a65ba8466da12ff039ae4c16c790b291e","src/lib.rs":"a07ef7a3d099493555ae5a58b7b4bf9106a978e38a23b5ff445a83b92727ab62","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"8c96cd2a051e3f09b1b87b75cd9ed77e82e889c8309ebd3e4bc782960cf63e58","src/options.rs":"5b309b225cc51e665bd42ed3e7965a7cd73d984e4455a2d76987fc42ab271ff8","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"5cb72fc3714c0d79e9e942d003349c0775fafd7cd0c9603c65f5261883bbf9cf","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"18270cdd7065ec045a6bb4bdcd5144d14a78b3aedb3bc5111e688773ac8b9ad0"} -\ No newline at end of file -+{"files":{},"package":"18270cdd7065ec045a6bb4bdcd5144d14a78b3aedb3bc5111e688773ac8b9ad0"} ---- third_party/rust/bindgen/src/ir/analysis/has_vtable.rs.orig -+++ third_party/rust/bindgen/src/ir/analysis/has_vtable.rs -@@ -9,37 +9,22 @@ use std::ops; - use {HashMap, Entry}; - - /// The result of the `HasVtableAnalysis` for an individual item. --#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)] -+#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] - pub enum HasVtableResult { -- /// The item has a vtable, but the actual vtable pointer is in a base -- /// member. -- BaseHasVtable, -+ /// The item does not have a vtable pointer. -+ No, - - /// The item has a vtable and the actual vtable pointer is within this item. - SelfHasVtable, - -- /// The item does not have a vtable pointer. -- No -+ /// The item has a vtable, but the actual vtable pointer is in a base -+ /// member. -+ BaseHasVtable, - } - - impl Default for HasVtableResult { - fn default() -> Self { - HasVtableResult::No -- } --} -- --impl cmp::PartialOrd for HasVtableResult { -- fn partial_cmp(&self, rhs: &Self) -> Option { -- use self::HasVtableResult::*; -- -- match (*self, *rhs) { -- (x, y) if x == y => Some(cmp::Ordering::Equal), -- (BaseHasVtable, _) => Some(cmp::Ordering::Greater), -- (_, BaseHasVtable) => Some(cmp::Ordering::Less), -- (SelfHasVtable, _) => Some(cmp::Ordering::Greater), -- (_, SelfHasVtable) => Some(cmp::Ordering::Less), -- _ => unreachable!(), -- } - } - } - ---- third_party/rust/bindgen/src/ir/analysis/sizedness.rs.orig -+++ third_party/rust/bindgen/src/ir/analysis/sizedness.rs -@@ -22,13 +22,14 @@ use {HashMap, Entry}; - /// - /// We initially assume that all types are `ZeroSized` and then update our - /// understanding as we learn more about each type. --#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)] -+#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] - pub enum SizednessResult { -- /// Has some size that is known to be greater than zero. That doesn't mean -- /// it has a static size, but it is not zero sized for sure. In other words, -- /// it might contain an incomplete array or some other dynamically sized -- /// type. -- NonZeroSized, -+ /// The type is zero-sized. -+ /// -+ /// This means that if it is a C++ type, and is not being used as a base -+ /// member, then we must add an `_address` byte to enforce the -+ /// unique-address-per-distinct-object-instance rule. -+ ZeroSized, - - /// Whether this type is zero-sized or not depends on whether a type - /// parameter is zero-sized or not. -@@ -52,32 +53,16 @@ pub enum SizednessResult { - /// https://github.com/rust-lang/rust-bindgen/issues/586 - DependsOnTypeParam, - -- /// The type is zero-sized. -- /// -- /// This means that if it is a C++ type, and is not being used as a base -- /// member, then we must add an `_address` byte to enforce the -- /// unique-address-per-distinct-object-instance rule. -- ZeroSized, -+ /// Has some size that is known to be greater than zero. That doesn't mean -+ /// it has a static size, but it is not zero sized for sure. In other words, -+ /// it might contain an incomplete array or some other dynamically sized -+ /// type. -+ NonZeroSized, - } - - impl Default for SizednessResult { - fn default() -> Self { - SizednessResult::ZeroSized -- } --} -- --impl cmp::PartialOrd for SizednessResult { -- fn partial_cmp(&self, rhs: &Self) -> Option { -- use self::SizednessResult::*; -- -- match (*self, *rhs) { -- (x, y) if x == y => Some(cmp::Ordering::Equal), -- (NonZeroSized, _) => Some(cmp::Ordering::Greater), -- (_, NonZeroSized) => Some(cmp::Ordering::Less), -- (DependsOnTypeParam, _) => Some(cmp::Ordering::Greater), -- (_, DependsOnTypeParam) => Some(cmp::Ordering::Less), -- _ => unreachable!(), -- } - } - } - ---- third_party/rust/bindgen/src/ir/derive.rs.orig -+++ third_party/rust/bindgen/src/ir/derive.rs -@@ -92,10 +92,10 @@ pub trait CanDeriveOrd { - /// - /// Initially we assume that we can derive trait for all types and then - /// update our understanding as we learn more about each type. --#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord)] -+#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] - pub enum CanDerive { -- /// No, we cannot. -- No, -+ /// Yes, we can derive automatically. -+ Yes, - - /// The only thing that stops us from automatically deriving is that - /// array with more than maximum number of elements is used. -@@ -103,29 +103,13 @@ pub enum CanDerive { - /// This means we probably can "manually" implement such trait. - Manually, - -- /// Yes, we can derive automatically. -- Yes, -+ /// No, we cannot. -+ No, - } - - impl Default for CanDerive { - fn default() -> CanDerive { - CanDerive::Yes -- } --} -- --impl cmp::PartialOrd for CanDerive { -- fn partial_cmp(&self, rhs: &Self) -> Option { -- use self::CanDerive::*; -- -- let ordering = match (*self, *rhs) { -- (x, y) if x == y => cmp::Ordering::Equal, -- (No, _) => cmp::Ordering::Greater, -- (_, No) => cmp::Ordering::Less, -- (Manually, _) => cmp::Ordering::Greater, -- (_, Manually) => cmp::Ordering::Less, -- _ => unreachable!() -- }; -- Some(ordering) - } - } - diff --git a/srcpkgs/firefox/patches/format_warning.patch b/srcpkgs/firefox/patches/format_warning.patch deleted file mode 100644 index c2b4c6332a..0000000000 --- a/srcpkgs/firefox/patches/format_warning.patch +++ /dev/null @@ -1,23 +0,0 @@ -Rust std::fmt::Display doesn't expect a C void*, change to print it in -hexadecimal - ---- third_party/rust/audio_thread_priority/src/rt_linux.rs.orig 2019-10-22 12:20:33.250687971 +0700 -+++ third_party/rust/audio_thread_priority/src/rt_linux.rs 2019-10-22 12:39:10.400928328 +0700 -@@ -100,7 +100,7 @@ - let mut policy = 0; - - if unsafe { libc::pthread_getschedparam(pthread_id, &mut policy, &mut param) } < 0 { -- error!("pthread_getschedparam error {}", pthread_id); -+ error!("pthread_getschedparam error {:?}", pthread_id); - return Err(()); - } - -@@ -127,7 +127,7 @@ - if unsafe { libc::pthread_setschedparam(rt_priority_handle.pthread_id, - rt_priority_handle.policy, - &rt_priority_handle.param) } < 0 { -- warn!("could not demote thread {}", rt_priority_handle.pthread_id); -+ warn!("could not demote thread {:?}", rt_priority_handle.pthread_id); - return Err(()); - } - return Ok(()); diff --git a/srcpkgs/firefox/patches/rust_audio-thread-priority.patch b/srcpkgs/firefox/patches/rust_audio-thread-priority.patch new file mode 100644 index 0000000000..4ee2a77d51 --- /dev/null +++ b/srcpkgs/firefox/patches/rust_audio-thread-priority.patch @@ -0,0 +1,39 @@ +backport of https://github.com/padenot/audio_thread_priority/commit/b5b86285d3c0cae2cb731730460f386ffa30cb03.patch +avoids problems with serialization of RtPriorityThreadInfo in media/audioipc on musl + +--- third_party/rust/audio_thread_priority/src/rt_linux.rs 2019-12-02 13:24:01.000000000 +0100 ++++ third_party/rust/audio_thread_priority/src/rt_linux.rs 2019-12-02 13:24:01.000000000 +0100 +@@ -31,9 +31,7 @@ + /// process. + pthread_id: libc::pthread_t, + /// ... +- policy: libc::c_int, +- /// ... +- param: libc::sched_param, ++ policy: libc::c_int + } + + impl RtPriorityThreadInfoInternal { +@@ -141,9 +139,11 @@ + -> Result<(), ()> { + assert!(unsafe { libc::pthread_self() } == rt_priority_handle.thread_info.pthread_id); + ++ let param = unsafe { std::mem::zeroed::() }; ++ + if unsafe { libc::pthread_setschedparam(rt_priority_handle.thread_info.pthread_id, + rt_priority_handle.thread_info.policy, +- &rt_priority_handle.thread_info.param) } < 0 { ++ ¶m) } < 0 { + error!("could not demote thread {}", OSError::last_os_error().raw_os_error().unwrap()); + return Err(()); + } +@@ -187,8 +187,7 @@ + pid, + thread_id, + pthread_id, +- policy, +- param ++ policy + }) + } + diff --git a/srcpkgs/firefox/patches/sndio.patch b/srcpkgs/firefox/patches/sndio.patch index 6c72284c19..09fc9cdfe2 100644 --- a/srcpkgs/firefox/patches/sndio.patch +++ b/srcpkgs/firefox/patches/sndio.patch @@ -1,8 +1,8 @@ --- old-configure.in.orig +++ old-configure.in -@@ -2839,6 +2839,22 @@ - - AC_SUBST(MOZ_ALSA) +@@ -2818,6 +2818,22 @@ + _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_COOKIES" + fi +dnl ================================== +dnl = Check sndio availability @@ -21,26 +21,11 @@ +AC_SUBST(MOZ_SNDIO) + dnl ======================================================== - dnl = Disable PulseAudio - dnl ======================================================== ---- toolkit/library/moz.build.orig -+++ toolkit/library/moz.build -@@ -235,10 +235,8 @@ - if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'): - OS_LIBS += CONFIG['TK_LIBS'] - --if CONFIG['OS_ARCH'] == 'OpenBSD': -- OS_LIBS += [ -- 'sndio', -- ] -+if CONFIG['MOZ_SNDIO']: -+ OS_LIBS += CONFIG['MOZ_SNDIO_LIBS'] - - if CONFIG['MOZ_ENABLE_DBUS']: - OS_LIBS += CONFIG['MOZ_DBUS_GLIB_LIBS'] + dnl = + dnl = Maintainer debug option (no --enable equivalent) --- media/libcubeb/src/moz.build.orig +++ media/libcubeb/src/moz.build -@@ -43,7 +43,7 @@ +@@ -44,7 +44,7 @@ ] DEFINES['USE_JACK'] = True @@ -51,17 +36,17 @@ ] --- build/moz.configure/old.configure.orig +++ build/moz.configure/old.configure -@@ -169,6 +169,7 @@ +@@ -184,6 +184,7 @@ @old_configure_options( '--cache-file', '--datadir', + '--enable-sndio', - '--enable-content-sandbox', '--enable-cookies', '--enable-cpp-rtti', + '--enable-crashreporter', --- security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp.orig +++ security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp -@@ -349,6 +349,21 @@ +@@ -394,6 +394,21 @@ } } } @@ -86,8 +71,8 @@ --- security/sandbox/linux/moz.build.orig +++ security/sandbox/linux/moz.build @@ -81,6 +81,9 @@ - if CONFIG['MOZ_ALSA']: - DEFINES['MOZ_ALSA'] = True + '../chromium/sandbox/linux/services/syscall_wrappers.cc', + ] +if CONFIG['MOZ_SNDIO']: + DEFINES['MOZ_SNDIO'] = True diff --git a/srcpkgs/firefox/patches/yuv-be.patch b/srcpkgs/firefox/patches/yuv-be.patch deleted file mode 100644 index 1c26f2ecce..0000000000 --- a/srcpkgs/firefox/patches/yuv-be.patch +++ /dev/null @@ -1,48 +0,0 @@ -# HG changeset patch -# User A. Wilcox -# Date 1543674229 0 -# Sat Dec 01 14:23:49 2018 +0000 -# Node ID 0309ff19e46b126c527e633518d7de8570442114 -# Parent 53107afbc21ec78e7ac46d37af212505f2032d5d -Bug 1511604 - Swizzle YCbCr->RGB data on big-endian machines - -diff -r 53107afbc21e -r 0309ff19e46b gfx/ycbcr/YCbCrUtils.cpp ---- gfx/ycbcr/YCbCrUtils.cpp Wed Nov 07 04:50:21 2018 +0000 -+++ gfx/ycbcr/YCbCrUtils.cpp Sat Dec 01 14:23:49 2018 +0000 -@@ -3,7 +3,9 @@ - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -+#include "mozilla/EndianUtils.h" - #include "gfx2DGlue.h" -+#include "mozilla/gfx/Swizzle.h" - - #include "YCbCrUtils.h" - #include "yuv_convert.h" -@@ -236,6 +238,13 @@ - yuvtype, - srcData.mYUVColorSpace); - } -+#if MOZ_BIG_ENDIAN -+ // libyuv makes endian-correct result, which needs to be swapped to BGRX -+ if (aDestFormat != SurfaceFormat::R5G6B5_UINT16) -+ gfx::SwizzleData(aDestBuffer, aStride, gfx::SurfaceFormat::X8R8G8B8, -+ aDestBuffer, aStride, gfx::SurfaceFormat::B8G8R8X8, -+ srcData.mPicSize); -+#endif - } - - void -@@ -257,6 +266,12 @@ - aSrcStrideYA, - aSrcStrideUV, - aDstStrideARGB); -+#if MOZ_BIG_ENDIAN -+ // libyuv makes endian-correct result, which needs to be swapped to BGRA -+ gfx::SwizzleData(aDstARGB, aDstStrideARGB, gfx::SurfaceFormat::A8R8G8B8, -+ aDstARGB, aDstStrideARGB, gfx::SurfaceFormat::B8G8R8A8, -+ IntSize(aWidth, aHeight)); -+#endif - } - - } // namespace gfx diff --git a/srcpkgs/firefox/template b/srcpkgs/firefox/template index b95ab9d7d8..6899aad5d1 100644 --- a/srcpkgs/firefox/template +++ b/srcpkgs/firefox/template @@ -3,7 +3,7 @@ # THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-i18n". # pkgname=firefox -version=70.0.1 +version=71.0 revision=1 build_helper="rust" short_desc="Mozilla Firefox web browser" @@ -11,7 +11,7 @@ maintainer="Johannes " license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later" homepage="https://www.mozilla.org/firefox/" distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.xz" -checksum=f2e9bb26af7682b31e82fdfc3a4b3e04fd1caa8b004469ea608185d33e35691b +checksum=78304cd58229e7103b56b34718aad051c9a4db30c266512a64f501ba58da7fbe lib32disabled=yes @@ -25,7 +25,7 @@ makedepends="nss-devel libjpeg-turbo-devel gtk+-devel gtk+3-devel icu-devel $(vopt_if startup_notification startup-notification-devel) $(vopt_if xscreensaver libXScrnSaver-devel) $(vopt_if sndio sndio-devel)" -depends="nss>=3.46.1 desktop-file-utils hicolor-icon-theme" +depends="nss>=3.47.1 desktop-file-utils hicolor-icon-theme" conflicts="firefox-esr>=0" build_options="alsa dbus pulseaudio startup_notification xscreensaver sndio wayland"