summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2020-01-21 08:04:18 +0100
committerKhem Raj <raj.khem@gmail.com>2020-01-22 09:56:34 -0800
commita804b0c1bbdc3273a41fbd4aeb5cc3b7d1ffc6b5 (patch)
tree1c3588995ec08c1314b5a316c4b00182a27f6f20
parentfe1607060ac2dd42ae8c5115b8cbc4993b467a87 (diff)
downloadmeta-openembedded-a804b0c1bbdc3273a41fbd4aeb5cc3b7d1ffc6b5.tar.gz
mozjs: upgrade 60.5.2 -> 60.9.0 and rework
* build with firefox-esr sources to simplyfy upgrade path * cleanup: Should make python2-> python3 transition easier Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch15
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch42
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch20
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb (renamed from meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb)56
4 files changed, 45 insertions, 88 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch b/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch
index a3c1b69e29..985fc36c18 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch
@@ -8,10 +8,12 @@ Use oe's python environment rather than create one of host
8Upstream-Status: Inappropriate [oe specific] 8Upstream-Status: Inappropriate [oe specific]
9 9
10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
11
12Rebase to 60.9.0 (firefox-esr sources)
13Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
11--- 14---
12 build/moz.configure/init.configure | 18 ------------------ 15 build/moz.configure/init.configure | 18 ------------------
13 configure.py | 10 +++++++++- 16 configure.py | 10 +++++++++-
14 js/src/old-configure | 4 ++--
15 3 files changed, 11 insertions(+), 21 deletions(-) 17 3 files changed, 11 insertions(+), 21 deletions(-)
16 18
17--- a/build/moz.configure/init.configure 19--- a/build/moz.configure/init.configure
@@ -60,14 +62,3 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
60 from mozbuild.configure import ConfigureSandbox 62 from mozbuild.configure import ConfigureSandbox
61 from mozbuild.makeutil import Makefile 63 from mozbuild.makeutil import Makefile
62 from mozbuild.pythonutil import iter_modules_in_path 64 from mozbuild.pythonutil import iter_modules_in_path
63--- a/js/src/old-configure
64+++ b/js/src/old-configure
65@@ -9974,7 +9974,7 @@ if test "$JS_STANDALONE"; then
66
67 if test "$no_recursion" != yes; then
68 trap '' EXIT
69- if ! $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then
70+ if ! PYTHONPATH=$_topsrcdir/python/mozbuild/ $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then
71 exit 1
72 fi
73 fi
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch b/meta-oe/recipes-extended/mozjs/mozjs/0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch
deleted file mode 100644
index 4cba79c5ba..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs/0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From a46adb74b5ba5e17d676d31d70faca76c1381d15 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 12 Jul 2018 21:25:46 +0800
4Subject: [PATCH 4/5] do not use autoconf 2.13 to refresh old.configure
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9---
10 build/moz.configure/old.configure | 2 +-
11 js/src/old-configure | 2 +-
12 2 files changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
15index ece47f4..a73900f 100644
16--- a/build/moz.configure/old.configure
17+++ b/build/moz.configure/old.configure
18@@ -83,7 +83,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
19 old_configure = os.path.join(old_configure_dir, 'js', 'src',
20 os.path.basename(old_configure))
21
22- refresh = True
23+ refresh = False
24 if exists(old_configure):
25 mtime = getmtime(old_configure)
26 aclocal = os.path.join(build_env.topsrcdir, 'build', 'autoconf',
27diff --git a/js/src/old-configure b/js/src/old-configure
28index 75b00e1..8a8ef52 100644
29--- a/js/src/old-configure
30+++ b/js/src/old-configure
31@@ -619,7 +619,7 @@ if test -z "$srcdir"; then
32 ac_prog=$0
33 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
34 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
35- srcdir=$ac_confdir
36+ srcdir="$ac_confdir/../../"
37 if test ! -r $srcdir/$ac_unique_file; then
38 srcdir=..
39 fi
40--
412.7.4
42
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch b/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch
index 3ac25f6aed..e0929a8a8f 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch
@@ -13,18 +13,26 @@ Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
13 13
14Rebase to 52.8.1 14Rebase to 52.8.1
15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
16
17Rebase to 60.9.0 (firefox-esr sources)
18Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
16--- 19---
17 js/src/old-configure | 2 +- 20 js/src/old-configure.in | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-) 21 1 file changed, 1 insertion(+), 1 deletion(-)
19 22
20--- a/js/src/old-configure 23diff --git a/js/src/old-configure.in b/js/src/old-configure.in
21+++ b/js/src/old-configure 24index 3d53ee1..11c3d5a 100644
22@@ -3833,7 +3833,7 @@ AS='$(CC)' 25--- a/js/src/old-configure.in
26+++ b/js/src/old-configure.in
27@@ -405,7 +405,7 @@ AS='$(CC)'
23 AS_DASH_C_FLAG='-c' 28 AS_DASH_C_FLAG='-c'
24 MOZ_USER_DIR=".mozilla" 29 MOZ_USER_DIR=".mozilla"
25 30
26-MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib" 31-MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"
27+MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin" 32+MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin"
28 33
29 34 dnl Configure platform-specific CPU architecture compiler options.
30 35 dnl ==============================================================
36--
372.21.0
38
diff --git a/meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb b/meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb
index 389bcac92e..e229bf424c 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb
@@ -3,13 +3,12 @@ HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonk
3LICENSE = "MPL-2.0" 3LICENSE = "MPL-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf"
5 5
6SRC_URI = "https://dev.gentoo.org/~axs/distfiles/mozjs-60.5.2.tar.bz2 \ 6SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \
7 file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \ 7 file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
8 file://0010-fix-cross-compilation-on-i586-targets.patch \ 8 file://0010-fix-cross-compilation-on-i586-targets.patch \
9 file://0001-do-not-create-python-environment.patch \ 9 file://0001-do-not-create-python-environment.patch \
10 file://0002-fix-cannot-find-link.patch \ 10 file://0002-fix-cannot-find-link.patch \
11 file://0003-workaround-autoconf-2.13-detection-failed.patch \ 11 file://0003-workaround-autoconf-2.13-detection-failed.patch \
12 file://0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch \
13 file://0005-fix-do_compile-failed-on-mips.patch \ 12 file://0005-fix-do_compile-failed-on-mips.patch \
14 file://add-riscv-support.patch \ 13 file://add-riscv-support.patch \
15 file://0001-mozjs-fix-coredump-caused-by-getenv.patch \ 14 file://0001-mozjs-fix-coredump-caused-by-getenv.patch \
@@ -26,15 +25,18 @@ SRC_URI_append_libc-musl = " \
26SRC_URI_append_mipsarchn32 = " \ 25SRC_URI_append_mipsarchn32 = " \
27 file://0001-fix-compiling-failure-on-mips64-n32-bsp.patch \ 26 file://0001-fix-compiling-failure-on-mips64-n32-bsp.patch \
28 " 27 "
29SRC_URI[md5sum] = "023ed014e9e93d01620d121bc06a3589" 28SRC_URI[md5sum] = "69a0be9ce695e5dc4941ed0c78ef00c2"
30SRC_URI[sha256sum] = "f51039c997415fd0f13f8e01966b4a8ff80cbf90deb8b14c18827104a369cc0d" 29SRC_URI[sha256sum] = "9f453c8cc5669e46e38f977764d49a36295bf0d023619d9aac782e6bb3e8c53f"
30
31S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}"
31 32
32inherit autotools pkgconfig perlnative pythonnative 33inherit autotools pkgconfig perlnative pythonnative
33 34
34inherit features_check 35inherit features_check
35CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold" 36CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold"
36 37
37DEPENDS += "nspr zlib python-six-native python-pytoml-native \ 38DEPENDS += "nspr zlib autoconf-2.13-native \
39 python-six-native python-pytoml-native \
38 python-jsmin-native python-futures-native \ 40 python-jsmin-native python-futures-native \
39 python-which-native" 41 python-which-native"
40 42
@@ -77,15 +79,9 @@ export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
77 79
78do_configure() { 80do_configure() {
79 export SHELL="/bin/sh" 81 export SHELL="/bin/sh"
80 export TMP="${B}"
81 ${S}/js/src/configure ${EXTRA_OECONF}
82}
83
84do_compile_prepend() {
85 export SHELL="/bin/sh"
86 export S
87 export PYTHONPATH
88 cd ${S} 82 cd ${S}
83 # Add mozjs python-modules necessary
84 PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build"
89 for sub_dir in python testing/mozbase; do 85 for sub_dir in python testing/mozbase; do
90 for module_dir in `ls $sub_dir -1`;do 86 for module_dir in `ls $sub_dir -1`;do
91 [ $module_dir = "virtualenv" ] && continue 87 [ $module_dir = "virtualenv" ] && continue
@@ -94,25 +90,29 @@ do_compile_prepend() {
94 fi 90 fi
95 done 91 done
96 done 92 done
97 PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build" 93 echo "$PYTHONPATH" > ${B}/PYTHONPATH
98 cd - 94 export PYTHONPATH=`cat ${B}/PYTHONPATH`
95
96 cd ${S}/js/src
97 autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213 old-configure.in > old-configure
98 sed -i 's:refresh = True:refresh = False:g' ${S}/build/moz.configure/old.configure
99
100 cd ${B}
101 ${S}/js/src/configure ${EXTRA_OECONF}
102
103 # Make standard Makefile checks pass
104 touch ${S}/js/src/configure
105 touch ${B}/config.status
106}
107
108do_compile_prepend() {
109 export SHELL="/bin/sh"
110 export PYTHONPATH=`cat ${B}/PYTHONPATH`
99} 111}
100 112
101do_install_prepend() { 113do_install_prepend() {
102 export SHELL="/bin/sh" 114 export SHELL="/bin/sh"
103 export S 115 export PYTHONPATH=`cat ${B}/PYTHONPATH`
104 export PYTHONPATH
105 cd ${S}
106 for sub_dir in python testing/mozbase; do
107 for module_dir in `ls $sub_dir -1`;do
108 [ $module_dir = "virtualenv" ] && continue
109 if [ -d "${S}/$sub_dir/$module_dir" ];then
110 PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir"
111 fi
112 done
113 done
114 PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build"
115 cd -
116} 116}
117 117
118PACKAGES =+ "lib${BPN}" 118PACKAGES =+ "lib${BPN}"