diff options
-rw-r--r-- | meta-oe/recipes-devtools/lua/lua/lua.pc | 11 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/lua/lua/uclibc-pthread.patch | 13 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/lua/lua_5.2.2.bb | 49 |
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 @@ | |||
1 | prefix=/usr | ||
2 | libdir=${prefix}/lib | ||
3 | includedir=${prefix}/include | ||
4 | |||
5 | Name: Lua | ||
6 | Description: Lua language engine | ||
7 | Version: 5.2.2 | ||
8 | Requires: | ||
9 | Libs: -L${libdir} -llua | ||
10 | Libs.private: -lm | ||
11 | 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 000000000..f4cdc5d8c --- /dev/null +++ b/meta-oe/recipes-devtools/lua/lua/uclibc-pthread.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | Index: 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 @@ | |||
1 | DESCRIPTION = "Lua is a powerful light-weight programming language designed \ | ||
2 | for extending applications." | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=364;endline=398;md5=ad3069a42853ac3efd7d379d87f6088b" | ||
5 | HOMEPAGE = "http://www.lua.org/" | ||
6 | |||
7 | PR = "r0" | ||
8 | |||
9 | DEPENDS = "readline" | ||
10 | SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \ | ||
11 | file://lua.pc \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[md5sum] = "efbb645e897eae37cad4344ce8b0a614" | ||
15 | SRC_URI[sha256sum] = "3fd67de3f5ed133bf312906082fa524545c6b9e1b952e8215ffbd27113f49f00" | ||
16 | |||
17 | inherit pkgconfig binconfig | ||
18 | |||
19 | UCLIBC_PATCHES += "file://uclibc-pthread.patch" | ||
20 | SRC_URI_append_libc-uclibc = "${UCLIBC_PATCHES}" | ||
21 | |||
22 | TARGET_CC_ARCH += " -fPIC ${LDFLAGS}" | ||
23 | EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -DLUA_USE_LINUX -fPIC' MYLDFLAGS='${LDFLAGS}'" | ||
24 | |||
25 | do_configure_prepend() { | ||
26 | sed -i -e s:/usr/local:${prefix}:g src/luaconf.h | ||
27 | } | ||
28 | |||
29 | do_compile () { | ||
30 | oe_runmake linux | ||
31 | } | ||
32 | |||
33 | do_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 | |||
49 | BBCLASSEXTEND = "native" | ||