diff options
| author | Marko Lindqvist <cazfi74@gmail.com> | 2013-10-25 08:56:36 +0000 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-10-31 10:27:15 +0100 |
| commit | e9759bfafb9f19b4dafb8c4888097690030ea616 (patch) | |
| tree | 605ab8c9ed4e521c5c2e3f259ce0ec6f65f1b439 | |
| parent | 274147fc56e3f8900547841758930b6aff282069 (diff) | |
| download | meta-openembedded-e9759bfafb9f19b4dafb8c4888097690030ea616.tar.gz | |
lua5.1: apply lua.org patches for lua-5.1.5
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | meta-oe/recipes-devtools/lua/lua5.1/luaorg_1.patch | 18 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch | 44 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/lua/lua5.1_5.1.5.bb | 4 |
3 files changed, 65 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/lua/lua5.1/luaorg_1.patch b/meta-oe/recipes-devtools/lua/lua5.1/luaorg_1.patch new file mode 100644 index 0000000000..b64a6a26bf --- /dev/null +++ b/meta-oe/recipes-devtools/lua/lua5.1/luaorg_1.patch | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | lua.org patch 1 for lua-5.1.5. | ||
| 2 | from http://www.lua.org/bugs.html | ||
| 3 | |||
| 4 | Upstream-Status: Backport | ||
| 5 | |||
| 6 | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> | ||
| 7 | diff -Nurd lua-5.1.5/src/Makefile lua-5.1.5/src/Makefile | ||
| 8 | --- lua-5.1.5/src/Makefile 2012-02-13 22:41:22.000000000 +0200 | ||
| 9 | +++ lua-5.1.5/src/Makefile 2013-10-25 11:29:49.769540434 +0300 | ||
| 10 | @@ -48,7 +48,7 @@ | ||
| 11 | a: $(ALL_A) | ||
| 12 | |||
| 13 | $(LUA_A): $(CORE_O) $(LIB_O) | ||
| 14 | - $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files | ||
| 15 | + $(AR) $@ $(CORE_O) $(LIB_O) | ||
| 16 | $(RANLIB) $@ | ||
| 17 | |||
| 18 | $(LUA_T): $(LUA_O) $(LUA_A) | ||
diff --git a/meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch b/meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch new file mode 100644 index 0000000000..0c48ea2876 --- /dev/null +++ b/meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | lua.org patch 2 for lua-5.1.5. | ||
| 2 | from http://www.lua.org/bugs.html | ||
| 3 | |||
| 4 | Upstream-Status: Backport | ||
| 5 | |||
| 6 | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> | ||
| 7 | diff -Nurd lua-5.1.5/src/lzio.c lua-5.1.5/src/lzio.c | ||
| 8 | --- lua-5.1.5/src/lzio.c 2007-12-27 15:02:25.000000000 +0200 | ||
| 9 | +++ lua-5.1.5/src/lzio.c 2013-10-25 11:32:45.773536572 +0300 | ||
| 10 | @@ -22,10 +22,14 @@ | ||
| 11 | size_t size; | ||
| 12 | lua_State *L = z->L; | ||
| 13 | const char *buff; | ||
| 14 | + if (z->eoz) return EOZ; | ||
| 15 | lua_unlock(L); | ||
| 16 | buff = z->reader(L, z->data, &size); | ||
| 17 | lua_lock(L); | ||
| 18 | - if (buff == NULL || size == 0) return EOZ; | ||
| 19 | + if (buff == NULL || size == 0) { | ||
| 20 | + z->eoz = 1; /* avoid calling reader function next time */ | ||
| 21 | + return EOZ; | ||
| 22 | + } | ||
| 23 | z->n = size - 1; | ||
| 24 | z->p = buff; | ||
| 25 | return char2int(*(z->p++)); | ||
| 26 | @@ -51,6 +55,7 @@ | ||
| 27 | z->data = data; | ||
| 28 | z->n = 0; | ||
| 29 | z->p = NULL; | ||
| 30 | + z->eoz = 0; | ||
| 31 | } | ||
| 32 | |||
| 33 | |||
| 34 | diff -Nurd lua-5.1.5/src/lzio.h lua-5.1.5/src/lzio.h | ||
| 35 | --- lua-5.1.5/src/lzio.h 2007-12-27 15:02:25.000000000 +0200 | ||
| 36 | +++ lua-5.1.5/src/lzio.h 2013-10-25 11:31:50.301537789 +0300 | ||
| 37 | @@ -59,6 +59,7 @@ | ||
| 38 | lua_Reader reader; | ||
| 39 | void* data; /* additional data */ | ||
| 40 | lua_State *L; /* Lua state (for reader) */ | ||
| 41 | + int eoz; /* true if reader has no more data */ | ||
| 42 | }; | ||
| 43 | |||
| 44 | |||
diff --git a/meta-oe/recipes-devtools/lua/lua5.1_5.1.5.bb b/meta-oe/recipes-devtools/lua/lua5.1_5.1.5.bb index 19fee01569..f9469948e4 100644 --- a/meta-oe/recipes-devtools/lua/lua5.1_5.1.5.bb +++ b/meta-oe/recipes-devtools/lua/lua5.1_5.1.5.bb | |||
| @@ -4,12 +4,14 @@ LICENSE = "MIT" | |||
| 4 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=59bdd99bb82238f238cf5c65c21604fd" | 4 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=59bdd99bb82238f238cf5c65c21604fd" |
| 5 | HOMEPAGE = "http://www.lua.org/" | 5 | HOMEPAGE = "http://www.lua.org/" |
| 6 | 6 | ||
| 7 | PR = "r1" | 7 | PR = "r2" |
| 8 | 8 | ||
| 9 | DEPENDS += "readline" | 9 | DEPENDS += "readline" |
| 10 | SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \ | 10 | SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \ |
| 11 | file://bitwise_operators.patch \ | 11 | file://bitwise_operators.patch \ |
| 12 | file://lua5.1.pc \ | 12 | file://lua5.1.pc \ |
| 13 | file://luaorg_1.patch \ | ||
| 14 | file://luaorg_2.patch \ | ||
| 13 | " | 15 | " |
| 14 | S = "${WORKDIR}/lua-${PV}" | 16 | S = "${WORKDIR}/lua-${PV}" |
| 15 | 17 | ||
