From 28d52a2f7a2755dc12076d33eef9a917761979ef Mon Sep 17 00:00:00 2001 From: Qing He Date: Mon, 5 Jul 2010 11:28:40 +0800 Subject: js: upgrade to version 1.8.0~rc1 from 1.5 use version string 1.7.0+1.8.0rc1 aka. spidermonkey changes: - rebase jsautocfg.h to add JS_HAVE_LONG_LONG, fixing the build failure - document the limitation of jsautocfg.h - jskwgen is a host script, and should be built by BUILD_CC - remove dependency of readline. readline or editline is only used in standalone js command line, which is not shipped in package. Removing the dependency to avoid any concern of GPL3-ization - set BUILD_OPT=1 for optimized build Note on version choice: js is known to have long rc cycles. e.g. the version 1.5: js-1.5-b1: 12/16/1999, js-1.5-rc1: 03/17/2000, js-1.5-rc6a: 06/16/2004, js-1.5 release: 10/22/2005 Current release version is 1.7.0: 10/19/2007, latest version 1.8.0-rc1: 03/09/2009, so 1.8.0-rc1 is used. Note on standalone js vs. xulrunner: xulrunner also includes a js version, that is more updated than standalone spidermonkey. It also uses autotools so jsautocfg.h patch may not be necessary. However the version of xulrunner is different from js, and it's difficult to identify the mapping between them. It needs further investigation on xulrunner's bundled js Signed-off-by: Qing He --- meta/packages/js/files/buildcc.patch | 20 +++++++++++++++++ meta/packages/js/files/jsautocfg.h | 2 ++ meta/packages/js/js_1.5.bb | 37 ------------------------------ meta/packages/js/js_1.7.0+1.8.0rc1.bb | 42 +++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 37 deletions(-) create mode 100644 meta/packages/js/files/buildcc.patch delete mode 100644 meta/packages/js/js_1.5.bb create mode 100644 meta/packages/js/js_1.7.0+1.8.0rc1.bb (limited to 'meta') diff --git a/meta/packages/js/files/buildcc.patch b/meta/packages/js/files/buildcc.patch new file mode 100644 index 000000000..26eef218d --- /dev/null +++ b/meta/packages/js/files/buildcc.patch @@ -0,0 +1,20 @@ +jskwgen should be built by BUILD_CC in cross environment + +7/23/2010 - created by Qing He + +diff -uNr js.orig//src/Makefile.ref js/src/Makefile.ref +--- js.orig//src/Makefile.ref 2009-02-25 21:24:29.000000000 +0800 ++++ js/src/Makefile.ref 2010-07-23 13:26:51.000000000 +0800 +@@ -303,10 +303,10 @@ + + $(OBJDIR)/jskwgen.o: jskwgen.c jskeyword.tbl + @$(MAKE_OBJDIR) +- $(CC) -o $@ -c $(CFLAGS) $< ++ $(BUILD_CC) -o $@ -c $(BUILD_CFLAGS) $< + + $(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX): $(OBJDIR)/jskwgen.$(OBJ_SUFFIX) +- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ ++ $(BUILD_CC) -o $@ $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $^ + + endif + diff --git a/meta/packages/js/files/jsautocfg.h b/meta/packages/js/files/jsautocfg.h index ac786dcda..efaf807ac 100644 --- a/meta/packages/js/files/jsautocfg.h +++ b/meta/packages/js/files/jsautocfg.h @@ -49,4 +49,6 @@ #define JS_STACK_GROWTH_DIRECTION (-1) +#define JS_HAVE_LONG_LONG + #endif /* js_cpucfg___ */ diff --git a/meta/packages/js/js_1.5.bb b/meta/packages/js/js_1.5.bb deleted file mode 100644 index fe8c8c2b9..000000000 --- a/meta/packages/js/js_1.5.bb +++ /dev/null @@ -1,37 +0,0 @@ -DESCRIPTION = "Spidermonkey: a javascript engine written in C" -HOMEPAGE = "http://www.mozilla.org/js/spidermonkey/" -SECTION = "libs" - -# the package is licensed under either of the following -LICENSE = "MPL1.1 | GPLv2+ | LGPLv2.1+" -DEPENDS = "readline" -PR = "r1" -SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/js/older-packages/js-1.5.tar.gz \ - file://link_with_gcc.patch;patch=1 \ - file://usepic.patch;patch=1 \ - file://jsautocfg.h" - -S = "${WORKDIR}/js/src" - -FILES_${PN} = "${libdir}/lib*.so" -FILES_${PN}-dev = "${includedir} ${libdir}/lib*.a" - -EXTRA_OEMAKE = "'CC=${CC}' 'LD=${LD}' 'XCFLAGS=${CFLAGS}' 'XLDFLAGS=${LDFLAGS} -Wl,-soname=libjs'" - -PARALLEL_MAKE = "" - -do_compile_prepend() { - cp ${WORKDIR}/jsautocfg.h ${S}/ -} - -do_compile() { - oe_runmake -f Makefile.ref JS_READLINE=1 JS_EDITLINE=1 PREBUILT_CPUCFG=1 -} - -do_install() { - install -d ${D}${libdir} - install -d ${D}${includedir} - install -d ${D}${includedir}/js - oe_libinstall -so -C Linux_All_DBG.OBJ libjs ${D}${libdir} - install -m 0644 ${S}/*.h ${D}${includedir}/js -} diff --git a/meta/packages/js/js_1.7.0+1.8.0rc1.bb b/meta/packages/js/js_1.7.0+1.8.0rc1.bb new file mode 100644 index 000000000..36ad11d1f --- /dev/null +++ b/meta/packages/js/js_1.7.0+1.8.0rc1.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "Spidermonkey: a javascript engine written in C" +HOMEPAGE = "http://www.mozilla.org/js/spidermonkey/" +SECTION = "libs" + +# the package is licensed under either of the following +LICENSE = "MPL1.1 | GPLv2+ | LGPLv2.1+" +LIC_FILES_CHKSUM = "file://jsapi.c;beginline=4;endline=39;md5=347c6bbf4fb4547de1fa5ad830030063" +PR = "r0" + +SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/js/js-1.8.0-rc1.tar.gz \ + file://link_with_gcc.patch \ + file://usepic.patch \ + file://buildcc.patch;striplevel=2 \ + file://jsautocfg.h" + +S = "${WORKDIR}/js/src" + +EXTRA_OEMAKE = "'CC=${CC}' 'LD=${LD}' 'XCFLAGS=${CFLAGS}' 'XLDFLAGS=${LDFLAGS} -Wl,-soname=libjs' \ + 'BUILD_CC=${BUILD_CC}' 'BUILD_CFLAGS=${BUILD_CFLAGS}' 'BUILD_LDFLAGS=${BUILD_LDFLAGS}'" + +PARALLEL_MAKE = "" + +# XXX: this is only guaranteed to work for i386 targets! +do_compile_prepend() { + cp ${WORKDIR}/jsautocfg.h ${S}/ +} + +do_compile() { + oe_runmake -f Makefile.ref JS_EDITLINE=1 PREBUILT_CPUCFG=1 BUILD_OPT=1 +} + +do_install() { + install -d ${D}${libdir} + install -d ${D}${includedir} + install -d ${D}${includedir}/js + oe_libinstall -so -C Linux_All_OPT.OBJ libjs ${D}${libdir} + install -m 0644 ${S}/*.h ${D}${includedir}/js +} + +FILES_${PN} = "${libdir}/lib*.so" +FILES_${PN}-dev = "${includedir} ${libdir}/lib*.a" + -- cgit v1.2.3