2008-08-24 18:45:26 +03:00
|
|
|
Index: lua-5.1.4/Makefile
|
2008-05-22 17:20:56 +03:00
|
|
|
===================================================================
|
2008-08-24 18:45:26 +03:00
|
|
|
--- lua-5.1.4.orig/Makefile 2008-08-24 16:46:37.000000000 +0200
|
|
|
|
+++ lua-5.1.4/Makefile 2008-08-24 16:48:42.000000000 +0200
|
|
|
|
@@ -42,8 +42,8 @@
|
2008-05-22 17:20:36 +03:00
|
|
|
|
2008-04-13 04:06:12 +03:00
|
|
|
# What to install.
|
|
|
|
TO_BIN= lua luac
|
2008-05-22 17:20:36 +03:00
|
|
|
-TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
|
2008-04-13 04:06:12 +03:00
|
|
|
-TO_LIB= liblua.a
|
2008-05-22 17:20:36 +03:00
|
|
|
+TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp lnum_config.h
|
2008-05-23 10:09:29 +03:00
|
|
|
+TO_LIB= liblua.a liblua.so.$R
|
2008-04-13 04:06:12 +03:00
|
|
|
TO_MAN= lua.1 luac.1
|
|
|
|
|
|
|
|
# Lua version and release.
|
2008-08-24 18:45:26 +03:00
|
|
|
@@ -63,6 +63,7 @@
|
2008-05-23 10:09:29 +03:00
|
|
|
cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
|
|
|
|
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
|
|
|
|
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
|
|
|
|
+ ln -s liblua.so.$R $(INSTALL_LIB)/liblua.so
|
|
|
|
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
|
|
|
|
|
2008-08-24 18:45:26 +03:00
|
|
|
ranlib:
|
|
|
|
Index: lua-5.1.4/src/ldo.h
|
2008-05-22 17:20:56 +03:00
|
|
|
===================================================================
|
2008-08-24 18:45:26 +03:00
|
|
|
--- lua-5.1.4.orig/src/ldo.h 2008-08-24 16:46:37.000000000 +0200
|
|
|
|
+++ lua-5.1.4/src/ldo.h 2008-08-24 16:48:42.000000000 +0200
|
2008-05-22 17:20:36 +03:00
|
|
|
@@ -46,7 +46,7 @@
|
|
|
|
LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);
|
|
|
|
LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize);
|
|
|
|
LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
|
|
|
|
-LUAI_FUNC void luaD_growstack (lua_State *L, int n);
|
|
|
|
+LUA_API void luaD_growstack (lua_State *L, int n);
|
|
|
|
|
|
|
|
LUAI_FUNC void luaD_throw (lua_State *L, int errcode);
|
|
|
|
LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
|
2008-08-24 18:45:26 +03:00
|
|
|
Index: lua-5.1.4/src/lfunc.h
|
2008-05-22 17:20:56 +03:00
|
|
|
===================================================================
|
2008-08-24 18:45:26 +03:00
|
|
|
--- lua-5.1.4.orig/src/lfunc.h 2008-08-24 16:46:37.000000000 +0200
|
|
|
|
+++ lua-5.1.4/src/lfunc.h 2008-08-24 16:48:42.000000000 +0200
|
2008-05-22 17:20:36 +03:00
|
|
|
@@ -18,7 +18,7 @@
|
|
|
|
cast(int, sizeof(TValue *)*((n)-1)))
|
|
|
|
|
|
|
|
|
|
|
|
-LUAI_FUNC Proto *luaF_newproto (lua_State *L);
|
|
|
|
+LUA_API Proto *luaF_newproto (lua_State *L);
|
|
|
|
LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e);
|
|
|
|
LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e);
|
|
|
|
LUAI_FUNC UpVal *luaF_newupval (lua_State *L);
|
2008-08-24 18:45:26 +03:00
|
|
|
Index: lua-5.1.4/src/lmem.h
|
2008-05-22 17:20:56 +03:00
|
|
|
===================================================================
|
2008-08-24 18:45:26 +03:00
|
|
|
--- lua-5.1.4.orig/src/lmem.h 2008-08-24 16:46:37.000000000 +0200
|
|
|
|
+++ lua-5.1.4/src/lmem.h 2008-08-24 16:48:42.000000000 +0200
|
2008-05-22 17:20:36 +03:00
|
|
|
@@ -38,9 +38,9 @@
|
|
|
|
((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t))))
|
|
|
|
|
|
|
|
|
|
|
|
-LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
|
|
|
|
+LUA_API void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
|
|
|
|
size_t size);
|
|
|
|
-LUAI_FUNC void *luaM_toobig (lua_State *L);
|
|
|
|
+LUA_API void *luaM_toobig (lua_State *L);
|
|
|
|
LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size,
|
|
|
|
size_t size_elem, int limit,
|
|
|
|
const char *errormsg);
|
2008-08-24 18:45:26 +03:00
|
|
|
Index: lua-5.1.4/src/lstring.h
|
2008-05-22 17:20:56 +03:00
|
|
|
===================================================================
|
2008-08-24 18:45:26 +03:00
|
|
|
--- lua-5.1.4.orig/src/lstring.h 2008-08-24 16:46:37.000000000 +0200
|
|
|
|
+++ lua-5.1.4/src/lstring.h 2008-08-24 16:48:42.000000000 +0200
|
2008-05-22 17:20:36 +03:00
|
|
|
@@ -25,7 +25,7 @@
|
|
|
|
|
|
|
|
LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
|
|
|
|
LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
|
|
|
|
-LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
|
|
|
|
+LUA_API TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
2008-08-24 18:45:26 +03:00
|
|
|
Index: lua-5.1.4/src/lundump.h
|
2008-05-22 17:20:56 +03:00
|
|
|
===================================================================
|
2008-08-24 18:45:26 +03:00
|
|
|
--- lua-5.1.4.orig/src/lundump.h 2008-08-24 16:46:37.000000000 +0200
|
|
|
|
+++ lua-5.1.4/src/lundump.h 2008-08-24 16:48:42.000000000 +0200
|
2008-05-22 17:20:36 +03:00
|
|
|
@@ -17,7 +17,7 @@
|
|
|
|
LUAI_FUNC void luaU_header (char* h);
|
|
|
|
|
|
|
|
/* dump one chunk; from ldump.c */
|
|
|
|
-LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
|
|
|
|
+LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
|
|
|
|
|
|
|
|
#ifdef luac_c
|
|
|
|
/* print one chunk; from print.c */
|
2008-08-24 18:45:26 +03:00
|
|
|
Index: lua-5.1.4/src/Makefile
|
2008-05-22 17:20:56 +03:00
|
|
|
===================================================================
|
2008-08-24 18:45:26 +03:00
|
|
|
--- lua-5.1.4.orig/src/Makefile 2008-08-24 16:48:20.000000000 +0200
|
|
|
|
+++ lua-5.1.4/src/Makefile 2008-08-24 16:48:42.000000000 +0200
|
2008-04-13 04:06:12 +03:00
|
|
|
@@ -23,6 +23,7 @@
|
|
|
|
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
|
|
|
|
|
|
|
LUA_A= liblua.a
|
|
|
|
+LUA_SO= liblua.so
|
|
|
|
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
|
|
|
|
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
|
2008-05-22 17:20:36 +03:00
|
|
|
lundump.o lvm.o lzio.o lnum.o
|
2008-04-13 04:06:12 +03:00
|
|
|
@@ -33,11 +34,12 @@
|
|
|
|
LUA_O= lua.o
|
|
|
|
|
|
|
|
LUAC_T= luac
|
|
|
|
-LUAC_O= luac.o print.o
|
|
|
|
+LUAC_O= luac.o print.o lopcodes.o
|
|
|
|
|
|
|
|
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
|
|
|
|
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
|
|
|
+ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
|
|
|
|
ALL_A= $(LUA_A)
|
|
|
|
+ALL_SO= $(LUA_SO)
|
|
|
|
|
|
|
|
default: $(PLAT)
|
|
|
|
|
2008-05-22 17:20:36 +03:00
|
|
|
@@ -47,14 +49,23 @@
|
2008-04-13 04:06:12 +03:00
|
|
|
|
|
|
|
a: $(ALL_A)
|
|
|
|
|
|
|
|
+so: $(ALL_SO)
|
|
|
|
+
|
|
|
|
$(LUA_A): $(CORE_O) $(LIB_O)
|
|
|
|
$(AR) $@ $?
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
|
|
|
-$(LUA_T): $(LUA_O) $(LUA_A)
|
|
|
|
- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
|
|
|
+$(LUA_SO): $(CORE_O) $(LIB_O)
|
2008-11-11 04:48:31 +02:00
|
|
|
+ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $?
|
2008-04-13 04:06:12 +03:00
|
|
|
+ ln -fs $@.$(PKG_VERSION) $@
|
2008-05-22 17:20:56 +03:00
|
|
|
+
|
2008-04-13 04:06:12 +03:00
|
|
|
+$(LUA_T): $(LUA_O) $(LUA_SO)
|
|
|
|
+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS)
|
2008-05-22 17:20:36 +03:00
|
|
|
+
|
2008-04-13 04:06:12 +03:00
|
|
|
+$(LUAC_T): $(LUAC_O) $(LUA_SO)
|
|
|
|
+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUAC_O) $(LIBS)
|
|
|
|
|
2008-05-22 17:20:36 +03:00
|
|
|
-$(LUAC_T): $(LUAC_O) $(LUA_A)
|
|
|
|
+$(LUAC_T)-host: $(LUAC_O) $(LUA_A)
|
|
|
|
$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
|
|
|
|
2008-04-13 04:06:12 +03:00
|
|
|
clean:
|
2008-05-22 17:20:36 +03:00
|
|
|
@@ -96,7 +107,7 @@
|
2008-04-13 04:06:12 +03:00
|
|
|
$(MAKE) all MYCFLAGS=
|
|
|
|
|
|
|
|
linux:
|
|
|
|
- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
|
|
|
|
+ $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
|
|
|
|
|
|
|
|
macosx:
|
|
|
|
$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
|