diff -Nru mozjs78-78.15.0/debian/changelog mozjs78-78.15.0/debian/changelog --- mozjs78-78.15.0/debian/changelog 2022-04-12 16:05:50.000000000 -0400 +++ mozjs78-78.15.0/debian/changelog 2023-03-15 13:19:32.000000000 -0400 @@ -1,3 +1,17 @@ +mozjs78 (78.15.0-7) unstable; urgency=medium + + * Cherry-pick patch from Mike Homney to fix arm* build. + This patch was previously applied to mozjs102. Thanks Emanuele Rocca. + (Closes: #1029167) + + -- Jeremy Bicha Wed, 15 Mar 2023 13:19:32 -0400 + +mozjs78 (78.15.0-6) unstable; urgency=medium + + * Add patch to fix build with Python 3.11 (Closes: #1028308) + + -- Jeremy Bicha Tue, 17 Jan 2023 17:26:39 -0500 + mozjs78 (78.15.0-5) unstable; urgency=medium [ Steve Langasek ] diff -Nru mozjs78-78.15.0/debian/patches/Fix-build-with-Python-3.11.patch mozjs78-78.15.0/debian/patches/Fix-build-with-Python-3.11.patch --- mozjs78-78.15.0/debian/patches/Fix-build-with-Python-3.11.patch 1969-12-31 19:00:00.000000000 -0500 +++ mozjs78-78.15.0/debian/patches/Fix-build-with-Python-3.11.patch 2023-03-15 13:19:32.000000000 -0400 @@ -0,0 +1,83 @@ +From: =?utf-8?q?Franti=C5=A1ek_Zatloukal?= +Date: Sun, 24 Jul 2022 11:11:01 +0200 +Subject: [PATCH] Python/Build: Use r instead of rU file read modes + +Fixes Python 3.11 build + +https://bugzilla.mozilla.org/show_bug.cgi?id=1769631 + +https://phabricator.services.mozilla.com/D147721 + +Origin: Fedora, https://src.fedoraproject.org/rpms/0ad/tree/main +--- + python/mozbuild/mozbuild/action/process_define_files.py | 2 +- + python/mozbuild/mozbuild/preprocessor.py | 6 +++--- + python/mozbuild/mozbuild/util.py | 4 +++- + 3 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/python/mozbuild/mozbuild/action/process_define_files.py b/python/mozbuild/mozbuild/action/process_define_files.py +index 6fff0d1..de2bcf4 100644 +--- a/python/mozbuild/mozbuild/action/process_define_files.py ++++ b/python/mozbuild/mozbuild/action/process_define_files.py +@@ -36,7 +36,7 @@ def process_define_file(output, input): + not config.substs.get('JS_STANDALONE'): + config = PartialConfigEnvironment(mozpath.join(topobjdir, 'js', 'src')) + +- with open(path, 'rU') as input: ++ with open(path, 'r') as input: + r = re.compile('^\s*#\s*(?P[a-z]+)(?:\s+(?P\S+)(?:\s+(?P\S+))?)?', re.U) + for l in input: + m = r.match(l) +diff --git a/python/mozbuild/mozbuild/preprocessor.py b/python/mozbuild/mozbuild/preprocessor.py +index 0e3a750..66f5cf7 100644 +--- a/python/mozbuild/mozbuild/preprocessor.py ++++ b/python/mozbuild/mozbuild/preprocessor.py +@@ -517,7 +517,7 @@ class Preprocessor: + + if args: + for f in args: +- with io.open(f, 'rU', encoding='utf-8') as input: ++ with io.open(f, 'r', encoding='utf-8') as input: + self.processFile(input=input, output=out) + if depfile: + mk = Makefile() +@@ -807,7 +807,7 @@ class Preprocessor: + args = self.applyFilters(args) + if not os.path.isabs(args): + args = os.path.join(self.curdir, args) +- args = io.open(args, 'rU', encoding='utf-8') ++ args = io.open(args, 'r', encoding='utf-8') + except Preprocessor.Error: + raise + except Exception: +@@ -862,7 +862,7 @@ def preprocess(includes=[sys.stdin], defines={}, + pp = Preprocessor(defines=defines, + marker=marker) + for f in includes: +- with io.open(f, 'rU', encoding='utf-8') as input: ++ with io.open(f, 'r', encoding='utf-8') as input: + pp.processFile(input=input, output=output) + return pp.includes + +diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py +index 98ed3ef..1d748b7 100644 +--- a/python/mozbuild/mozbuild/util.py ++++ b/python/mozbuild/mozbuild/util.py +@@ -54,6 +54,8 @@ def exec_(object, globals=None, locals=None): + + + def _open(path, mode): ++ if mode == "rU": ++ mode = "r" + if 'b' in mode: + return io.open(path, mode) + return io.open(path, mode, encoding='utf-8', newline='\n') +@@ -220,7 +222,7 @@ class FileAvoidWrite(BytesIO): + still occur, as well as diff capture if requested. + """ + +- def __init__(self, filename, capture_diff=False, dry_run=False, readmode='rU'): ++ def __init__(self, filename, capture_diff=False, dry_run=False, readmode='r'): + BytesIO.__init__(self) + self.name = filename + assert type(capture_diff) == bool diff -Nru mozjs78-78.15.0/debian/patches/Remove-workaround-for-old-libstdc-problem-which-now-cause.patch mozjs78-78.15.0/debian/patches/Remove-workaround-for-old-libstdc-problem-which-now-cause.patch --- mozjs78-78.15.0/debian/patches/Remove-workaround-for-old-libstdc-problem-which-now-cause.patch 1969-12-31 19:00:00.000000000 -0500 +++ mozjs78-78.15.0/debian/patches/Remove-workaround-for-old-libstdc-problem-which-now-cause.patch 2023-03-15 13:19:32.000000000 -0400 @@ -0,0 +1,56 @@ +From: Mike Hommey +Date: Mon, 15 Aug 2022 14:49:40 +0900 +Subject: Remove workaround for old libstdc++ problem, + which now causes problems with GCC 12 on arm + +--- + intl/icu/source/common/unicode/std_string.h | 5 ----- + intl/icu/source/common/utypeinfo.h | 3 --- + intl/icu/source/io/unicode/ustream.h | 4 ---- + 3 files changed, 12 deletions(-) + +diff --git a/intl/icu/source/common/unicode/std_string.h b/intl/icu/source/common/unicode/std_string.h +index bf87230..c8388ef 100644 +--- a/intl/icu/source/common/unicode/std_string.h ++++ b/intl/icu/source/common/unicode/std_string.h +@@ -29,11 +29,6 @@ + + #if U_SHOW_CPLUSPLUS_API + +-// Workaround for a libstdc++ bug before libstdc++4.6 (2011). +-// https://bugs.llvm.org/show_bug.cgi?id=13364 +-#if defined(__GLIBCXX__) +-namespace std { class type_info; } +-#endif + #include + + #endif /* U_SHOW_CPLUSPLUS_API */ +diff --git a/intl/icu/source/common/utypeinfo.h b/intl/icu/source/common/utypeinfo.h +index c666373..5d97240 100644 +--- a/intl/icu/source/common/utypeinfo.h ++++ b/intl/icu/source/common/utypeinfo.h +@@ -24,9 +24,6 @@ + #include + using std::exception; + #endif +-#if defined(__GLIBCXX__) +-namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 +-#endif + #include // for 'typeid' to work + + #endif +diff --git a/intl/icu/source/io/unicode/ustream.h b/intl/icu/source/io/unicode/ustream.h +index 927342c..93ef51c 100644 +--- a/intl/icu/source/io/unicode/ustream.h ++++ b/intl/icu/source/io/unicode/ustream.h +@@ -34,10 +34,6 @@ + * C++ I/O stream API. + */ + +-#if defined(__GLIBCXX__) +-namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 +-#endif +- + #include + + U_NAMESPACE_BEGIN diff -Nru mozjs78-78.15.0/debian/patches/series mozjs78-78.15.0/debian/patches/series --- mozjs78-78.15.0/debian/patches/series 2022-04-12 16:05:50.000000000 -0400 +++ mozjs78-78.15.0/debian/patches/series 2023-03-15 13:19:32.000000000 -0400 @@ -20,3 +20,5 @@ Fix-armhf-build-for-GCC-11-627.patch python3.10.diff Skip-a-test-for-backward-compatible-time-zone-aliases.patch +Fix-build-with-Python-3.11.patch +Remove-workaround-for-old-libstdc-problem-which-now-cause.patch