firefox-esr: update to 60.5.0.

[ci skip]
This commit is contained in:
John Zimmermann 2019-01-31 15:57:29 +01:00
parent bd3e876380
commit 9eba8388ff
18 changed files with 338 additions and 296 deletions

View File

@ -1,121 +0,0 @@
[Desktop Entry]
Name=Firefox
Name[bn]=
Name[eo]=Fajrovulpo
Name[fi]=Firefox
Name[pa]=
Name[tg]=Рӯбоҳи оташин
GenericName=Web Browser
GenericName[af]=Web Blaaier
GenericName[ar]=متصفح ويب
GenericName[az]=Veb Səyyahı
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[br]=Furcher ar Gwiad
GenericName[bs]=WWW Preglednik
GenericName[ca]=Fullejador web
GenericName[cs]=WWW prohlížeč
GenericName[cy]=Porydd Gwe
GenericName[da]=Browser
GenericName[de]=Web-Browser
GenericName[el]=Περιηγητής Ιστού
GenericName[eo]=TTT-legilo
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fa]=مرورگر وب
GenericName[fi]=WWW-selain
GenericName[fo]=Alnótsfar
GenericName[fr]=Navigateur web
GenericName[gl]=Navegador Web
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[is]=Vafri
GenericName[it]=Browser Web
GenericName[ja]=
GenericName[ko]=
GenericName[lo]=
GenericName[lt]=Žiniatinklio naršyklė
GenericName[lv]=Web Pārlūks
GenericName[mk]=Прелистувач на Интернет
GenericName[mn]=Веб-Хөтөч
GenericName[nb]=Nettleser
GenericName[nds]=Nettkieker
GenericName[nl]=Webbrowser
GenericName[nn]=Nettlesar
GenericName[nso]=Seinyakisi sa Web
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator de web
GenericName[ru]=Веб-браузер
GenericName[se]=Fierpmádatlogan
GenericName[sk]=Webový prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sr]=Веб претраживач
GenericName[sr@Latn]=Veb pretraživač
GenericName[ss]=Ibrawuza yeWeb
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[tg]=Тафсиргари вэб
GenericName[th]=
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Навігатор Тенет
GenericName[uz]=Веб-браузер
GenericName[ven]=Buronza ya Webu
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[xh]=Umkhangeli zincwadi we Web
GenericName[zh_CN]=
GenericName[zh_TW]=
GenericName[zu]=Umcingi we-Web
Comment=Browse the World Wide Web
Comment[ar]=تصفح الشبكة العنكبوتية العالمية
Comment[ast]=Restola pela Rede
Comment[bn]=
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížení stránek World Wide Webu
Comment[da]=Surf på internettet
Comment[de]=Im Internet surfen
Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web)
Comment[es]=Navegue por la web
Comment[et]=Lehitse veebi
Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید
Comment[fi]=Selaa Internetin WWW-sivuja
Comment[fr]=Naviguer sur le Web
Comment[gl]=Navegar pola rede
Comment[he]=גלישה ברחבי האינטרנט
Comment[hr]=Pretražite web
Comment[hu]=A világháló böngészése
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[ku]=Li torê bigere
Comment[lt]=Naršykite internete
Comment[nb]=Surf på nettet
Comment[nl]=Verken het internet
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegue na Internet
Comment[pt_BR]=Navegue na Internet
Comment[ro]=Navigați pe Internet
Comment[ru]=Доступ в Интернет
Comment[sk]=Prehliadanie internetu
Comment[sl]=Brskajte po spletu
Comment[sv]=Surfa på webben
Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ
Comment[uk]=Перегляд сторінок Інтернету
Comment[vi]=Đ duyt các trang web
Comment[zh_CN]=
Comment[zh_TW]=
Exec=firefox %u
Icon=firefox
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
Categories=Network;WebBrowser;

View File

@ -17,7 +17,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-hunspell
ac_add_options --enable-system-sqlite
ac_add_options --enable-system-ffi
@ -43,5 +42,4 @@ ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --enable-pie
ac_add_options --enable-official-branding
ac_add_options --enable-safe-browsing
ac_add_options --enable-application=browser

