summaryrefslogtreecommitdiff
path: root/recipes/lua
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-09-24 11:27:54 +0200
committerKoen Kooi <koen@openembedded.org>2009-09-24 12:14:55 +0200
commitbdc8f0323b05966c3533ab72614ddafe257a8352 (patch)
tree9b99da7e609ba1eaab7ef1ff789a8d79c77eaca3 /recipes/lua
parent6d1554ecf044484e5e21e34f4b9700e07562cf64 (diff)
lua 5.1: attempt to get in in a buildable state again
Diffstat (limited to 'recipes/lua')
-rw-r--r--recipes/lua/lua5.1-native_5.1.4.bb11
-rw-r--r--recipes/lua/lua5.1/lua5.1.pc4
-rw-r--r--recipes/lua/lua5.1/makefile.patch22
-rw-r--r--recipes/lua/lua5.1_5.1.4.bb20
4 files changed, 24 insertions, 33 deletions
diff --git a/recipes/lua/lua5.1-native_5.1.4.bb b/recipes/lua/lua5.1-native_5.1.4.bb
new file mode 100644
index 0000000000..35afb55662
--- /dev/null
+++ b/recipes/lua/lua5.1-native_5.1.4.bb
@@ -0,0 +1,11 @@
+require lua5.1_${PV}.bb
+inherit native
+
+DEPENDS = "readline-native"
+
+do_stage () {
+ oe_libinstall -C src liblua ${STAGING_LIBDIR}/
+ install -d ${STAGING_INCDIR}/
+ install -m 0644 src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h ${STAGING_INCDIR}/
+}
+
diff --git a/recipes/lua/lua5.1/lua5.1.pc b/recipes/lua/lua5.1/lua5.1.pc
index df8eb15c0f..80db250b7c 100644
--- a/recipes/lua/lua5.1/lua5.1.pc
+++ b/recipes/lua/lua5.1/lua5.1.pc
@@ -6,6 +6,6 @@ Name: Lua
Description: Lua language engine
Version: 5.1.3
Requires:
-Libs: -L${libdir} -llua5.1
+Libs: -L${libdir} -llua
Libs.private: -lm
-Cflags: -I${includedir}/lua5.1
+Cflags: -I${includedir}
diff --git a/recipes/lua/lua5.1/makefile.patch b/recipes/lua/lua5.1/makefile.patch
deleted file mode 100644
index 569a94421b..0000000000
--- a/recipes/lua/lua5.1/makefile.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- lua-5.1.3.orig/Makefile 2008-08-18 17:59:06.000000000 +0200
-+++ lua-5.1.3/Makefile 2008-08-18 17:59:15.000000000 +0200
-@@ -38,7 +38,7 @@
- # What to install.
- TO_BIN= lua luac
- TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
--TO_LIB= liblua.a
-+TO_LIB= liblua5.1.a
- TO_MAN= lua.1 luac.1
-
- # Lua version and release.
---- lua-5.1.3.orig/src/Makefile 2008-08-18 17:54:30.000000000 +0200
-+++ lua-5.1.3/src/Makefile 2008-08-18 17:54:39.000000000 +0200
-@@ -22,7 +22,7 @@
-
- PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
-
--LUA_A= liblua.a
-+LUA_A= liblua5.1.a
- CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
- lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
- lundump.o lvm.o lzio.o
diff --git a/recipes/lua/lua5.1_5.1.4.bb b/recipes/lua/lua5.1_5.1.4.bb
index b9d26518b2..81ae6cfba6 100644
--- a/recipes/lua/lua5.1_5.1.4.bb
+++ b/recipes/lua/lua5.1_5.1.4.bb
@@ -4,32 +4,34 @@ LICENSE = "MIT"
HOMEPAGE = "http://www.lua.org/"
DEPENDS += "readline"
-PR = "r0"
+PR = "r4"
SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \
- file://makefile.patch;patch=1 \
file://lua5.1.pc"
S = "${WORKDIR}/lua-${PV}"
-inherit binconfig
+inherit pkgconfig binconfig
-EXTRA_OEMAKE = "'CC=${CC}' 'MYCFLAGS=${CFLAGS}' 'MYLDFLAGS=${LDFLAGS}'"
+TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
+EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -DLUA_USE_LINUX -fPIC' MYLDFLAGS='${LDFLAGS}'"
do_compile () {
+ cp ${WORKDIR}/lua5.1.pc ${S}/
oe_runmake linux
}
do_stage () {
- oe_libinstall -C src liblua5.1 ${STAGING_LIBDIR}/
- install -d ${STAGING_INCDIR}/lua5.1
- install -m 0644 src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h ${STAGING_INCDIR}/lua5.1
- install -m 0644 ${WORKDIR}/lua5.1.pc ${STAGING_LIBDIR}/pkgconfig/
+ oe_libinstall -C src liblua ${STAGING_LIBDIR}/
+ install -d ${STAGING_INCDIR}/
+ install -m 0644 src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h ${STAGING_INCDIR}/
+ # the .so ones are broken
+ rm ${STAGING_LIBDIR}/*.so*
}
do_install () {
oe_runmake \
'INSTALL_TOP=${D}${prefix}' \
'INSTALL_BIN=${D}${bindir}' \
- 'INSTALL_INC=${D}${includedir}/lua5.1' \
+ 'INSTALL_INC=${D}${includedir}/' \
'INSTALL_MAN=${D}${mandir}/man1' \
'INSTALL_SHARE=${D}${datadir}/lua' \
install