summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathon Fernyhough2022-03-23 02:28:00 +0000
committerJonathon Fernyhough2022-03-23 02:28:00 +0000
commit9b643ec594554f139e120bcc20ab3b3771d05495 (patch)
tree0f3f41fc107b549c4e34926dca9b36f7621045e4
parent101141494b878e79326e6302441d42ca42332687 (diff)
downloadaur-9b643ec594554f139e120bcc20ab3b3771d05495.tar.gz
Side-by-side installation fixes
-rw-r--r--.SRCINFO6
-rw-r--r--0001-Use-remoting-name-for-GDK-application-names.patch57
-rw-r--r--PKGBUILD17
-rw-r--r--firefox-esr.desktop8
4 files changed, 78 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0edf19150966..c61f64465127 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = firefox-esr
pkgdesc = Standalone web browser from mozilla.org, Extended Support Release
pkgver = 91.7.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.mozilla.org/en-US/firefox/enterprise/
arch = x86_64
license = MPL
@@ -49,12 +49,14 @@ pkgbase = firefox-esr
options = !debug
source = https://archive.mozilla.org/pub/firefox/releases/91.7.0esr/source/firefox-91.7.0esr.source.tar.xz
source = https://archive.mozilla.org/pub/firefox/releases/91.7.0esr/source/firefox-91.7.0esr.source.tar.xz.asc
+ source = 0001-Use-remoting-name-for-GDK-application-names.patch
source = firefox-esr.desktop
source = identity-icons-brand.svg
validpgpkeys = 14F26682D0916CDD81E37B6D61B7B526D98F0353
sha256sums = 9c3ae9abe1ef10d66d64cbbee96ba2c16840098de8fe0285959f04160d0fee5a
sha256sums = SKIP
- sha256sums = 39c4c2d1f465e3fb08e20e3036c2284ee3e8dfbd539abe4ffea3c46b4058f16d
+ sha256sums = 138b972a40a74104791783167770c4a01e62cce00bb9cc75119e152f9ea9f14d
+ sha256sums = c798853574da42bc22b066acb4b0bfdd630dc05b22560fcf0db9235b4207e051
sha256sums = a9b8b4a0a1f4a7b4af77d5fc70c2686d624038909263c795ecc81e0aec7711e9
pkgname = firefox-esr
diff --git a/0001-Use-remoting-name-for-GDK-application-names.patch b/0001-Use-remoting-name-for-GDK-application-names.patch
new file mode 100644
index 000000000000..17e0e2cfccb9
--- /dev/null
+++ b/0001-Use-remoting-name-for-GDK-application-names.patch
@@ -0,0 +1,57 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
+Date: Mon, 25 Mar 2019 20:30:11 +0100
+Subject: [PATCH] Use remoting name for GDK application names
+
+---
+ toolkit/xre/nsAppRunner.cpp | 6 +-----
+ widget/gtk/nsAppShell.cpp | 12 +++++-------
+ 2 files changed, 6 insertions(+), 12 deletions(-)
+
+diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
+index d3bb8096ad02e..95ccce28fa786 100644
+--- a/toolkit/xre/nsAppRunner.cpp
++++ b/toolkit/xre/nsAppRunner.cpp
+@@ -4262,11 +4262,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
+ // consistently.
+
+ // Set program name to the one defined in application.ini.
+- {
+- nsAutoCString program(gAppData->name);
+- ToLowerCase(program);
+- g_set_prgname(program.get());
+- }
++ g_set_prgname(gAppData->remotingName);
+
+ // Initialize GTK here for splash.
+
+diff --git a/widget/gtk/nsAppShell.cpp b/widget/gtk/nsAppShell.cpp
+index 60de473de07ab..004c066575c17 100644
+--- a/widget/gtk/nsAppShell.cpp
++++ b/widget/gtk/nsAppShell.cpp
+@@ -24,6 +24,8 @@
+ # include "WakeLockListener.h"
+ #endif
+ #include "gfxPlatform.h"
++#include "nsAppRunner.h"
++#include "mozilla/XREAppData.h"
+ #include "ScreenHelperGTK.h"
+ #include "HeadlessScreenHelper.h"
+ #include "mozilla/widget/ScreenManager.h"
+@@ -152,13 +154,9 @@ nsresult nsAppShell::Init() {
+ // See https://bugzilla.gnome.org/show_bug.cgi?id=747634
+ //
+ // Only bother doing this for the parent process, since it's the one
+- // creating top-level windows. (At this point, a child process hasn't
+- // received the list of registered chrome packages, so the
+- // GetBrandShortName call would fail anyway.)
+- nsAutoString brandName;
+- mozilla::widget::WidgetUtils::GetBrandShortName(brandName);
+- if (!brandName.IsEmpty()) {
+- gdk_set_program_class(NS_ConvertUTF16toUTF8(brandName).get());
++ // creating top-level windows.
++ if (gAppData) {
++ gdk_set_program_class(gAppData->remotingName);
+ }
+ }
+ }
diff --git a/PKGBUILD b/PKGBUILD
index 5ff6bdbe466d..16f1f0f2165e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=firefox-esr
pkgver=91.7.0
-pkgrel=1
+pkgrel=2
pkgdesc="Standalone web browser from mozilla.org, Extended Support Release"
arch=(x86_64)
license=(MPL GPL LGPL)
@@ -23,10 +23,12 @@ optdepends=('networkmanager: Location detection via available WiFi networks'
'xdg-desktop-portal: Screensharing with Wayland')
options=(!emptydirs !makeflags !strip !lto !debug)
source=(https://archive.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz{,.asc}
+ 0001-Use-remoting-name-for-GDK-application-names.patch
$pkgname.desktop identity-icons-brand.svg)
sha256sums=('9c3ae9abe1ef10d66d64cbbee96ba2c16840098de8fe0285959f04160d0fee5a'
'SKIP'
- '39c4c2d1f465e3fb08e20e3036c2284ee3e8dfbd539abe4ffea3c46b4058f16d'
+ '138b972a40a74104791783167770c4a01e62cce00bb9cc75119e152f9ea9f14d'
+ 'c798853574da42bc22b066acb4b0bfdd630dc05b22560fcf0db9235b4207e051'
'a9b8b4a0a1f4a7b4af77d5fc70c2686d624038909263c795ecc81e0aec7711e9')
validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases <release@mozilla.com>
@@ -46,6 +48,9 @@ prepare() {
mkdir mozbuild
cd firefox-$pkgver
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1530052
+ patch -Np1 -i ../0001-Use-remoting-name-for-GDK-application-names.patch
+
echo -n "$_google_api_key" >google-api-key
echo -n "$_mozilla_api_key" >mozilla-api-key
@@ -68,8 +73,9 @@ ac_add_options --enable-update-channel=release
ac_add_options --with-distribution-id=org.archlinux
ac_add_options --with-unsigned-addon-scopes=app,system
ac_add_options --allow-addon-sideload
+ac_add_options --with-app-name=$pkgname
export MOZILLA_OFFICIAL=1
-export MOZ_APP_REMOTINGNAME=${pkgname//-/}
+export MOZ_APP_REMOTINGNAME=$pkgname
# Keys
ac_add_options --with-google-location-service-api-keyfile=${PWD@Q}/google-api-key
@@ -97,6 +103,9 @@ build() {
export MOZ_ENABLE_FULL_SYMBOLS=1
export MACH_USE_SYSTEM_PYTHON=1
+ export MOZ_BUILD_DATE=$(head -1 sourcestamp.txt)
+ export RUSTFLAGS="-C debuginfo=1"
+
# LTO needs more open files
ulimit -n 4096
@@ -188,7 +197,7 @@ END
# Install a wrapper to avoid confusion about binary path
install -Dvm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <<END
#!/bin/sh
-exec /usr/lib/$pkgname/firefox "\$@"
+exec /usr/lib/$pkgname/firefox-esr "\$@"
END
# Replace duplicate binary with wrapper
diff --git a/firefox-esr.desktop b/firefox-esr.desktop
index f0945bc319cc..e5b04f83bd9a 100644
--- a/firefox-esr.desktop
+++ b/firefox-esr.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
Version=1.0
-Name=Firefox
+Name=Firefox ESR
GenericName=Web Browser
GenericName[ar]=متصفح ويب
GenericName[ast]=Restolador Web
@@ -112,7 +112,7 @@ Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;п
Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web
Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;Firefox;ff;互联网;网站;
Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐
-Exec=/usr/lib/firefox/firefox %u
+Exec=/usr/lib/firefox-esr/firefox-esr %u
Icon=firefox-esr
Terminal=false
X-MultipleArgs=false
@@ -229,7 +229,7 @@ Name[wo]=Palanteer bu bees
Name[xh]=Ifestile entsha
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
-Exec=/usr/lib/firefox/firefox --new-window %u
+Exec=/usr/lib/firefox-esr/firefox-esr --new-window %u
[Desktop Action new-private-window]
Name=New Private Window
@@ -337,4 +337,4 @@ Name[wo]=Panlanteeru biir bu bees
Name[xh]=Ifestile yangasese entsha
Name[zh_CN]=新建隐私浏览窗口
Name[zh_TW]=新增隱私視窗
-Exec=/usr/lib/firefox/firefox --private-window %u
+Exec=/usr/lib/firefox-esr/firefox-esr --private-window %u