summaryrefslogtreecommitdiff
path: root/openembedded/packages/js/js_1.5.bb
blob: 5af1441e3686b1aa83143a1e38ae2c0bc2761c70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
LICENSE = "GPL"
DESCRIPTION = "A JavaScript engine"
SECTION = "libs"
DEPENDS = "readline"
SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/js/js-1.5.tar.gz \
	   file://jsautocfg.h"
MAINTAINER = "Chris Lord <chris@openedhand.com>"

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=-L${STAGING_LIBDIR}'"

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
	install -m 0644 ${S}/Linux_All_DBG.OBJ/lib*.so ${D}${libdir}
	install -m 0644 ${S}/Linux_All_DBG.OBJ/lib*.a ${D}${libdir}
	install -m 0644 ${S}/*.h ${D}${includedir}/js
}

do_stage() {
	install -d ${STAGING_INCDIR}/js
	install -m 0644 ${S}/*.h ${STAGING_INCDIR}/js/
	oe_libinstall -so -C Linux_All_DBG.OBJ libjs ${STAGING_LIBDIR}
}