Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" |
| 2 | LICENSE = "MPL-2.0" |
| 3 | LIC_FILES_CHKSUM = "file://../../LICENSE;md5=815ca599c9df247a0c7f619bab123dad" |
| 4 | |
| 5 | SRC_URI = " \ |
| 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 | file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \ |
| 9 | file://0002-Move-JS_BYTES_PER_WORD-out-of-config.h.patch;patchdir=../../ \ |
| 10 | file://0003-Add-AArch64-support.patch;patchdir=../../ \ |
| 11 | file://0004-mozbug746112-no-decommit-on-large-pages.patch;patchdir=../../ \ |
| 12 | file://0005-aarch64-64k-page.patch;patchdir=../../ \ |
| 13 | file://0001-regenerate-configure.patch;patchdir=../../ \ |
| 14 | file://fix-the-compile-error-of-powerpc64.patch;patchdir=../../ \ |
| 15 | file://fix_milestone_compile_issue.patch \ |
| 16 | file://0010-fix-cross-compilation-on-i586-targets.patch;patchdir=../../ \ |
| 17 | file://0001-add-support-for-big-endian-32bit-ARM.patch;patchdir=../../ \ |
| 18 | " |
| 19 | |
| 20 | SRC_URI[md5sum] = "20b6f8f1140ef6e47daa3b16965c9202" |
| 21 | SRC_URI[sha256sum] = "321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba" |
| 22 | |
| 23 | S = "${WORKDIR}/${BPN}${PV}/js/src" |
| 24 | |
| 25 | inherit autotools pkgconfig perlnative pythonnative |
| 26 | |
| 27 | DEPENDS += "nspr zlib" |
| 28 | |
| 29 | # nspr's package-config is ignored so set libs manually |
| 30 | EXTRA_OECONF = " \ |
| 31 | --target=${TARGET_SYS} \ |
| 32 | --host=${BUILD_SYS} \ |
| 33 | --build=${BUILD_SYS} \ |
| 34 | --prefix=${prefix} \ |
| 35 | --libdir=${libdir} \ |
| 36 | --with-nspr-libs='-lplds4 -lplc4 -lnspr4' \ |
| 37 | --enable-threadsafe \ |
| 38 | --disable-static \ |
| 39 | " |
| 40 | EXTRA_OECONF_append_armv4 += " \ |
| 41 | --disable-methodjit \ |
| 42 | " |
| 43 | |
| 44 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" |
| 45 | PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11" |
| 46 | |
| 47 | # mozjs requires autoreconf 2.13 |
| 48 | do_configure() { |
| 49 | ( cd ${S} |
| 50 | gnu-configize --force |
| 51 | mv config.guess config.sub build/autoconf ) |
| 52 | ${S}/configure ${EXTRA_OECONF} |
| 53 | } |
| 54 | |
| 55 | # patch.bbclass will try to apply the patches already present and fail, so clean them out |
| 56 | do_unpack() { |
| 57 | tar -xvf ${DL_DIR}/mozjs17.0.0.tar.gz -C ${WORKDIR}/ |
| 58 | rm -rf ${WORKDIR}/${BPN}${PV}/patches |
| 59 | } |
| 60 | |
| 61 | |
| 62 | PACKAGES =+ "lib${PN}" |
| 63 | FILES_lib${PN} += "${libdir}/lib*.so" |
| 64 | FILES_${PN}-dev += "${bindir}/js17-config" |
| 65 | |
| 66 | # Fails to build with thumb-1 (qemuarm) |
| 67 | #| {standard input}: Assembler messages: |
| 68 | #| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20' |
| 69 | #| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)' |
| 70 | #| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)' |
| 71 | #| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300' |
| 72 | #| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52' |
| 73 | ARM_INSTRUCTION_SET = "arm" |