build fixes

This commit is contained in:
Martin Stransky 2022-12-08 11:05:41 +01:00
parent de85410030
commit 2abef0ec2b
7 changed files with 4637 additions and 65 deletions

57
D162136.diff Normal file
View File

@ -0,0 +1,57 @@
diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py
--- a/python/mach/mach/site.py
+++ b/python/mach/mach/site.py
@@ -16,14 +16,14 @@
import shutil
import site
import subprocess
import sys
import sysconfig
-from pathlib import Path
import tempfile
from contextlib import contextmanager
-from typing import Optional, Callable
+from pathlib import Path
+from typing import Callable, Optional
from mach.requirements import (
MachEnvRequirements,
UnexpectedFlexibleRequirementException,
)
@@ -761,11 +761,11 @@
self.bin_path = os.path.join(prefix, "Scripts")
self.python_path = os.path.join(self.bin_path, "python.exe")
else:
self.bin_path = os.path.join(prefix, "bin")
self.python_path = os.path.join(self.bin_path, "python")
- self.prefix = prefix
+ self.prefix = os.path.realpath(prefix)
@functools.lru_cache(maxsize=None)
def resolve_sysconfig_packages_path(self, sysconfig_path):
# macOS uses a different default sysconfig scheme based on whether it's using the
# system Python or running in a virtualenv.
@@ -781,20 +781,16 @@
data_path = Path(sysconfig_paths["data"])
path = Path(sysconfig_paths[sysconfig_path])
relative_path = path.relative_to(data_path)
# Path to virtualenv's "site-packages" directory for provided sysconfig path
- return os.path.normpath(
- os.path.normcase(os.path.realpath(Path(self.prefix) / relative_path))
- )
+ return os.path.normpath(os.path.normcase(Path(self.prefix) / relative_path))
def site_packages_dirs(self):
dirs = []
if sys.platform.startswith("win"):
- dirs.append(
- os.path.normpath(os.path.normcase(os.path.realpath(self.prefix)))
- )
+ dirs.append(os.path.normpath(os.path.normcase(self.prefix)))
purelib = self.resolve_sysconfig_packages_path("purelib")
platlib = self.resolve_sysconfig_packages_path("platlib")
dirs.append(purelib)
if platlib != purelib:

View File

@ -1,28 +0,0 @@
diff -up firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py.build-python-3.11 firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py
--- firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py.build-python-3.11 2022-06-23 09:10:31.000000000 +0200
+++ firefox-102.0/xpcom/idl-parser/xpidl/xpidl.py 2022-07-15 16:18:52.048351493 +0200
@@ -1572,13 +1572,13 @@ class IDLParser(object):
t_ignore = " \t"
def t_multilinecomment(self, t):
- r"/\*(?s).*?\*/"
+ r"/\*(?s:.)*?\*/"
t.lexer.lineno += t.value.count("\n")
if t.value.startswith("/**"):
self._doccomments.append(t.value)
def t_singlelinecomment(self, t):
- r"(?m)//.*?$"
+ r"(?m://.*?$)"
def t_IID(self, t):
return t
@@ -1591,7 +1591,7 @@ class IDLParser(object):
return t
def t_LCDATA(self, t):
- r"(?s)%\{[ ]*C\+\+[ ]*\n(?P<cdata>.*?\n?)%\}[ ]*(C\+\+)?"
+ r"(?s:%\{[ ]*C\+\+[ ]*\n(?P<cdata>.*?\n?)%\}[ ]*(C\+\+)?)"
t.type = "CDATA"
t.value = t.lexer.lexmatch.group("cdata")
t.lexer.lineno += t.value.count("\n")

View File

