diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:11 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:57 +0100 |
commit | d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch) | |
tree | f36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-support/js | |
parent | caab7fc509bf27706ff3248689f6afd04225cfda (diff) | |
download | openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.bz2 openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.zip |
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-support/js')
-rw-r--r-- | meta/recipes-support/js/files/buildcc.patch | 20 | ||||
-rw-r--r-- | meta/recipes-support/js/files/configure.ac | 28 | ||||
-rw-r--r-- | meta/recipes-support/js/files/jsautocfg.h | 74 | ||||
-rw-r--r-- | meta/recipes-support/js/files/link_with_gcc.patch | 13 | ||||
-rw-r--r-- | meta/recipes-support/js/files/usepic.patch | 24 | ||||
-rw-r--r-- | meta/recipes-support/js/js_1.7.0+1.8.0rc1.bb | 47 |
6 files changed, 206 insertions, 0 deletions
diff --git a/meta/recipes-support/js/files/buildcc.patch b/meta/recipes-support/js/files/buildcc.patch new file mode 100644 index 0000000000..26eef218d6 --- /dev/null +++ b/meta/recipes-support/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 <qing.he@intel.com> + +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/recipes-support/js/files/configure.ac b/meta/recipes-support/js/files/configure.ac new file mode 100644 index 0000000000..41af298455 --- /dev/null +++ b/meta/recipes-support/js/files/configure.ac @@ -0,0 +1,28 @@ +AC_INIT + +AC_CHECK_SIZEOF([char]) +AC_CHECK_SIZEOF([short]) +AC_CHECK_SIZEOF([int]) +AC_CHECK_SIZEOF([int64_t]) +AC_CHECK_SIZEOF([long]) +AC_CHECK_SIZEOF([long long]) +AC_CHECK_SIZEOF([int *]) +AC_CHECK_SIZEOF([float]) +AC_CHECK_SIZEOF([double]) + +AC_CHECK_ALIGNOF([char]) +AC_CHECK_ALIGNOF([short]) +AC_CHECK_ALIGNOF([int]) +AC_CHECK_ALIGNOF([int64_t]) +AC_CHECK_ALIGNOF([long]) +AC_CHECK_ALIGNOF([long long]) +AC_CHECK_ALIGNOF([int *]) +AC_CHECK_ALIGNOF([float]) +AC_CHECK_ALIGNOF([double]) + +AC_C_BIGENDIAN + +AC_TYPE_LONG_LONG_INT + +AC_CONFIG_HEADER([conf.h]) +AC_OUTPUT diff --git a/meta/recipes-support/js/files/jsautocfg.h b/meta/recipes-support/js/files/jsautocfg.h new file mode 100644 index 0000000000..16e38bf8d6 --- /dev/null +++ b/meta/recipes-support/js/files/jsautocfg.h @@ -0,0 +1,74 @@ +#ifndef js_cpucfg___ +#define js_cpucfg___ + +/* AUTOMATICALLY GENERATED - DO NOT EDIT */ + +#include "../conf.h" + +#ifdef WORDS_BIGENDIAN +# undef IS_LITTLE_ENDIAN +# define IS_BIG_ENDIAN 1 +#else +# define IS_LITTLE_ENDIAN 1 +# undef IS_BIG_ENDIAN +#endif + +#define __I_LOG2(n) ( \ + ((n) == 1)? 0: \ + ((n) == 2)? 1: \ + ((n) == 4)? 2: \ + ((n) == 8)? 3: \ + ((n) == 16)? 4: \ + ((n) == 32)? 5: \ + ((n) == 64)? 6: \ + ((n) == 128)? 7: \ + -1) + +#define JS_BYTES_PER_BYTE SIZEOF_CHAR +#define JS_BYTES_PER_SHORT SIZEOF_SHORT +#define JS_BYTES_PER_INT SIZEOF_INT +#define JS_BYTES_PER_INT64 SIZEOF_INT64_T +#define JS_BYTES_PER_LONG SIZEOF_LONG +#define JS_BYTES_PER_FLOAT SIZEOF_FLOAT +#define JS_BYTES_PER_DOUBLE SIZEOF_DOUBLE +#define JS_BYTES_PER_WORD SIZEOF_LONG +#define JS_BYTES_PER_DWORD SIZEOF_LONG_LONG + +#define JS_BITS_PER_BYTE 8L +#define JS_BITS_PER_SHORT (JS_BITS_PER_BYTE * JS_BYTES_PER_SHORT) +#define JS_BITS_PER_INT (JS_BITS_PER_BYTE * JS_BYTES_PER_INT) +#define JS_BITS_PER_INT64 (JS_BITS_PER_BYTE * JS_BYTES_PER_INT64) +#define JS_BITS_PER_LONG (JS_BITS_PER_BYTE * JS_BYTES_PER_LONG) +#define JS_BITS_PER_FLOAT (JS_BITS_PER_BYTE * JS_BYTES_PER_GLOAT) +#define JS_BITS_PER_DOUBLE (JS_BITS_PER_BYTE * JS_BYTES_PER_DOUBLE) +#define JS_BITS_PER_WORD (JS_BITS_PER_BYTE * JS_BYTES_PER_WORD) + +#define JS_BITS_PER_BYTE_LOG2 __I_LOG2(JS_BITS_PER_BYTE) +#define JS_BITS_PER_SHORT_LOG2 __I_LOG2(JS_BITS_PER_BYTE) +#define JS_BITS_PER_INT_LOG2 __I_LOG2(JS_BITS_PER_BYTE) +#define JS_BITS_PER_INT64_LOG2 __I_LOG2(JS_BITS_PER_BYTE) +#define JS_BITS_PER_LONG_LOG2 __I_LOG2(JS_BITS_PER_BYTE) +#define JS_BITS_PER_FLOAT_LOG2 __I_LOG2(JS_BITS_PER_BYTE) +#define JS_BITS_PER_DOUBLE_LOG2 __I_LOG2(JS_BITS_PER_BYTE) +#define JS_BITS_PER_WORD_LOG2 __I_LOG2(JS_BITS_PER_BYTE) + +#define JS_ALIGN_OF_SHORT ALIGNOF_SHORT +#define JS_ALIGN_OF_INT ALIGNOF_INT +#define JS_ALIGN_OF_LONG ALIGNOF_LONG +#define JS_ALIGN_OF_INT64 ALIGNOF_INT64_T +#define JS_ALIGN_OF_FLOAT ALIGNOF_FLOAT +#define JS_ALIGN_OF_DOUBLE ALIGNOF_DOUBLE +#define JS_ALIGN_OF_POINTER ALIGNOF_INT_P +#define JS_ALIGN_OF_WORD ALIGNOF_LONG + +#define JS_BYTES_PER_WORD_LOG2 __I_LOG2(JS_BYTES_PER_WORD) +#define JS_BYTES_PER_DWORD_LOG2 __I_LOG2(JS_BYTES_PER_DWORDS) +#define JS_WORDS_PER_DWORD_LOG2 __I_LOG2(JS_BYTES_PER_DWORDS / JS_BYTES_PER_WORD) + +#define JS_STACK_GROWTH_DIRECTION (-1) + +#ifdef HAVE_LONG_LONG_INT +# define JS_HAVE_LONG_LONG +#endif + +#endif /* js_cpucfg___ */ diff --git a/meta/recipes-support/js/files/link_with_gcc.patch b/meta/recipes-support/js/files/link_with_gcc.patch new file mode 100644 index 0000000000..d74b94f378 --- /dev/null +++ b/meta/recipes-support/js/files/link_with_gcc.patch @@ -0,0 +1,13 @@ +Index: src/config/Linux_All.mk +=================================================================== +--- src.orig/config/Linux_All.mk 2005-05-10 19:53:44.000000000 +0000 ++++ src/config/Linux_All.mk 2007-06-18 17:20:05.000000000 +0000 +@@ -47,7 +47,7 @@ + OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R + + RANLIB = echo +-MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS) ++MKSHLIB = $(CC) -shared $(XMKSHLIBOPTS) + + #.c.o: + # $(CC) -c -MD $*.d $(CFLAGS) $< diff --git a/meta/recipes-support/js/files/usepic.patch b/meta/recipes-support/js/files/usepic.patch new file mode 100644 index 0000000000..ddd31be9cb --- /dev/null +++ b/meta/recipes-support/js/files/usepic.patch @@ -0,0 +1,24 @@ +Mips needs -fPIC to compile properly. These tests are broken anyway as they test +the build system architecture, not the target. This is a hack. + +RP 10/6/2010 + +Index: src/config/Linux_All.mk +=================================================================== +--- src.orig/config/Linux_All.mk 2010-06-10 22:09:43.000000000 +0100 ++++ src/config/Linux_All.mk 2010-06-10 22:09:55.000000000 +0100 +@@ -90,14 +90,10 @@ + # Use the editline library to provide line-editing support. + JS_EDITLINE = 1 + +-ifeq ($(CPU_ARCH),x86_64) + # Use VA_COPY() standard macro on x86-64 + # FIXME: better use it everywhere + OS_CFLAGS += -DHAVE_VA_COPY -DVA_COPY=va_copy +-endif + +-ifeq ($(CPU_ARCH),x86_64) + # We need PIC code for shared libraries + # FIXME: better patch rules.mk & fdlibm/Makefile* + OS_CFLAGS += -DPIC -fPIC +-endif diff --git a/meta/recipes-support/js/js_1.7.0+1.8.0rc1.bb b/meta/recipes-support/js/js_1.7.0+1.8.0rc1.bb new file mode 100644 index 0000000000..97cba90d03 --- /dev/null +++ b/meta/recipes-support/js/js_1.7.0+1.8.0rc1.bb @@ -0,0 +1,47 @@ +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 = "r1" + +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 \ + file://configure.ac" + +S = "${WORKDIR}/js/src" + +# use local autoconf script to generate a usable jsautocfg.h +# don't bother with automake +inherit autotools + +do_configure_prepend() { + cp -f ${WORKDIR}/configure.ac ${S} + cp -f ${WORKDIR}/jsautocfg.h ${S} +} + +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 = "" + +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" + |