summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/mozjs/mozjs-128_128.14.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/mozjs/mozjs-128_128.14.0.bb')
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-128_128.14.0.bb115
1 files changed, 115 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128_128.14.0.bb b/meta-oe/recipes-extended/mozjs/mozjs-128_128.14.0.bb
new file mode 100644
index 0000000000..635cad96cf
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs-128_128.14.0.bb
@@ -0,0 +1,115 @@
1SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
2HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
3LICENSE = "MPL-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf"
5
6SRC_URI = " \
7 https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \
8 file://0001-Cargo.toml-do-not-abort-on-panic.patch \
9 file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \
10 file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \
11 file://0004-use-asm-sgidefs.h.patch \
12 file://0005-Add-RISCV32-support.patch \
13 file://0006-util.configure-fix-one-occasionally-reproduced-confi.patch \
14 file://0007-Rewrite-cargo-host-linker-in-python3.patch \
15 file://0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch \
16 file://0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch \
17 file://0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch \
18 file://0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch \
19 file://0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch \
20 file://0013-Fix-build-error-with-musl.patch \
21 file://D261512.1755672843.patch \
22"
23SRC_URI[sha256sum] = "93b9ef6229f41cb22ff109b95bbf61a78395a0fe4b870192eeca22947cb09a53"
24
25UPSTREAM_CHECK_URI = "https://tracker.debian.org/pkg/mozjs128"
26UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
27
28S = "${UNPACKDIR}/firefox-${PV}"
29
30inherit pkgconfig perlnative python3native rust cargo
31
32DEPENDS += "zlib cbindgen-native python3 icu"
33DEPENDS:remove:mipsarch = "icu"
34DEPENDS:remove:powerpc:toolchain-clang = "icu"
35
36B = "${WORKDIR}/build"
37
38export PYTHONPATH = "${S}/build:\
39${S}/third_party/python/PyYAML/lib3:\
40${S}/testing/mozbase/mozfile:\
41${S}/python/mozboot:\
42${S}/third_party/python/distro:\
43${S}/testing/mozbase/mozinfo:\
44${S}/config:\
45${S}/testing/mozbase/manifestparser:\
46${S}/third_party/python/pytoml:\
47${S}/testing/mozbase/mozprocess:\
48${S}/third_party/python/six:\
49${S}/python/mozbuild:\
50${S}/python/mozbuild/mozbuild:\
51${S}/python/mach:\
52${S}/third_party/python/jsmin:\
53${S}/python/mozversioncontrol"
54
55export HOST_CC = "${BUILD_CC}"
56export HOST_CXX = "${BUILD_CXX}"
57export HOST_CFLAGS = "${BUILD_CFLAGS}"
58export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}"
59export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
60
61export AS = "${CC}"
62
63export MOZBUILD_STATE_PATH = "${WORKDIR}/mozbuild_state"
64export RUSTFLAGS
65
66JIT ?= ""
67JIT:mipsarch = "--disable-jit"
68ICU ?= "--with-system-icu"
69ICU:mipsarch = ""
70ICU:powerpc:toolchain-clang = ""
71
72LDFLAGS:append:riscv32 = " -latomic"
73
74do_configure() {
75 cd ${B}
76 python3 ${S}/configure.py \
77 --enable-project=js \
78 --target=${RUST_HOST_SYS} \
79 --host=${BUILD_SYS} \
80 --prefix=${prefix} \
81 --libdir=${libdir} \
82 --disable-jemalloc \
83 --disable-strip \
84 ${JIT} \
85 ${ICU}
86}
87do_configure[cleandirs] += "${B}"
88
89# The main build system is a Makefile that call cargo downstream.
90# We inherit cargo to get the environnement but need to switch back to
91# base_do_compile to do the Makefile base compilation.
92do_compile() {
93 base_do_compile
94}
95
96do_install() {
97 oe_runmake 'DESTDIR=${D}' install
98}
99
100inherit multilib_script multilib_header
101
102MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
103MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config"
104
105do_install:append() {
106 oe_multilib_header mozjs-${MAJ_VER}/js-config.h
107 sed -e 's@${STAGING_DIR_HOST}@@g' \
108 -i ${D}${bindir}/js${MAJ_VER}-config
109 rm -f ${D}${libdir}/libjs_static.ajs
110}
111
112INSANE_SKIP += "32bit-time"
113PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
114PACKAGES =+ "lib${BPN}"
115FILES:lib${BPN} += "${libdir}/lib*"