diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/lua/files/advanced-readline.patch | 0 | ||||
-rw-r--r-- | packages/lua/lua-build.inc | 39 | ||||
-rw-r--r-- | packages/lua/lua.inc | 23 | ||||
-rw-r--r-- | packages/lua/lua_5.0.2.bb | 12 |
4 files changed, 74 insertions, 0 deletions
diff --git a/packages/lua/files/advanced-readline.patch b/packages/lua/files/advanced-readline.patch new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/lua/files/advanced-readline.patch diff --git a/packages/lua/lua-build.inc b/packages/lua/lua-build.inc index e69de29bb2..fed15f1841 100644 --- a/packages/lua/lua-build.inc +++ b/packages/lua/lua-build.inc @@ -0,0 +1,39 @@ +LOADLIB = "-DUSE_DLOPEN=1 -fPIC" +DLLIB = "-ldl" +MYLDFLAGS = "${LDFLAGS} -Wl,-E" +MYCFLAGS = "${CFLAGS}" +USERCONF = '-DLUA_USERCONFIG="\"$(LUA)/etc/saconfig.c\"" -DUSE_READLINE' +# EXTRA_LIBS= "-lm -ldl -lreadline # -lhistory -lcurses -lncurses" +EXTRA_LIBS= "-lm -ldl -lreadline" + +EXTRA_OEMAKE = "'CC=${CC}' 'MYCFLAGS=${MYCFLAGS}' \ + 'MYLDFLAGS=${MYLDFLAGS}' 'WARN=' \ + 'INSTALL_EXEC=install -m 0755' \ + 'INSTALL_DATA=install -m 0644' \ + 'STRIP=echo' 'RANLIB=${RANLIB}' \ + 'AR=${AR} rcu' 'LD=${LD}' \ + 'LOADLIB=${LOADLIB}' 'DLLIB=${DLLIB}' \ + 'USERCONF=${USERCONF}' 'EXTRA_LIBS=${EXTRA_LIBS}' \ + 'INSTALL_ROOT=${prefix}' 'INSTALL_BIN=${bindir}' \ + 'INSTALL_INC=${includedir}' 'INSTALL_MAN=${mandir}/man1' \ + 'INSTALL_SHARE=${datadir}/lua'" + +do_compile () { + oe_runmake all so sobin +} + +do_stage () { + oe_libinstall -C lib liblua ${STAGING_LIBDIR}/ + oe_libinstall -C lib liblualib ${STAGING_LIBDIR}/ + install -m 0644 include/lua.h include/lualib.h ${STAGING_INCDIR}/ +} + +do_install () { + oe_runmake \ + 'INSTALL_ROOT=${D}${prefix}' \ + 'INSTALL_BIN=${D}${bindir}' \ + 'INSTALL_INC=${D}${includedir}' \ + 'INSTALL_MAN=${D}${mandir}/man1' \ + 'INSTALL_SHARE=${D}${datadir}/lua' \ + install soinstall +} diff --git a/packages/lua/lua.inc b/packages/lua/lua.inc index e69de29bb2..652491d522 100644 --- a/packages/lua/lua.inc +++ b/packages/lua/lua.inc @@ -0,0 +1,23 @@ +DESCRIPTION = "Lua is a powerful light-weight programming language designed \ +for extending applications." +LICENSE = "MIT" +HOMEPAGE = "http://www.lua.org/" +MAINTAINER = "Chris Larson <kergoth@handhelds.org>" +DEPENDS += "readline" + +PACKAGES = "${PN} liblua ${PN}-doc liblua-dev \ + liblualib liblualib-dev" +FILES_${PN} = "${bindir}/lua ${bindir}/luac" +FILES_${PN}-doc = "${mandir}/man1/lua.1 ${mandir}/man1/luac.1" +FILES_liblua = "${libdir}/liblua.so.*" +FILES_liblua-dev = "${libdir}/liblua.so ${libdir}/liblua.a \ + ${includedir}/lua.h" +FILES_liblualib = "${libdir}/liblualib.so.*" +FILES_liblualib-dev = "${libdir}/liblualib.so ${libdir}/liblualib.a \ + ${includedir}/lualib.h" +SECTION_${PN} = "interpreters" +SECTION_${PN}-doc = "doc" +SECTION_liblua = "libs" +SECTION_liblua-dev = "devel" +SECTION_liblualib = "libs" +SECTION_liblualib-dev = "devel" diff --git a/packages/lua/lua_5.0.2.bb b/packages/lua/lua_5.0.2.bb index e69de29bb2..05266eba0a 100644 --- a/packages/lua/lua_5.0.2.bb +++ b/packages/lua/lua_5.0.2.bb @@ -0,0 +1,12 @@ +include lua.inc + +PR = "r1" +SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \ + file://debian.patch;patch=1 \ + file://make.patch;patch=1 \ + file://advanced-readline.patch;patch=1" +# http://lua-users.org/files/wiki_insecure/power_patches/5.0/advanced-readline.patch;patch=1" +S = "${WORKDIR}/lua-${PV}" +FILESPATH = "${FILE_DIRNAME}/lua-${PV}:${FILE_DIRNAME}/lua:${FILE_DIRNAME}/files" + +include lua-build.inc |