1 Index: lua-5.1.3/Makefile
2 ===================================================================
3 --- lua-5.1.3.orig/Makefile 2008-05-23 09:03:23.000000000 +0200
4 +++ lua-5.1.3/Makefile 2008-05-23 09:05:51.000000000 +0200
9 -TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
11 +TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp lnum_config.h
12 +TO_LIB= liblua.a liblua.so.$R
15 # Lua version and release.
17 cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
18 cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
19 cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
20 + ln -s liblua.so.$R $(INSTALL_LIB)/liblua.so
21 cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
24 Index: lua-5.1.3/src/ldo.h
25 ===================================================================
26 --- lua-5.1.3.orig/src/ldo.h 2008-05-23 09:03:23.000000000 +0200
27 +++ lua-5.1.3/src/ldo.h 2008-05-23 09:03:32.000000000 +0200
29 LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);
30 LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize);
31 LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
32 -LUAI_FUNC void luaD_growstack (lua_State *L, int n);
33 +LUA_API void luaD_growstack (lua_State *L, int n);
35 LUAI_FUNC void luaD_throw (lua_State *L, int errcode);
36 LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
37 Index: lua-5.1.3/src/lfunc.h
38 ===================================================================
39 --- lua-5.1.3.orig/src/lfunc.h 2008-05-23 09:03:23.000000000 +0200
40 +++ lua-5.1.3/src/lfunc.h 2008-05-23 09:03:32.000000000 +0200
42 cast(int, sizeof(TValue *)*((n)-1)))
45 -LUAI_FUNC Proto *luaF_newproto (lua_State *L);
46 +LUA_API Proto *luaF_newproto (lua_State *L);
47 LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e);
48 LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e);
49 LUAI_FUNC UpVal *luaF_newupval (lua_State *L);
50 Index: lua-5.1.3/src/lmem.h
51 ===================================================================
52 --- lua-5.1.3.orig/src/lmem.h 2008-05-23 09:03:23.000000000 +0200
53 +++ lua-5.1.3/src/lmem.h 2008-05-23 09:03:32.000000000 +0200
55 ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t))))
58 -LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
59 +LUA_API void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
61 -LUAI_FUNC void *luaM_toobig (lua_State *L);
62 +LUA_API void *luaM_toobig (lua_State *L);
63 LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size,
64 size_t size_elem, int limit,
65 const char *errormsg);
66 Index: lua-5.1.3/src/lstring.h
67 ===================================================================
68 --- lua-5.1.3.orig/src/lstring.h 2008-05-23 09:03:23.000000000 +0200
69 +++ lua-5.1.3/src/lstring.h 2008-05-23 09:03:32.000000000 +0200
72 LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
73 LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
74 -LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
75 +LUA_API TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
79 Index: lua-5.1.3/src/lundump.h
80 ===================================================================
81 --- lua-5.1.3.orig/src/lundump.h 2008-05-23 09:03:23.000000000 +0200
82 +++ lua-5.1.3/src/lundump.h 2008-05-23 09:03:32.000000000 +0200
84 LUAI_FUNC void luaU_header (char* h);
86 /* dump one chunk; from ldump.c */
87 -LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
88 +LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
91 /* print one chunk; from print.c */
92 Index: lua-5.1.3/src/Makefile
93 ===================================================================
94 --- lua-5.1.3.orig/src/Makefile 2008-05-23 09:03:32.000000000 +0200
95 +++ lua-5.1.3/src/Makefile 2008-05-23 09:03:36.000000000 +0200
97 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
101 CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
102 lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
103 lundump.o lvm.o lzio.o lnum.o
108 -LUAC_O= luac.o print.o
109 +LUAC_O= luac.o print.o lopcodes.o
111 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
112 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
113 +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
125 $(LUA_A): $(CORE_O) $(LIB_O)
129 -$(LUA_T): $(LUA_O) $(LUA_A)
130 - $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
131 +$(LUA_SO): $(CORE_O) $(LIB_O)
132 + $(CC) -o $@.$(PKG_VERSION) -shared -soname="$@.$(PKG_VERSION)" $? -nostdlib -lgcc
133 + ln -fs $@.$(PKG_VERSION) $@
135 +$(LUA_T): $(LUA_O) $(LUA_SO)
136 + $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS)
138 +$(LUAC_T): $(LUAC_O) $(LUA_SO)
139 + $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUAC_O) $(LIBS)
141 -$(LUAC_T): $(LUAC_O) $(LUA_A)
142 +$(LUAC_T)-host: $(LUAC_O) $(LUA_A)
143 $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
147 $(MAKE) all MYCFLAGS=
150 - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
151 + $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
154 $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"