View File

@ -1,17 +0,0 @@
--- xpcom/ds/nsMathUtils.h.orig
+++ xpcom/ds/nsMathUtils.h
@@ -104,12 +104,12 @@
#ifdef WIN32
// NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
return !!_finite(aNum);
-#elif defined(XP_DARWIN)
+#elif defined(XP_DARWIN) || defined(_GLIBCXX_CMATH)
// Darwin has deprecated |finite| and recommends |isfinite|. The former is
// not present in the iOS SDK.
return std::isfinite(aNum);
#else
- return finite(aNum);
+ return isfinite(aNum);
#endif
}

View File

@ -1,11 +0,0 @@
--- mozilla-config.h.in 2016-07-06 15:16:06.621880293 +0200
+++ mozilla-config.h.in 2016-07-06 15:16:42.958428126 +0200
@@ -54,7 +54,7 @@
* HUNSPELL_STATIC is defined in extensions/spellcheck/hunspell/src/Makefile.in,
* unless --enable-system-hunspell is defined.
*/
-#if defined(HUNSPELL_STATIC)
+#if 0
#include "hunspell_alloc_hooks.h"
#include "hunspell_fopen_hooks.h"
#endif

View File

@ -1,17 +0,0 @@
--- config/baseconfig.mk.orig 2016-03-09 19:02:40.438986365 +0100
+++ config/baseconfig.mk 2016-03-09 19:03:07.492984916 +0100
@@ -2,10 +2,10 @@
# directly in python/mozbuild/mozbuild/base.py for gmake validation.
# We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
# whether a normal build is happening or whether the check is running.
-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
+includedir := $(includedir)/$(MOZ_APP_NAME)
+idldir = $(datadir)/idl/$(MOZ_APP_NAME)
+installdir = $(libdir)/$(MOZ_APP_NAME)
+sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel
ifeq (.,$(DEPTH))
DIST = dist
else

View File

@ -1,30 +0,0 @@
See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1338655
--- media/libstagefright/binding/mp4parse-cargo.patch.orig 2017-05-17 18:28:48.627377816 +0200
+++ media/libstagefright/binding/mp4parse-cargo.patch 2017-05-17 18:30:27.349873737 +0200
@@ -25,12 +25,14 @@ diff --git a/media/libstagefright/bindin
index aeeebc65..5c0836a 100644
--- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
+++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
-@@ -18,17 +18,9 @@ exclude = [
+@@ -18,17 +18,11 @@ exclude = [
"*.mp4",
]
-build = "build.rs"
-
++build = false
++
[dependencies]
"mp4parse" = {version = "0.6.0", path = "../mp4parse"}
--- media/libstagefright/binding/mp4parse_capi/Cargo.toml.orig 2017-05-17 18:30:58.571714318 +0200
+++ media/libstagefright/binding/mp4parse_capi/Cargo.toml 2017-05-17 18:31:02.624693622 +0200
@@ -18,6 +18,8 @@ exclude = [
"*.mp4",
]
+build = false
+
[dependencies]
"mp4parse" = {version = "0.6.0", path = "../mp4parse"}

View File

@ -0,0 +1,11 @@
--- taskcluster/docker/firefox-snap/firefox.desktop.orig 2019-01-18 19:31:39.428839442 +0100
+++ taskcluster/docker/firefox-snap/firefox.desktop 2019-01-18 19:32:20.689063456 +0100
@@ -154,7 +154,7 @@
Terminal=false
X-MultipleArgs=false
Type=Application
-Icon=/browser/chrome/icons/default/default128.png
+Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true

View File

@ -0,0 +1,11 @@
--- tools/profiler/core/platform.h.orig
+++ tools/profiler/core/platform.h
@@ -56,7 +56,7 @@
// We need a definition of gettid(), but glibc doesn't provide a
// wrapper for it.
-#if defined(__GLIBC__)
+#if defined(__linux__)
#include <unistd.h>
#include <sys/syscall.h>
static inline pid_t gettid()

View File

@ -48,17 +48,6 @@
#endif
--- toolkit.orig/mozapps/update/common/updatedefines.h 2014-03-15 05:19:37.000000000 +0000
+++ toolkit/mozapps/update/common/updatedefines.h 2014-04-17 10:24:33.793431933 +0000
@@ -105,7 +105,7 @@
#ifdef SOLARIS
# include <sys/stat.h>
-#else
+#elif !defined(__linux__) || defined(__GLIBC__)
# include <fts.h>
#endif
# include <dirent.h>
--- toolkit.orig/mozapps/update/updater/updater.cpp 2014-03-15 05:19:37.000000000 +0000
+++ toolkit/mozapps/update/updater/updater.cpp 2014-04-17 10:24:33.796765327 +0000
@@ -3432,6 +3432,7 @@
@ -77,3 +66,14 @@
return rv;
}
--- toolkit/mozapps/update/common/updatedefines.h 2019-01-24 18:31:42.000000000 +0100
+++ - 2019-01-31 11:15:53.946747750 +0100
@@ -100,7 +100,7 @@
#ifdef SOLARIS
#include <sys/stat.h>
-#else
+#elif !defined(__linux__) || defined(__GLIBC__)
#include <fts.h>
#endif
#include <dirent.h>

