diff options
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 85 | ||||
-rw-r--r-- | RemoteSpellCheckEngineChild.patch | 12 | ||||
-rw-r--r-- | arc4random.patch | 45 | ||||
-rw-r--r-- | gcc11_limits.patch | 23 | ||||
-rw-r--r-- | gcc9_format-overflow.patch | 28 | ||||
-rw-r--r-- | gcc_lto-partitions.patch | 36 | ||||
-rw-r--r-- | gfxFont.patch | 105 | ||||
-rw-r--r-- | glibc-gettid-wrapper.patch | 32 | ||||
-rw-r--r-- | icu74_nsJISx4051LineBreaker.patch | 17 | ||||
-rw-r--r-- | linux_remove_sysctl.patch | 16 | ||||
-rw-r--r-- | mach_install_ignore_errors.patch | 35 | ||||
-rw-r--r-- | mathops_operand_type_mismatch_for_shr.patch | 76 |
13 files changed, 527 insertions, 10 deletions
@@ -1,7 +1,7 @@ pkgbase = firefox-esr52 pkgdesc = Standalone web browser from mozilla.org, Extended Support Release 52.x with NPAPI support pkgver = 52.9.0 - pkgrel = 3 + pkgrel = 9 url = https://www.mozilla.org/en-US/firefox/organizations/ arch = x86_64 license = MPL @@ -56,6 +56,18 @@ pkgbase = firefox-esr52 source = mozconfig source = vendor.js source = distribution.ini + source = gcc9_format-overflow.patch + source = glibc-gettid-wrapper.patch + source = gfxFont.patch + source = linux_remove_sysctl.patch + source = gcc11_limits.patch + source = mach_install_ignore_errors.patch + source = seamonkey-use-scoped-enums-in-IDBTransaction.patch::https://bugs.archlinux.org/task/71113?getfile=20366 + source = RemoteSpellCheckEngineChild.patch + source = icu74_nsJISx4051LineBreaker.patch + source = gcc_lto-partitions.patch::https://bug1258215.bmoattachments.org/attachment.cgi?id=8766692 + source = arc4random.patch + source = mathops_operand_type_mismatch_for_shr.patch::https://git.videolan.org/?p=ffmpeg.git;a=patch;h=effadce6c756247ea8bae32dc13bb3e6f464f0eb validpgpkeys = 2B90598A745E992F315E22C58AB132963A06537A sha256sums = c01d09658c53c1b3a496e353a24dad03b26b81d3b1d099abc26a06f81c199dd6 sha256sums = 9efd02ff78c31f8690a12401faac2605dffcac12eaf11e1791ec4221570c2746 @@ -70,6 +82,17 @@ pkgbase = firefox-esr52 sha256sums = 1c17c99ffc7ddf83d79ee76a91927a55a45bb6bd459bcff3baf79c5ad5748645 sha256sums = 3c039dbfdcf63022812b51f35289b176b26b4a9933da073f8788fde02be9fdcd sha256sums = 8ae5b7cd1f7092f13859b632e1e5f69948b2801e0459fdf29c745c89f8eeb823 + sha256sums = b66a84af7cc1809fe9dd0d7737f6043be2919ebe0a2c752cca483d67957ad431 + sha256sums = e2f6353d2021bb2490acd7216762cd5bae41eb55a82e245813a62a7024c01229 + sha256sums = ba7858a8cb852388c870bb9acd20bedc5e9cb0b2cf7bdfa5c334e61350279232 + sha256sums = 1f324e9a5bf195a58416f622c025a9dd0aac7d802f838e44d9b55b34a0e56585 + sha256sums = f88b950d72d5edae01289fddb29dad75de075ed61735782da6687bf56af225d8 + sha256sums = cc1cbddc8f984dc6e626eda530e67592ac1982f5644318b7873e989392926612 + sha256sums = 6227a54ef4519c19ab8e39412bca71711fabab393491db691f7ef90dbe99f225 + sha256sums = 979ddabbd475eee2664a63667cd4c7867ce781d5b8fc14a3de3fe51577b75bf0 + sha256sums = 0aedf9faa0be244be6fefbe25bf5f85df0ce757f7b0d45720b1baa2f6ee1f990 + sha256sums = 64118a811ecf34762c433bad92e9e895c69b8a3060e7261246519a2b6d25ff1b + sha256sums = 0a8a8119c3b10d09f7caf3ebe9b25ae7f51001ce835cab8baafc507fb3fd6772 + sha256sums = a50d7da9870a3fd801ad3a4d13d5c9b260acb094cf8bfa4afd95a54741173a7f pkgname = firefox-esr52 - @@ -5,7 +5,7 @@ pkgname=firefox-esr52 pkgver=52.9.0 -pkgrel=3 +pkgrel=9 pkgdesc='Standalone web browser from mozilla.org, Extended Support Release 52.x with NPAPI support' arch=('x86_64') license=('MPL' 'GPL' 'LGPL') @@ -33,7 +33,19 @@ source=("https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefo "${pkgname}.sh" "mozconfig" "vendor.js" - "distribution.ini") + "distribution.ini" + "gcc9_format-overflow.patch" + "glibc-gettid-wrapper.patch" + "gfxFont.patch" + "linux_remove_sysctl.patch" + "gcc11_limits.patch" + "mach_install_ignore_errors.patch" + "seamonkey-use-scoped-enums-in-IDBTransaction.patch"::"https://bugs.archlinux.org/task/71113?getfile=20366" + "RemoteSpellCheckEngineChild.patch" + "icu74_nsJISx4051LineBreaker.patch" + "gcc_lto-partitions.patch"::"https://bug1258215.bmoattachments.org/attachment.cgi?id=8766692" + "arc4random.patch" + "mathops_operand_type_mismatch_for_shr.patch"::"https://git.videolan.org/?p=ffmpeg.git;a=patch;h=effadce6c756247ea8bae32dc13bb3e6f464f0eb") sha256sums=('c01d09658c53c1b3a496e353a24dad03b26b81d3b1d099abc26a06f81c199dd6' '9efd02ff78c31f8690a12401faac2605dffcac12eaf11e1791ec4221570c2746' 'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9' @@ -46,7 +58,19 @@ sha256sums=('c01d09658c53c1b3a496e353a24dad03b26b81d3b1d099abc26a06f81c199dd6' 'fc0bc82aa88b15ce9ebf35d2d12750e2cd3b6bd93d5fc7b52b596f76e0e58608' '1c17c99ffc7ddf83d79ee76a91927a55a45bb6bd459bcff3baf79c5ad5748645' '3c039dbfdcf63022812b51f35289b176b26b4a9933da073f8788fde02be9fdcd' - '8ae5b7cd1f7092f13859b632e1e5f69948b2801e0459fdf29c745c89f8eeb823') + '8ae5b7cd1f7092f13859b632e1e5f69948b2801e0459fdf29c745c89f8eeb823' + 'b66a84af7cc1809fe9dd0d7737f6043be2919ebe0a2c752cca483d67957ad431' + 'e2f6353d2021bb2490acd7216762cd5bae41eb55a82e245813a62a7024c01229' + 'ba7858a8cb852388c870bb9acd20bedc5e9cb0b2cf7bdfa5c334e61350279232' + '1f324e9a5bf195a58416f622c025a9dd0aac7d802f838e44d9b55b34a0e56585' + 'f88b950d72d5edae01289fddb29dad75de075ed61735782da6687bf56af225d8' + 'cc1cbddc8f984dc6e626eda530e67592ac1982f5644318b7873e989392926612' + '6227a54ef4519c19ab8e39412bca71711fabab393491db691f7ef90dbe99f225' + '979ddabbd475eee2664a63667cd4c7867ce781d5b8fc14a3de3fe51577b75bf0' + '0aedf9faa0be244be6fefbe25bf5f85df0ce757f7b0d45720b1baa2f6ee1f990' + '64118a811ecf34762c433bad92e9e895c69b8a3060e7261246519a2b6d25ff1b' + '0a8a8119c3b10d09f7caf3ebe9b25ae7f51001ce835cab8baafc507fb3fd6772' + 'a50d7da9870a3fd801ad3a4d13d5c9b260acb094cf8bfa4afd95a54741173a7f') validpgpkeys=('2B90598A745E992F315E22C58AB132963A06537A') # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) @@ -70,20 +94,20 @@ prepare() { # Remove dangling old-configure file in the source package rm "old-configure" - patch -Np1 -i "../firefox-install-dir.patch" + patch -Np1 -i "${srcdir}/firefox-install-dir.patch" sed -i 's#^installdir .*#installdir = $(libdir)/firefox-esr52#' "config/baseconfig.mk" # https://bugzilla.mozilla.org/show_bug.cgi?id=1314968 - patch -Np1 -i "../fix-wifi-scanner.diff" + patch -Np1 -i "${srcdir}/fix-wifi-scanner.diff" # https://bugs.archlinux.org/task/54395 // https://bugzilla.mozilla.org/show_bug.cgi?id=1371991 - patch -Np1 -i "../0001-Bug-54395-remove-hardcoded-flag-lcrmf.patch" + patch -Np1 -i "${srcdir}/0001-Bug-54395-remove-hardcoded-flag-lcrmf.patch" # https://bugzilla.mozilla.org/show_bug.cgi?id=1384062 - patch -Np1 -i "../make_SystemResourceMonitor.stop_more_resilient_to_errors.patch" + patch -Np1 -i "${srcdir}/make_SystemResourceMonitor.stop_more_resilient_to_errors.patch" # https://hg.mozilla.org/mozilla-central/rev/ae7e3082d862 - patch -Np1 -i "../use_noexcept_in_mozalloc.patch" + patch -Np1 -i "${srcdir}/use_noexcept_in_mozalloc.patch" # https://hg.mozilla.org/releases/mozilla-esr60/rev/2f39b32593bd # https://svnweb.freebsd.org/ports/head/www/firefox/files/patch-bug1435212?view=markup&pathrev=468159 @@ -95,6 +119,51 @@ prepare() { install -m 644 "${srcdir}/mozconfig" ".mozconfig" # Fix path for Google API and Mozilla API keys sed -i "s#\$SOURCE#${PWD}#" ".mozconfig" + + # Fix for GCC 9 and format overflow incompatibilities + # https://bugzilla.mozilla.org/show_bug.cgi?id=1514781 + # https://forum.palemoon.org/viewtopic.php?t=21745 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925781 + patch -Np1 -i "${srcdir}/gcc9_format-overflow.patch" + + # Fix for gettid() wrapper in newer glibc + # https://bugzilla.mozilla.org/show_bug.cgi?id=1533969 + patch -Np1 -i "${srcdir}/glibc-gettid-wrapper.patch" + + # Fix for gfxFont.cpp + patch -Np1 -i "${srcdir}/gfxFont.patch" + + # Fix for missing sysctl.h in memory/mozjemalloc/jemalloc.c + patch -Np1 -i "${srcdir}/linux_remove_sysctl.patch" + + # Fix for limits on BaseRect.h + patch -Np1 -i "${srcdir}/gcc11_limits.patch" + + # Ignore mach install errors as it's buggy ATM + patch -Np1 -i "${srcdir}/mach_install_ignore_errors.patch" + + # Fix for nss 3.66 + patch -Np1 -i "${srcdir}/seamonkey-use-scoped-enums-in-IDBTransaction.patch" + + # Fix for RemoteSpellCheckEngineChild + patch -Np1 -i "${srcdir}/RemoteSpellCheckEngineChild.patch" + + # Fix for icu 74 + patch -Np1 -i "${srcdir}/icu74_nsJISx4051LineBreaker.patch" + # https://bugzilla.mozilla.org/show_bug.cgi?id=1862601 + + # Fix for G++ lto-partitions=1 + # https://bugzilla.mozilla.org/show_bug.cgi?id=1258215 + patch -Np1 -i "${srcdir}/gcc_lto-partitions.patch" + + # Fix for arc4random + # https://bugzilla.mozilla.org/show_bug.cgi?id=1782988 + patch -Np1 -i "${srcdir}/arc4random.patch" + + # Fix for ffmpeg mathops + # https://hg.mozilla.org/releases/mozilla-esr115/rev/e024fe4fd62c + cd "media/ffvpx" + patch -Np1 -i "${srcdir}/mathops_operand_type_mismatch_for_shr.patch" } build() { diff --git a/RemoteSpellCheckEngineChild.patch b/RemoteSpellCheckEngineChild.patch new file mode 100644 index 000000000000..46d4a3fae357 --- /dev/null +++ b/RemoteSpellCheckEngineChild.patch @@ -0,0 +1,12 @@ +diff -Naur firefox-52.9.0esr.orig/extensions/spellcheck/src/mozSpellChecker.h firefox-52.9.0esr/extensions/spellcheck/src/mozSpellChecker.h +--- firefox-52.9.0esr.orig/extensions/spellcheck/src/mozSpellChecker.h 2024-01-07 15:58:46.604431217 +0100 ++++ firefox-52.9.0esr/extensions/spellcheck/src/mozSpellChecker.h 2024-01-07 16:00:47.739420245 +0100 +@@ -17,7 +17,7 @@ + #include "nsTArray.h" + #include "mozISpellI18NUtil.h" + #include "nsCycleCollectionParticipant.h" +-#include "RemoteSpellCheckEngineChild.h" ++#include "mozilla/RemoteSpellCheckEngineChild.h" + + namespace mozilla { + class PRemoteSpellcheckEngineChild; diff --git a/arc4random.patch b/arc4random.patch new file mode 100644 index 000000000000..cb5834820b76 --- /dev/null +++ b/arc4random.patch @@ -0,0 +1,45 @@ +diff -Naur firefox-52.9.0esr.orig/ipc/chromium/src/third_party/libevent/arc4random.c firefox-52.9.0esr/ipc/chromium/src/third_party/libevent/arc4random.c +--- firefox-52.9.0esr.orig/ipc/chromium/src/third_party/libevent/arc4random.c 2024-01-07 16:54:39.331683004 +0100 ++++ firefox-52.9.0esr/ipc/chromium/src/third_party/libevent/arc4random.c 2024-01-07 19:46:19.624639689 +0100 +@@ -477,20 +477,6 @@ + } + #endif + +-ARC4RANDOM_EXPORT void +-arc4random_buf(void *_buf, size_t n) +-{ +- unsigned char *buf = _buf; +- _ARC4_LOCK(); +- arc4_stir_if_needed(); +- while (n--) { +- if (--arc4_count <= 0) +- arc4_stir(); +- buf[n] = arc4_getbyte(); +- } +- _ARC4_UNLOCK(); +-} +- + #ifndef ARC4RANDOM_NOUNIFORM + /* + * Calculate a uniformly distributed random number less than upper_bound +diff -Naur firefox-52.9.0esr.orig/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h firefox-52.9.0esr/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h +--- firefox-52.9.0esr.orig/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h 2024-01-07 16:54:39.341683019 +0100 ++++ firefox-52.9.0esr/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h 2024-01-07 18:37:36.641265170 +0100 +@@ -23,11 +23,15 @@ + /* Define if libevent should not be compiled with thread support */ + /* #undef _EVENT_DISABLE_THREAD_SUPPORT */ + ++#ifdef HAVE_ARC4RANDOM + /* Define to 1 if you have the `arc4random' function. */ +-/* #undef _EVENT_HAVE_ARC4RANDOM */ ++#define EVENT__HAVE_ARC4RANDOM 1 ++#endif + ++#ifdef HAVE_ARC4RANDOM_BUF + /* Define to 1 if you have the `arc4random_buf' function. */ +-/* #undef _EVENT_HAVE_ARC4RANDOM_BUF */ ++#define EVENT__HAVE_ARC4RANDOM_BUF 1 ++#endif + + /* Define to 1 if you have the <arpa/inet.h> header file. */ + #define _EVENT_HAVE_ARPA_INET_H 1 diff --git a/gcc11_limits.patch b/gcc11_limits.patch new file mode 100644 index 000000000000..0c56475f46c0 --- /dev/null +++ b/gcc11_limits.patch @@ -0,0 +1,23 @@ +diff -Naur firefox-52.9.0esr.orig/gfx/2d/BaseRect.h firefox-52.9.0esr/gfx/2d/BaseRect.h +--- firefox-52.9.0esr.orig/gfx/2d/BaseRect.h 2017-04-11 04:13:04.000000000 +0200 ++++ firefox-52.9.0esr/gfx/2d/BaseRect.h 2021-11-07 11:43:05.918263005 +0100 +@@ -7,6 +7,7 @@ + #define MOZILLA_GFX_BASERECT_H_ + + #include <algorithm> ++#include <limits> + #include <cmath> + #include <ostream> + +diff -Naur firefox-52.9.0esr.orig/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc firefox-52.9.0esr/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc +--- firefox-52.9.0esr.orig/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc 2017-04-11 04:13:15.000000000 +0200 ++++ firefox-52.9.0esr/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc 2021-11-07 12:10:21.097272082 +0100 +@@ -8,6 +8,8 @@ + * be found in the AUTHORS file in the root of the source tree. + */ + ++#include <limits> ++ + #include "webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h" + + #include "webrtc/base/checks.h" diff --git a/gcc9_format-overflow.patch b/gcc9_format-overflow.patch new file mode 100644 index 000000000000..b39b8ba6fb5c --- /dev/null +++ b/gcc9_format-overflow.patch @@ -0,0 +1,28 @@ +diff -Naur firefox-52.9.0esr.orig/js/src/jsapi-tests/testPrintf.cpp firefox-52.9.0esr/js/src/jsapi-tests/testPrintf.cpp +--- firefox-52.9.0esr.orig/js/src/jsapi-tests/testPrintf.cpp 2017-04-11 04:13:16.000000000 +0200 ++++ firefox-52.9.0esr/js/src/jsapi-tests/testPrintf.cpp 2019-06-22 20:55:06.354236156 +0200 +@@ -55,7 +55,6 @@ + CHECK(print_one("27270", "%zu", (size_t) 27270)); + CHECK(print_one("27270", "%" PRIuSIZE, (size_t) 27270)); + CHECK(print_one("hello", "he%so", "ll")); +- CHECK(print_one("(null)", "%s", zero())); + CHECK(print_one("0", "%p", (char *) 0)); + CHECK(print_one("h", "%c", 'h')); + CHECK(print_one("1.500000", "%f", 1.5f)); +diff -Naur firefox-52.9.0esr.orig/js/xpconnect/src/XPCWrappedNative.cpp firefox-52.9.0esr/js/xpconnect/src/XPCWrappedNative.cpp +--- firefox-52.9.0esr.orig/js/xpconnect/src/XPCWrappedNative.cpp 2018-06-21 20:53:54.000000000 +0200 ++++ firefox-52.9.0esr/js/xpconnect/src/XPCWrappedNative.cpp 2019-06-22 20:56:41.481045308 +0200 +@@ -2215,10 +2215,9 @@ + name = JS_sprintf_append(name, "%s", array[1]->GetNameString()); + } else { + for (uint16_t i = 0; i < count; i++) { +- const char* fmt = (i == 0) ? +- "(%s" : (i == count-1) ? +- ", %s)" : ", %s"; +- name = JS_sprintf_append(name, fmt, ++ name = JS_sprintf_append(name, (i == 0) ? ++ "(%s" : (i == count-1) ? ++ ", %s)" : ", %s", + array[i]->GetNameString()); + } + } diff --git a/gcc_lto-partitions.patch b/gcc_lto-partitions.patch new file mode 100644 index 000000000000..d6e502eb8dd0 --- /dev/null +++ b/gcc_lto-partitions.patch @@ -0,0 +1,36 @@ +diff -Naur a/ipc/app/moz.build b/ipc/app/moz.build +--- a/ipc/app/moz.build 2016-06-01 12:11:45.000000000 +0800 ++++ b/ipc/app/moz.build 2016-06-30 13:38:44.418231590 +0800 +@@ -85,7 +85,7 @@ + # from the function using it which breaks the build. Work around that by + # forcing there to be only one partition. + if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']: +- LDFLAGS += ['--param lto-partitions=1'] ++ LDFLAGS += ['--lto-partition=one'] + + if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] == 'Darwin': + # For sandbox includes and the include dependencies those have +diff -Naur a/ipc/app/pie/moz.build b/ipc/app/pie/moz.build +--- a/ipc/app/pie/moz.build 2016-05-13 01:13:13.000000000 +0800 ++++ b/ipc/app/pie/moz.build 2016-06-30 13:38:31.791619842 +0800 +@@ -25,7 +25,7 @@ + # from the function using it which breaks the build. Work around that by + # forcing there to be only one partition. + if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']: +- LDFLAGS += ['--param lto-partitions=1'] ++ LDFLAGS += ['--lto-partition=one'] + + LDFLAGS += ['-pie'] + +diff -Naur a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build +--- a/security/sandbox/linux/moz.build 2016-06-01 12:11:46.000000000 +0800 ++++ b/security/sandbox/linux/moz.build 2016-06-30 13:38:52.561530457 +0800 +@@ -79,7 +79,7 @@ + # from the function using it which breaks the build. Work around that by + # forcing there to be only one partition. + if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']: +- LDFLAGS += ['--param lto-partitions=1'] ++ LDFLAGS += ['--lto-partition=one'] + + DEFINES['NS_NO_XPCOM'] = True + DISABLE_STL_WRAPPING = True diff --git a/gfxFont.patch b/gfxFont.patch new file mode 100644 index 000000000000..609797cf8006 --- /dev/null +++ b/gfxFont.patch @@ -0,0 +1,105 @@ +--- firefox-52.9.0esr.orig/gfx/thebes/gfxFont.cpp 2020-06-03 21:55:12.303261510 +0300
++++ firefox-52.9.0esr/gfx/thebes/gfxFont.cpp 2020-06-03 21:57:35.318890953 +0300
+@@ -3071,6 +3071,28 @@
+
+ return true;
+ }
++// Explicit instantiations of GetShapedWord, to avoid libxul link failure
++template gfxShapedWord*
++gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
++ const uint8_t *aText,
++ uint32_t aLength,
++ uint32_t aHash,
++ Script aRunScript,
++ bool aVertical,
++ int32_t aAppUnitsPerDevUnit,
++ uint32_t aFlags,
++ gfxTextPerfMetrics *aTextPerf);
++
++template gfxShapedWord*
++gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
++ const char16_t *aText,
++ uint32_t aLength,
++ uint32_t aHash,
++ Script aRunScript,
++ bool aVertical,
++ int32_t aAppUnitsPerDevUnit,
++ uint32_t aFlags,
++ gfxTextPerfMetrics *aTextPerf);
+
+ // Explicit instantiations of SplitAndInitTextRun, to avoid libxul link failure
+ template bool
+--- firefox-52.9.0esr.orig/gfx/thebes/gfxFont.h 2020-06-03 21:55:12.299928120 +0300
++++ firefox-52.9.0esr/gfx/thebes/gfxFont.h 2020-06-03 21:58:04.522669252 +0300
+@@ -2171,6 +2171,72 @@
+ static double CalcXScale(DrawTarget* aDrawTarget);
+ };
+
++// Explicit declarations of SplitAndInitTextRun, to avoid libxul link failure
++extern template bool
++gfxFont::SplitAndInitTextRun(DrawTarget *aDrawTarget,
++ gfxTextRun *aTextRun,
++ const uint8_t *aString,
++ uint32_t aRunStart,
++ uint32_t aRunLength,
++ Script aRunScript,
++ bool aVertical);
++
++extern template bool
++gfxFont::SplitAndInitTextRun(DrawTarget *aDrawTarget,
++ gfxTextRun *aTextRun,
++ const char16_t *aString,
++ uint32_t aRunStart,
++ uint32_t aRunLength,
++ Script aRunScript,
++ bool aVertical);
++
++// Explicit declarations of GetShapedWord, to avoid libxul link failure
++extern template gfxShapedWord*
++gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
++ const uint8_t *aText,
++ uint32_t aLength,
++ uint32_t aHash,
++ Script aRunScript,
++ bool aVertical,
++ int32_t aAppUnitsPerDevUnit,
++ uint32_t aFlags,
++ gfxTextPerfMetrics *aTextPerf);
++
++extern template gfxShapedWord*
++gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
++ const char16_t *aText,
++ uint32_t aLength,
++ uint32_t aHash,
++ Script aRunScript,
++ bool aVertical,
++ int32_t aAppUnitsPerDevUnit,
++ uint32_t aFlags,
++ gfxTextPerfMetrics *aTextPerf);
++
++// Explicit declarations of InitFakeSmallCapsRun, to avoid libxul link failure
++template<> bool
++gfxFont::InitFakeSmallCapsRun(DrawTarget *aDrawTarget,
++ gfxTextRun *aTextRun,
++ const uint8_t *aText,
++ uint32_t aOffset,
++ uint32_t aLength,
++ uint8_t aMatchType,
++ uint16_t aOrientation,
++ Script aScript,
++ bool aSyntheticLower,
++ bool aSyntheticUpper);
++template<> bool
++gfxFont::InitFakeSmallCapsRun(DrawTarget *aDrawTarget,
++ gfxTextRun *aTextRun,
++ const char16_t *aText,
++ uint32_t aOffset,
++ uint32_t aLength,
++ uint8_t aMatchType,
++ uint16_t aOrientation,
++ Script aScript,
++ bool aSyntheticLower,
++ bool aSyntheticUpper);
++
+ // proportion of ascent used for x-height, if unable to read value from font
+ #define DEFAULT_XHEIGHT_FACTOR 0.56f
\ No newline at end of file diff --git a/glibc-gettid-wrapper.patch b/glibc-gettid-wrapper.patch new file mode 100644 index 000000000000..643bde10519b --- /dev/null +++ b/glibc-gettid-wrapper.patch @@ -0,0 +1,32 @@ +--- a/tools/profiler/core/platform.h 2017-04-10 19:13:25.000000000 -0700
++++ b/tools/profiler/core/platform.h 2019-11-23 13:26:09.765046334 -0800
+@@ -59,16 +59,13 @@
+ #include <vector>
+ #include "StackTop.h"
+
+-// We need a definition of gettid(), but Linux libc implementations don't
++// We need a definition of gettid(), but old Linux libc implementations don't
+ // provide a wrapper for it (except for Bionic)
+ #if defined(__linux__)
+ #include <unistd.h>
+ #if !defined(__BIONIC__)
+ #include <sys/syscall.h>
+-static inline pid_t gettid()
+-{
+- return (pid_t) syscall(SYS_gettid);
+-}
++#define gettid() static_cast<pid_t>(syscall(SYS_gettid))
+ #endif
+ #endif
+
+--- a/tools/profiler/core/GeckoSampler.cpp 2017-04-10 19:13:25.000000000 -0700
++++ b/tools/profiler/core/GeckoSampler.cpp 2019-11-23 14:17:39.549385223 -0800
+@@ -67,7 +67,7 @@
+
+ #if defined(LINUX) || defined(XP_MACOSX)
+ #include <sys/types.h>
+-pid_t gettid();
++//pid_t gettid();
+ #endif
+
+ #if defined(__arm__) && defined(ANDROID)
\ No newline at end of file diff --git a/icu74_nsJISx4051LineBreaker.patch b/icu74_nsJISx4051LineBreaker.patch new file mode 100644 index 000000000000..915cd694dea6 --- /dev/null +++ b/icu74_nsJISx4051LineBreaker.patch @@ -0,0 +1,17 @@ +diff -Naur firefox-52.9.0esr.orig/intl/lwbrk/nsJISx4051LineBreaker.cpp firefox-52.9.0esr/intl/lwbrk/nsJISx4051LineBreaker.cpp +--- firefox-52.9.0esr.orig/intl/lwbrk/nsJISx4051LineBreaker.cpp 2024-01-07 16:54:44.911690681 +0100 ++++ firefox-52.9.0esr/intl/lwbrk/nsJISx4051LineBreaker.cpp 2024-01-07 17:18:28.544628736 +0100 +@@ -550,7 +550,12 @@ + /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER, + /* E_BASE = 40, [EB] */ CLASS_BREAKABLE, + /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER, +- /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER ++ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER, ++ /* AKSARA = 43, [AK] */ CLASS_CHARACTER, ++ /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER, ++ /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER, ++ /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER, ++ /* VIRAMA = 47, [VI] */ CLASS_CHARACTER + }; + + #if ENABLE_INTL_API diff --git a/linux_remove_sysctl.patch b/linux_remove_sysctl.patch new file mode 100644 index 000000000000..b55784386c03 --- /dev/null +++ b/linux_remove_sysctl.patch @@ -0,0 +1,16 @@ +diff -Naur firefox-52.9.0esr.orig/memory/mozjemalloc/jemalloc.c firefox-52.9.0esr/memory/mozjemalloc/jemalloc.c +--- firefox-52.9.0esr.orig/memory/mozjemalloc/jemalloc.c 2017-05-12 02:25:50.000000000 +0200 ++++ firefox-52.9.0esr/memory/mozjemalloc/jemalloc.c 2020-12-12 22:13:48.502275579 +0100 +@@ -331,9 +331,9 @@ + #endif + #include <sys/time.h> + #include <sys/types.h> +-#if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID) +-#include <sys/sysctl.h> +-#endif ++//#if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID) ++//#include <sys/sysctl.h> ++//#endif + #include <sys/uio.h> + #ifndef MOZ_MEMORY + #include <sys/ktrace.h> /* Must come after several other sys/ includes. */ diff --git a/mach_install_ignore_errors.patch b/mach_install_ignore_errors.patch new file mode 100644 index 000000000000..8f664c3f21c2 --- /dev/null +++ b/mach_install_ignore_errors.patch @@ -0,0 +1,35 @@ +diff -Naur firefox-52.9.0esr.orig/toolkit/mozapps/installer/packager.py firefox-52.9.0esr/toolkit/mozapps/installer/packager.py +--- firefox-52.9.0esr.orig/toolkit/mozapps/installer/packager.py 2024-01-07 16:54:43.185021639 +0100 ++++ firefox-52.9.0esr/toolkit/mozapps/installer/packager.py 2024-01-07 21:33:32.564305725 +0100 +@@ -163,17 +163,20 @@ + % resource], + extra_linker_path=gre_path, + extra_env=extra_env): +- errors.fatal('Error while running startup cache precompilation') +- return +- from mozpack.mozjar import JarReader +- jar = JarReader(cache) +- resource = '/resource/%s/' % resource +- for f in jar: +- if resource in f.filename: +- path = f.filename[f.filename.index(resource) + len(resource):] +- if registry.contains(path): +- registry.add(f.filename, GeneratedFile(f.read())) +- jar.close() ++ # errors.fatal('Error while running startup cache precompilation') ++ # return ++ # Ignore the xpcshell errors as it's buggy ATM ++ pass ++ if os.path.exists(cache): ++ from mozpack.mozjar import JarReader ++ jar = JarReader(cache) ++ resource = '/resource/%s/' % resource ++ for f in jar: ++ if resource in f.filename: ++ path = f.filename[f.filename.index(resource) + len(resource):] ++ if registry.contains(path): ++ registry.add(f.filename, GeneratedFile(f.read())) ++ jar.close() + finally: + if os.path.exists(cache): + os.remove(cache) diff --git a/mathops_operand_type_mismatch_for_shr.patch b/mathops_operand_type_mismatch_for_shr.patch new file mode 100644 index 000000000000..33fd3d484fb6 --- /dev/null +++ b/mathops_operand_type_mismatch_for_shr.patch @@ -0,0 +1,76 @@ +From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001 +From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> +Date: Sun, 16 Jul 2023 18:18:02 +0300 +Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift + instructions within inline assembly + +Fixes assembling with binutil as >= 2.41 + +Signed-off-by: James Almer <jamrial@gmail.com> +--- + libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h +index 6298f5ed19..ca7e2dffc1 100644 +--- a/libavcodec/x86/mathops.h ++++ b/libavcodec/x86/mathops.h +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + +-- +2.30.2 + |