mozjs_17.0.0.bb 1.9 KB
Newer Older
Andreas Müller's avatar
Andreas Müller committed
1 2 3 4 5
SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=815ca599c9df247a0c7f619bab123dad"

SRC_URI = " \
Robert Yang's avatar
Robert Yang committed
6
    http://ftp.mozilla.org/pub/mozilla.org/js/${BPN}${PV}.tar.gz \
7
    file://0001-mozjs17.0.0-fix-the-compile-bug-of-powerpc.patch \
8 9 10 11 12 13 14 15
    file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
    file://0002-Move-JS_BYTES_PER_WORD-out-of-config.h.patch;patchdir=../../ \
    file://0003-Add-AArch64-support.patch;patchdir=../../ \
    file://0004-mozbug746112-no-decommit-on-large-pages.patch;patchdir=../../ \
    file://0005-aarch64-64k-page.patch;patchdir=../../ \
    file://0001-regenerate-configure.patch;patchdir=../../ \ 
  "

Andreas Müller's avatar
Andreas Müller committed
16 17 18 19 20 21 22
SRC_URI[md5sum] = "20b6f8f1140ef6e47daa3b16965c9202"
SRC_URI[sha256sum] = "321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba"

S = "${WORKDIR}/${PN}${PV}/js/src"

inherit autotools pkgconfig perlnative

23
DEPENDS += "nspr zlib"
Andreas Müller's avatar
Andreas Müller committed
24 25 26 27 28 29 30

# nspr's package-config is ignored so set libs manually
EXTRA_OECONF = " \
    --target=${TARGET_SYS} \
    --host=${BUILD_SYS} \
    --build=${BUILD_SYS} \
    --prefix=${prefix} \
31
    --libdir=${libdir} \
Andreas Müller's avatar
Andreas Müller committed
32 33
    --with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
    --enable-threadsafe \
34
    --disable-static \
Andreas Müller's avatar
Andreas Müller committed
35
"
36 37 38
EXTRA_OECONF_append_armv4 += " \
    --disable-methodjit \
"
Andreas Müller's avatar
Andreas Müller committed
39 40 41

# mozjs requires autoreconf 2.13
do_configure() {
42 43 44
    ( cd ${S} 
      gnu-configize --force
      mv config.guess config.sub build/autoconf )
Khem Raj's avatar
Khem Raj committed
45
    ${S}/configure ${EXTRA_OECONF}
Andreas Müller's avatar
Andreas Müller committed
46 47
}

48 49 50 51 52 53 54 55 56 57 58 59 60
# patch.bbclass will try to apply the patches already present and fail, so clean them out
do_sourceclean() {
    (
    cd ${WORKDIR}/${PN}${PV}/patches
    for i in $(cat series | awk '{print $1}') ; do
        rm -f $i
    done
    rm -f series
    )
}

addtask sourceclean before do_patch after do_unpack

Andreas Müller's avatar
Andreas Müller committed
61 62 63
PACKAGES =+ "lib${PN}"
FILES_lib${PN} += "${libdir}/lib*.so"
FILES_${PN}-dev += "${bindir}/js17-config"