View File

@ -3,42 +3,49 @@
@@ -29,6 +29,8 @@
#ifndef TOOLS_PLATFORM_H_
#define TOOLS_PLATFORM_H_
+#include <sys/types.h>
+
#include <stdint.h>
#include <math.h>
#include "MainThreadUtils.h"
--- tools/profiler/lul/LulElf.cpp
+++ tools/profiler/lul/LulElf.cpp
@@ -579,10 +579,10 @@
// Return the non-directory portion of FILENAME: the portion after the
--- tools/profiler/lul/LulElf.cpp 2019-01-24 18:31:42.000000000 +0100
+++ - 2019-01-31 11:19:53.198257189 +0100
@@ -460,9 +460,9 @@
// last slash, or the whole filename if there are no slashes.
string BaseFileName(const string &filename) {
- // Lots of copies! basename's behavior is less than ideal.
- char *c_filename = strdup(filename.c_str());
string BaseFileName(const string& filename) {
// Lots of copies! basename's behavior is less than ideal.
- char* c_filename = strdup(filename.c_str());
- string base = basename(c_filename);
- free(c_filename);
+ // basename's behavior is less than ideal so avoid it
+ const char *c_filename = filename.c_str();
+ const char* c_filename = filename.c_str();
+ const char *p = strrchr(c_filename, '/');
+ string base = p ? p+1 : c_filename;
return base;
}
--- tools/profiler/core/platform-linux.cc
+++ tools/profiler/core/platform-linux.cc
@@ -683,11 +683,13 @@
void TickSample::PopulateContext(void* aContext)
{
MOZ_ASSERT(aContext);
--- tools/profiler/core/platform-linux-android.cpp 2019-01-24 18:31:43.000000000 +0100
+++ - 2019-01-31 11:23:07.911772317 +0100
@@ -253,7 +253,11 @@
// Request profiling signals.
struct sigaction sa;
+#if defined(GP_ARCH_arm)
+ sa.sa_sigaction = SigprofHandler;
+#else
sa.sa_sigaction = MOZ_SIGNAL_TRAMPOLINE(SigprofHandler);
+#endif
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART | SA_SIGINFO;
if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) {
@@ -497,8 +497,10 @@
ucontext_t sSyncUContext;
void Registers::SyncPopulate() {
+#if defined(__GLIBC__)
ucontext_t* pContext = reinterpret_cast<ucontext_t*>(aContext);
if (!getcontext(pContext)) {
context = pContext;
SetSampleContext(this, aContext);
if (!getcontext(&sSyncUContext)) {
PopulateRegsFromContext(*this, &sSyncUContext);
}
+#endif
}
void OS::SleepMicro(int microseconds)
#endif

View File

@ -0,0 +1,11 @@
--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features.cc 2019-01-24 18:31:10.000000000 +0100
+++ - 2019-02-01 00:13:35.690776711 +0100
@@ -67,7 +67,7 @@
return 0;
}
-#if !defined(ANDROID)
+#if !defined(ANDROID) && !defined(__linux__)
#ifdef WEBRTC_ARCH_ARM_V7
uint64_t WebRtc_GetCPUFeaturesARM(void) {
return kCPUFeatureARMv7

View File

@ -0,0 +1,23 @@
--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2019-02-01 00:49:18.472382771 +0100
+++ - 2019-02-01 00:50:25.928007236 +0100
@@ -11,7 +11,10 @@
#include <stdlib.h>
#include <string.h>
#include <features.h>
-#if __GLIBC_PREREQ(2, 16)
+#ifndef __GLIBC_PREREQ
+#define __GLIBC_PREREQ(a, b) 0
+#endif
+#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
#include <sys/auxv.h>
#else
#include <fcntl.h>
@@ -29,7 +32,7 @@
int architecture = 0;
unsigned long hwcap = 0;
const char* platform = NULL;
-#if __GLIBC_PREREQ(2, 16)
+#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
hwcap = getauxval(AT_HWCAP);
platform = (const char*)getauxval(AT_PLATFORM);
#else

View File

@ -0,0 +1,19 @@
# HG changeset patch
# Parent b735e618c2a860972197942f6680c941e3c9a67f
# User Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com>
Bug 997353 - Do not use compile-time page size for PowerPC.
The PowerPC architecture allows various memory page sizes, making it impossible
to predict the runtime page size.
--- memory/build/mozjemalloc.cpp
+++ memory/build/mozjemalloc.cpp
@@ -369,7 +369,7 @@
// Debug builds are opted out too, for test coverage.
#ifndef MOZ_DEBUG
#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && \
- !defined(__aarch64__)
+ !defined(__aarch64__) && !defined(__powerpc__) && !defined(__powerpc64__)
#define MALLOC_STATIC_PAGESIZE 1
#endif
#endif

View File

@ -0,0 +1,32 @@
Mozilla rustc check does not support crossbuild: let's remove it
--- build/moz.configure/rust.configure 2018-10-01 16:28:31.000000000 +0200
+++ build/moz.configure/rust.configure 2018-10-20 14:21:35.510000000 +0200
@@ -204,26 +204,6 @@
os.write(in_fd, source)
os.close(in_fd)
-
- cmd = [
- rustc,
- '--crate-type', 'staticlib',
- target_arg,
- '-o', out_path,
- in_path,
- ]
-
- def failed():
- die(dedent('''\
- Cannot compile for {} with {}
- The target may be unsupported, or you may not have
- a rust std library for that target installed. Try:
-
- rustup target add {}
- '''.format(host_or_target.alias, rustc, rustc_target.alias)))
- check_cmd_output(*cmd, onerror=failed)
- if not os.path.exists(out_path) or os.path.getsize(out_path) == 0:
- failed()
finally:
os.remove(in_path)
os.remove(out_path)

View File

@ -1,16 +0,0 @@
build/moz.configure/rust.configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git c/build/moz.configure/rust.configure i/build/moz.configure/rust.configure
index cd86b24153debb1b..44911715e25d95e3 100644
--- build/moz.configure/rust.configure
+++ build/moz.configure/rust.configure
@@ -81,7 +81,7 @@ def rust_target(rust_compiler, rustc, target, cross_compiling):
# OpenBSD
('x86_64', 'OpenBSD'): 'x86_64-unknown-openbsd',
# Linux
- ('x86', 'Linux'): 'i586-unknown-linux-gnu',
+ ('x86', 'Linux'): 'i686-unknown-linux-gnu',
# Linux
('x86_64', 'Linux'): 'x86_64-unknown-linux-gnu',
# OS X and iOS

View File

@ -0,0 +1,19 @@
--- ./media/audioipc/audioipc/src/cmsg.rs.orig 2018-05-09 22:19:14.748631939 +0200
+++ ./media/audioipc/audioipc/src/cmsg.rs 2018-05-09 22:19:22.961620862 +0200
@@ -106,11 +106,11 @@ impl ControlMsgBuilder {
return Err(Error::NoSpace);
}
- let cmsghdr = cmsghdr {
- cmsg_len: cmsg_len as _,
- cmsg_level: level,
- cmsg_type: kind,
- };
+ use std::mem;
+ let mut cmsghdr: cmsghdr = unsafe { mem::zeroed() };
+ cmsghdr.cmsg_len = cmsg_len as _;
+ cmsghdr.cmsg_level = level;
+ cmsghdr.cmsg_type = kind;
let cmsghdr = unsafe {
slice::from_raw_parts(&cmsghdr as *const _ as *const _, mem::size_of::<cmsghdr>())

View File

@ -0,0 +1,97 @@
--- old-configure.in.orig
+++ old-configure.in
@@ -2839,6 +2839,22 @@
AC_SUBST(MOZ_ALSA)
+dnl ==================================
+dnl = Check sndio availability
+dnl ==================================
+
+MOZ_ARG_ENABLE_BOOL(sndio,
+[ --enable-sndio Enable sndio support],
+ MOZ_SNDIO=1,
+ MOZ_SNDIO=)
+
+if test -n "$MOZ_SNDIO"; then
+ MOZ_SNDIO_LIBS="-lsndio"
+ AC_SUBST_LIST(MOZ_SNDIO_LIBS)
+fi
+
+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']
--- media/libcubeb/src/moz.build.orig
+++ media/libcubeb/src/moz.build
@@ -43,7 +43,7 @@
]
DEFINES['USE_JACK'] = True
-if CONFIG['OS_ARCH'] == 'OpenBSD':
+if CONFIG['MOZ_SNDIO']:
SOURCES += [
'cubeb_sndio.c',
]
--- build/moz.configure/old.configure.orig
+++ build/moz.configure/old.configure
@@ -159,6 +159,7 @@
'--enable-accessibility',
'--enable-address-sanitizer',
'--enable-alsa',
+ '--enable-sndio',
'--enable-bundled-fonts',
'--enable-clang-plugin',
'--enable-content-sandbox',
--- security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp.orig
+++ security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
@@ -349,6 +349,21 @@
}
}
}
+
+#ifdef MOZ_SNDIO
+ // ~/.aucat_cookie (sndio)
+ rv = homeDir->Clone(getter_AddRefs(confDir));
+ if (NS_SUCCEEDED(rv)) {
+ rv = confDir->AppendNative(NS_LITERAL_CSTRING(".aucat_cookie"));
+ if (NS_SUCCEEDED(rv)) {
+ nsAutoCString tmpPath;
+ rv = confDir->GetNativePath(tmpPath);
+ if (NS_SUCCEEDED(rv)) {
+ policy->AddPath(rdwrcr, tmpPath.get());
+ }
+ }
+ }
+#endif
}
// Firefox binary dir.
--- security/sandbox/linux/moz.build.orig
+++ security/sandbox/linux/moz.build
@@ -81,6 +81,9 @@
if CONFIG['MOZ_ALSA']:
DEFINES['MOZ_ALSA'] = True
+if CONFIG['MOZ_SNDIO']:
+ DEFINES['MOZ_SNDIO'] = True
+
# This copy of SafeSPrintf doesn't need to avoid the Chromium logging
# dependency like the one in libxul does, but this way the behavior is
# consistent. See also the comment in SandboxLogging.h.

