1*8460358cSPatrick WilliamsSUMMARY = "Lua is a powerful light-weight programming language designed \
2*8460358cSPatrick Williamsfor extending applications."
3*8460358cSPatrick WilliamsLICENSE = "MIT"
4*8460358cSPatrick WilliamsLIC_FILES_CHKSUM = "file://doc/readme.html;beginline=305;endline=326;md5=344ad98880a7ee9ff6e1498a519a7c76"
5*8460358cSPatrick WilliamsHOMEPAGE = "http://www.lua.org/"
6*8460358cSPatrick Williams
7*8460358cSPatrick WilliamsSRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
8*8460358cSPatrick Williams file://lua.pc.in \
9*8460358cSPatrick Williams ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest file://run-ptest ', '', d)} \
10*8460358cSPatrick Williams "
11*8460358cSPatrick Williams
12*8460358cSPatrick Williams# if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
13*8460358cSPatrick WilliamsPV_testsuites = "${PV}"
14*8460358cSPatrick Williams
15*8460358cSPatrick WilliamsSRC_URI[tarballsrc.sha256sum] = "9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30"
16*8460358cSPatrick WilliamsSRC_URI[tarballtest.sha256sum] = "8a4898ffe4c7613c8009327a0722db7a41ef861d526c77c5b46114e59ebf811e"
17*8460358cSPatrick Williams
18*8460358cSPatrick Williamsinherit pkgconfig binconfig ptest
19*8460358cSPatrick Williams
20*8460358cSPatrick WilliamsPACKAGECONFIG ??= "readline"
21*8460358cSPatrick WilliamsPACKAGECONFIG[readline] = ",,readline"
22*8460358cSPatrick Williams
23*8460358cSPatrick WilliamsTARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
24*8460358cSPatrick WilliamsEXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}' 'AR=ar rcD' 'RANLIB=ranlib -D'"
25*8460358cSPatrick Williams
26*8460358cSPatrick Williamsdo_configure:prepend() {
27*8460358cSPatrick Williams sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
28*8460358cSPatrick Williams sed -i -e s:lib/lua/:${baselib}/lua/:g src/luaconf.h
29*8460358cSPatrick Williams}
30*8460358cSPatrick Williams
31*8460358cSPatrick Williamsdo_compile () {
32*8460358cSPatrick Williams oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux-readline', 'linux', d)}
33*8460358cSPatrick Williams}
34*8460358cSPatrick Williams
35*8460358cSPatrick Williamsdo_install () {
36