firefox: update to 75.0

support for system-sqlite was dropped by upstream
This commit is contained in:
Johannes 2020-04-07 22:58:24 +02:00 committed by Johannes
parent 1283579de2
commit a612b1b4fd
5 changed files with 4 additions and 225 deletions

View File

@ -12,7 +12,6 @@ ac_add_options --with-system-icu
# XXX: the system's libpng doesn't have APNG support
ac_add_options --without-system-png
ac_add_options --enable-system-pixman
ac_add_options --enable-system-sqlite
ac_add_options --enable-system-ffi
ac_add_options --with-nspr-prefix=${XBPS_CROSS_BASE}/usr

View File

@ -1,115 +0,0 @@
https://phabricator.services.mozilla.com/D65797
https://bugzilla.mozilla.org/show_bug.cgi?id=1616030
diff --git a/gfx/2d/Swizzle.cpp b/gfx/2d/Swizzle.cpp
--- gfx/2d/Swizzle.cpp
+++ gfx/2d/Swizzle.cpp
@@ -892,7 +892,11 @@
uint8_t r = src[aSwapRB ? 2 : 0];
uint8_t g = src[1];
uint8_t b = src[aSwapRB ? 0 : 2];
+#if MOZ_LITTLE_ENDIAN()
*--dst = 0xFF000000 | (b << 16) | (g << 8) | r;
+#else
+ *--dst = 0x000000FF | (b << 8) | (g << 16) | (r << 24);
+#endif
src -= 3;
}
}
@@ -906,6 +910,28 @@
SurfaceFormat::R8G8B8, aDstFormat, \
UnpackRowRGB24<ShouldSwapRB(SurfaceFormat::R8G8B8, aDstFormat)>)
+static void UnpackRowRGB24_To_ARGB(const uint8_t* aSrc, uint8_t* aDst,
+ int32_t aLength) {
+ // Because we are expanding, we can only process the data back to front in
+ // case we are performing this in place.
+ const uint8_t* src = aSrc + 3 * (aLength - 1);
+ uint32_t* dst = reinterpret_cast<uint32_t*>(aDst + 4 * aLength);
+ while (src >= aSrc) {
+ uint8_t r = src[0];
+ uint8_t g = src[1];
+ uint8_t b = src[2];
+#if MOZ_LITTLE_ENDIAN()
+ *--dst = 0x000000FF | (r << 8) | (g << 16) | (b << 24);
+#else
+ *--dst = 0xFF000000 | (r << 24) | (g << 16) | b;
+#endif
+ src -= 3;
+ }
+}
+
+#define UNPACK_ROW_RGB_TO_ARGB(aDstFormat) \
+ FORMAT_CASE_ROW(SurfaceFormat::R8G8B8, aDstFormat, UnpackRowRGB24_To_ARGB)
+
bool SwizzleData(const uint8_t* aSrc, int32_t aSrcStride,
SurfaceFormat aSrcFormat, uint8_t* aDst, int32_t aDstStride,
SurfaceFormat aDstFormat, const IntSize& aSize) {
@@ -1071,16 +1097,36 @@
SWIZZLE_ROW_FALLBACK(SurfaceFormat::R8G8B8X8, SurfaceFormat::B8G8R8X8)
SWIZZLE_ROW_FALLBACK(SurfaceFormat::R8G8B8A8, SurfaceFormat::B8G8R8X8)
SWIZZLE_ROW_FALLBACK(SurfaceFormat::R8G8B8X8, SurfaceFormat::B8G8R8A8)
+ SWIZZLE_ROW_FALLBACK(SurfaceFormat::R8G8B8A8, SurfaceFormat::A8R8G8B8)
+ SWIZZLE_ROW_FALLBACK(SurfaceFormat::R8G8B8X8, SurfaceFormat::X8R8G8B8)
+
+ SWIZZLE_ROW_FALLBACK(SurfaceFormat::A8R8G8B8, SurfaceFormat::R8G8B8A8)
+ SWIZZLE_ROW_FALLBACK(SurfaceFormat::X8R8G8B8, SurfaceFormat::R8G8B8X8)
+ SWIZZLE_ROW_FALLBACK(SurfaceFormat::A8R8G8B8, SurfaceFormat::R8G8B8X8)
+ SWIZZLE_ROW_FALLBACK(SurfaceFormat::X8R8G8B8, SurfaceFormat::R8G8B8A8)
SWIZZLE_ROW_OPAQUE(SurfaceFormat::B8G8R8A8, SurfaceFormat::B8G8R8X8)
SWIZZLE_ROW_OPAQUE(SurfaceFormat::B8G8R8X8, SurfaceFormat::B8G8R8A8)
SWIZZLE_ROW_OPAQUE(SurfaceFormat::R8G8B8A8, SurfaceFormat::R8G8B8X8)
SWIZZLE_ROW_OPAQUE(SurfaceFormat::R8G8B8X8, SurfaceFormat::R8G8B8A8)
+ SWIZZLE_ROW_OPAQUE(SurfaceFormat::A8R8G8B8, SurfaceFormat::X8R8G8B8)
+ SWIZZLE_ROW_OPAQUE(SurfaceFormat::X8R8G8B8, SurfaceFormat::A8R8G8B8)
+
+ SWIZZLE_ROW_SWAP(SurfaceFormat::B8G8R8A8, SurfaceFormat::A8R8G8B8)
+ SWIZZLE_ROW_SWAP(SurfaceFormat::B8G8R8A8, SurfaceFormat::X8R8G8B8)
+ SWIZZLE_ROW_SWAP(SurfaceFormat::B8G8R8X8, SurfaceFormat::X8R8G8B8)
+ SWIZZLE_ROW_SWAP(SurfaceFormat::B8G8R8X8, SurfaceFormat::A8R8G8B8)
+ SWIZZLE_ROW_SWAP(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)
+ SWIZZLE_ROW_SWAP(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8X8)
+ SWIZZLE_ROW_SWAP(SurfaceFormat::X8R8G8B8, SurfaceFormat::B8G8R8X8)
+ SWIZZLE_ROW_SWAP(SurfaceFormat::X8R8G8B8, SurfaceFormat::B8G8R8A8)
UNPACK_ROW_RGB(SurfaceFormat::R8G8B8X8)
UNPACK_ROW_RGB(SurfaceFormat::R8G8B8A8)
UNPACK_ROW_RGB(SurfaceFormat::B8G8R8X8)
UNPACK_ROW_RGB(SurfaceFormat::B8G8R8A8)
+ UNPACK_ROW_RGB_TO_ARGB(SurfaceFormat::A8R8G8B8)
+ UNPACK_ROW_RGB_TO_ARGB(SurfaceFormat::X8R8G8B8)
default:
break;
diff --git a/gfx/tests/gtest/TestSwizzle.cpp b/gfx/tests/gtest/TestSwizzle.cpp
--- gfx/tests/gtest/TestSwizzle.cpp
+++ gfx/tests/gtest/TestSwizzle.cpp
@@ -219,6 +219,12 @@
15, 14, 13, 255, 18, 17, 16, 255, 21, 20, 19, 255, 24, 23, 22, 255,
27, 26, 25, 255, 30, 29, 28, 255, 33, 32, 31, 255, 36, 35, 34, 255,
};
+ const uint8_t check_unpack_xrgb[16 * 4] = {
+ 255, 0, 254, 253, 255, 255, 0, 0, 255, 0, 0, 0, 255, 3, 2, 1,
+ 255, 9, 0, 127, 255, 4, 5, 6, 255, 9, 8, 7, 255, 10, 11, 12,
+ 255, 13, 14, 15, 255, 16, 17, 18, 255, 19, 20, 21, 255, 22, 23, 24,
+ 255, 25, 26, 27, 255, 28, 29, 30, 255, 31, 32, 33, 255, 34, 35, 36,
+ };
SwizzleRowFn func =
SwizzleRow(SurfaceFormat::B8G8R8A8, SurfaceFormat::R8G8B8A8);
@@ -246,4 +252,13 @@
memcpy(out_unpack, in_rgb, sizeof(in_rgb));
func(out_unpack, out_unpack, 16);
EXPECT_TRUE(ArrayEqual(out_unpack, check_unpack_rgbx));
+
+ func = SwizzleRow(SurfaceFormat::R8G8B8, SurfaceFormat::X8R8G8B8);
+ func(in_rgb, out_unpack, 16);
+ EXPECT_TRUE(ArrayEqual(out_unpack, check_unpack_xrgb));
+
+ memset(out_unpack, 0xE5, sizeof(out_unpack));
+ memcpy(out_unpack, in_rgb, sizeof(in_rgb));
+ func(out_unpack, out_unpack, 16);
+ EXPECT_TRUE(ArrayEqual(out_unpack, check_unpack_xrgb));
}

