From bad7af195a945bdd9c06050a9782122aa723eb97 Mon Sep 17 00:00:00 2001 From: git-bruh Date: Mon, 30 Oct 2023 23:05:35 +0530 Subject: [PATCH] firefox: fix target detection, closes #164 --- extra/firefox/checksums | 1 + .../patches/fix-target-detection.patch | 19 +++++++++++++++++++ extra/firefox/sources | 1 + 3 files changed, 21 insertions(+) create mode 100644 extra/firefox/patches/fix-target-detection.patch diff --git a/extra/firefox/checksums b/extra/firefox/checksums index cf204a32..b29e3b0a 100644 --- a/extra/firefox/checksums +++ b/extra/firefox/checksums @@ -1,4 +1,5 @@ d86c192c0cfb9d2df3ca2376b6503c282794040d301561ee213473ae1dc0663aa8 +3e4e722acd2ab2e38a16ec23b29296318d77cc54f034d4b21d91bde085e26bc0a3 49e95cf848c09df618587bb8286bed3ed9531e24554b9ef275f070201078dba7f5 ee279241e461011e2265086328d9d0a913ab938bb81aa97fa22b8b9b7edf5e33bc 8c0f419eb138061e67dbe2ac73e9c8332649fb90aacb57ac4f00d5de94c0cf23a8 diff --git a/extra/firefox/patches/fix-target-detection.patch b/extra/firefox/patches/fix-target-detection.patch new file mode 100644 index 00000000..8e115a3d --- /dev/null +++ b/extra/firefox/patches/fix-target-detection.patch @@ -0,0 +1,19 @@ +diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure +index 7a2fd1a..ba5ba62 100644 +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -403,9 +403,13 @@ def detect_rustc_target( + ] + if len(narrowed) == 1: + return narrowed[0].rust_target ++ elif narrowed: ++ candidates = narrowed ++ ++ aliased_vendor = "unknown" if host_or_target.vendor == "pc" else host_or_target.vendor + + # Finally, see if the vendor can be used to disambiguate. +- narrowed = [c for c in candidates if c.target.vendor == host_or_target.vendor] ++ narrowed = [c for c in candidates if c.target.vendor == aliased_vendor] + if len(narrowed) == 1: + return narrowed[0].rust_target + diff --git a/extra/firefox/sources b/extra/firefox/sources index 55098a72..2eb31f5c 100644 --- a/extra/firefox/sources +++ b/extra/firefox/sources @@ -1,4 +1,5 @@ https://ftp.mozilla.org/pub/firefox/releases/119.0/source/firefox-119.0.source.tar.xz +patches/fix-target-detection.patch patches/fix-vaapi.patch patches/musl-sandbox.patch patches/no-atk.patch