2022-05-28 15:20:07 +00:00
|
|
|
SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
|
|
|
|
HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
|
|
|
|
LICENSE = "MPL-2.0"
|
|
|
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf"
|
|
|
|
|
|
|
|
SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \
|
|
|
|
file://0001-Cargo.toml-do-not-abort-on-panic.patch \
|
2024-05-21 16:55:51 +00:00
|
|
|
file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \
|
2022-05-28 15:20:07 +00:00
|
|
|
file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \
|
|
|
|
file://0004-use-asm-sgidefs.h.patch \
|
|
|
|
file://fix-musl-build.patch \
|
2024-05-21 16:55:51 +00:00
|
|
|
file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \
|
2022-05-28 15:20:07 +00:00
|
|
|
file://riscv32.patch \
|
|
|
|
file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \
|
2024-05-21 16:55:51 +00:00
|
|
|
file://0001-rewrite-cargo-host-linker-in-python3.patch \
|
2023-09-29 16:46:16 +00:00
|
|
|
file://musl-disable-stackwalk.patch \
|
|
|
|
file://0001-add-arm-to-list-of-mozinline.patch \
|
2024-05-21 16:55:51 +00:00
|
|
|
file://armv5.patch \
|
2022-05-28 15:20:07 +00:00
|
|
|
"
|
2024-05-21 16:55:51 +00:00
|
|
|
SRC_URI[sha256sum] = "af8086f23efc8492d286671f6035b1a915de6f4ed5c7897e40be0e1cb6b895ea"
|
2023-09-29 16:46:16 +00:00
|
|
|
|
|
|
|
S = "${WORKDIR}/firefox-${PV}"
|
2022-05-28 15:20:07 +00:00
|
|
|
|
|
|
|
inherit pkgconfig perlnative python3native rust
|
|
|
|
|
|
|
|
DEPENDS += "zlib cargo-native python3 icu"
|
|
|
|
DEPENDS:remove:mipsarch = "icu"
|
|
|
|
DEPENDS:remove:powerpc:toolchain-clang = "icu"
|
|
|
|
|
|
|
|
B = "${WORKDIR}/build"
|
|
|
|
|
2024-05-21 16:55:51 +00:00
|
|
|
export PYTHONPATH = "${S}/build:\
|
|
|
|
${S}/third_party/python/PyYAML/lib3:\
|
|
|
|
${S}/testing/mozbase/mozfile:\
|
|
|
|
${S}/python/mozboot:\
|
|
|
|
${S}/third_party/python/distro:\
|
|
|
|
${S}/testing/mozbase/mozinfo:\
|
|
|
|
${S}/config:\
|
|
|
|
${S}/testing/mozbase/manifestparser:\
|
|
|
|
${S}/third_party/python/pytoml:\
|
|
|
|
${S}/testing/mozbase/mozprocess:\
|
|
|
|
${S}/third_party/python/six:\
|
|
|
|
${S}/python/mozbuild:\
|
|
|
|
${S}/python/mozbuild/mozbuild:\
|
|
|
|
${S}/python/mach:\
|
|
|
|
${S}/third_party/python/jsmin:\
|
|
|
|
${S}/python/mozversioncontrol"
|
2022-05-28 15:20:07 +00:00
|
|
|
|
|
|
|
export HOST_CC = "${BUILD_CC}"
|
|
|
|
export HOST_CXX = "${BUILD_CXX}"
|
|
|
|
export HOST_CFLAGS = "${BUILD_CFLAGS}"
|
|
|
|
export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}"
|
|
|
|
export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
|
|
|
|
|
|
|
|
export AS = "${CC}"
|
|
|
|
|
|
|
|
export RUSTFLAGS
|
|
|
|
|
|
|
|
JIT ?= ""
|
|
|
|
JIT:mipsarch = "--disable-jit"
|
|
|
|
ICU ?= "--with-system-icu"
|
|
|
|
ICU:mipsarch = ""
|
|
|
|
ICU:powerpc:toolchain-clang = ""
|
|
|
|
|
|
|
|
do_configure() {
|
|
|
|
cd ${B}
|
|
|
|
python3 ${S}/configure.py \
|
|
|
|
--enable-project=js \
|
2022-11-15 17:25:32 +00:00
|
|
|
--target=${RUST_HOST_SYS} \
|
2022-05-28 15:20:07 +00:00
|
|
|
--host=${BUILD_SYS} \
|
|
|
|
--prefix=${prefix} \
|
|
|
|
--libdir=${libdir} \
|
|
|
|
--disable-jemalloc \
|
|
|
|
--disable-strip \
|
|
|
|
${JIT} \
|
|
|
|
${ICU}
|
|
|
|
}
|
2024-05-21 16:55:51 +00:00
|
|
|
do_configure[cleandirs] += "${B}"
|
2022-05-28 15:20:07 +00:00
|
|
|
|
|
|
|
do_install() {
|
|
|
|
oe_runmake 'DESTDIR=${D}' install
|
|
|
|
}
|
|
|
|
|
|
|
|
inherit multilib_script multilib_header
|
|
|
|
|
2024-05-21 16:55:51 +00:00
|
|
|
MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
|
|
|
|
MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config"
|
2022-05-28 15:20:07 +00:00
|
|
|
|
|
|
|
do_install:append() {
|
2024-05-21 16:55:51 +00:00
|
|
|
oe_multilib_header mozjs-${MAJ_VER}/js-config.h
|
2022-05-28 15:20:07 +00:00
|
|
|
sed -e 's@${STAGING_DIR_HOST}@@g' \
|
2024-05-21 16:55:51 +00:00
|
|
|
-i ${D}${bindir}/js${MAJ_VER}-config
|
2022-05-28 15:20:07 +00:00
|
|
|
rm -f ${D}${libdir}/libjs_static.ajs
|
|
|
|
}
|
|
|
|
|
2024-05-21 16:55:51 +00:00
|
|
|
PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
|
2022-05-28 15:20:07 +00:00
|
|
|
PACKAGES =+ "lib${BPN}"
|
|
|
|
FILES:lib${BPN} += "${libdir}/lib*"
|