View File

@ -3,47 +3,43 @@
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-esr-i18n".
#
pkgname=firefox-esr
version=52.9.0
revision=5
wrksrc="firefox-${version}esr"
version=60.5.0
revision=1
build_helper="rust"
wrksrc="firefox-${version}"
short_desc="Mozilla Firefox web browser - Extended Support Release (ESR)"
maintainer="Eivind Uggedal <eivind@uggedal.com>"
license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://www.mozilla.org/firefox/organizations/"
distfiles="${MOZILLA_SITE}/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz
https://aur.archlinux.org/cgit/aur.git/plain/ffmpeg4.patch.gz?h=firefox-esr52>ffmpeg4.patch.gz"
checksum="c01d09658c53c1b3a496e353a24dad03b26b81d3b1d099abc26a06f81c199dd6
2a285e0c31968e3fe9b65a585838b46f9342ff0a369e786a729b4c3886617034"
distfiles="${MOZILLA_SITE}/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz"
checksum=1a1f69ee87092637f75aef7f3fa588b0eef0b2c8bcc160094a036450c49c4025
lib32disabled=yes
hostmakedepends="autoconf213 unzip zip pkg-config perl python yasm
$(vopt_if rust cargo)"
makedepends="
libatomic-devel nss-devel gtk+-devel
sqlite-devel libevent-devel libnotify-devel libvpx-devel
hunspell-devel libXcomposite-devel libSM-devel libXt-devel
$(vopt_if alsa alsa-lib-devel) $(vopt_if dbus dbus-glib-devel)
$(vopt_if gtk3 gtk+3-devel) $(vopt_if pulseaudio pulseaudio-devel)
cargo llvm clang rust cbindgen python"
makedepends="nss-devel libjpeg-turbo-devel gtk+-devel gtk+3-devel icu-devel
pixman-devel sqlite-devel libevent-devel libnotify-devel libvpx-devel
libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std
libXdamage-devel rust-std $(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)"
depends="nss>=3.27 desktop-file-utils hicolor-icon-theme"
$(vopt_if xscreensaver libXScrnSaver-devel) $(vopt_if sndio sndio-devel)"
depends="nss>=3.37.3 desktop-file-utils hicolor-icon-theme"
conflicts="firefox>=0"
build_options="alsa dbus gtk3 rust pulseaudio startup_notification xscreensaver"
build_options_default="alsa dbus gtk3 pulseaudio startup_notification xscreensaver"
desc_option_rust="Build rust components"
build_options="alsa dbus gtk3 pulseaudio startup_notification xscreensaver sndio"
build_options_default="alsa dbus gtk3 pulseaudio startup_notification xscreensaver sndio"
case "$XBPS_TARGET_MACHINE" in
i686|x86_64*) build_options_default+=" rust";;
case $XBPS_TARGET_MACHINE in
armv6*)
broken="required NEON extensions are not supported on armv6"
;;
esac
post_extract() {
patch -Np0 -i ../ffmpeg4.patch
post_extract() {
case "$XBPS_TARGET_MACHINE" in
*-musl)
# fix musl rust triplet
sed -i "s/\(x86_64-unknown-linux\)-gnu/\1-musl/" build/moz.configure/rust.configure
cp "${FILESDIR}/stab.h" toolkit/crashreporter/google-breakpad/src/
;;
esac
@ -60,21 +56,28 @@ do_build() {
cp "${FILESDIR}/mozconfig" "${wrksrc}/.mozconfig"
case "$XBPS_TARGET_MACHINE" in
ppc64*) ;;
*) echo "ac_add_options --disable-elf-hack" >>.mozconfig;;
*-musl)
echo "ac_add_options --disable-jemalloc" >>.mozconfig
echo "ac_add_options --disable-gold" >>.mozconfig
echo "ac_add_options --enable-release" >>.mozconfig
;;
esac
case "$XBPS_TARGET_MACHINE" in
*-musl)
echo "ac_add_options --disable-jemalloc" >>.mozconfig
echo "ac_add_options --enable-gold=no" >>.mozconfig
;;
arm*|aarch64*)
echo "ac_add_options --enable-gold=no" >>.mozconfig
arm*|x86_64*|i686*)
echo "ac_add_options --disable-elf-hack" >>.mozconfig
;;
esac
if [ "$CROSS_BUILD" ]; then
BINDGEN_INCLUDE_FLAGS=$( $CPP -x c++ -v /dev/null -o /dev/null 2>&1 | \
sed -n '/#include <...> search starts here:/,/End of search list./p' | \
sed '1,1d;$d' | sed 's/^ /-I/' | paste -s )
export BINDGEN_CFLAGS="--target=$XBPS_CROSS_TRIPLET \
--sysroot=${XBPS_CROSS_BASE} ${BINDGEN_INCLUDE_FLAGS}"
export HOST_CC=cc
export TARGET_CC="${CC}"
export HOST_CFLAGS="${XBPS_CFLAGS}"
export HOST_CXXFLAGS="${XBPS_CXXFLAGS}"
export ac_cv_sqlite_secure_delete=yes \
@ -83,14 +86,38 @@ do_build() {
ac_cv_sqlite_dbstat_vtab=yes \
ac_cv_sqlite_enable_unlock_notify=yes \
ac_cv_prog_hostcxx_works=1
case "$XBPS_TARGET_MACHINE" in
*-musl) _host_triplet=${XBPS_MACHINE%-musl}-unknown-linux-musl;;
*) _host_triplet=${XBPS_MACHINE}-unknwon-linux-gnu;;
esac
echo "ac_add_options --target=$XBPS_CROSS_TRIPLET" >>.mozconfig
echo "ac_add_options --host=$_host_triplet" >>.mozconfig
else
echo "ac_add_options --target=$XBPS_TRIPLET" >>.mozconfig
echo "ac_add_options --host=$XBPS_TRIPLET" >>.mozconfig
fi
# Append CFLAGS and CXXFLAGS to set work around code which gcc6 would
# otherwise regard as out-of-specification and allow it to produce a
# working program.
export CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
export CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
mkdir -p third_party/rust/libloading/.deps
case "$XBPS_TARGET_MACHINE" in
i686*)
export CFLAGS+=" -D_FILE_OFFSET_BITS=64"
export CXXFLAGS+=" -D_FILE_OFFSET_BITS=64"
;;
armv7*)
export CFLAGS+=" -mfpu=neon -Wno-psabi"
export CXXFLAGS+=" -mfpu=neon -Wno-psabi"
;;
esac
case "$XBPS_MACHINE" in
i686*)
# ENOMEM
echo "ac_add_options --disable-debug-symbols" >>.mozconfig
;;
esac
export LDFLAGS+=" -Wl,-rpath=/usr/lib/firefox"
@ -99,37 +126,36 @@ do_build() {
fi
export MOZ_MAKE_FLAGS="${makejobs}"
export MOZ_NOSPAM=1
export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild"
export AS=$CC
cat <<! >>.mozconfig
ac_add_options --with-google-api-keyfile="${wrksrc}/google-api-key"
ac_add_options --with-mozilla-api-keyfile="${wrksrc}/mozilla-api-key"
ac_add_options --enable-default-toolkit=cairo-gtk$(vopt_if gtk3 '3' '2')
ac_add_options $(vopt_enable alsa)
ac_add_options $(vopt_enable sndio)
ac_add_options $(vopt_enable dbus)
ac_add_options $(vopt_enable dbus necko-wifi)
ac_add_options $(vopt_enable pulseaudio)
ac_add_options $(vopt_enable rust)
ac_add_options $(vopt_enable startup_notification startup-notification)
!
make -f client.mk build
rm -f old-configure
./mach build
}
do_install() {
make -f client.mk DESTDIR="$DESTDIR" install
DESTDIR="$DESTDIR" ./mach install
vinstall ${FILESDIR}/vendor.js 644 usr/lib/firefox/browser/defaults/preferences
vinstall ${FILESDIR}/firefox.desktop 644 usr/share/applications
vinstall taskcluster/docker/firefox-snap/firefox.desktop 644 usr/share/applications
for i in 16x16 22x22 24x24 32x32 48x48 256x256; do
for i in 16x16 22x22 24x24 32x32 48x48 128x128 256x256; do
vinstall ${wrksrc}/browser/branding/official/default${i%x*}.png 644 \
usr/share/icons/hicolor/${i}/apps firefox.png
done
# Use system-provided dictionaries
rm -rf ${DESTDIR}/usr/lib/firefox/{dictionaries,hyphenation}
ln -s /usr/share/hunspell ${DESTDIR}/usr/lib/firefox/dictionaries
ln -s /usr/share/hyphen ${DESTDIR}/usr/lib/firefox/hyphenation
# We don't want the development stuff
rm -rf ${DESTDIR}/usr/{include,lib/firefox-devel,share/idl}