mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 16:43:09 +02:00
[package] lua: add zlib build dependency, fix inaccuracy in gzip loader
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15109 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a1cd2822b2
commit
9ebc77668e
@ -20,7 +20,7 @@ PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
|
|||||||
PKG_MD5SUM:=d0870f2de55d59c1c8419f36e8fac150
|
PKG_MD5SUM:=d0870f2de55d59c1c8419f36e8fac150
|
||||||
|
|
||||||
HOST_PATCH_DIR=./patches-host
|
HOST_PATCH_DIR=./patches-host
|
||||||
PKG_BUILD_DEPENDS:=lua/host
|
PKG_BUILD_DEPENDS:=lua/host zlib
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/host-build.mk
|
include $(INCLUDE_DIR)/host-build.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -12,7 +12,7 @@ diff -ur lua-5.1.4.orig/src/Makefile lua-5.1.4/src/Makefile
|
|||||||
MYLDFLAGS=
|
MYLDFLAGS=
|
||||||
diff -ur lua-5.1.4.orig/src/lauxlib.c lua-5.1.4/src/lauxlib.c
|
diff -ur lua-5.1.4.orig/src/lauxlib.c lua-5.1.4/src/lauxlib.c
|
||||||
--- lua-5.1.4.orig/src/lauxlib.c 2009-04-04 23:06:04.000000000 +0200
|
--- lua-5.1.4.orig/src/lauxlib.c 2009-04-04 23:06:04.000000000 +0200
|
||||||
+++ lua-5.1.4/src/lauxlib.c 2009-04-05 00:03:33.000000000 +0200
|
+++ lua-5.1.4/src/lauxlib.c 2009-04-05 03:35:24.000000000 +0200
|
||||||
@@ -11,6 +11,7 @@
|
@@ -11,6 +11,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -34,7 +34,7 @@ diff -ur lua-5.1.4.orig/src/lauxlib.c lua-5.1.4/src/lauxlib.c
|
|||||||
|
|
||||||
static const char *getF (lua_State *L, void *ud, size_t *size) {
|
static const char *getF (lua_State *L, void *ud, size_t *size) {
|
||||||
LoadF *lf = (LoadF *)ud;
|
LoadF *lf = (LoadF *)ud;
|
||||||
@@ -550,6 +557,26 @@
|
@@ -550,6 +557,28 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -47,7 +47,9 @@ diff -ur lua-5.1.4.orig/src/lauxlib.c lua-5.1.4/src/lauxlib.c
|
|||||||
+ if (*size > 0) {
|
+ if (*size > 0) {
|
||||||
+ if (lf->first_chunk) {
|
+ if (lf->first_chunk) {
|
||||||
+ lf->first_chunk = 0;
|
+ lf->first_chunk = 0;
|
||||||
+ if (strstr(lf->buffer, "#!") && (sp=strstr(lf->buffer, "\n")) != NULL) {
|
+ if ((lf->buffer[0] == '#') && (lf->buffer[1] == '!') &&
|
||||||
|
+ (sp=strstr(lf->buffer, "\n")) != NULL)
|
||||||
|
+ {
|
||||||
+ *size -= ((uint)sp - (uint)lf->buffer);
|
+ *size -= ((uint)sp - (uint)lf->buffer);
|
||||||
+ return sp;
|
+ return sp;
|
||||||
+ }
|
+ }
|
||||||
@ -61,7 +63,7 @@ diff -ur lua-5.1.4.orig/src/lauxlib.c lua-5.1.4/src/lauxlib.c
|
|||||||
static int errfile (lua_State *L, const char *what, int fnameindex) {
|
static int errfile (lua_State *L, const char *what, int fnameindex) {
|
||||||
const char *serr = strerror(errno);
|
const char *serr = strerror(errno);
|
||||||
const char *filename = lua_tostring(L, fnameindex) + 1;
|
const char *filename = lua_tostring(L, fnameindex) + 1;
|
||||||
@@ -560,6 +587,31 @@
|
@@ -560,6 +589,31 @@
|
||||||
|
|
||||||
|
|
||||||
LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
|
LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
|
||||||
|
@ -12,7 +12,7 @@ diff -ur lua-5.1.4.orig/src/Makefile lua-5.1.4/src/Makefile
|
|||||||
MYLDFLAGS=
|
MYLDFLAGS=
|
||||||
diff -ur lua-5.1.4.orig/src/lauxlib.c lua-5.1.4/src/lauxlib.c
|
diff -ur lua-5.1.4.orig/src/lauxlib.c lua-5.1.4/src/lauxlib.c
|
||||||
--- lua-5.1.4.orig/src/lauxlib.c 2009-04-04 23:06:04.000000000 +0200
|
--- lua-5.1.4.orig/src/lauxlib.c 2009-04-04 23:06:04.000000000 +0200
|
||||||
+++ lua-5.1.4/src/lauxlib.c 2009-04-05 00:03:33.000000000 +0200
|
+++ lua-5.1.4/src/lauxlib.c 2009-04-05 03:35:24.000000000 +0200
|
||||||
@@ -11,6 +11,7 @@
|
@@ -11,6 +11,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -34,7 +34,7 @@ diff -ur lua-5.1.4.orig/src/lauxlib.c lua-5.1.4/src/lauxlib.c
|
|||||||
|
|
||||||
static const char *getF (lua_State *L, void *ud, size_t *size) {
|
static const char *getF (lua_State *L, void *ud, size_t *size) {
|
||||||
LoadF *lf = (LoadF *)ud;
|
LoadF *lf = (LoadF *)ud;
|
||||||
@@ -550,6 +557,26 @@
|
@@ -550,6 +557,28 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -47,7 +47,9 @@ diff -ur lua-5.1.4.orig/src/lauxlib.c lua-5.1.4/src/lauxlib.c
|
|||||||
+ if (*size > 0) {
|
+ if (*size > 0) {
|
||||||
+ if (lf->first_chunk) {
|
+ if (lf->first_chunk) {
|
||||||
+ lf->first_chunk = 0;
|
+ lf->first_chunk = 0;
|
||||||
+ if (strstr(lf->buffer, "#!") && (sp=strstr(lf->buffer, "\n")) != NULL) {
|
+ if ((lf->buffer[0] == '#') && (lf->buffer[1] == '!') &&
|
||||||
|
+ (sp=strstr(lf->buffer, "\n")) != NULL)
|
||||||
|
+ {
|
||||||
+ *size -= ((uint)sp - (uint)lf->buffer);
|
+ *size -= ((uint)sp - (uint)lf->buffer);
|
||||||
+ return sp;
|
+ return sp;
|
||||||
+ }
|
+ }
|
||||||
@ -61,7 +63,7 @@ diff -ur lua-5.1.4.orig/src/lauxlib.c lua-5.1.4/src/lauxlib.c
|
|||||||
static int errfile (lua_State *L, const char *what, int fnameindex) {
|
static int errfile (lua_State *L, const char *what, int fnameindex) {
|
||||||
const char *serr = strerror(errno);
|
const char *serr = strerror(errno);
|
||||||
const char *filename = lua_tostring(L, fnameindex) + 1;
|
const char *filename = lua_tostring(L, fnameindex) + 1;
|
||||||
@@ -560,6 +587,31 @@
|
@@ -560,6 +589,31 @@
|
||||||
|
|
||||||
|
|
||||||
LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
|
LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
|
||||||
|
Loading…
Reference in New Issue
Block a user