aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2013-12-03 11:12:44 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2013-12-21 19:16:51 +0100
commitd2ec4eef07c977e2b30142b4e141436fea295eb1 (patch)
tree6b8b091bda04b7c4c789e4fe9996da6306ebe962 /meta-oe/recipes-devtools
parent3b50ee2fa650d86a4066a09619953cb8efbfe49f (diff)
downloadmeta-openembedded-contrib-d2ec4eef07c977e2b30142b4e141436fea295eb1.tar.gz
meta-openembedded-contrib-d2ec4eef07c977e2b30142b4e141436fea295eb1.tar.bz2
meta-openembedded-contrib-d2ec4eef07c977e2b30142b4e141436fea295eb1.zip
lua: add lua 5.2 recipe
Add lua 5.2.2 recipe. Update: * remove bitwise_operators.patch that lua uses bit32 library to support for bitwise operations. * update uclibc-pthread.patch Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r--meta-oe/recipes-devtools/lua/lua/lua.pc11
-rw-r--r--meta-oe/recipes-devtools/lua/lua/uclibc-pthread.patch13
-rw-r--r--meta-oe/recipes-devtools/lua/lua_5.2.2.bb49
3 files changed, 73 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/lua/lua/lua.pc b/meta-oe/recipes-devtools/lua/lua/lua.pc
new file mode 100644
index 0000000000..e6f8b6f096
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua/lua.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: Lua
+Description: Lua language engine
+Version: 5.2.2
+Requires:
+Libs: -L${libdir} -llua
+Libs.private: -lm
+Cflags: -I${includedir}
diff --git a/meta-oe/recipes-devtools/lua/lua/uclibc-pthread.patch b/meta-oe/recipes-devtools/lua/lua/uclibc-pthread.patch
new file mode 100644
index 0000000000..f4cdc5d8c5
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua/uclibc-pthread.patch
@@ -0,0 +1,13 @@
+Index: lua-5.1.4/src/Makefile
+===================================================================
+--- a/src/Makefile.orig 2013-10-22 22:17:19.929103523 -0400
++++ a/src/Makefile 2013-10-22 22:18:27.992104545 -0400
+@@ -9,7 +9,7 @@
+ CC= gcc
+ CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
+ LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
+-LIBS= -lm $(SYSLIBS) $(MYLIBS)
++LIBS= -lm -lpthread $(SYSLIBS) $(MYLIBS)
+
+ AR= ar rcu
+ RANLIB= ranlib
diff --git a/meta-oe/recipes-devtools/lua/lua_5.2.2.bb b/meta-oe/recipes-devtools/lua/lua_5.2.2.bb
new file mode 100644
index 0000000000..500dd3a774
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua_5.2.2.bb
@@ -0,0 +1,49 @@
+DESCRIPTION = "Lua is a powerful light-weight programming language designed \
+for extending applications."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=364;endline=398;md5=ad3069a42853ac3efd7d379d87f6088b"
+HOMEPAGE = "http://www.lua.org/"
+
+PR = "r0"
+
+DEPENDS = "readline"
+SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \
+ file://lua.pc \
+"
+
+SRC_URI[md5sum] = "efbb645e897eae37cad4344ce8b0a614"
+SRC_URI[sha256sum] = "3fd67de3f5ed133bf312906082fa524545c6b9e1b952e8215ffbd27113f49f00"
+
+inherit pkgconfig binconfig
+
+UCLIBC_PATCHES += "file://uclibc-pthread.patch"
+SRC_URI_append_libc-uclibc = "${UCLIBC_PATCHES}"
+
+TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
+EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -DLUA_USE_LINUX -fPIC' MYLDFLAGS='${LDFLAGS}'"
+
+do_configure_prepend() {
+ sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
+}
+
+do_compile () {
+ oe_runmake linux
+}
+
+do_install () {
+ oe_runmake \
+ 'INSTALL_TOP=${D}${prefix}' \
+ 'INSTALL_BIN=${D}${bindir}' \
+ 'INSTALL_INC=${D}${includedir}/' \
+ 'INSTALL_MAN=${D}${mandir}/man1' \
+ 'INSTALL_SHARE=${D}${datadir}/lua' \
+ 'INSTALL_LIB=${D}${libdir}' \
+ 'INSTALL_CMOD=${D}${libdir}/lua/5.2' \
+ install
+ install -d ${D}${libdir}/pkgconfig
+ install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
+ rmdir ${D}${datadir}/lua/5.2
+ rmdir ${D}${datadir}/lua
+}
+
+BBCLASSEXTEND = "native"