diff options
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.bb | 115 |
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 @@ | |||
| 1 | SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" | ||
| 2 | HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" | ||
| 3 | LICENSE = "MPL-2.0" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" | ||
| 5 | |||
| 6 | SRC_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 | " | ||
| 23 | SRC_URI[sha256sum] = "93b9ef6229f41cb22ff109b95bbf61a78395a0fe4b870192eeca22947cb09a53" | ||
| 24 | |||
| 25 | UPSTREAM_CHECK_URI = "https://tracker.debian.org/pkg/mozjs128" | ||
| 26 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" | ||
| 27 | |||
| 28 | S = "${UNPACKDIR}/firefox-${PV}" | ||
| 29 | |||
| 30 | inherit pkgconfig perlnative python3native rust cargo | ||
| 31 | |||
| 32 | DEPENDS += "zlib cbindgen-native python3 icu" | ||
| 33 | DEPENDS:remove:mipsarch = "icu" | ||
| 34 | DEPENDS:remove:powerpc:toolchain-clang = "icu" | ||
| 35 | |||
| 36 | B = "${WORKDIR}/build" | ||
| 37 | |||
| 38 | export 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 | |||
| 55 | export HOST_CC = "${BUILD_CC}" | ||
| 56 | export HOST_CXX = "${BUILD_CXX}" | ||
| 57 | export HOST_CFLAGS = "${BUILD_CFLAGS}" | ||
| 58 | export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}" | ||
| 59 | export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" | ||
| 60 | |||
| 61 | export AS = "${CC}" | ||
| 62 | |||
| 63 | export MOZBUILD_STATE_PATH = "${WORKDIR}/mozbuild_state" | ||
| 64 | export RUSTFLAGS | ||
| 65 | |||
| 66 | JIT ?= "" | ||
| 67 | JIT:mipsarch = "--disable-jit" | ||
| 68 | ICU ?= "--with-system-icu" | ||
| 69 | ICU:mipsarch = "" | ||
| 70 | ICU:powerpc:toolchain-clang = "" | ||
| 71 | |||
| 72 | LDFLAGS:append:riscv32 = " -latomic" | ||
| 73 | |||
| 74 | do_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 | } | ||
| 87 | do_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. | ||
| 92 | do_compile() { | ||
| 93 | base_do_compile | ||
| 94 | } | ||
| 95 | |||
| 96 | do_install() { | ||
| 97 | oe_runmake 'DESTDIR=${D}' install | ||
| 98 | } | ||
| 99 | |||
| 100 | inherit multilib_script multilib_header | ||
| 101 | |||
| 102 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" | ||
| 103 | MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config" | ||
| 104 | |||
| 105 | do_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 | |||
| 112 | INSANE_SKIP += "32bit-time" | ||
| 113 | PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" | ||
| 114 | PACKAGES =+ "lib${BPN}" | ||
| 115 | FILES:lib${BPN} += "${libdir}/lib*" | ||
