diff options
author | Khem Raj <raj.khem@gmail.com> | 2013-01-05 19:41:10 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2013-01-08 09:31:45 -0800 |
commit | 9aecf2944ea8646dfce4085622b4cc6427d2140c (patch) | |
tree | 9d2f14a3e856513d5e926715a494949bcb107765 /meta-oe/recipes-devtools | |
parent | 8925d39d3697196ee7ca77b1c8ffe5901e41da1c (diff) | |
download | meta-openembedded-9aecf2944ea8646dfce4085622b4cc6427d2140c.tar.gz |
luajit: Add recipes
LuaJIT is for JIT'ting LUA code
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r-- | meta-oe/recipes-devtools/luajit/luajit-2.0.0/disable_lj_vm_foldarith_for_spe.patch | 13 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb | 53 |
2 files changed, 66 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/luajit/luajit-2.0.0/disable_lj_vm_foldarith_for_spe.patch b/meta-oe/recipes-devtools/luajit/luajit-2.0.0/disable_lj_vm_foldarith_for_spe.patch new file mode 100644 index 000000000..c96fc77c7 --- /dev/null +++ b/meta-oe/recipes-devtools/luajit/luajit-2.0.0/disable_lj_vm_foldarith_for_spe.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | Index: LuaJIT-2.0.0/src/lj_vmmath.c | ||
2 | =================================================================== | ||
3 | --- LuaJIT-2.0.0.orig/src/lj_vmmath.c 2012-11-08 02:10:00.000000000 -0800 | ||
4 | +++ LuaJIT-2.0.0/src/lj_vmmath.c 2012-11-19 22:15:28.613527136 -0800 | ||
5 | @@ -22,7 +22,7 @@ | ||
6 | LJ_FUNCA double lj_vm_tanh(double x) { return tanh(x); } | ||
7 | #endif | ||
8 | |||
9 | -#if !LJ_TARGET_X86ORX64 | ||
10 | +#if !(LJ_TARGET_X86ORX64 || LJ_TARGET_PPCSPE) | ||
11 | double lj_vm_foldarith(double x, double y, int op) | ||
12 | { | ||
13 | switch (op) { | ||
diff --git a/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb b/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb new file mode 100644 index 000000000..ac769cf44 --- /dev/null +++ b/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb | |||
@@ -0,0 +1,53 @@ | |||
1 | DESCRIPTION = " a Just-In-Time Compiler for Lua" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=9511885992e4900014e3b13ca6372b7d" | ||
4 | HOMEPAGE = "http://luajit.org" | ||
5 | |||
6 | DEPENDS += "lua5.1" | ||
7 | PR = "r0" | ||
8 | SRC_URI = "http://luajit.org/download/LuaJIT-${PV}.tar.gz \ | ||
9 | file://disable_lj_vm_foldarith_for_spe.patch \ | ||
10 | " | ||
11 | SRC_URI[md5sum] = "97a2b87cc0490784f54b64cfb3b8f5ad" | ||
12 | SRC_URI[sha256sum] = "deaed645c4a093c5fb250c30c9933c9131ee05c94b13262d58f6e0b60b338c15" | ||
13 | |||
14 | S = "${WORKDIR}/LuaJIT-${PV}" | ||
15 | |||
16 | inherit pkgconfig binconfig | ||
17 | |||
18 | do_configure_prepend() { | ||
19 | sed -i -e s:/usr/local:${prefix}:g ${S}/Makefile | ||
20 | sed -i -e s:/lib:${base_libdir}:g ${S}/Makefile | ||
21 | } | ||
22 | |||
23 | EXTRA_OEMAKE = 'CROSS=${HOST_PREFIX}' | ||
24 | EXTRA_OEMAKE_append_powerpc = ' HOST_CC="${BUILD_CC} -m32"' | ||
25 | EXTRA_OEMAKE_append_x86-64 = ' HOST_CC="${BUILD_CC}"' | ||
26 | EXTRA_OEMAKE_append_i586 = ' HOST_CC="${BUILD_CC} -m32"' | ||
27 | EXTRA_OEMAKE_append_powerpc64 = ' HOST_CC="${BUILD_CC}"' | ||
28 | EXTRA_OEMAKE_append_arm = ' HOST_CC="${BUILD_CC} -m32"' | ||
29 | EXTRA_OEMAKE_append_mips64 = ' HOST_CC="${BUILD_CC} -m32"' | ||
30 | |||
31 | do_compile () { | ||
32 | oe_runmake | ||
33 | } | ||
34 | |||
35 | do_install () { | ||
36 | oe_runmake 'DESTDIR=${D}' install | ||
37 | rmdir ${D}${datadir}/lua/5.1 \ | ||
38 | ${D}${datadir}/lua \ | ||
39 | ${D}${libdir}/lua/5.1 \ | ||
40 | ${D}${libdir}/lua | ||
41 | } | ||
42 | |||
43 | PACKAGES += 'luajit-common' | ||
44 | |||
45 | FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \ | ||
46 | ${libdir}/libluajit-5.1.so.2.0.0 \ | ||
47 | " | ||
48 | FILES_${PN}-dev += "${libdir}/libluajit-5.1.a \ | ||
49 | ${libdir}/libluajit-5.1.so \ | ||
50 | ${libdir}/pkgconfig/luajit.pc \ | ||
51 | " | ||
52 | FILES_luajit-common = "${datadir}/${BPN}-${PV}" | ||
53 | |||