@ -1,12 +0,0 @@
diff -up firefox-95.0/build/mach_virtualenv_packages.txt.pytpatch firefox-95.0/build/mach_virtualenv_packages.txt
--- firefox-95.0/build/mach_virtualenv_packages.txt.pytpatch 2021-12-06 07:52:44.829038010 +0100
+++ firefox-95.0/build/mach_virtualenv_packages.txt 2021-12-06 07:53:56.676269562 +0100
@@ -1,7 +1,7 @@
packages.txt:build/common_virtualenv_packages.txt
# glean-sdk may not be installable if a wheel isn't available
# and it has to be built from source.
-pypi-optional:glean-sdk==40.0.0:telemetry will not be collected
+pypi-optional:glean-sdk>=40.0.0,<=42.2.0:telemetry will not be collected
# Mach gracefully handles the case where `psutil` is unavailable.
# We aren't (yet) able to pin packages in automation, so we have to
# support down to the oldest locally-installed version (5.4.2).

View File

@ -2,10 +2,8 @@
ac_add_options --with-system-zlib
ac_add_options --disable-strip
#ac_add_options --enable-libnotify
ac_add_options --enable-necko-wifi
ac_add_options --disable-updater
ac_add_options --disable-elfhack
ac_add_options --enable-chrome-format=omni
ac_add_options --enable-pulseaudio
ac_add_options --enable-av1

View File

@ -168,6 +168,8 @@ ExcludeArch: i686
%global __provides_exclude_from ^%{mozappdir}
%global __requires_exclude ^(%%(find %{buildroot}%{mozappdir} -name '*.so' | xargs -n1 basename | sort -u | paste -s -d '|' -))
%undefine _package_note_flags
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 108.0
@ -213,7 +215,6 @@ Patch35: build-ppc-jit.patch
# Fixing missing cacheFlush when JS_CODEGEN_NONE is used (s390x)
Patch38: build-cacheFlush-missing.patch
Patch40: build-aarch64-skia.patch
#Patch41: build-disable-elfhack.patch
Patch44: build-arm-libopus.patch
Patch46: firefox-nss-version.patch
Patch47: fedora-shebang-build.patch
@ -222,10 +223,9 @@ Patch53: firefox-gcc-build.patch
Patch54: mozilla-1669639.patch
Patch55: firefox-testing.patch
Patch61: firefox-glibc-dynstack.patch
Patch62: build-python.patch
Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch
Patch77: build-python-3.11.patch
Patch78: firefox-i686-build.patch
Patch80: D162136.diff
# Test patches
# Generate without context by
@ -501,8 +501,8 @@ This package contains results of tests executed during build.
%patch53 -p1 -b .firefox-gcc-build
%patch54 -p1 -b .1669639
%patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12
#%patch77 -p1 -b .build-python-3.11
%patch78 -p1 -b .firefox-i686
%patch80 -p1 -b .D162136
# Test patches
#%patch100 -p1 -b .firefox-tests-xpcshell

View File

