From e6ef53969f80c1adac9fcf84c95b8759935335c1 Mon Sep 17 00:00:00 2001 From: Owen Rafferty Date: Mon, 24 Oct 2022 18:02:21 -0500 Subject: [PATCH] firefox: python 3.11 compatibility --- extra/firefox/checksums | 1 + extra/firefox/patches/python-3.11.patch | 30 +++++++++++++++++++++++++ extra/firefox/sources | 1 + 3 files changed, 32 insertions(+) create mode 100644 extra/firefox/patches/python-3.11.patch diff --git a/extra/firefox/checksums b/extra/firefox/checksums index da55b029..316a8198 100644 --- a/extra/firefox/checksums +++ b/extra/firefox/checksums @@ -4,3 +4,4 @@ ba6e380bc3d2cbd1b3a505ab97687498335c334d8a4be7f465ad30ee366806c7 42d489e60eae7d2807ef109a4eb1dd3d0e52e8ea9a8a19074495453e588f0625 4a232e3aa3973894a58c126b9e901c924d4e1ca3e00c4fc82d08de4b880183a9 ed51ce8a6730c489ea9dda354f02c579fb3632925096a0260bfae7a6b82ceace +5b0aad43012e4c175a6dde70b006fa9f07c4b0d70e9632414f16ac55d5243be4 diff --git a/extra/firefox/patches/python-3.11.patch b/extra/firefox/patches/python-3.11.patch new file mode 100644 index 00000000..97ac3cef --- /dev/null +++ b/extra/firefox/patches/python-3.11.patch @@ -0,0 +1,30 @@ +# https://src.fedoraproject.org/rpms/firefox/c/4d45de9bff7b7ef01f7d3c9e53a61adc9cf3ce9e?branch=4d45de9bff7b7ef01f7d3c9e53a61adc9cf3ce9e + +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.*?\n?)%\}[ ]*(C\+\+)?" ++ r"(?s:%\{[ ]*C\+\+[ ]*\n(?P.*?\n?)%\}[ ]*(C\+\+)?)" + t.type = "CDATA" + t.value = t.lexer.lexmatch.group("cdata") + t.lexer.lineno += t.value.count("\n") diff --git a/extra/firefox/sources b/extra/firefox/sources index 89bd1b4d..a0ba35cf 100644 --- a/extra/firefox/sources +++ b/extra/firefox/sources @@ -4,3 +4,4 @@ patches/fix-linux-header.patch patches/no-dbus.patch patches/no-fribidi.patch patches/no-perl.patch +patches/python-3.11.patch