2 # Copyright (C) 2006 OpenWrt.org
5 Index: lua-5.1.3/Makefile
6 ===================================================================
7 --- lua-5.1.3.orig/Makefile 2008-02-20 00:06:06.000000000 +0100
8 +++ lua-5.1.3/Makefile 2008-02-20 00:06:07.000000000 +0100
12 TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
14 +TO_LIB= liblua.a liblua.so liblua.so.$R
17 # Lua version and release.
18 Index: lua-5.1.3/src/Makefile
19 ===================================================================
20 --- lua-5.1.3.orig/src/Makefile 2008-02-20 00:06:06.000000000 +0100
21 +++ lua-5.1.3/src/Makefile 2008-02-20 00:06:07.000000000 +0100
23 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
27 CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
28 lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
29 lundump.o lvm.o lzio.o
34 -LUAC_O= luac.o print.o
35 +LUAC_O= luac.o print.o lopcodes.o
37 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
38 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
39 +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
51 $(LUA_A): $(CORE_O) $(LIB_O)
55 -$(LUA_T): $(LUA_O) $(LUA_A)
56 - $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
57 +$(LUA_SO): $(CORE_O) $(LIB_O)
58 + $(LD) -o $@.$(PKG_VERSION) -shared -soname="$@.$(PKG_VERSION)" $?
59 + ln -fs $@.$(PKG_VERSION) $@
61 +$(LUA_T): $(LUA_O) $(LUA_SO)
62 + $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS)
64 -$(LUAC_T): $(LUAC_O) $(LUA_A)
65 - $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
66 +$(LUAC_T): $(LUAC_O) $(LUA_SO)
67 + $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUAC_O) $(LIBS)
70 $(RM) $(ALL_T) $(ALL_O)
75 - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
76 + $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
79 $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
80 Index: lua-5.1.3/src/ldo.h
81 ===================================================================
82 --- lua-5.1.3.orig/src/ldo.h 2008-02-20 00:06:06.000000000 +0100
83 +++ lua-5.1.3/src/ldo.h 2008-02-20 00:06:07.000000000 +0100
85 LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);
86 LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize);
87 LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
88 -LUAI_FUNC void luaD_growstack (lua_State *L, int n);
89 +LUA_API void luaD_growstack (lua_State *L, int n);
91 LUAI_FUNC void luaD_throw (lua_State *L, int errcode);
92 LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
93 Index: lua-5.1.3/src/lfunc.h
94 ===================================================================
95 --- lua-5.1.3.orig/src/lfunc.h 2008-02-20 00:06:06.000000000 +0100
96 +++ lua-5.1.3/src/lfunc.h 2008-02-20 00:06:07.000000000 +0100
98 cast(int, sizeof(TValue *)*((n)-1)))
101 -LUAI_FUNC Proto *luaF_newproto (lua_State *L);
102 +LUA_API Proto *luaF_newproto (lua_State *L);
103 LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e);
104 LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e);
105 LUAI_FUNC UpVal *luaF_newupval (lua_State *L);
106 Index: lua-5.1.3/src/lmem.h
107 ===================================================================
108 --- lua-5.1.3.orig/src/lmem.h 2008-02-20 00:06:06.000000000 +0100
109 +++ lua-5.1.3/src/lmem.h 2008-02-20 00:06:07.000000000 +0100
111 ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t))))
114 -LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
115 +LUA_API void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
117 -LUAI_FUNC void *luaM_toobig (lua_State *L);
118 +LUA_API void *luaM_toobig (lua_State *L);
119 LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size,
120 size_t size_elem, int limit,
121 const char *errormsg);
122 Index: lua-5.1.3/src/lstring.h
123 ===================================================================
124 --- lua-5.1.3.orig/src/lstring.h 2008-02-20 00:06:06.000000000 +0100
125 +++ lua-5.1.3/src/lstring.h 2008-02-20 00:06:07.000000000 +0100
128 LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
129 LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
130 -LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
131 +LUA_API TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
135 Index: lua-5.1.3/src/lundump.h
136 ===================================================================
137 --- lua-5.1.3.orig/src/lundump.h 2008-02-20 00:06:06.000000000 +0100
138 +++ lua-5.1.3/src/lundump.h 2008-02-20 00:06:07.000000000 +0100
140 LUAI_FUNC void luaU_header (char* h);
142 /* dump one chunk; from ldump.c */
143 -LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
144 +LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
147 /* print one chunk; from print.c */