@ -1,6 +1,6 @@
diff -up firefox-106.0/media/ffvpx/libavcodec/codec_list.c.1667096 firefox-106.0/media/ffvpx/libavcodec/codec_list.c
--- firefox-106.0/media/ffvpx/libavcodec/codec_list.c.1667096 2022-10-10 18:05:25.000000000 +0200
+++ firefox-106.0/media/ffvpx/libavcodec/codec_list.c 2022-10-14 10:43:44.943418216 +0200
diff -up firefox-108.0/media/ffvpx/libavcodec/codec_list.c.1667096 firefox-108.0/media/ffvpx/libavcodec/codec_list.c
--- firefox-108.0/media/ffvpx/libavcodec/codec_list.c.1667096 2022-12-05 21:18:00.000000000 +0100
+++ firefox-108.0/media/ffvpx/libavcodec/codec_list.c 2022-12-08 08:29:54.513562296 +0100
@@ -11,6 +11,9 @@ static const FFCodec * const codec_list[
#if CONFIG_MP3_DECODER
&ff_mp3_decoder,
@ -11,10 +11,10 @@ diff -up firefox-106.0/media/ffvpx/libavcodec/codec_list.c.1667096 firefox-106.0
#if CONFIG_LIBDAV1D
&ff_libdav1d_decoder,
#endif
diff -up firefox-106.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-106.0/media/ffvpx/libavcodec/libfdk-aacdec.c
--- firefox-106.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 2022-10-14 10:43:44.943418216 +0200
+++ firefox-106.0/media/ffvpx/libavcodec/libfdk-aacdec.c 2022-10-14 13:33:42.604975843 +0200
@@ -0,0 +1,498 @@
diff -up firefox-108.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-108.0/media/ffvpx/libavcodec/libfdk-aacdec.c
--- firefox-108.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 2022-12-08 08:29:54.514562328 +0100
+++ firefox-108.0/media/ffvpx/libavcodec/libfdk-aacdec.c 2022-09-03 18:20:04.000000000 +0200
@@ -0,0 +1,497 @@
+/*
+ * AAC decoder wrapper
+ * Copyright (c) 2012 Martin Storsjo
@ -41,7 +41,7 @@ diff -up firefox-106.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-10
+#include "libavutil/opt.h"
+#include "avcodec.h"
+#include "codec_internal.h"
+#include "internal.h"
+#include "decode.h"
+
+#ifdef AACDECODER_LIB_VL0
+#define FDKDEC_VER_AT_LEAST(vl0, vl1) \
@ -495,7 +495,7 @@ diff -up firefox-106.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-10
+
+const FFCodec ff_libfdk_aac_decoder = {
+ .p.name = "libfdk_aac",
+ .p.long_name = NULL_IF_CONFIG_SMALL("Fraunhofer FDK AAC"),
+ CODEC_LONG_NAME("Fraunhofer FDK AAC"),
+ .p.type = AVMEDIA_TYPE_AUDIO,
+ .p.id = AV_CODEC_ID_AAC,
+ .priv_data_size = sizeof(FDKAACDecContext),
@ -509,14 +509,13 @@ diff -up firefox-106.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-10
+#endif
+ ,
+ .p.priv_class = &fdk_aac_dec_class,
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
+ FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
+ .p.wrapper_name = "libfdk",
+};
diff -up firefox-106.0/media/ffvpx/libavcodec/moz.build.1667096 firefox-106.0/media/ffvpx/libavcodec/moz.build
--- firefox-106.0/media/ffvpx/libavcodec/moz.build.1667096 2022-10-10 18:05:25.000000000 +0200
+++ firefox-106.0/media/ffvpx/libavcodec/moz.build 2022-10-14 10:43:44.943418216 +0200
@@ -129,6 +129,12 @@ if CONFIG['MOZ_LIBAV_FFT']:
diff -up firefox-108.0/media/ffvpx/libavcodec/moz.build.1667096 firefox-108.0/media/ffvpx/libavcodec/moz.build
--- firefox-108.0/media/ffvpx/libavcodec/moz.build.1667096 2022-12-05 21:18:01.000000000 +0100
+++ firefox-108.0/media/ffvpx/libavcodec/moz.build 2022-12-08 08:29:54.514562328 +0100
@@ -130,6 +130,12 @@ if CONFIG['MOZ_LIBAV_FFT']:
'avfft.c',
]
@ -529,10 +528,10 @@ diff -up firefox-106.0/media/ffvpx/libavcodec/moz.build.1667096 firefox-106.0/me
SYMBOLS_FILE = 'avcodec.symbols'
NoVisibilityFlags()
diff -up firefox-106.0/toolkit/moz.configure.1667096 firefox-106.0/toolkit/moz.configure
--- firefox-106.0/toolkit/moz.configure.1667096 2022-10-14 10:43:44.912417169 +0200
+++ firefox-106.0/toolkit/moz.configure 2022-10-14 10:43:44.944418250 +0200
@@ -2148,6 +2148,15 @@ with only_when(compile_environment):
diff -up firefox-108.0/toolkit/moz.configure.1667096 firefox-108.0/toolkit/moz.configure
--- firefox-108.0/toolkit/moz.configure.1667096 2022-12-05 21:21:08.000000000 +0100
+++ firefox-108.0/toolkit/moz.configure 2022-12-08 08:29:54.514562328 +0100
@@ -2134,6 +2134,15 @@ with only_when(compile_environment):
set_config("MOZ_SYSTEM_PNG", True, when="--with-system-png")

4558
python-build.patch Normal file

File diff suppressed because it is too large Load Diff