summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-07 19:07:39 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-07 19:07:39 +0000
commit59aa5ebb76efd757f107e61bb4cceb0a167c727e (patch)
tree2938d3db37170cccba266cf0ae899f479bbb99ad
parentbbcfbb2837243b567861c0f37961bec1cb3cb17e (diff)
downloadpackages-59aa5ebb76efd757f107e61bb4cceb0a167c727e.tar.gz
packages-59aa5ebb76efd757f107e61bb4cceb0a167c727e.tar.bz2
packages-59aa5ebb76efd757f107e61bb4cceb0a167c727e.tar.xz
packages-59aa5ebb76efd757f107e61bb4cceb0a167c727e.zip
user/mozjs: bump to 60.5.2
-rw-r--r--user/mozjs/0004-build-Copy-headers-on-install-instead-of-symlinking.patch35
-rw-r--r--user/mozjs/0006-Disable-MOZ_GLUE_IN_PROGRAM-in-stand-alone-builds-on.patch68
-rw-r--r--user/mozjs/0008-tests-Skip-on-all-64-bit-archs.patch51
-rw-r--r--user/mozjs/1002_drop_build_id.patch33
-rw-r--r--user/mozjs/1004_fix_pie_detection.patch34
-rw-r--r--user/mozjs/6006_musl_pthread_setname.patch29
-rw-r--r--user/mozjs/APKBUILD64
-rw-r--r--user/mozjs/arm64.patch60
-rw-r--r--user/mozjs/baseconfig.patch22
-rw-r--r--user/mozjs/dont-fail-tests-without-ion.patch39
-rw-r--r--user/mozjs/endian.patch141
-rw-r--r--user/mozjs/python3.patch331
12 files changed, 277 insertions, 630 deletions
diff --git a/user/mozjs/0004-build-Copy-headers-on-install-instead-of-symlinking.patch b/user/mozjs/0004-build-Copy-headers-on-install-instead-of-symlinking.patch
deleted file mode 100644
index cc55486b9..000000000
--- a/user/mozjs/0004-build-Copy-headers-on-install-instead-of-symlinking.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 45919a0f627c7adde9f9676228448b4c53b291e5 Mon Sep 17 00:00:00 2001
-From: Rico Tzschichholz <ricotz@ubuntu.com>
-Date: Wed, 5 Jul 2017 22:45:59 -0700
-Subject: [PATCH 04/10] build: Copy headers on install instead of symlinking
-
-Patch ported forward to mozjs52 by Philip Chimento
-<philip.chimento@gmail.com>.
-
-https://bugzilla.mozilla.org/show_bug.cgi?id=1379537
----
- python/mozbuild/mozbuild/backend/recursivemake.py | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
-index 132dcf94..33d489a6 100644
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -1307,11 +1307,11 @@ class RecursiveMakeBackend(CommonBackend):
- raise Exception("Wildcards are only supported in the filename part of "
- "srcdir-relative or absolute paths.")
-
-- install_manifest.add_pattern_symlink(basepath, wild, path)
-+ install_manifest.add_pattern_copy(basepath, wild, path)
- else:
-- install_manifest.add_pattern_symlink(f.srcdir, f, path)
-+ install_manifest.add_pattern_copy(f.srcdir, f, path)
- else:
-- install_manifest.add_symlink(f.full_path, dest)
-+ install_manifest.add_copy(f.full_path, dest)
- else:
- install_manifest.add_optional_exists(dest)
- backend_file.write('%s_FILES += %s\n' % (
---
-2.13.0
-
diff --git a/user/mozjs/0006-Disable-MOZ_GLUE_IN_PROGRAM-in-stand-alone-builds-on.patch b/user/mozjs/0006-Disable-MOZ_GLUE_IN_PROGRAM-in-stand-alone-builds-on.patch
deleted file mode 100644
index dd0e40115..000000000
--- a/user/mozjs/0006-Disable-MOZ_GLUE_IN_PROGRAM-in-stand-alone-builds-on.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From ed8471fe677138b71477f25a6ee2732a80c1c5f7 Mon Sep 17 00:00:00 2001
-From: Till Schneidereit <till@tillschneidereit.net>
-Date: Thu, 1 Oct 2015 12:59:09 +0200
-Subject: [PATCH 06/10] Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on
- all platforms
-
-Otherwise, build fails not being able to find HashBytes.
-
-Patch ported forward to mozjs52 by Philip Chimento
-<philip.chimento@gmail.com>.
-
-https://bugzilla.mozilla.org/show_bug.cgi?id=1176787
----
- js/src/old-configure.in | 23 ++++++++++++++---------
- mozglue/build/moz.build | 2 +-
- 2 files changed, 15 insertions(+), 10 deletions(-)
-
-diff --git a/js/src/old-configure.in b/js/src/old-configure.in
-index c40eb962..336e1aa7 100644
---- a/js/src/old-configure.in
-+++ b/js/src/old-configure.in
-@@ -1620,16 +1620,21 @@ dnl ========================================================
- dnl = Enable jemalloc
- dnl ========================================================
-
--case "${OS_TARGET}" in
--Android|WINNT|Darwin)
-+dnl In stand-alone builds we always only want to link executables against mozglue.
-+if test "$JS_STANDALONE"; then
- MOZ_GLUE_IN_PROGRAM=
-- ;;
--*)
-- dnl On !Android !Windows !OSX, we only want to link executables against mozglue
-- MOZ_GLUE_IN_PROGRAM=1
-- AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
-- ;;
--esac
-+else
-+ case "${OS_TARGET}" in
-+ Android|WINNT|Darwin)
-+ MOZ_GLUE_IN_PROGRAM=
-+ ;;
-+ *)
-+ dnl On !Android !Windows !OSX, we only want to link executables against mozglue
-+ MOZ_GLUE_IN_PROGRAM=1
-+ AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
-+ ;;
-+ esac
-+fi
-
- if test "$MOZ_MEMORY"; then
- if test "x$MOZ_DEBUG" = "x1"; then
-diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
-index d2897477..e3be5a2b 100644
---- a/mozglue/build/moz.build
-+++ b/mozglue/build/moz.build
-@@ -6,7 +6,7 @@
-
- # Build mozglue as a shared lib on Windows, OSX and Android.
- # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
--if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
-+if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
- SharedLibrary('mozglue')
- else:
- Library('mozglue')
---
-2.13.0
-
diff --git a/user/mozjs/0008-tests-Skip-on-all-64-bit-archs.patch b/user/mozjs/0008-tests-Skip-on-all-64-bit-archs.patch
deleted file mode 100644
index 9f41e0fd6..000000000
--- a/user/mozjs/0008-tests-Skip-on-all-64-bit-archs.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 6a5ffe6cc8c6c2b7cf18c1778279e993afbb660a Mon Sep 17 00:00:00 2001
-From: Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
-Date: Wed, 5 Jul 2017 21:05:27 -0700
-Subject: [PATCH 08/10] tests: Skip on all 64-bit archs
-
-Tests that are skipped on x86_64 should be skipped on all 64-bit
-architectures.
-
-https://bugzilla.mozilla.org/show_bug.cgi?id=1357593
-
-Taken from Fedora:
-http://pkgs.fedoraproject.org/cgit/rpms/mozjs38.git/tree/fix-64bit-archs.patch
----
- js/src/tests/js1_5/Array/regress-157652.js | 2 +-
- js/src/tests/js1_5/Array/regress-330812.js | 2 +-
- js/src/tests/js1_5/Regress/regress-422348.js | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/js/src/tests/js1_5/Array/regress-157652.js b/js/src/tests/js1_5/Array/regress-157652.js
-index 0bdba8fd..9d77802c 100644
---- a/js/src/tests/js1_5/Array/regress-157652.js
-+++ b/js/src/tests/js1_5/Array/regress-157652.js
-@@ -1,4 +1,4 @@
--// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64/)||Android) -- No test results
-+// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x/)||Android) -- No test results
- /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
-diff --git a/js/src/tests/js1_5/Array/regress-330812.js b/js/src/tests/js1_5/Array/regress-330812.js
-index 3a392976..c48f4c88 100644
---- a/js/src/tests/js1_5/Array/regress-330812.js
-+++ b/js/src/tests/js1_5/Array/regress-330812.js
-@@ -1,4 +1,4 @@
--// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64/)||Android) -- No test results
-+// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x/)||Android) -- No test results
- /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
-diff --git a/js/src/tests/js1_5/Regress/regress-422348.js b/js/src/tests/js1_5/Regress/regress-422348.js
-index f2443c28..7ae83f4a 100644
---- a/js/src/tests/js1_5/Regress/regress-422348.js
-+++ b/js/src/tests/js1_5/Regress/regress-422348.js
-@@ -1,4 +1,4 @@
--// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64/)) -- On 64-bit, takes forever rather than throwing
-+// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x/)) -- On 64-bit, takes forever rather than throwing
- /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
---
-2.13.0
-
diff --git a/user/mozjs/1002_drop_build_id.patch b/user/mozjs/1002_drop_build_id.patch
new file mode 100644
index 000000000..9f62abaea
--- /dev/null
+++ b/user/mozjs/1002_drop_build_id.patch
@@ -0,0 +1,33 @@
+From: Jory A. Pratt <anarchy@gentoo.org>
+
+We must drop build id as it causes conflicts when merging
+thunderbird/firefox/seamonkey on same system when using
+splitdebug
+
+diff --git a/js/src/old-configure.in b/js/src/old-configure.in
+--- a/js/src/old-configure.in
++++ b/js/src/old-configure.in
+@@ -478,23 +478,16 @@ if test "$GNU_CC"; then
+
+ AC_MSG_CHECKING([for -z relro option to ld])
+ _SAVE_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no])
+ LDFLAGS=$_SAVE_LDFLAGS)
+
+- AC_MSG_CHECKING([for --build-id option to ld])
+- _SAVE_LDFLAGS=$LDFLAGS
+- LDFLAGS="$LDFLAGS -Wl,--build-id"
+- AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
+- AC_MSG_RESULT([no])
+- LDFLAGS=$_SAVE_LDFLAGS)
+-
+ _DEFINES_CFLAGS="-include $jsconfdefs -DMOZILLA_CLIENT"
+ _USE_CPP_INCLUDE_FLAG=1
+ fi
+
+ if test "$GNU_CXX"; then
+ _DEFINES_CXXFLAGS="-DMOZILLA_CLIENT -include $jsconfdefs"
+ _USE_CPP_INCLUDE_FLAG=1
+ fi
diff --git a/user/mozjs/1004_fix_pie_detection.patch b/user/mozjs/1004_fix_pie_detection.patch
new file mode 100644
index 000000000..e24adf365
--- /dev/null
+++ b/user/mozjs/1004_fix_pie_detection.patch
@@ -0,0 +1,34 @@
+From: Jory A. Pratt <anarchy@gentoo.org>
+
+CFLAGS must contain -fPIC when checking the linker
+
+diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4
+--- a/build/autoconf/compiler-opts.m4
++++ b/build/autoconf/compiler-opts.m4
+@@ -205,23 +205,26 @@ MOZ_PIE=
+
+ MOZ_ARG_ENABLE_BOOL(pie,
+ [ --enable-pie Enable Position Independent Executables],
+ MOZ_PIE=1,
+ MOZ_PIE= )
+
+ if test "$GNU_CC$CLANG_CC" -a -n "$MOZ_PIE"; then
+ AC_MSG_CHECKING([for PIE support])
++ _SAVE_CFLAGS=$CFLAGS
++ CFLAGS="$CFLAGS -fPIC"
+ _SAVE_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS -pie"
+ AC_TRY_LINK(,,AC_MSG_RESULT([yes])
+ [MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -pie"],
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([--enable-pie requires PIE support from the linker.]))
+ LDFLAGS=$_SAVE_LDFLAGS
++ CFLAGS=$_SAVE_CFLAGS
+ fi
+
+ AC_SUBST(MOZ_PROGRAM_LDFLAGS)
+
+ dnl ASan assumes no symbols are being interposed, and when that happens,
+ dnl it's not happy with it. Unconveniently, since Firefox is exporting
+ dnl libffi symbols and Gtk+3 pulls system libffi via libwayland-client,
+ dnl system libffi interposes libffi symbols that ASan assumes are in
diff --git a/user/mozjs/6006_musl_pthread_setname.patch b/user/mozjs/6006_musl_pthread_setname.patch
new file mode 100644
index 000000000..213509ff7
--- /dev/null
+++ b/user/mozjs/6006_musl_pthread_setname.patch
@@ -0,0 +1,29 @@
+From: Jory A. Pratt <anarchy@gentoo.org>
+
+set pthread name for non glibc systems
+
+diff --git a/js/src/threading/posix/Thread.cpp b/js/src/threading/posix/Thread.cpp
+--- a/js/src/threading/posix/Thread.cpp
++++ b/js/src/threading/posix/Thread.cpp
+@@ -155,18 +155,20 @@
+ int rv;
+ #ifdef XP_DARWIN
+ rv = pthread_setname_np(name);
+ #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ pthread_set_name_np(pthread_self(), name);
+ rv = 0;
+ #elif defined(__NetBSD__)
+ rv = pthread_setname_np(pthread_self(), "%s", (void*)name);
+-#else
++#elif defined(__GLIBC__)
+ rv = pthread_setname_np(pthread_self(), name);
++#else
++ rv = 0;
+ #endif
+ MOZ_RELEASE_ASSERT(!rv);
+ }
+
+ void js::ThisThread::GetName(char* nameBuffer, size_t len) {
+ MOZ_RELEASE_ASSERT(len >= 16);
+
+ int rv = -1;
diff --git a/user/mozjs/APKBUILD b/user/mozjs/APKBUILD
index e9b3958ac..78d4ea352 100644
--- a/user/mozjs/APKBUILD
+++ b/user/mozjs/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=mozjs
-pkgver=52.4.0
-pkgrel=2
+pkgver=60.5.2
+pkgrel=0
pkgdesc="Standalone JavaScript interpreter from Mozilla"
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
arch="all"
@@ -10,52 +10,70 @@ license="NPL-1.1"
depends=""
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="autoconf2.13 icu-dev libffi-dev nspr-dev python3 cmd:which
- zlib-dev"
+ zlib-dev
+ ncurses-dev openssl-dev"
subpackages="$pkgname-dev"
source="https://distfiles.adelielinux.org/source/mozilla/mozjs-$pkgver.tar.bz2
+ https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz
0003-build-Fix-library-install-name-on-macOS.patch
- 0004-build-Copy-headers-on-install-instead-of-symlinking.patch
- 0006-Disable-MOZ_GLUE_IN_PROGRAM-in-stand-alone-builds-on.patch
- 0008-tests-Skip-on-all-64-bit-archs.patch
0009-build-Include-configure-script-be-nicer-about-option.patch
- arm64.patch
- baseconfig.patch
- dont-fail-tests-without-ion.patch
- python3.patch
+ 1002_drop_build_id.patch
+ 1004_fix_pie_detection.patch
+ 6006_musl_pthread_setname.patch
+ endian.patch
"
builddir="$srcdir/mozjs-$pkgver"
+unpack() {
+ default_unpack
+ [ -z $SKIP_PYTHON ] || return 0
+
+ msg "Killing all remaining hope for humanity and building Python 2..."
+ cd "$srcdir/Python-2.7.15"
+ [ -d ../python ] && rm -r ../python
+ # 19:39 <+solar> just make the firefox build process build its own py2 copy
+ # 20:03 <calvin> TheWilfox: there's always violence
+ ./configure --prefix="$srcdir/python"
+ make -j $JOBS
+ # 6 tests failed:
+ # test__locale test_os test_posix test_re test_strptime test_time
+ # make test
+ make -j $JOBS install
+}
+
prepare() {
cd "$builddir"
default_prepare
cd "$builddir"/js/src
+ export PATH="$srcdir/python/bin:$PATH"
autoconf-2.13 old-configure.in >/dev/null
autoconf-2.13
}
build() {
- cd "$builddir"/js/src
- ./configure \
+ cd "$builddir"/js/src/build
+ export PATH="$srcdir/python/bin:$PATH"
+ ../configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--disable-jemalloc \
--disable-optimize \
- --enable-ion \
--enable-tests \
--with-intl-api \
--with-system-icu \
- --with-system-nspr
+ --with-system-nspr \
+ --with-system-zlib
MOZ_MAKE_FLAGS="$MAKEFLAGS" make
}
check() {
- cd "$builddir"/js/src
+ cd "$builddir"/js/src/build
dist/bin/jsapi-tests
}
package() {
- cd "$builddir"/js/src
+ cd "$builddir"/js/src/build
make DESTDIR="$pkgdir" install
# no real point for 400 MB monster.
@@ -63,13 +81,11 @@ package() {
rm "$pkgdir"/usr/lib/libjs_static.ajs
}
-sha512sums="80e006ed7550b64dad7cf78335dd9f2d34f50ad486439887f0088eb3817242d24cf7c1d9325e2dcd4a01fd5c5f54d710873113b97fd914ccd961fa46a71653fa mozjs-52.4.0.tar.bz2
+sha512sums="5fb73330e7803bdd524fbe7cfdf4e6b72e85d4b22b0c827400317b5d052d1088d36e558ceac376393089e9d03e658b24e69262851fc04a66bbcda47135423dc0 mozjs-60.5.2.tar.bz2
+27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6 Python-2.7.15.tar.xz
8563264274c8b47c41fcce0b23d8d31467c60b4f1e6b37e14a390950f0d4c84be08919e0cf3578367ca1c76633201fc7d182c98a1efb57b17ce176a3e1ed5b0d 0003-build-Fix-library-install-name-on-macOS.patch
-edbec26bff4fb91911b1dafc566d4cf37635e9039a1cbd527543d74765d1c96bcfae71fe4f9a66c6555750f402377db4963e2afe0d6b061f48dbab78717bd177 0004-build-Copy-headers-on-install-instead-of-symlinking.patch
-d9acf4570a073a2151e19ad854e72ff927d050b532f04367bf49fb0c98f8eb544e9f6c455b1411d09a8a3034a2be62e23b7f9080fac9249e4132e85f2245d474 0006-Disable-MOZ_GLUE_IN_PROGRAM-in-stand-alone-builds-on.patch
-a95e91ffa3693ac2ac81eddee2e490b4acfb5ae0381a291b1916afc0d91fb00b95457fde0efe62905025fe425c18d5363c5e6ad1bb121645b29a14f6c76c0489 0008-tests-Skip-on-all-64-bit-archs.patch
2556f3322c5bc39c1efbbbd19b6843cf69b63a0255e8e3617f58b229e75ac221b6cb57fce15452cd1f25498c66f29f588f38c10c175b82c6fe163faaa7e3e2b0 0009-build-Include-configure-script-be-nicer-about-option.patch
-63806e54fe7530703420fd070a8ef38b46cd185991a6d66dc2c1ec588f2b271883120b8e16d1a898eb6ddb41569d719f857e71f9e16e839962527cee1f47c41e arm64.patch
-22870d6ee8a0a0b4359d78173aef0ade49063bfad495fd40815852684a1cdf17f9f50585e0d693eb712c2a2225ea43c4387cf454f3b9bd39e01899f3936775f1 baseconfig.patch
-6ebaf6fd24f1987020ad0da82cd2ff878e5c27997ac45a571899f492b435d12e32274eac35e2d571775b6f6bdce24f8e7a968088da61329e2cd36dfc762a0156 dont-fail-tests-without-ion.patch
-66a894b4878797438ac1361b892df4df45fe0c990e9540235336116a2dbfcc5d787a3076dca323b8252fb8cb6e39a61819fc0d4ce1491fb9e4d07c912fdf9e4d python3.patch"
+0882664005d65d491d4b3d0cd73a2163637730eff41a2ad3ae1ea4e855e8728b83d1bc42632901d717f947a11e6c1c42a33f5286b0adedda3111068ae1425259 1002_drop_build_id.patch
+11cef339e8ba5d446d9fbb3947c6526294a3577025f21323cfd959707cbcc36f24535d5b68ea286220891de584ae6deef9408e838fc720af453062a179f22f42 1004_fix_pie_detection.patch
+00cc3ea149ea8527393fa3995fcb6fa7af41fc79488c38df2bcd3326dbf43bcc83db509b6dbf2c9c8d68998ce2c1ab1f18c1c46584d9aeb63ddd2cf05b1ca1ce 6006_musl_pthread_setname.patch
+363f1df1a78799783b4e9f887dc85d83ec83c6ec392aeacbd98dc89e543d0cd3b9d1964ce274142b44847a03c47f845cbf6fa7fa17a04b25bbaa37fc5d714730 endian.patch"
diff --git a/user/mozjs/arm64.patch b/user/mozjs/arm64.patch
deleted file mode 100644
index df1c8cc7e..000000000
--- a/user/mozjs/arm64.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-
-# HG changeset patch
-# User Jim Chen <nchen@mozilla.com>
-# Date 1493664360 14400
-# Node ID 042d975f9355f711b058152691a44e458ba252b3
-# Parent fa7165dda22460795afe4ed27ecc57f454a3dfaa
-Bug 1357874 - Add more AArch64 support to JS code; r=luke
-
-* Fix a parentheses warning when compiling testGCAllocator.cpp.
-
-* Define GETRANDOM_NR macro for AArch64.
-
-* Disable Android workarounds in jsnativestack.cpp and
- WasmSignalHandlers.cpp for AArch64, because AArch64 is only supported
- on API 21+, in which case those workarounds don't apply.
-
-* Enable trace logging in TraceLogging.cpp.
-
-diff --git a/js/src/jsapi-tests/testGCAllocator.cpp b/js/src/jsapi-tests/testGCAllocator.cpp
---- a/js/src/jsapi-tests/testGCAllocator.cpp
-+++ b/js/src/jsapi-tests/testGCAllocator.cpp
-@@ -310,15 +310,15 @@ void unmapPages(void* p, size_t size) {
- #elif defined(XP_UNIX)
-
- void*
- mapMemoryAt(void* desired, size_t length)
- {
- #if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__)
-- MOZ_RELEASE_ASSERT(0xffff800000000000ULL & (uintptr_t(desired) + length - 1) == 0);
-+ MOZ_RELEASE_ASSERT((0xffff800000000000ULL & (uintptr_t(desired) + length - 1)) == 0);
- #endif
- void* region = mmap(desired, length, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
- if (region == MAP_FAILED)
- return nullptr;
- if (region != desired) {
- if (munmap(region, length))
- MOZ_RELEASE_ASSERT(errno == ENOMEM);
- return nullptr;
-diff --git a/js/src/vm/TraceLogging.cpp b/js/src/vm/TraceLogging.cpp
---- a/js/src/vm/TraceLogging.cpp
-+++ b/js/src/vm/TraceLogging.cpp
-@@ -56,17 +56,17 @@ rdtsc(void)
- );
- result = upper;
- result = result<<32;
- result = result|lower;
-
- return result;
-
- }
--#elif defined(__arm__)
-+#elif defined(__arm__) || defined(__aarch64__)
-
- #include <sys/time.h>
-
- static __inline__ uint64_t
- rdtsc(void)
- {
- struct timeval tv;
- gettimeofday(&tv, NULL);
diff --git a/user/mozjs/baseconfig.patch b/user/mozjs/baseconfig.patch
deleted file mode 100644
index ee52728fa..000000000
--- a/user/mozjs/baseconfig.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Fix various paths to include MOZ_APP_VERSION
-
-This has been committed upstream but was not included in
-the 52.4.0 sources that spidermonkey was rolled from.
-
---- a/config/baseconfig.mk 2017-10-03 14:00:45.000000000 -0400
-+++ b/config/baseconfig.mk 2017-10-03 16:36:10.857663794 -0400
-@@ -2,10 +2,10 @@
- # directly in python/mozbuild/mozbuild/base.py for gmake validation.
- # We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
- # whether a normal build is happening or whether the check is running.
--includedir := $(includedir)/$(MOZ_APP_NAME)
--idldir = $(includedir)/idl/$(MOZ_APP_NAME)
--installdir = $(libdir)/$(MOZ_APP_NAME)
--sdkdir = $(libdir)/$(MOZ_APP_NAME)
-+includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+idldir = $(includedir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+sdkdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
- ifeq (.,$(DEPTH))
- DIST = dist
- else
diff --git a/user/mozjs/dont-fail-tests-without-ion.patch b/user/mozjs/dont-fail-tests-without-ion.patch
deleted file mode 100644
index 569947cdc..000000000
--- a/user/mozjs/dont-fail-tests-without-ion.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-
-# HG changeset patch
-# User Steve Fink <sfink@mozilla.com>
-# Date 1519362707 28800
-# Node ID 7b78c4aa2d589e088519b4f76bddf8ded33283a6
-# Parent 9b8b888e1ce64b1a607158681aecb959721d1326
-Bug 1426006 - Do not expect ion scripts when ion is unavailable. r=bbouvier, a=RyanVM
-
-diff --git a/js/src/jsapi-tests/testPreserveJitCode.cpp b/js/src/jsapi-tests/testPreserveJitCode.cpp
---- a/js/src/jsapi-tests/testPreserveJitCode.cpp
-+++ b/js/src/jsapi-tests/testPreserveJitCode.cpp
-@@ -38,24 +38,20 @@ testPreserveJitCode(bool preserveJitCode
- cx->options().setBaseline(true);
- cx->options().setIon(true);
- cx->setOffthreadIonCompilationEnabled(false);
-
- RootedObject global(cx, createTestGlobal(preserveJitCode));
- CHECK(global);
- JSAutoCompartment ac(cx, global);
-
--#ifdef JS_CODEGEN_ARM64
-- // The ARM64 Ion JIT is not yet enabled, so this test will fail with
-- // countIonScripts(global) == 0. Once Ion is enabled for ARM64, this test
-- // should be passing again, and this code can be deleted.
-- // Bug 1208526 - ARM64: Reenable jsapi-tests/testPreserveJitCode once Ion is enabled
-+ // The Ion JIT may be unavailable due to --disable-ion or lack of support
-+ // for this platform.
- if (!js::jit::IsIonEnabled(cx))
- knownFail = true;
--#endif
-
- CHECK_EQUAL(countIonScripts(global), 0u);
-
- const char* source =
- "var i = 0;\n"
- "var sum = 0;\n"
- "while (i < 10) {\n"
- " sum += i;\n"
-
diff --git a/user/mozjs/endian.patch b/user/mozjs/endian.patch
new file mode 100644
index 000000000..1a04573ea
--- /dev/null
+++ b/user/mozjs/endian.patch
@@ -0,0 +1,141 @@
+Bug 1488552 - Ensure proper running on 64-bit and 32-bit BE platforms.
+
+diff --git a/js/src/gc/RelocationOverlay.h b/js/src/gc/RelocationOverlay.h
+--- a/js/src/gc/RelocationOverlay.h
++++ b/js/src/gc/RelocationOverlay.h
+@@ -29,23 +29,34 @@ struct Cell;
+ * This structure overlays a Cell that has been moved and provides a way to find
+ * its new location. It's used during generational and compacting GC.
+ */
+ class RelocationOverlay {
+ /* See comment in js/public/HeapAPI.h. */
+ static const uint32_t Relocated = js::gc::Relocated;
+
++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
+ /*
+- * Keep the low 32 bits untouched. Use them to distinguish strings from
++ * Keep the first 32 bits untouched. Use them to distinguish strings from
+ * objects in the nursery.
+ */
+ uint32_t preserve_;
+
+ /* Set to Relocated when moved. */
+ uint32_t magic_;
++#elif JS_BITS_PER_WORD == 64
++ /*
++ * On big-endian, we need to reorder to keep preserve_ lined up with the
++ * low 32 bits of the aligned group_ pointer in JSObject.
++ */
++ uint32_t magic_;
++ uint32_t preserve_;
++#else
++# error "Unknown endianness or word size"
++#endif
+
+ /* The location |this| was moved to. */
+ Cell* newLocation_;
+
+ /* A list entry to track all relocated things. */
+ RelocationOverlay* next_;
+
+ public:
+diff --git a/js/src/vm/StringType.h b/js/src/vm/StringType.h
+--- a/js/src/vm/StringType.h
++++ b/js/src/vm/StringType.h
+@@ -2,16 +2,17 @@
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+ #ifndef vm_StringType_h
+ #define vm_StringType_h
+
++#include "mozilla/EndianUtils.h"
+ #include "mozilla/MemoryReporting.h"
+ #include "mozilla/PodOperations.h"
+ #include "mozilla/Range.h"
+
+ #include "jsapi.h"
+ #include "jsfriendapi.h"
+
+ #include "builtin/String.h"
+@@ -168,8 +168,20 @@ class JSString : public js::gc::Cell
+ struct Data {
+ union {
+ struct {
++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
+ uint32_t flags; /* JSString */
+ uint32_t length; /* JSString */
++#elif JS_BITS_PER_WORD == 64
++ /*
++ * On big-endian, we need to reorder to keep flags lined up
++ * with the low 32 bits of the aligned group_ pointer in
++ * JSObject.
++ */
++ uint32_t length; /* JSString */
++ uint32_t flags; /* JSString */
++#else
++# error "Unknown endianness or word size"
++#endif
+ };
+ uintptr_t flattenData; /* JSRope (temporary while flattening) */
+ } u1;
+--- thunderbird-60.2.1/js/src/gc/Marking-inl.h.old 2018-10-01 14:51:12.000000000 +0000
++++ thunderbird-60.2.1/js/src/gc/Marking-inl.h 2018-10-12 19:08:28.260000000 +0000
+@@ -92,13 +92,29 @@
+ MOZ_ASSERT(!isForwarded());
+ // The location of magic_ is important because it must never be valid to see
+ // the value Relocated there in a GC thing that has not been moved.
++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
++ // On 32-bit, the magic_ aliases with whatever comes after the first
++ // pointer; on little-endian 64-bit, the magic_ aliases with the
++ // 32 most significant bits of the pointer, which are the second half.
+ static_assert(offsetof(RelocationOverlay, magic_) ==
+ offsetof(JSObject, group_) + sizeof(uint32_t),
+ "RelocationOverlay::magic_ is in the wrong location");
+ static_assert(offsetof(RelocationOverlay, magic_) ==
+ offsetof(js::Shape, base_) + sizeof(uint32_t),
+ "RelocationOverlay::magic_ is in the wrong location");
++#elif JS_BITS_PER_WORD == 64
++ // On big-endian 64-bit, the magic_ aliases with the 32 most
++ // significant bits of the pointer, but now that's the first half.
++ static_assert(offsetof(RelocationOverlay, magic_) ==
++ offsetof(JSObject, group_),
++ "RelocationOverlay::magic_ is in the wrong location");
++ static_assert(offsetof(RelocationOverlay, magic_) ==
++ offsetof(js::Shape, base_),
++ "RelocationOverlay::magic_ is in the wrong location");
++#else
++# error "Unknown endianness or word size"
++#endif
+ static_assert(
+ offsetof(RelocationOverlay, magic_) == offsetof(JSString, d.u1.length),
+ "RelocationOverlay::magic_ is in the wrong location");
+ magic_ = Relocated;
+--- thunderbird-60.2.1/js/src/jsfriendapi.h.old 2018-10-01 14:51:13.000000000 +0000
++++ thunderbird-60.2.1/js/src/jsfriendapi.h 2018-10-12 19:12:06.190000000 +0000
+@@ -9,6 +9,7 @@
+
+ #include "mozilla/Atomics.h"
+ #include "mozilla/Casting.h"
++#include "mozilla/EndianUtils.h"
+ #include "mozilla/Maybe.h"
+ #include "mozilla/MemoryReporting.h"
+ #include "mozilla/UniquePtr.h"
+@@ -640,8 +641,15 @@
+ static const uint32_t LATIN1_CHARS_BIT = JS_BIT(6);
+ static const uint32_t EXTERNAL_FLAGS = LINEAR_BIT | NON_ATOM_BIT | JS_BIT(5);
+ static const uint32_t TYPE_FLAGS_MASK = JS_BIT(6) - 1;
++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
+ uint32_t flags;
+ uint32_t length;
++#elif JS_BITS_PER_WORD == 64
++ uint32_t length;
++ uint32_t flags;
++#else
++# error "Unknown endianness or word size"
++#endif
+ union {
+ const JS::Latin1Char* nonInlineCharsLatin1;
+ const char16_t* nonInlineCharsTwoByte;
diff --git a/user/mozjs/python3.patch b/user/mozjs/python3.patch
index 2ff9dcfa6..65fc9da53 100644
--- a/user/mozjs/python3.patch
+++ b/user/mozjs/python3.patch
@@ -424,17 +424,6 @@
return bool(self._set)
def __iter__(self):
---- mozjs-52.4.0/python/mozbuild/mozbuild/milestone.py (original)
-+++ mozjs-52.4.0/python/mozbuild/mozbuild/milestone.py (refactored)
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import argparse
- import os
--- mozjs-52.4.0/python/mozbuild/mozbuild/mozconfig.py (original)
+++ mozjs-52.4.0/python/mozbuild/mozbuild/mozconfig.py (refactored)
@@ -2,7 +2,7 @@
@@ -962,26 +951,6 @@
- print('%s=%s' % (key, value))
+for key, value in list(os.environ.items()):
+ print(('%s=%s' % (key, value)))
---- mozjs-52.4.0/python/mozbuild/mozbuild/action/explode_aar.py (original)
-+++ mozjs-52.4.0/python/mozbuild/mozbuild/action/explode_aar.py (refactored)
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import argparse
- import errno
-@@ -44,7 +44,7 @@
- assets = mozpath.join(destdir, 'assets')
- try:
- os.rmdir(assets)
-- except OSError, e:
-+ except OSError as e:
- if e.errno in (errno.ENOTEMPTY, errno.ENOENT):
- pass
- else:
--- mozjs-52.4.0/python/mozbuild/mozbuild/action/file_generate.py (original)
+++ mozjs-52.4.0/python/mozbuild/mozbuild/action/file_generate.py (refactored)
@@ -6,7 +6,7 @@
@@ -1201,17 +1170,6 @@
from mozpack.files import FileFinder
from mozpack.copier import Jarrer
---- mozjs-52.4.0/python/mozbuild/mozbuild/backend/android_eclipse.py (original)
-+++ mozjs-52.4.0/python/mozbuild/mozbuild/backend/android_eclipse.py (refactored)
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import itertools
- import os
--- mozjs-52.4.0/python/mozbuild/mozbuild/backend/base.py (original)
+++ mozjs-52.4.0/python/mozbuild/mozbuild/backend/base.py (refactored)
@@ -2,7 +2,7 @@
@@ -3235,21 +3193,6 @@
os.path.join(os.path.abspath(mozbuild_path), '__init__.py'),
os.path.join(os.path.abspath(mozbuild_path), 'pythonutil.py'),
os.path.join(os.path.abspath(mozbuild_path), 'test', 'test_pythonutil.py'),
---- mozjs-52.4.0/python/mozbuild/mozbuild/test/test_testing.py (original)
-+++ mozjs-52.4.0/python/mozbuild/mozbuild/test/test_testing.py (refactored)
-@@ -2,9 +2,9 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
--from __future__ import unicode_literals
--
--import cPickle as pickle
-+
-+
-+import pickle as pickle
- import os
- import shutil
- import tempfile
--- mozjs-52.4.0/python/mozbuild/mozbuild/test/test_util.py (original)
+++ mozjs-52.4.0/python/mozbuild/mozbuild/test/test_util.py (refactored)
@@ -3,7 +3,7 @@
@@ -3488,17 +3431,6 @@
import os
import unittest
---- mozjs-52.4.0/python/mozbuild/mozbuild/test/backend/test_android_eclipse.py (original)
-+++ mozjs-52.4.0/python/mozbuild/mozbuild/test/backend/test_android_eclipse.py (refactored)
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
--from __future__ import unicode_literals
-+
-
- import json
- import os
--- mozjs-52.4.0/python/mozbuild/mozbuild/test/backend/test_build.py (original)
+++ mozjs-52.4.0/python/mozbuild/mozbuild/test/backend/test_build.py (refactored)
@@ -2,7 +2,7 @@
@@ -7145,26 +7077,6 @@
import posixpath
import os
---- mozjs-52.4.0/python/mozbuild/mozpack/unify.py (original)
-+++ mozjs-52.4.0/python/mozbuild/mozpack/unify.py (refactored)
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
--from __future__ import absolute_import
-+
-
- from mozpack.files import (
- BaseFinder,
-@@ -73,7 +73,7 @@
- creating the instance.
- skip_if_older is ignored.
- '''
-- assert isinstance(dest, basestring)
-+ assert isinstance(dest, str)
- tmpfiles = []
- try:
- for e in self._executables:
--- mozjs-52.4.0/python/mozbuild/mozpack/chrome/flags.py (original)
+++ mozjs-52.4.0/python/mozbuild/mozpack/chrome/flags.py (refactored)
@@ -2,7 +2,7 @@
@@ -7615,17 +7527,6 @@
)
---- mozjs-52.4.0/python/mozbuild/mozpack/test/test_unify.py (original)
-+++ mozjs-52.4.0/python/mozbuild/mozpack/test/test_unify.py (refactored)
-@@ -13,7 +13,7 @@
- from mozpack.files import FileFinder
- from mozpack.mozjar import JarWriter
- from mozpack.test.test_files import MockDest
--from cStringIO import StringIO
-+from io import StringIO
- import os
- import sys
- from mozpack.errors import (
--- mozjs-52.4.0/python/mozbuild/mozpack/test/support/minify_js_verify.py (original)
+++ mozjs-52.4.0/python/mozbuild/mozpack/test/support/minify_js_verify.py (refactored)
@@ -2,7 +2,7 @@
@@ -7837,42 +7738,6 @@ diff -aur mozjs-52.4.0/python/mozbuild/mozbuild/makeutil.py mozjs-fixed/python/m
self._commands.extend(commands)
return self
-diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py
---- mozjs-52.4.0/python/which/which.py 2017-04-11 02:13:24.000000000 +0000
-+++ mozjs-fixed/python/which/which.py 2018-07-10 08:11:01.570000000 +0000
-@@ -280,17 +280,17 @@
- try:
- optlist, args = getopt.getopt(argv[1:], 'haVvqp:e:',
- ['help', 'all', 'version', 'verbose', 'quiet', 'path=', 'exts='])
-- except getopt.GetoptError, msg:
-+ except getopt.GetoptError as msg:
- sys.stderr.write("which: error: %s. Your invocation was: %s\n"\
- % (msg, argv))
- sys.stderr.write("Try 'which --help'.\n")
- return 1
- for opt, optarg in optlist:
- if opt in ('-h', '--help'):
-- print _cmdlnUsage
-+ print(_cmdlnUsage)
- return 0
- elif opt in ('-V', '--version'):
-- print "which %s" % __version__
-+ print("which %s" % __version__)
- return 0
- elif opt in ('-a', '--all'):
- all = 1
-@@ -318,9 +318,9 @@
- nmatches = 0
- for match in whichgen(arg, path=altpath, verbose=verbose, exts=exts):
- if verbose:
-- print "%s (%s)" % match
-+ print("%s (%s)" % match)
- else:
-- print match
-+ print(match)
- nmatches += 1
- if not all:
- break
diff -aur mozjs-52.4.0/testing/mozbase/mozprocess/mozprocess/processhandler.py mozjs-fixed/testing/mozbase/mozprocess/mozprocess/processhandler.py
--- mozjs-52.4.0/testing/mozbase/mozprocess/mozprocess/processhandler.py 2017-04-11 02:13:06.000000000 +0000
+++ mozjs-fixed/testing/mozbase/mozprocess/mozprocess/processhandler.py 2018-07-10 08:13:15.440000000 +0000
@@ -8117,18 +7982,6 @@ diff -aur mozjs-52.4.0/python/mozbuild/mozbuild/virtualenv.py mozjs-fixed/python
log_handle.write('You are running Python %s.\n' % our)
if os.name in ('nt', 'ce'):
-diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py
---- mozjs-52.4.0/python/which/which.py 2018-07-10 10:29:50.380000000 +0000
-+++ mozjs-fixed/python/which/which.py 2018-07-10 10:20:16.770000000 +0000
-@@ -243,7 +243,7 @@
- If no match is found for the command, a WhichError is raised.
- """
- try:
-- match = whichgen(command, path, verbose, exts).next()
-+ match = next(whichgen(command, path, verbose, exts))
- except StopIteration:
- raise WhichError("Could not find '%s' on the path." % command)
- return match
--- mozjs-52.4.0/build/moz.configure/old.configure.old 2018-07-10 10:32:48.550000000 +0000
+++ mozjs-52.4.0/build/moz.configure/old.configure 2018-07-10 10:35:32.440000000 +0000
@@ -107,7 +107,7 @@
@@ -8252,57 +8105,6 @@ diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py
from mozbuild.config_status import config_status
# Some values in sanitized_config also have more complex types, such as
---- mozjs-52.4.0/python/blessings/blessings/__init__.py.old 2017-04-11 02:13:23.000000000 +0000
-+++ mozjs-52.4.0/python/blessings/blessings/__init__.py 2018-07-10 10:56:52.820000000 +0000
-@@ -333,7 +333,7 @@
- 'shadow', 'standout', 'subscript', 'superscript']))
-
-
--class ParametrizingString(unicode):
-+class ParametrizingString(str):
- """A Unicode string which can be called to parametrize it as a terminal capability"""
- def __new__(cls, formatting, normal=None):
- """Instantiate.
-@@ -343,7 +343,7 @@
- "normal" capability.
-
- """
-- new = unicode.__new__(cls, formatting)
-+ new = str.__new__(cls, formatting)
- new._normal = normal
- return new
-
-@@ -375,10 +375,10 @@
- raise
-
-
--class FormattingString(unicode):
-+class FormattingString(str):
- """A Unicode string which can be called upon a piece of text to wrap it in formatting"""
- def __new__(cls, formatting, normal):
-- new = unicode.__new__(cls, formatting)
-+ new = str.__new__(cls, formatting)
- new._normal = normal
- return new
-
-@@ -393,7 +393,7 @@
- return self + text + self._normal
-
-
--class NullCallableString(unicode):
-+class NullCallableString(str):
- """A dummy class to stand in for ``FormattingString`` and ``ParametrizingString``
-
- A callable bytestring that returns an empty Unicode when called with an int
-@@ -402,7 +402,7 @@
-
- """
- def __new__(cls):
-- new = unicode.__new__(cls, u'')
-+ new = str.__new__(cls, u'')
- return new
-
- def __call__(self, arg):
--- mozjs-52.4.0/testing/mozbase/mozfile/mozfile/mozfile.py (original)
+++ mozjs-52.4.0/testing/mozbase/mozfile/mozfile/mozfile.py (refactored)
@@ -6,7 +6,7 @@
@@ -8599,56 +8401,6 @@ diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py
cls._walk_directories(directories, callback, pattern=pattern, ignore=ignore)
---- mozjs-52.4.0/testing/mozbase/manifestparser/manifestparser/cli.py (original)
-+++ mozjs-52.4.0/testing/mozbase/manifestparser/manifestparser/cli.py (refactored)
-@@ -81,7 +81,7 @@
- # parse the arguments
- try:
- kwargs, tags, args = parse_args(args)
-- except ParserError, e:
-+ except ParserError as e:
- self._parser.error(e.message)
-
- # make sure we have some manifests, otherwise it will
-@@ -132,7 +132,7 @@
- manifest = convert(args, pattern=options.pattern, ignore=options.ignore,
- write=options.in_place)
- if manifest:
-- print manifest
-+ print(manifest)
-
-
- class WriteCLI(CLICommand):
-@@ -146,7 +146,7 @@
- # parse the arguments
- try:
- kwargs, tags, args = parse_args(args)
-- except ParserError, e:
-+ except ParserError as e:
- self._parser.error(e.message)
-
- # make sure we have some manifests, otherwise it will
-@@ -175,9 +175,9 @@
- commands[args[0]](self._parser).parser().print_help()
- else:
- self._parser.print_help()
-- print '\nCommands:'
-+ print('\nCommands:')
- for command in sorted(commands):
-- print ' %s : %s' % (command, commands[command].__doc__.strip())
-+ print(' %s : %s' % (command, commands[command].__doc__.strip()))
-
-
- class UpdateCLI(CLICommand):
-@@ -190,7 +190,7 @@
- # parse the arguments
- try:
- kwargs, tags, args = parse_args(args)
-- except ParserError, e:
-+ except ParserError as e:
- self._parser.error(e.message)
-
- # make sure we have some manifests, otherwise it will
--- mozjs-52.4.0/testing/mozbase/manifestparser/manifestparser/expression.py (original)
+++ mozjs-52.4.0/testing/mozbase/manifestparser/manifestparser/expression.py (refactored)
@@ -275,7 +275,7 @@
@@ -9378,61 +9130,6 @@ diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py
lines.append("{0:6}: {1}".format(v, k))
lines.sort()
---- mozjs-52.4.0/config/link.py (original)
-+++ mozjs-52.4.0/config/link.py (refactored)
-@@ -18,7 +18,7 @@
- time.sleep(0.5)
- idleTime += 0.5
- if idleTime > 20 * 60:
-- print "Still linking, 20 minutes passed..."
-+ print("Still linking, 20 minutes passed...")
- sys.stdout.flush()
- idleTime = 0
-
-@@ -42,6 +42,6 @@
-
- if __name__ == "__main__":
- if len(sys.argv) < 2:
-- print >>sys.stderr, "Usage: link.py <commandline>"
-+ print("Usage: link.py <commandline>", file=sys.stderr)
- sys.exit(1)
- sys.exit(wrap_linker(sys.argv[1:]))
---- mozjs-52.4.0/config/mozunit.py (original)
-+++ mozjs-52.4.0/config/mozunit.py (refactored)
-@@ -140,7 +140,7 @@
- '''
- def __init__(self, files = {}):
- self.files = {}
-- for name, content in files.iteritems():
-+ for name, content in files.items():
- self.files[normcase(os.path.abspath(name))] = content
-
- def __call__(self, name, mode = 'r'):
-@@ -158,19 +158,19 @@
- return file
-
- def __enter__(self):
-- import __builtin__
-- self.open = __builtin__.open
-+ import builtins
-+ self.open = builtins.open
- self._orig_path_exists = os.path.exists
- self._orig_path_isdir = os.path.isdir
- self._orig_path_isfile = os.path.isfile
-- __builtin__.open = self
-+ builtins.open = self
- os.path.exists = self._wrapped_exists
- os.path.isdir = self._wrapped_isdir
- os.path.isfile = self._wrapped_isfile
-
- def __exit__(self, type, value, traceback):
-- import __builtin__
-- __builtin__.open = self.open
-+ import builtins
-+ builtins.open = self.open
- os.path.exists = self._orig_path_exists
- os.path.isdir = self._orig_path_isdir
- os.path.isfile = self._orig_path_isfile
--- mozjs-52.4.0/config/nsinstall.py (original)
+++ mozjs-52.4.0/config/nsinstall.py (refactored)
@@ -9,7 +9,7 @@
@@ -9782,34 +9479,6 @@ diff -aur mozjs-52.4.0/python/which/which.py mozjs-fixed/python/which/which.py
sys.stderr.flush()
if proc.returncode:
return proc.returncode
---- mozjs-52.4.0/js/src/jsautokw.py.old 2017-04-11 02:13:16.000000000 +0000
-+++ mozjs-52.4.0/js/src/jsautokw.py 2018-07-11 05:11:27.080000000 +0000
-@@ -80,14 +80,14 @@
- per_column = column_dict.setdefault(keyword[column], [])
- per_column.append(item)
-
-- return sorted(column_dict.items(), key=lambda (char, keyword): ord(char))
-+ return sorted(list(column_dict.items()), key=lambda char_keyword: ord(char_keyword[0]))
-
- def generate_letter_switch(opt, unprocessed_columns, keyword_list,
- columns=None):
- assert(len(keyword_list) != 0);
-
- if not columns:
-- columns = range(0, unprocessed_columns)
-+ columns = list(range(0, unprocessed_columns))
-
- if len(keyword_list) == 1:
- index, keyword = keyword_list[0]
-@@ -161,7 +161,7 @@
- per_length = length_dict.setdefault(len(keyword), [])
- per_length.append(item)
-
-- return sorted(length_dict.items(), key=lambda (length, keyword): length)
-+ return sorted(list(length_dict.items()), key=lambda length_keyword: length_keyword[0])
-
- def generate_switch(opt, keyword_list):
- assert(len(keyword_list) != 0);
--- mozjs-52.4.0/js/src/builtin/embedjs.py (original)
+++ mozjs-52.4.0/js/src/builtin/embedjs.py (refactored)
@@ -36,7 +36,7 @@