summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 000000000..e6f8b6f09
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua/lua.pc
@@ -0,0 +1,11 @@
1prefix=/usr
2libdir=${prefix}/lib
3includedir=${prefix}/include
4
5Name: Lua
6Description: Lua language engine
7Version: 5.2.2
8Requires:
9Libs: -L${libdir} -llua
10Libs.private: -lm
11Cflags: -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 000000000..f4cdc5d8c
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua/uclibc-pthread.patch
@@ -0,0 +1,13 @@
1Index: lua-5.1.4/src/Makefile
2===================================================================
3--- a/src/Makefile.orig 2013-10-22 22:17:19.929103523 -0400
4+++ a/src/Makefile 2013-10-22 22:18:27.992104545 -0400
5@@ -9,7 +9,7 @@
6 CC= gcc
7 CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
8 LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
9-LIBS= -lm $(SYSLIBS) $(MYLIBS)
10+LIBS= -lm -lpthread $(SYSLIBS) $(MYLIBS)
11
12 AR= ar rcu
13 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 000000000..500dd3a77
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua_5.2.2.bb
@@ -0,0 +1,49 @@
1DESCRIPTION = "Lua is a powerful light-weight programming language designed \
2for extending applications."
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=364;endline=398;md5=ad3069a42853ac3efd7d379d87f6088b"
5HOMEPAGE = "http://www.lua.org/"
6
7PR = "r0"
8
9DEPENDS = "readline"
10SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \
11 file://lua.pc \
12"
13
14SRC_URI[md5sum] = "efbb645e897eae37cad4344ce8b0a614"
15SRC_URI[sha256sum] = "3fd67de3f5ed133bf312906082fa524545c6b9e1b952e8215ffbd27113f49f00"
16
17inherit pkgconfig binconfig
18
19UCLIBC_PATCHES += "file://uclibc-pthread.patch"
20SRC_URI_append_libc-uclibc = "${UCLIBC_PATCHES}"
21
22TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
23EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -DLUA_USE_LINUX -fPIC' MYLDFLAGS='${LDFLAGS}'"
24
25do_configure_prepend() {
26 sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
27}
28
29do_compile () {
30 oe_runmake linux
31}
32
33do_install () {
34 oe_runmake \
35 'INSTALL_TOP=${D}${prefix}' \
36 'INSTALL_BIN=${D}${bindir}' \
37 'INSTALL_INC=${D}${includedir}/' \
38 'INSTALL_MAN=${D}${mandir}/man1' \
39 'INSTALL_SHARE=${D}${datadir}/lua' \
40 'INSTALL_LIB=${D}${libdir}' \
41 'INSTALL_CMOD=${D}${libdir}/lua/5.2' \
42 install
43 install -d ${D}${libdir}/pkgconfig
44 install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
45 rmdir ${D}${datadir}/lua/5.2
46 rmdir ${D}${datadir}/lua
47}
48
49BBCLASSEXTEND = "native"