aboutsummaryrefslogtreecommitdiff
path: root/www/firefox
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2021-02-15 21:28:15 +0000
committerJan Beich <jbeich@FreeBSD.org>2021-02-15 21:28:15 +0000
commitab740a98be884b837b216bffc82da39b46c0073e (patch)
tree446fef8f2ca8881e88cc97fe96fe099ce6e4320f /www/firefox
parent98c24badd0f2908e39151be41b0873ac3e59ae1a (diff)
downloadports-ab740a98be884b837b216bffc82da39b46c0073e.tar.gz
ports-ab740a98be884b837b216bffc82da39b46c0073e.zip
www/firefox: update to 86.0
Notes
Notes: svn path=/head/; revision=565343
Diffstat (limited to 'www/firefox')
-rw-r--r--www/firefox/Makefile3
-rw-r--r--www/firefox/distinfo6
-rw-r--r--www/firefox/files/patch-addon-search8
-rw-r--r--www/firefox/files/patch-bug1680982369
-rw-r--r--www/firefox/files/patch-bug168426178
-rw-r--r--www/firefox/files/patch-bug168671376
-rw-r--r--www/firefox/files/patch-bug1687487159
-rw-r--r--www/firefox/files/patch-bug169015297
-rw-r--r--www/firefox/pkg-message6
9 files changed, 458 insertions, 344 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index 5d7443d3d915..4f6584bf4738 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= firefox
-DISTVERSION= 85.0.2
-PORTREVISION= 1
+DISTVERSION= 86.0
PORTEPOCH= 2
CATEGORIES= www
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index 4273e336d782..b1a4bd41ec49 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1612802741
-SHA256 (firefox-85.0.2.source.tar.xz) = b157cdc265daa6140ec8daef2bc98d335f871e7e9ac235287fb199e11c164287
-SIZE (firefox-85.0.2.source.tar.xz) = 372234168
+TIMESTAMP = 1613411049
+SHA256 (firefox-86.0.source.tar.xz) = 5a12bca96ec5d7e5febc750b5400fbd78ffa143cc3a90942bd045af34ac9fdd7
+SIZE (firefox-86.0.source.tar.xz) = 368780392
diff --git a/www/firefox/files/patch-addon-search b/www/firefox/files/patch-addon-search
index 11efb6c5e8fa..99ab877a16d0 100644
--- a/www/firefox/files/patch-addon-search
+++ b/www/firefox/files/patch-addon-search
@@ -5,16 +5,16 @@ diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js
index 75c2c5e435e35..4d8c09c02759b 100644
--- browser/app/profile/firefox.js
+++ browser/app/profile/firefox.js
-@@ -37,7 +37,7 @@ pref("extensions.webextOptionalPermissionPrompts", true);
+@@ -39,7 +39,7 @@ pref("extensions.postDownloadThirdPartyPrompt", true);
// Preferences for AMO integration
pref("extensions.getAddons.cache.enabled", true);
- pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v3/addons/search/?guid=%IDS%&lang=%LOCALE%");
+ pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v4/addons/search/?guid=%IDS%&lang=%LOCALE%");
-pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%");
+pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=Linux&appver=%VERSION%");
pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/");
- pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v3/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%");
+ pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%");
pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%");
-@@ -168,8 +168,8 @@ pref("app.update.staging.enabled", true);
+@@ -176,8 +176,8 @@ pref("app.update.langpack.enabled", true);
// .. etc ..
//
pref("extensions.update.enabled", true);
diff --git a/www/firefox/files/patch-bug1680982 b/www/firefox/files/patch-bug1680982
new file mode 100644
index 000000000000..17604ac3b6a2
--- /dev/null
+++ b/www/firefox/files/patch-bug1680982
@@ -0,0 +1,369 @@
+commit d947b92c7503
+Author: Greg V <greg@unrelenting.technology>
+Date: Sun Dec 6 22:07:00 2020 +0000
+
+ Bug 1680982 - Use evdev for gamepads on Linux/FreeBSD
+
+ Switch from the legacy Linux joystick API to the generic evdev API.
+
+ - BTN_GAMEPAD semantic buttons are interpreted directly,
+ since all kernel drivers are supposed to use them correctly:
+ https://www.kernel.org/doc/html/latest/input/gamepad.html
+ - BTN_JOYSTICK legacy style numbered buttons use the model specific remappers
+ - using evdev is a prerequisite for adding rumble (haptic feedback) and other extras
+ - the Linux gamepad module is enabled on FreeBSD, because
+ FreeBSD provides evdev, and libudev-devd provides enough of libudev
+ (evdev headers are provided by the devel/evdev-proto package)
+
+ Differential Revision: https://phabricator.services.mozilla.com/D98868
+---
+ dom/gamepad/linux/LinuxGamepad.cpp | 243 +++++++++++++++++++++++++++++++------
+ dom/gamepad/moz.build | 2 +-
+ 2 files changed, 210 insertions(+), 35 deletions(-)
+
+diff --git dom/gamepad/linux/LinuxGamepad.cpp dom/gamepad/linux/LinuxGamepad.cpp
+index 512ac765020d..0e51183c2a2d 100644
+--- dom/gamepad/linux/LinuxGamepad.cpp
++++ dom/gamepad/linux/LinuxGamepad.cpp
+@@ -5,15 +5,16 @@
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+ /*
+- * LinuxGamepadService: A Linux backend for the GamepadService.
+- * Derived from the kernel documentation at
+- * http://www.kernel.org/doc/Documentation/input/joystick-api.txt
++ * LinuxGamepadService: An evdev backend for the GamepadService.
++ *
++ * Ref: https://www.kernel.org/doc/html/latest/input/gamepad.html
+ */
+ #include <algorithm>
++#include <unordered_map>
+ #include <cstddef>
+
+ #include <glib.h>
+-#include <linux/joystick.h>
++#include <linux/input.h>
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <sys/ioctl.h>
+@@ -21,10 +22,14 @@
+ #include "nscore.h"
+ #include "mozilla/dom/GamepadHandle.h"
+ #include "mozilla/dom/GamepadPlatformService.h"
++#include "mozilla/dom/GamepadRemapping.h"
+ #include "mozilla/Tainting.h"
+ #include "mozilla/UniquePtr.h"
+ #include "udev.h"
+
++#define LONG_BITS (sizeof(long) * 8)
++#define NLONGS(x) (((x) + LONG_BITS - 1) / LONG_BITS)
++
+ namespace {
+
+ using namespace mozilla::dom;
+@@ -36,19 +41,29 @@ using mozilla::udev_list_entry;
+ using mozilla::udev_monitor;
+ using mozilla::UniquePtr;
+
+-static const float kMaxAxisValue = 32767.0;
+-static const char kJoystickPath[] = "/dev/input/js";
++static const char kEvdevPath[] = "/dev/input/event";
++
++static inline bool TestBit(const unsigned long* arr, int bit) {
++ return !!(arr[bit / LONG_BITS] & (1LL << (bit % LONG_BITS)));
++}
++
++static inline double ScaleAxis(const input_absinfo& info, int value) {
++ return 2.0 * (value - info.minimum) / (double)(info.maximum - info.minimum) -
++ 1.0;
++}
+
+ // TODO: should find a USB identifier for each device so we can
+ // provide something that persists across connect/disconnect cycles.
+-typedef struct {
++struct Gamepad {
+ GamepadHandle handle;
+- guint source_id;
+- int numAxes;
+- int numButtons;
+- char idstring[256];
+- char devpath[PATH_MAX];
+-} Gamepad;
++ RefPtr<GamepadRemapper> remapper = nullptr;
++ guint source_id = UINT_MAX;
++ char idstring[256] = {0};
++ char devpath[PATH_MAX] = {0};
++ uint8_t key_map[KEY_MAX] = {0};
++ uint8_t abs_map[ABS_MAX] = {0};
++ std::unordered_map<uint16_t, input_absinfo> abs_info;
++};
+
+ class LinuxGamepadService {
+ public:
+@@ -66,7 +81,7 @@ class LinuxGamepadService {
+ bool is_gamepad(struct udev_device* dev);
+ void ReadUdevChange();
+
+- // handler for data from /dev/input/jsN
++ // handler for data from /dev/input/eventN
+ static gboolean OnGamepadData(GIOChannel* source, GIOCondition condition,
+ gpointer data);
+
+@@ -114,8 +129,12 @@ void LinuxGamepadService::AddDevice(struct udev_device* dev) {
+ g_io_channel_set_encoding(channel, nullptr, nullptr);
+ g_io_channel_set_buffered(channel, FALSE);
+ int fd = g_io_channel_unix_get_fd(channel);
++
++ struct input_id id = {0};
++ ioctl(fd, EVIOCGID, &id);
++
+ char name[128];
+- if (ioctl(fd, JSIOCGNAME(sizeof(name)), &name) == -1) {
++ if (ioctl(fd, EVIOCGNAME(sizeof(name)), &name) == -1) {
+ strcpy(name, "unknown");
+ }
+ const char* vendor_id =
+@@ -131,20 +150,69 @@ void LinuxGamepadService::AddDevice(struct udev_device* dev) {
+ model_id = mUdev.udev_device_get_sysattr_value(parent, "id/product");
+ }
+ }
++ if (!vendor_id && id.vendor != 0) {
++ vendor_id = (const char*)alloca(5);
++ snprintf((char*)vendor_id, 5, "%04x", id.vendor);
++ }
++ if (!model_id && id.product != 0) {
++ model_id = (const char*)alloca(5);
++ snprintf((char*)model_id, 5, "%04x", id.product);
++ }
+ snprintf(gamepad->idstring, sizeof(gamepad->idstring), "%s-%s-%s",
+ vendor_id ? vendor_id : "unknown", model_id ? model_id : "unknown",
+ name);
+
+ char numAxes = 0, numButtons = 0;
+- ioctl(fd, JSIOCGAXES, &numAxes);
+- gamepad->numAxes = numAxes;
+- ioctl(fd, JSIOCGBUTTONS, &numButtons);
+- gamepad->numButtons = numButtons;
++ unsigned long key_bits[NLONGS(KEY_CNT)] = {0};
++ unsigned long abs_bits[NLONGS(ABS_CNT)] = {0};
++ ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bits)), key_bits);
++ ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(abs_bits)), abs_bits);
++ for (uint16_t i = BTN_JOYSTICK; i < KEY_MAX; i++) {
++ /* Skip proper gamepad events, they are handled directly */
++ if (i == BTN_GAMEPAD) {
++ i = BTN_THUMBR + 1;
++ continue;
++ }
++ if (i == BTN_DPAD_UP) {
++ i = BTN_DPAD_RIGHT + 1;
++ continue;
++ }
++ if (TestBit(key_bits, i)) {
++ gamepad->key_map[i] = numButtons++;
++ }
++ }
++ for (uint16_t i = 0; i < BTN_JOYSTICK; i++) {
++ if (TestBit(key_bits, i)) {
++ gamepad->key_map[i] = numButtons++;
++ }
++ }
++ for (uint16_t i = 0; i < ABS_MAX; ++i) {
++ if (TestBit(abs_bits, i)) {
++ gamepad->abs_info.emplace(i, input_absinfo{});
++ if (ioctl(fd, EVIOCGABS(i), &gamepad->abs_info[i]) < 0) {
++ continue;
++ }
++ if (gamepad->abs_info[i].minimum == gamepad->abs_info[i].maximum) {
++ gamepad->abs_info.erase(i);
++ continue;
++ }
++ gamepad->abs_map[i] = numAxes++;
++ }
++ }
++
++ bool defaultRemapper = false;
++ RefPtr<GamepadRemapper> remapper =
++ GetGamepadRemapper(id.vendor, id.product, defaultRemapper);
++ MOZ_ASSERT(remapper);
++ remapper->SetAxisCount(numAxes);
++ remapper->SetButtonCount(numButtons);
+
+ gamepad->handle = service->AddGamepad(
+- gamepad->idstring, mozilla::dom::GamepadMappingType::_empty,
+- mozilla::dom::GamepadHand::_empty, gamepad->numButtons, gamepad->numAxes,
+- 0, 0, 0); // TODO: Bug 680289, implement gamepad haptics for Linux.
++ gamepad->idstring, remapper->GetMappingType(), GamepadHand::_empty,
++ remapper->GetButtonCount(), remapper->GetAxisCount(), 0,
++ remapper->GetLightIndicatorCount(), remapper->GetTouchEventCount());
++ gamepad->remapper = remapper.forget();
++ // TODO: Bug 680289, implement gamepad haptics for Linux.
+ // TODO: Bug 1523355, implement gamepad lighindicator and touch for Linux.
+
+ gamepad->source_id =
+@@ -257,7 +325,7 @@ bool LinuxGamepadService::is_gamepad(struct udev_device* dev) {
+ if (!devpath) {
+ return false;
+ }
+- if (strncmp(kJoystickPath, devpath, sizeof(kJoystickPath) - 1) != 0) {
++ if (strncmp(kEvdevPath, devpath, sizeof(kEvdevPath) - 1) != 0) {
+ return false;
+ }
+
+@@ -292,7 +360,7 @@ gboolean LinuxGamepadService::OnGamepadData(GIOChannel* source,
+ if (condition & G_IO_ERR || condition & G_IO_HUP) return FALSE;
+
+ while (true) {
+- struct js_event event;
++ struct input_event event = {0};
+ gsize count;
+ GError* err = nullptr;
+ if (g_io_channel_read_chars(source, (gchar*)&event, sizeof(event), &count,
+@@ -301,18 +369,125 @@ gboolean LinuxGamepadService::OnGamepadData(GIOChannel* source,
+ break;
+ }
+
+- // TODO: store device state?
+- if (event.type & JS_EVENT_INIT) {
+- continue;
+- }
+-
+ switch (event.type) {
+- case JS_EVENT_BUTTON:
+- service->NewButtonEvent(gamepad->handle, event.number, !!event.value);
++ case EV_KEY:
++ switch (event.code) {
++ /* The gamepad events are meaningful, and according to
++ * https://www.kernel.org/doc/html/latest/input/gamepad.html
++ * "No other devices, that do not look/feel like a gamepad, shall
++ * report these events" */
++ case BTN_SOUTH:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_PRIMARY,
++ !!event.value);
++ break;
++ case BTN_EAST:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_SECONDARY,
++ !!event.value);
++ break;
++ case BTN_NORTH:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_QUATERNARY,
++ !!event.value);
++ break;
++ case BTN_WEST:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_TERTIARY,
++ !!event.value);
++ break;
++ case BTN_TL:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_LEFT_SHOULDER,
++ !!event.value);
++ break;
++ case BTN_TR:
++ service->NewButtonEvent(gamepad->handle,
++ BUTTON_INDEX_RIGHT_SHOULDER, !!event.value);
++ break;
++ case BTN_TL2:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_LEFT_TRIGGER,
++ !!event.value);
++ break;
++ case BTN_TR2:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_RIGHT_TRIGGER,
++ !!event.value);
++ break;
++ case BTN_SELECT:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_BACK_SELECT,
++ !!event.value);
++ break;
++ case BTN_START:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_START,
++ !!event.value);
++ break;
++ case BTN_MODE:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_META,
++ !!event.value);
++ break;
++ case BTN_THUMBL:
++ service->NewButtonEvent(
++ gamepad->handle, BUTTON_INDEX_LEFT_THUMBSTICK, !!event.value);
++ break;
++ case BTN_THUMBR:
++ service->NewButtonEvent(
++ gamepad->handle, BUTTON_INDEX_RIGHT_THUMBSTICK, !!event.value);
++ break;
++ case BTN_DPAD_UP:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_DPAD_UP,
++ !!event.value);
++ break;
++ case BTN_DPAD_DOWN:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_DPAD_DOWN,
++ !!event.value);
++ break;
++ case BTN_DPAD_LEFT:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_DPAD_LEFT,
++ !!event.value);
++ break;
++ case BTN_DPAD_RIGHT:
++ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_DPAD_RIGHT,
++ !!event.value);
++ break;
++ default:
++ /* For non-gamepad events, this is the "anything goes" numbered
++ * handling that should be handled with remappers. */
++ gamepad->remapper->RemapButtonEvent(
++ gamepad->handle, gamepad->key_map[event.code], !!event.value);
++ break;
++ }
+ break;
+- case JS_EVENT_AXIS:
+- service->NewAxisMoveEvent(gamepad->handle, event.number,
+- ((float)event.value) / kMaxAxisValue);
++ case EV_ABS:
++ if (!gamepad->abs_info.count(event.code)) continue;
++ switch (event.code) {
++ case ABS_HAT0X:
++ service->NewButtonEvent(
++ gamepad->handle, BUTTON_INDEX_DPAD_LEFT,
++ AxisNegativeAsButton(
++ ScaleAxis(gamepad->abs_info[event.code], event.value)));
++ service->NewButtonEvent(
++ gamepad->handle, BUTTON_INDEX_DPAD_RIGHT,
++ AxisPositiveAsButton(
++ ScaleAxis(gamepad->abs_info[event.code], event.value)));
++ break;
++ case ABS_HAT0Y:
++ service->NewButtonEvent(
++ gamepad->handle, BUTTON_INDEX_DPAD_UP,
++ AxisNegativeAsButton(
++ ScaleAxis(gamepad->abs_info[event.code], event.value)));
++ service->NewButtonEvent(
++ gamepad->handle, BUTTON_INDEX_DPAD_DOWN,
++ AxisPositiveAsButton(
++ ScaleAxis(gamepad->abs_info[event.code], event.value)));
++ break;
++ case ABS_HAT1X:
++ case ABS_HAT1Y:
++ case ABS_HAT2X:
++ case ABS_HAT2Y:
++ case ABS_HAT3X:
++ case ABS_HAT3Y:
++ break;
++ default:
++ gamepad->remapper->RemapAxisMoveEvent(
++ gamepad->handle, gamepad->abs_map[event.code],
++ ScaleAxis(gamepad->abs_info[event.code], event.value));
++ break;
++ }
+ break;
+ }
+ }
+diff --git dom/gamepad/moz.build dom/gamepad/moz.build
+index 5f55d5a95e96..b5d10e9d095a 100644
+--- dom/gamepad/moz.build
++++ dom/gamepad/moz.build
+@@ -59,7 +59,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
+ UNIFIED_SOURCES += ["windows/WindowsGamepad.cpp"]
+ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
+ UNIFIED_SOURCES += ["android/AndroidGamepad.cpp"]
+-elif CONFIG["OS_ARCH"] == "Linux":
++elif CONFIG["OS_ARCH"] == "Linux" or CONFIG["OS_ARCH"] == "FreeBSD":
+ UNIFIED_SOURCES += ["linux/LinuxGamepad.cpp"]
+ else:
+ UNIFIED_SOURCES += ["fallback/FallbackGamepad.cpp"]
diff --git a/www/firefox/files/patch-bug1684261 b/www/firefox/files/patch-bug1684261
deleted file mode 100644
index 954c0df10cf9..000000000000
--- a/www/firefox/files/patch-bug1684261
+++ /dev/null
@@ -1,78 +0,0 @@
-
-# HG changeset patch
-# User Emilio Cobos Álvarez <emilio@crisal.io>
-# Date 1609006565 0
-# Node ID 48f46a7eada94d51d8bd508b5122642865ddef3d
-# Parent f1bc2b9069ab9b6a246c10501782c0af267c77d7
-Bug 1684261 - Fix build with rust nightly. r=jrmuizel
-
-Fixes errors like:
-
- dependency (nix) specification is ambiguous. Only one of `branch`, `tag` or `rev` is allowed.
-
-I've left the most specific dependency, but for wgpu the rev is not
-right, so I've kept the branch which effectively preserves behavior.
-
-Differential Revision: https://phabricator.services.mozilla.com/D100485
-
---- .cargo/config.in.orig 2021-02-12 15:09:04.023268000 +0100
-+++ .cargo/config.in 2021-02-12 15:09:20.428857000 +0100
-@@ -3,9 +3,9 @@
- # Please do not edit.
-
- [source."https://github.com/shravanrn/nix/"]
--branch = "r0.13.1"
- git = "https://github.com/shravanrn/nix/"
- replace-with = "vendored-sources"
-+rev = "4af6c367603869a30fddb5ffb0aba2b9477ba92e"
-
- [source."https://github.com/mozilla/neqo"]
- git = "https://github.com/mozilla/neqo"
-
-diff --git a/Cargo.lock b/Cargo.lock
---- Cargo.lock
-+++ Cargo.lock
-@@ -3447,17 +3447,17 @@ source = "registry+https://github.com/ru
- checksum = "0cdc457076c78ab54d5e0d6fa7c47981757f1e34dc39ff92787f217dede586c4"
- dependencies = [
- "unreachable",
- ]
-
- [[package]]
- name = "nix"
- version = "0.13.1"
--source = "git+https://github.com/shravanrn/nix/?branch=r0.13.1#4af6c367603869a30fddb5ffb0aba2b9477ba92e"
-+source = "git+https://github.com/shravanrn/nix/?rev=4af6c367603869a30fddb5ffb0aba2b9477ba92e#4af6c367603869a30fddb5ffb0aba2b9477ba92e"
- dependencies = [
- "bitflags",
- "cc",
- "cfg-if 0.1.10",
- "libc",
- "void",
- ]
-
-diff --git a/Cargo.toml b/Cargo.toml
---- Cargo.toml
-+++ Cargo.toml
-@@ -70,18 +70,18 @@ opt-level = 1
- [profile.release.build-override]
- opt-level = 1
-
- [patch.crates-io]
- chardetng = { git = "https://github.com/hsivonen/chardetng", rev="7d5e0608d3e012bdfea3bd199111e3546607dd31" }
- libudev-sys = { path = "dom/webauthn/libudev-sys" }
- packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="0917fe780032a6bbb23d71be545f9c1834128d75" }
- rlbox_lucet_sandbox = { git = "https://github.com/PLSysSec/rlbox_lucet_sandbox/", rev="f3cace4fb8b53db0849c62af4fa62bade5a620f7" }
--nix = { git = "https://github.com/shravanrn/nix/", branch = "r0.13.1", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" }
--spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu4", rev = "e9eff10f964957e7a001c5f712effe17ce09aa99" }
-+nix = { git = "https://github.com/shravanrn/nix/", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" }
-+spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu4" }
- # failure's backtrace feature might break our builds, see bug 1608157.
- failure = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" }
- failure_derive = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" }
-
- [patch.crates-io.cranelift-codegen]
- git = "https://github.com/mozilla-spidermonkey/wasmtime"
- rev = "3334d92350da40b90d2529c147db3ea44918b558"
-
-
diff --git a/www/firefox/files/patch-bug1686713 b/www/firefox/files/patch-bug1686713
new file mode 100644
index 000000000000..f4e1eb4c0a98
--- /dev/null
+++ b/www/firefox/files/patch-bug1686713
@@ -0,0 +1,76 @@
+commit 89e72841a8f5
+Author: Greg V <greg@unrelenting.technology>
+Date: Thu Jan 14 22:16:53 2021 +0000
+
+ Bug 1686713 - Fix mozglue/misc/Uptime build on *BSD
+---
+ mozglue/misc/Uptime.cpp | 28 +++++++++++++++++-----------
+ 1 file changed, 17 insertions(+), 11 deletions(-)
+
+diff --git mozglue/misc/Uptime.cpp mozglue/misc/Uptime.cpp
+index bded4017ec13..0e953101994d 100644
+--- mozglue/misc/Uptime.cpp
++++ mozglue/misc/Uptime.cpp
+@@ -43,9 +43,7 @@ Maybe<uint64_t> NowIncludingSuspendMs() {
+ return Some(clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW) / kNSperMS);
+ }
+
+-#endif // macOS
+-
+-#if defined(XP_WIN)
++#elif defined(XP_WIN)
+
+ // Number of hundreds of nanoseconds in a millisecond
+ static constexpr uint64_t kHNSperMS = 10000;
+@@ -77,11 +75,23 @@ Maybe<uint64_t> NowIncludingSuspendMs() {
+ pQueryInterruptTime(&interrupt_time);
+ return Some(interrupt_time / kHNSperMS);
+ }
+-#endif // XP_WIN
+
+-#if defined(XP_LINUX) // including Android
++#else
++
+ # include <time.h>
+
++# ifdef CLOCK_UPTIME // FreeBSD, OpenBSD
++# define CLOCK_EXCLUDING_SUSPEND CLOCK_UPTIME
++# else
++# define CLOCK_EXCLUDING_SUSPEND CLOCK_MONOTONIC
++# endif
++
++# ifdef CLOCK_BOOTTIME // Linux (including Android), OpenBSD (== MONOTONIC)
++# define CLOCK_INCLUDING_SUSPEND CLOCK_BOOTTIME
++# else
++# define CLOCK_INCLUDING_SUSPEND CLOCK_MONOTONIC
++# endif
++
+ // Number of nanoseconds in a millisecond.
+ static constexpr uint64_t kNSperMS = 1000000;
+
+@@ -92,23 +102,19 @@ uint64_t TimespecToMilliseconds(struct timespec aTs) {
+ Maybe<uint64_t> NowExcludingSuspendMs() {
+ struct timespec ts = {0};
+
+- if (clock_gettime(CLOCK_MONOTONIC, &ts)) {
++ if (clock_gettime(CLOCK_EXCLUDING_SUSPEND, &ts)) {
+ return Nothing();
+ }
+ return Some(TimespecToMilliseconds(ts));
+ }
+
+ Maybe<uint64_t> NowIncludingSuspendMs() {
+-# ifndef CLOCK_BOOTTIME
+- return Nothing();
+-# else
+ struct timespec ts = {0};
+
+- if (clock_gettime(CLOCK_BOOTTIME, &ts)) {
++ if (clock_gettime(CLOCK_INCLUDING_SUSPEND, &ts)) {
+ return Nothing();
+ }
+ return Some(TimespecToMilliseconds(ts));
+-# endif
+ }
+
+ #endif // XP_LINUX
diff --git a/www/firefox/files/patch-bug1687487 b/www/firefox/files/patch-bug1687487
deleted file mode 100644
index fcccbead6880..000000000000
--- a/www/firefox/files/patch-bug1687487
+++ /dev/null
@@ -1,159 +0,0 @@
-commit f48008ba21c0
-Author: Paul Adenot <paul@paul.cx>
-Date: Tue Jan 19 07:04:00 2021 -0800
-
- Bug 1687487 - Update libcubeb to 4a83932. r=kinetik
----
- media/libcubeb/moz.yaml | 2 +-
- media/libcubeb/src/cubeb_oss.c | 43 ++++++++++++++++++++++++++++++-------
- media/libcubeb/src/cubeb_wasapi.cpp | 24 ++++++++++-----------
- 3 files changed, 48 insertions(+), 21 deletions(-)
-
-diff --git media/libcubeb/moz.yaml media/libcubeb/moz.yaml
-index c90f95e09a0a..c2eea799d1bf 100644
---- media/libcubeb/moz.yaml
-+++ media/libcubeb/moz.yaml
-@@ -19,5 +19,5 @@ origin:
- license: "ISC"
-
- # update.sh will update this value
-- release: "85f1cf48dffd749dd32798681955155e1a1a6ff5 (2020-12-07 08:11:33 +0000)"
-+ release: "4a83932caee16c9ee404b39144620fcbcc7a842f (2021-01-19 16:05:14 +0100)"
-
-diff --git media/libcubeb/src/cubeb_oss.c media/libcubeb/src/cubeb_oss.c
-index 32a4bf6de482..8c44c9e8d08a 100644
---- media/libcubeb/src/cubeb_oss.c
-+++ media/libcubeb/src/cubeb_oss.c
-@@ -781,6 +781,28 @@ oss_put_play_frames(cubeb_stream * s, unsigned int nframes)
- return 0;
- }
-
-+static int
-+oss_wait_playfd_for_space(cubeb_stream * s)
-+{
-+ /* For non-duplex stream we have to wait until we have space in the
-+ * buffer */
-+ int rate = s->play.info.sample_rate;
-+ struct pollfd pfd;
-+
-+ pfd.events = POLLOUT|POLLHUP;
-+ pfd.revents = 0;
-+ pfd.fd = s->play.fd;
-+
-+ if (poll(&pfd, 1, s->nfr * 1000 + rate - 1 / rate) == -1) {
-+ return CUBEB_ERROR;
-+ }
-+
-+ if (pfd.revents & POLLHUP) {
-+ return CUBEB_ERROR;
-+ }
-+ return 0;
-+}
-+
- /* 1 - Stopped by cubeb_stream_stop, otherwise 0 */
- static int
- oss_audio_loop(cubeb_stream * s, cubeb_state *new_state)
-@@ -873,26 +895,31 @@ oss_audio_loop(cubeb_stream * s, cubeb_state *new_state)
- goto breakdown;
- }
-
-- audio_buf_info bi;
- if (play_on) {
-- if (ioctl(s->play.fd, SNDCTL_DSP_GETOSPACE, &bi)) {
-- state = CUBEB_STATE_ERROR;
-- goto breakdown;
-- }
- /*
- * In duplex mode, playback direction drives recording direction to
- * prevent building up latencies.
- */
-+
-+ if (oss_wait_playfd_for_space(s) != 0) {
-+ state = CUBEB_STATE_ERROR;
-+ goto breakdown;
-+ }
-+
-+ audio_buf_info bi;
-+ if (ioctl(s->play.fd, SNDCTL_DSP_GETOSPACE, &bi)) {
-+ state = CUBEB_STATE_ERROR;
-+ goto breakdown;
-+ }
- nfr = bi.fragsize * bi.fragments / s->play.frame_size;
- if (nfr > s->bufframes) {
- nfr = s->bufframes;
- }
-+ } else {
-+ nfr = s->nfr;
- }
-
- if (record_on) {
-- if (nfr == 0) {
-- nfr = s->nfr;
-- }
- if (oss_get_rec_frames(s, nfr) == CUBEB_ERROR) {
- state = CUBEB_STATE_ERROR;
- goto breakdown;
-diff --git media/libcubeb/src/cubeb_wasapi.cpp media/libcubeb/src/cubeb_wasapi.cpp
-index 30a6d06c7e20..b7b337ce7829 100644
---- media/libcubeb/src/cubeb_wasapi.cpp
-+++ media/libcubeb/src/cubeb_wasapi.cpp
-@@ -778,12 +778,6 @@ hns_to_frames(cubeb_stream * stm, REFERENCE_TIME hns)
- return hns_to_frames(get_rate(stm), hns);
- }
-
--REFERENCE_TIME
--frames_to_hns(cubeb_stream * stm, uint32_t frames)
--{
-- return std::ceil(frames * 10000000.0 / get_rate(stm));
--}
--
- REFERENCE_TIME
- frames_to_hns(uint32_t rate, uint32_t frames)
- {
-@@ -1834,7 +1828,8 @@ initialize_iaudioclient2(com_ptr<IAudioClient> & audio_client)
- return CUBEB_OK;
- }
-
--static bool
-+// Not static to suppress a warning.
-+/* static */ bool
- initialize_iaudioclient3(com_ptr<IAudioClient> & audio_client,
- cubeb_stream * stm,
- const com_heap_ptr<WAVEFORMATEX> & mix_format,
-@@ -2185,7 +2180,7 @@ int setup_wasapi_stream_one_side(cubeb_stream * stm,
-
- void wasapi_find_matching_output_device(cubeb_stream * stm) {
- HRESULT hr;
-- cubeb_device_info * input_device;
-+ cubeb_device_info * input_device = nullptr;
- cubeb_device_collection collection;
-
- // Only try to match to an output device if the input device is a bluetooth
-@@ -2207,6 +2202,9 @@ void wasapi_find_matching_output_device(cubeb_stream * stm) {
- }
-
- int rv = wasapi_enumerate_devices(stm->context, (cubeb_device_type)(CUBEB_DEVICE_TYPE_INPUT|CUBEB_DEVICE_TYPE_OUTPUT), &collection);
-+ if (rv != CUBEB_OK) {
-+ return;
-+ }
-
- // Find the input device, and then find the output device with the same group
- // id and the same rate.
-@@ -2220,11 +2218,13 @@ void wasapi_find_matching_output_device(cubeb_stream * stm) {
-
- for (uint32_t i = 0; i < collection.count; i++) {
- cubeb_device_info dev = collection.device[i];
-- if (dev.type == CUBEB_DEVICE_TYPE_OUTPUT &&
-- dev.group_id && !strcmp(dev.group_id, input_device->group_id) &&
-+ if (dev.type == CUBEB_DEVICE_TYPE_OUTPUT && dev.group_id && input_device &&
-+ !strcmp(dev.group_id, input_device->group_id) &&
- dev.default_rate == input_device->default_rate) {
-- LOG("Found matching device for %s: %s", input_device->friendly_name, dev.friendly_name);
-- stm->output_device_id = utf8_to_wstr(reinterpret_cast<char const *>(dev.devid));
-+ LOG("Found matching device for %s: %s", input_device->friendly_name,
-+ dev.friendly_name);
-+ stm->output_device_id =
-+ utf8_to_wstr(reinterpret_cast<char const *>(dev.devid));
- }
- }
-
diff --git a/www/firefox/files/patch-bug1690152 b/www/firefox/files/patch-bug1690152
deleted file mode 100644
index 49bdaf42be7e..000000000000
--- a/www/firefox/files/patch-bug1690152
+++ /dev/null
@@ -1,97 +0,0 @@
-
-# HG changeset patch
-# User Cameron Kaiser <spectre@floodgap.com>
-# Date 1612231460 0
-# Node ID 579a66fd796690fb752485215b2edaa6167ebf16
-# Parent a00504e040bfd34d01c74d478beb9d308ec085be
-Bug 1690152 - on ppc64 properly skip parameter slots if we overflow GPRs while still having FPRs to burn. r=tcampbell
-
-Differential Revision: https://phabricator.services.mozilla.com/D103724
-
-diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc64_linux.cpp b/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc64_linux.cpp
---- xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc64_linux.cpp
-+++ xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc64_linux.cpp
-@@ -86,27 +86,37 @@ extern "C" void invoke_copy_to_stack(uin
- case nsXPTType::T_WCHAR: value = s->val.wc; break;
- default: value = (uint64_t) s->val.p; break;
- }
- }
-
- if (!s->IsIndirect() && s->type == nsXPTType::T_DOUBLE) {
- if (nr_fpr < FPR_COUNT) {
- fpregs[nr_fpr++] = s->val.d;
-- nr_gpr++;
-+ // Even if we have enough FPRs, still skip space in
-+ // the parameter area if we ran out of placeholder GPRs.
-+ if (nr_gpr < GPR_COUNT) {
-+ nr_gpr++;
-+ } else {
-+ d++;
-+ }
- } else {
- *((double *)d) = s->val.d;
- d++;
- }
- }
- else if (!s->IsIndirect() && s->type == nsXPTType::T_FLOAT) {
- if (nr_fpr < FPR_COUNT) {
- // Single-precision floats are passed in FPRs too.
- fpregs[nr_fpr++] = s->val.f;
-- nr_gpr++;
-+ if (nr_gpr < GPR_COUNT) {
-+ nr_gpr++;
-+ } else {
-+ d++;
-+ }
- } else {
- #ifdef __LITTLE_ENDIAN__
- *((float *)d) = s->val.f;
- #else
- // Big endian needs adjustment to point to the least
- // significant word.
- float* p = (float*)d;
- p++;
-diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp
---- xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp
-+++ xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp
-@@ -98,27 +98,37 @@ PrepareAndDispatch(nsXPTCStubBase * self
- nr_gpr++;
- else
- ap++;
- }
-
- if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
- if (nr_fpr < FPR_COUNT) {
- dp->val.d = fpregs[nr_fpr++];
-- nr_gpr++;
-+ // Even if we have enough FPRs, still skip space in
-+ // the parameter area if we ran out of placeholder GPRs.
-+ if (nr_gpr < GPR_COUNT) {
-+ nr_gpr++;
-+ } else {
-+ ap++;
-+ }
- } else {
- dp->val.d = *(double*)ap++;
- }
- continue;
- }
- if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
- if (nr_fpr < FPR_COUNT) {
- // Single-precision floats are passed in FPRs too.
- dp->val.f = (float)fpregs[nr_fpr++];
-- nr_gpr++;
-+ if (nr_gpr < GPR_COUNT) {
-+ nr_gpr++;
-+ } else {
-+ ap++;
-+ }
- } else {
- #ifdef __LITTLE_ENDIAN__
- dp->val.f = *(float*)ap++;
- #else
- // Big endian needs adjustment to point to the least
- // significant word.
- float* p = (float*)ap;
- p++;
-
diff --git a/www/firefox/pkg-message b/www/firefox/pkg-message
index cd87a3f55921..1d1e028646d8 100644
--- a/www/firefox/pkg-message
+++ b/www/firefox/pkg-message
@@ -9,7 +9,6 @@ Some features found on Windows, macOS and Linux are not implemented:
- Process sandboxing (requires Capsicum backend)
- Reduced memory usage (requires mozjemalloc)
- Crash Reporter (requires Google Breakpad and reproducible builds)
-- Gamepad API (requires libusbhid backend)
- WebVR (requires open source runtime)
- TCP fast open
- `about:networking` (requires link state notification)
@@ -30,6 +29,11 @@ Microphone selection only works in `oss`, `pulse`, `pulse-rust` backends.
Other backends are limited to `default` which is usually `/dev/dsp`,
so use virtual_oss to reroute microphones from non-default devices.
+## Gamepad API
+
+Requires evdev(4) joystick support. On FreeBSD 13.0 enable hgame(4)
+while older versions can use sysutils/iichid or multimedia/webcamd.
+
## smb:// issues
Network group, machine, and share browsing does not work correctly.