From 53775068ff233a095ce94ba108a2e1a60e58012b Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Thu, 10 Nov 2022 13:15:47 +0100 Subject: [PATCH] Fix qtwebengine and thunderbird for python-3.11 --- x/lib/qtwebengine.xml | 9 +++++++++ xsoft/other/thunderbird.xml | 18 ++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/x/lib/qtwebengine.xml b/x/lib/qtwebengine.xml index b8e48be78c..f15a6722e2 100644 --- a/x/lib/qtwebengine.xml +++ b/x/lib/qtwebengine.xml @@ -387,6 +387,15 @@ sed -e '/link_pulseaudio/s/false/true/' \ -i src/3rdparty/chromium/media/media_options.gni + + Next, fix the build tools so they can be run with Python-3.11+: + + +sed -e 's/\^(?i)/(?i)^/' \ + -i src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py && +sed -e "s/'rU'/'r'/" \ + -i src/3rdparty/chromium/tools/grit/grit/util.py + Finally, fix a change in the build system which allows its developers to pass e.g. -j20 to make (for quick tests of some areas) but breaks the diff --git a/xsoft/other/thunderbird.xml b/xsoft/other/thunderbird.xml index 0d59a7f26f..5c5e58d93e 100644 --- a/xsoft/other/thunderbird.xml +++ b/xsoft/other/thunderbird.xml @@ -254,9 +254,23 @@ esac grep -rl \"rU\" | xargs sed -i 's/"rU"/"r"/' + + Then fix an issue with regular expressions in python-3.11: + + +sed -e 's/?s)\./?s:.)/' \ + -e '/?m)/{s/?m)/?m:/;s/\$"/$)"/}' \ + -e '/?s)%/{s/?s)/?s:/;s/?"/?)"/}' \ + -i xpcom/idl-parser/xpidl/xpidl.py + + + Now invoke the Python mach script to compile the + package. + + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none && -export MOZBUILD_STATE_PATH=./mozbuild && -./mach configure && +export MOZBUILD_STATE_PATH=./mozbuild && +./mach configure && ./mach build