View File

@ -1,66 +0,0 @@
# HG changeset patch
# User Samuel Holland <samuel@sholland.org>
# Date 1581604569 0
# Node ID a3096ca24124886f8642cb45d2091af0cc4010e1
# Parent ddce7f4b64d96e68a86d7a519f1828d06e37176d
Bug 1041962 - Include libgen.h for basename r=jseward
Currently, the GNU version of basename from string.h is used, which
has behavior that conflicts with the POSIX version in libgen.h.
The GNU basename is not available in all libcs. In particular, it
is missing in musl libc, causing a build failure:
error: 'basename' was not declared in this scope
The GNU version has the following implementation:
char *p = strrchr (filename, '/');
return p ? p + 1 : (char *) filename;
The POSIX version has slightly different semantics. It may modify
its argument string, or copy part of it to static storage. However,
it will also delete trailing slashes, while the GNU version will
return the empty string if there is a trailing slash.
This change resolves the issue by including libgen.h, adopting POSIX
basename semantics. This should be a safe change for the following
reasons:
- The google-breakpad code, from which this code was derived, has
also switched to the POSIX basename:
https://chromium.googlesource.com/breakpad/breakpad/+/072f86ca83bb7138fe33f10b6380badd9ef7f065%5E%21/#F4
- The version of LulElf.cpp in mozglue/baseprofiler has also switched
to the POSIX basename:
https://hg.mozilla.org/mozilla-central/annotate/de1c3ae8df14cdb2c94a817b02dcffcb2cee12e2/mozglue/baseprofiler/lul/LulElf.cpp#l54
- The BaseFileName function is called only with paths to ELF files,
never directories, so the paths will never contain a trailing
slash, and the two versions of basename will behave identically.
Differential Revision: https://phabricator.services.mozilla.com/D61047
diff --git a/tools/profiler/lul/LulElf.cpp b/tools/profiler/lul/LulElf.cpp
--- tools/profiler/lul/LulElf.cpp
+++ tools/profiler/lul/LulElf.cpp
@@ -42,16 +42,17 @@
// This file is derived from the following files in
// toolkit/crashreporter/google-breakpad:
// src/common/linux/dump_symbols.cc
// src/common/linux/elfutils.cc
// src/common/linux/file_id.cc
#include <errno.h>
#include <fcntl.h>
+#include <libgen.h>
#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <set>

