* update js115 to 115.11.0-1
This commit is contained in:
parent
d06b093d38
commit
0e8d0a15d5
88
js115/big-endian-image-decoders.patch
Normal file
88
js115/big-endian-image-decoders.patch
Normal file
@ -0,0 +1,88 @@
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1626236
|
||||
https://bug1626236.bmoattachments.org/attachment.cgi?id=9137096
|
||||
|
||||
# HG changeset patch
|
||||
# User msirringhaus@suse.de
|
||||
# Date 1582805876 -3600
|
||||
# Thu Feb 27 13:17:56 2020 +0100
|
||||
# Node ID cc3d09abea31068e57f1ab918782f9f86fc6a158
|
||||
# Parent 9cd90914846f667f18babc491a74c164ae5d6e9f
|
||||
imported patch decoder_workaround.patch
|
||||
|
||||
diff -r 9cd90914846f image/decoders/nsGIFDecoder2.cpp
|
||||
--- a/image/decoders/nsGIFDecoder2.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||
+++ b/image/decoders/nsGIFDecoder2.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||
@@ -422,6 +422,9 @@
|
||||
MOZ_ASSERT(mSwizzleFn);
|
||||
uint8_t* data = reinterpret_cast<uint8_t*>(aColormap);
|
||||
mSwizzleFn(data, data, aColors);
|
||||
+#if MOZ_BIG_ENDIAN()
|
||||
+ SwizzleRow(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)(data, data, aColors);
|
||||
+#endif
|
||||
}
|
||||
|
||||
LexerResult nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator,
|
||||
diff -r 9cd90914846f image/decoders/nsJPEGDecoder.cpp
|
||||
--- a/image/decoders/nsJPEGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||
+++ b/image/decoders/nsJPEGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||
@@ -263,6 +263,9 @@
|
||||
case JCS_YCbCr:
|
||||
// By default, we will output directly to BGRA. If we need to apply
|
||||
// special color transforms, this may change.
|
||||
+#if MOZ_BIG_ENDIAN()
|
||||
+ mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
|
||||
+#else
|
||||
switch (SurfaceFormat::OS_RGBX) {
|
||||
case SurfaceFormat::B8G8R8X8:
|
||||
mInfo.out_color_space = JCS_EXT_BGRX;
|
||||
@@ -277,6 +280,7 @@
|
||||
mState = JPEG_ERROR;
|
||||
return Transition::TerminateFailure();
|
||||
}
|
||||
+#endif
|
||||
break;
|
||||
case JCS_CMYK:
|
||||
case JCS_YCCK:
|
||||
diff -r 9cd90914846f image/decoders/nsPNGDecoder.cpp
|
||||
--- a/image/decoders/nsPNGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||
+++ b/image/decoders/nsPNGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||
@@ -361,7 +361,7 @@
|
||||
IResumable* aOnResume) {
|
||||
MOZ_ASSERT(!HasError(), "Shouldn't call DoDecode after error!");
|
||||
|
||||
- return mLexer.Lex(aIterator, aOnResume,
|
||||
+ LexerResult res = mLexer.Lex(aIterator, aOnResume,
|
||||
[=](State aState, const char* aData, size_t aLength) {
|
||||
switch (aState) {
|
||||
case State::PNG_DATA:
|
||||
@@ -371,6 +371,14 @@
|
||||
}
|
||||
MOZ_CRASH("Unknown State");
|
||||
});
|
||||
+
|
||||
+#if MOZ_BIG_ENDIAN()
|
||||
+ if(res.is<TerminalState>() && res.as<TerminalState>() == TerminalState::SUCCESS) {
|
||||
+ NativeEndian::swapToLittleEndianInPlace<uint32_t>((uint32_t*)(mImageData), mImageDataLength / 4);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ return res;
|
||||
}
|
||||
|
||||
LexerTransition<nsPNGDecoder::State> nsPNGDecoder::ReadPNGData(
|
||||
diff -r 9cd90914846f image/decoders/nsWebPDecoder.cpp
|
||||
--- a/image/decoders/nsWebPDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
|
||||
+++ b/image/decoders/nsWebPDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
|
||||
@@ -237,7 +237,12 @@
|
||||
// WebP doesn't guarantee that the alpha generated matches the hint in the
|
||||
// header, so we always need to claim the input is BGRA. If the output is
|
||||
// BGRX, swizzling will mask off the alpha channel.
|
||||
+#if MOZ_BIG_ENDIAN()
|
||||
+ mBuffer.colorspace = MODE_ARGB;
|
||||
+ SurfaceFormat inFormat = mFormat;
|
||||
+#else
|
||||
SurfaceFormat inFormat = SurfaceFormat::OS_RGBA;
|
||||
+#endif
|
||||
|
||||
SurfacePipeFlags pipeFlags = SurfacePipeFlags();
|
||||
if (mFormat == SurfaceFormat::OS_RGBA &&
|
20
js115/fix-webrtc-glibcisms.patch
Normal file
20
js115/fix-webrtc-glibcisms.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
|
||||
+++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
|
||||
@@ -18,7 +18,7 @@
|
||||
#define WEBRTC_GLIBC_PREREQ(a, b) 0
|
||||
#endif
|
||||
|
||||
-#if WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
+#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
#include <sys/auxv.h>
|
||||
#else
|
||||
#include <errno.h>
|
||||
@@ -40,7 +40,7 @@
|
||||
int architecture = 0;
|
||||
uint64_t hwcap = 0;
|
||||
const char* platform = NULL;
|
||||
-#if WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
+#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
|
||||
hwcap = getauxval(AT_HWCAP);
|
||||
platform = (const char*)getauxval(AT_PLATFORM);
|
||||
#else
|
85
js115/ply-python3.11.patch
Normal file
85
js115/ply-python3.11.patch
Normal file
@ -0,0 +1,85 @@
|
||||
The Ply lexer, which doesn't seem too active a project, wraps regular
|
||||
expressions from grammar definitions in its own regular expressions that name
|
||||
groups. This breaks re.compile in Python >= 3.11 when the original expressions
|
||||
contain global flags, because the compiler requires that global flags appear at
|
||||
the start of the expression instead of inside the named group.
|
||||
|
||||
This patch wraps re.compile to scan the expression for any global flags and,
|
||||
when found, moves them to the start of the expression.
|
||||
|
||||
--- a/third_party/python/ply/ply/lex.py
|
||||
+++ b/third_party/python/ply/ply/lex.py
|
||||
@@ -49,6 +49,37 @@
|
||||
# Python 3.0
|
||||
StringTypes = (str, bytes)
|
||||
|
||||
+
|
||||
+def _re_compile(expression, *args, **kwargs):
|
||||
+ '''
|
||||
+ Rearrange global flags in the regular expression to appear at the
|
||||
+ beginning, avoiding deprecation warnings on Python < 3.11 and hard
|
||||
+ errors on Python >= 3.11.
|
||||
+ '''
|
||||
+ flags = set()
|
||||
+ remainder = ''
|
||||
+
|
||||
+ pattern = re.compile(r'\(\?([aiLmsux]+)\)')
|
||||
+ while m := pattern.search(expression):
|
||||
+ # Location of the global flag spec
|
||||
+ l, h = m.span(0)
|
||||
+ # Accumulate global flags from this spec
|
||||
+ flags.update(m.group(1))
|
||||
+ # Capture all text leading up to the match
|
||||
+ remainder += expression[:l]
|
||||
+ # Trim to the end fo the flag spec
|
||||
+ expression = expression[h:]
|
||||
+
|
||||
+ # Any remaining expression contains no flags
|
||||
+ remainder += expression
|
||||
+
|
||||
+ # If there are flags, they belong at the beginning
|
||||
+ if flags:
|
||||
+ remainder = f'(?{"".join(sorted(flags))})' + remainder
|
||||
+
|
||||
+ return re.compile(remainder, *args, **kwargs)
|
||||
+
|
||||
+
|
||||
# This regular expression is used to match valid token names
|
||||
_is_identifier = re.compile(r'^[a-zA-Z0-9_]+$')
|
||||
|
||||
@@ -230,7 +261,7 @@
|
||||
titem = []
|
||||
txtitem = []
|
||||
for pat, func_name in lre:
|
||||
- titem.append((re.compile(pat, lextab._lexreflags), _names_to_funcs(func_name, fdict)))
|
||||
+ titem.append((_re_compile(pat, lextab._lexreflags), _names_to_funcs(func_name, fdict)))
|
||||
|
||||
self.lexstatere[statename] = titem
|
||||
self.lexstateretext[statename] = txtitem
|
||||
@@ -495,7 +526,7 @@
|
||||
return []
|
||||
regex = '|'.join(relist)
|
||||
try:
|
||||
- lexre = re.compile(regex, reflags)
|
||||
+ lexre = _re_compile(regex, reflags)
|
||||
|
||||
# Build the index to function map for the matching engine
|
||||
lexindexfunc = [None] * (max(lexre.groupindex.values()) + 1)
|
||||
@@ -758,7 +789,7 @@
|
||||
continue
|
||||
|
||||
try:
|
||||
- c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), self.reflags)
|
||||
+ c = _re_compile('(?P<%s>%s)' % (fname, _get_regex(f)), self.reflags)
|
||||
if c.match(''):
|
||||
self.log.error("%s:%d: Regular expression for rule '%s' matches empty string", file, line, f.__name__)
|
||||
self.error = True
|
||||
@@ -782,7 +813,7 @@
|
||||
continue
|
||||
|
||||
try:
|
||||
- c = re.compile('(?P<%s>%s)' % (name, r), self.reflags)
|
||||
+ c = _re_compile('(?P<%s>%s)' % (name, r), self.reflags)
|
||||
if (c.match('')):
|
||||
self.log.error("Regular expression for rule '%s' matches empty string", name)
|
||||
self.error = True
|
36
js115/ppc32-fix-build.patch
Normal file
36
js115/ppc32-fix-build.patch
Normal file
@ -0,0 +1,36 @@
|
||||
This is not a complete/correct patch, but it makes firefox build. For now
|
||||
mostly for tracking, so a real fix can be made, but right now it still
|
||||
segfaults on start.
|
||||
|
||||
Ref: https://hg.mozilla.org/mozilla-central/rev/08339a56f3ae
|
||||
Ref: https://hg.mozilla.org/mozilla-central/rev/d16fcad6aa60
|
||||
Ref: https://hg.mozilla.org/mozilla-central/rev/ab87611d012e
|
||||
Ref: https://hg.mozilla.org/mozilla-central/file/tip/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_linux.cpp
|
||||
|
||||
--- a/xpcom/reflect/xptcall/xptcall.h
|
||||
+++ b/xpcom/reflect/xptcall/xptcall.h
|
||||
@@ -71,6 +71,11 @@ struct nsXPTCVariant {
|
||||
ExtendedVal ext;
|
||||
};
|
||||
|
||||
+#if defined(__powerpc__) && !defined(__powerpc64__)
|
||||
+ // this field is still necessary on ppc32, as an address
|
||||
+ // to it is taken certain places in xptcall
|
||||
+ void *ptr;
|
||||
+#endif
|
||||
nsXPTType type;
|
||||
uint8_t flags;
|
||||
|
||||
@@ -91,7 +96,12 @@ struct nsXPTCVariant {
|
||||
};
|
||||
|
||||
void ClearFlags() { flags = 0; }
|
||||
+#if defined(__powerpc__) && !defined(__powerpc64__)
|
||||
+ void SetIndirect() { ptr = &val; flags |= IS_INDIRECT; }
|
||||
+ bool IsPtrData() const { return IsIndirect(); }
|
||||
+#else
|
||||
void SetIndirect() { flags |= IS_INDIRECT; }
|
||||
+#endif
|
||||
|
||||
bool IsIndirect() const { return 0 != (flags & IS_INDIRECT); }
|
||||
|
15
js115/sandbox-fork.patch
Normal file
15
js115/sandbox-fork.patch
Normal file
@ -0,0 +1,15 @@
|
||||
make SYS_fork non-fatal, musl uses it for fork(2)
|
||||
|
||||
--- a/security/sandbox/linux/SandboxFilter.cpp
|
||||
+++ b/security/sandbox/linux/SandboxFilter.cpp
|
||||
@@ -1420,6 +1420,10 @@
|
||||
// usually do something reasonable on error.
|
||||
case __NR_clone:
|
||||
return ClonePolicy(Error(EPERM));
|
||||
+# ifdef __NR_fork
|
||||
+ case __NR_fork:
|
||||
+ return Error(ENOSYS);
|
||||
+# endif
|
||||
|
||||
# ifdef __NR_fadvise64
|
||||
case __NR_fadvise64:
|
55
js115/sqlite-ppc.patch
Normal file
55
js115/sqlite-ppc.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From 67157b1aa7da0a146b7d2d5abb9237eea1f434ec Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Kolesa <daniel@octaforge.org>
|
||||
Date: Fri, 23 Sep 2022 02:38:29 +0200
|
||||
Subject: [PATCH] fix sqlite3 on ppc with clang
|
||||
|
||||
The __ppc__ macro is always defined on clang but not gcc, which
|
||||
results in sqlite mistakenly thinking that ppc64le with clang
|
||||
is big endian.
|
||||
|
||||
Also disable some inline assembly stuff on ppc that is never used
|
||||
with gcc and probably was never tested with modern machines.
|
||||
---
|
||||
third_party/sqlite3/src/sqlite3.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/third_party/sqlite3/src/sqlite3.c b/third_party/sqlite3/src/sqlite3.c
|
||||
index 4f3dc68..9017062 100644
|
||||
--- a/third_party/sqlite3/src/sqlite3.c
|
||||
+++ b/third_party/sqlite3/src/sqlite3.c
|
||||
@@ -14317,9 +14317,9 @@ typedef INT16_TYPE LogEst;
|
||||
# if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
|
||||
defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
|
||||
defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
|
||||
- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
|
||||
+ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || defined(__LITTLE_ENDIAN__)
|
||||
# define SQLITE_BYTEORDER 1234
|
||||
-# elif defined(sparc) || defined(__ppc__) || \
|
||||
+# elif defined(sparc) || defined(__BIG_ENDIAN__) || \
|
||||
defined(__ARMEB__) || defined(__AARCH64EB__)
|
||||
# define SQLITE_BYTEORDER 4321
|
||||
# else
|
||||
@@ -20713,7 +20713,7 @@ SQLITE_PRIVATE const char **sqlite3CompileOptions(int *pnOpt);
|
||||
return val;
|
||||
}
|
||||
|
||||
-#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__))
|
||||
+#elif 0
|
||||
|
||||
__inline__ sqlite_uint64 sqlite3Hwtime(void){
|
||||
unsigned long long retval;
|
||||
@@ -196385,9 +196385,9 @@ struct RtreeMatchArg {
|
||||
#if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
|
||||
defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
|
||||
defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
|
||||
- defined(__arm__)
|
||||
+ defined(__arm__) || defined(__LITTLE_ENDIAN__)
|
||||
# define SQLITE_BYTEORDER 1234
|
||||
-#elif defined(sparc) || defined(__ppc__)
|
||||
+#elif defined(sparc) || defined(__BIG_ENDIAN__)
|
||||
# define SQLITE_BYTEORDER 4321
|
||||
#else
|
||||
# define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */
|
||||
--
|
||||
2.37.3
|
||||
|
Loading…
x
Reference in New Issue
Block a user