summaryrefslogtreecommitdiffstats
path: root/meta/packages/js
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/js')
-rw-r--r--meta/packages/js/files/host-cc.patch16
-rw-r--r--meta/packages/js/files/jsautocfg.h52
-rw-r--r--meta/packages/js/js_1.5.bb36
3 files changed, 104 insertions, 0 deletions
diff --git a/meta/packages/js/files/host-cc.patch b/meta/packages/js/files/host-cc.patch
new file mode 100644
index 0000000000..78a1e1b5a0
--- /dev/null
+++ b/meta/packages/js/files/host-cc.patch
@@ -0,0 +1,16 @@
1diff -urNd smjs-1.5-r0/js/src/Makefile.ref smjs-1.5-r0.new/js/src/Makefile.ref
2--- smjs-1.5-r0/js/src/Makefile.ref 2003-11-15 00:10:55.000000000 +0000
3+++ smjs-1.5-r0.new/js/src/Makefile.ref 2006-01-31 23:43:16.000000000 +0000
4@@ -317,8 +317,11 @@
5 rm -f $@
6 $(OBJDIR)/jscpucfg > $@
7
8+$(OBJDIR)/jscpucfg.o: jscpucfg.c jscpucfg.h
9+ $(HOST_CC) -o $@ $(CFLAGS) $(LDFLAGS) jscpucfg.c
10+
11 $(OBJDIR)/jscpucfg: $(OBJDIR)/jscpucfg.o
12- $(CC) -o $@ $(OBJDIR)/jscpucfg.o
13+ $(HOST_CC) -o $@ $(OBJDIR)/jscpucfg.o
14
15 # Look in OBJDIR to find jsautocfg.h
16 INCLUDES += -I$(OBJDIR)
diff --git a/meta/packages/js/files/jsautocfg.h b/meta/packages/js/files/jsautocfg.h
new file mode 100644
index 0000000000..ac786dcdad
--- /dev/null
+++ b/meta/packages/js/files/jsautocfg.h
@@ -0,0 +1,52 @@
1#ifndef js_cpucfg___
2#define js_cpucfg___
3
4/* AUTOMATICALLY GENERATED - DO NOT EDIT */
5
6#define IS_LITTLE_ENDIAN 1
7#undef IS_BIG_ENDIAN
8
9#define JS_BYTES_PER_BYTE 1L
10#define JS_BYTES_PER_SHORT 2L
11#define JS_BYTES_PER_INT 4L
12#define JS_BYTES_PER_INT64 8L
13#define JS_BYTES_PER_LONG 8L
14#define JS_BYTES_PER_FLOAT 4L
15#define JS_BYTES_PER_DOUBLE 8L
16#define JS_BYTES_PER_WORD 4L
17#define JS_BYTES_PER_DWORD 8L
18
19#define JS_BITS_PER_BYTE 8L
20#define JS_BITS_PER_SHORT 16L
21#define JS_BITS_PER_INT 32L
22#define JS_BITS_PER_INT64 64L
23#define JS_BITS_PER_LONG 64L
24#define JS_BITS_PER_FLOAT 32L
25#define JS_BITS_PER_DOUBLE 64L
26#define JS_BITS_PER_WORD 32L
27
28#define JS_BITS_PER_BYTE_LOG2 3L
29#define JS_BITS_PER_SHORT_LOG2 4L
30#define JS_BITS_PER_INT_LOG2 5L
31#define JS_BITS_PER_INT64_LOG2 6L
32#define JS_BITS_PER_LONG_LOG2 6L
33#define JS_BITS_PER_FLOAT_LOG2 5L
34#define JS_BITS_PER_DOUBLE_LOG2 6L
35#define JS_BITS_PER_WORD_LOG2 3L
36
37#define JS_ALIGN_OF_SHORT 2L
38#define JS_ALIGN_OF_INT 4L
39#define JS_ALIGN_OF_LONG 8L
40#define JS_ALIGN_OF_INT64 8L
41#define JS_ALIGN_OF_FLOAT 4L
42#define JS_ALIGN_OF_DOUBLE 8L
43#define JS_ALIGN_OF_POINTER 8L
44#define JS_ALIGN_OF_WORD 4L
45
46#define JS_BYTES_PER_WORD_LOG2 2L
47#define JS_BYTES_PER_DWORD_LOG2 3L
48#define JS_WORDS_PER_DWORD_LOG2 0L
49
50#define JS_STACK_GROWTH_DIRECTION (-1)
51
52#endif /* js_cpucfg___ */
diff --git a/meta/packages/js/js_1.5.bb b/meta/packages/js/js_1.5.bb
new file mode 100644
index 0000000000..040538a8ff
--- /dev/null
+++ b/meta/packages/js/js_1.5.bb
@@ -0,0 +1,36 @@
1LICENSE = "GPL"
2DESCRIPTION = "A JavaScript engine"
3SECTION = "libs"
4DEPENDS = "readline"
5SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/js/js-1.5.tar.gz \
6 file://jsautocfg.h"
7MAINTAINER = "Chris Lord <chris@openedhand.com>"
8
9S = "${WORKDIR}/js/src"
10
11FILES_${PN} = "${libdir}/lib*.so"
12FILES_${PN}-dev = "${includedir} ${libdir}/lib*.a"
13
14EXTRA_OEMAKE = "'CC=${CC}' 'LD=${LD}' 'XCFLAGS=${CFLAGS}' 'XLDFLAGS=-L${STAGING_LIBDIR} -soname=libjs'"
15
16do_compile_prepend() {
17 cp ${WORKDIR}/jsautocfg.h ${S}/
18}
19
20do_compile() {
21 oe_runmake -f Makefile.ref JS_READLINE=1 JS_EDITLINE=1 PREBUILT_CPUCFG=1
22}
23
24do_install() {
25 install -d ${D}${libdir}
26 install -d ${D}${includedir}
27 install -d ${D}${includedir}/js
28 oe_libinstall -so -C Linux_All_DBG.OBJ libjs ${D}${libdir}
29 install -m 0644 ${S}/*.h ${D}${includedir}/js
30}
31
32do_stage() {
33 install -d ${STAGING_INCDIR}/js
34 install -m 0644 ${S}/*.h ${STAGING_INCDIR}/js/
35 oe_libinstall -so -C Linux_All_DBG.OBJ libjs ${STAGING_LIBDIR}
36}