View File

@ -1,39 +0,0 @@
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::<libc::sched_param>() };
+
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 {
+ &param) } < 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
})
}

View File

@ -3,7 +3,7 @@
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-i18n".
#
pkgname=firefox
version=74.0.1
version=75.0
revision=1
build_helper="rust"
short_desc="Mozilla Firefox web browser"
@ -11,21 +11,21 @@ maintainer="Johannes <johannes.brechtmann@gmail.com>"
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=62e4297b682fad1ea50d8e32fc51c811169f8edec8d12d2aab0ea60b3197f011
checksum=bbb1054d8f2717c634480556d3753a8483986af7360e023bb6232df80b746b0f
lib32disabled=yes
hostmakedepends="autoconf213 unzip zip pkg-config perl python3 yasm rust cargo
llvm clang nodejs-lts-10 cbindgen python nasm which tar"
makedepends="nss-devel libjpeg-turbo-devel gtk+-devel gtk+3-devel icu-devel
pixman-devel sqlite-devel libevent-devel libnotify-devel libvpx5-devel
pixman-devel libevent-devel libnotify-devel libvpx-devel
libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std
libXdamage-devel freetype-devel $(vopt_if alsa alsa-lib-devel)
$(vopt_if dbus dbus-glib-devel) $(vopt_if pulseaudio pulseaudio-devel)
$(vopt_if startup_notification startup-notification-devel)
$(vopt_if xscreensaver libXScrnSaver-devel)
$(vopt_if sndio sndio-devel) $(vopt_if jack jack-devel)"
depends="nss>=3.47.1 desktop-file-utils hicolor-icon-theme sqlite>=$(xbps-uhelper version sqlite)"
depends="nss>=3.47.1 desktop-file-utils hicolor-icon-theme"
conflicts="firefox-esr>=0"
build_options="alsa jack dbus pulseaudio startup_notification xscreensaver sndio wayland"