mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-01 18:32:58 +02:00
firefox: update to 141.0.
This commit is contained in:
parent
e1b0e6b3eb
commit
75937486de
2 changed files with 9 additions and 91 deletions
|
@ -1,85 +0,0 @@
|
||||||
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
|
|
|
@ -3,7 +3,7 @@
|
||||||
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-i18n".
|
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-i18n".
|
||||||
#
|
#
|
||||||
pkgname=firefox
|
pkgname=firefox
|
||||||
version=140.0
|
version=141.0
|
||||||
revision=1
|
revision=1
|
||||||
build_helper="rust"
|
build_helper="rust"
|
||||||
short_desc="Mozilla Firefox web browser"
|
short_desc="Mozilla Firefox web browser"
|
||||||
|
@ -12,14 +12,14 @@ license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later"
|
||||||
homepage="https://www.mozilla.org/firefox/"
|
homepage="https://www.mozilla.org/firefox/"
|
||||||
changelog="https://www.mozilla.org/en-US/firefox/${version}/releasenotes/"
|
changelog="https://www.mozilla.org/en-US/firefox/${version}/releasenotes/"
|
||||||
distfiles="${MOZILLA_SITE}/firefox/releases/${version/beta/b}/source/firefox-${version/beta/b}.source.tar.xz"
|
distfiles="${MOZILLA_SITE}/firefox/releases/${version/beta/b}/source/firefox-${version/beta/b}.source.tar.xz"
|
||||||
checksum=ee1253b49b21241abc5d490df60be1d9f1d3914cdc1a4e3482a8158913f9fd1f
|
checksum=80982a84bb7ca41a67ac073321de96f74e0c25f296d19ca432b11fc2a33535c8
|
||||||
|
|
||||||
lib32disabled=yes
|
lib32disabled=yes
|
||||||
_llvmver=19 # needs to match rust
|
_llvmver=19 # needs to match rust
|
||||||
hostmakedepends="autoconf213 unzip zip pkg-config perl python3 yasm rust
|
hostmakedepends="unzip zip pkg-config perl python3
|
||||||
cargo llvm${_llvmver} clang${_llvmver} lld${_llvmver} nodejs cbindgen nasm which
|
yasm rust cargo llvm${_llvmver} clang${_llvmver} lld${_llvmver}
|
||||||
tar xz $(vopt_if pgo 'xvfb-run dbus mesa-dri vulkan-loader pciutils')
|
nodejs cbindgen nasm which tar xz $(vopt_if wasi wasi-sdk)
|
||||||
$(vopt_if wasi wasi-sdk)"
|
$(vopt_if pgo 'xvfb-run dbus mesa-dri vulkan-loader pciutils')"
|
||||||
makedepends="nss-devel libjpeg-turbo-devel gtk+3-devel
|
makedepends="nss-devel libjpeg-turbo-devel gtk+3-devel
|
||||||
pixman-devel libevent-devel libnotify-devel libvpx-devel libwebp-devel
|
pixman-devel libevent-devel libnotify-devel libvpx-devel libwebp-devel
|
||||||
libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std
|
libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std
|
||||||
|
@ -140,6 +140,7 @@ do_build() {
|
||||||
ac_add_options --host=${XBPS_TRIPLET}
|
ac_add_options --host=${XBPS_TRIPLET}
|
||||||
ac_add_options --target=${XBPS_CROSS_TRIPLET:-${XBPS_TRIPLET}}
|
ac_add_options --target=${XBPS_CROSS_TRIPLET:-${XBPS_TRIPLET}}
|
||||||
ac_add_options --enable-linker=$(vopt_if clang lld bfd)
|
ac_add_options --enable-linker=$(vopt_if clang lld bfd)
|
||||||
|
ac_add_options --disable-bootstrap
|
||||||
$(vopt_if lto 'ac_add_options --enable-lto=cross')
|
$(vopt_if lto 'ac_add_options --enable-lto=cross')
|
||||||
$(vopt_if clang 'ac_add_options --with-libclang-path=/usr/lib')
|
$(vopt_if clang 'ac_add_options --with-libclang-path=/usr/lib')
|
||||||
|
|
||||||
|
@ -149,6 +150,8 @@ do_build() {
|
||||||
ac_add_options --enable-hardening
|
ac_add_options --enable-hardening
|
||||||
ac_add_options --enable-optimize="\${CFLAGS}"
|
ac_add_options --enable-optimize="\${CFLAGS}"
|
||||||
ac_add_options --enable-path-remapping=c,rust
|
ac_add_options --enable-path-remapping=c,rust
|
||||||
|
ac_add_options --enable-packed-relative-relocs
|
||||||
|
ac_add_options --disable-cargo-incremental
|
||||||
ac_add_options --disable-tests
|
ac_add_options --disable-tests
|
||||||
ac_add_options --disable-crashreporter
|
ac_add_options --disable-crashreporter
|
||||||
ac_add_options --disable-updater
|
ac_add_options --disable-updater
|
||||||
|
|
Loading…
Add table
Reference in a new issue