1 Somewhat based on Arch Linux' Lua patch.
3 diff -aur lua-5.1.2.orig/Makefile lua-5.1.2/Makefile
4 --- lua-5.1.2.orig/Makefile 2007-03-25 16:44:39.000000000 +0200
5 +++ lua-5.1.2/Makefile 2007-04-09 20:22:39.100496674 +0200
9 TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
11 +TO_LIB= liblua.a liblua.so.5.1
14 # Lua version and release.
16 cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
17 cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
18 + ln -s liblua.so.5.1 $(INSTALL_LIB)/liblua.so
21 cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
23 diff -aur lua-5.1.2.orig/etc/lua.pc lua-5.1.2/etc/lua.pc
24 --- lua-5.1.2.orig/etc/lua.pc 2007-03-23 20:58:49.000000000 +0100
25 +++ lua-5.1.2/etc/lua.pc 2007-04-09 20:00:26.642825529 +0200
29 # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
32 INSTALL_BIN= ${prefix}/bin
33 INSTALL_INC= ${prefix}/include
34 INSTALL_LIB= ${prefix}/lib
35 diff -aur lua-5.1.2.orig/src/Makefile lua-5.1.2/src/Makefile
36 --- lua-5.1.2.orig/src/Makefile 2007-03-25 16:49:23.000000000 +0200
37 +++ lua-5.1.2/src/Makefile 2007-04-09 20:20:37.073542755 +0200
42 -CFLAGS= -O2 -Wall $(MYCFLAGS)
44 +CFLAGS += $(MYCFLAGS)
49 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
53 CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
54 lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
55 lundump.o lvm.o lzio.o
57 LUAC_O= luac.o print.o
59 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
60 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
61 +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
69 +$(LUA_SO): $(CORE_O) $(LIB_O)
70 + $(CC) -shared -Wl,-soname,liblua.so -o $@.5.1 $? $(MYLDFLAGS)
73 $(LUA_T): $(LUA_O) $(LUA_A)
74 $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
76 diff -aur lua-5.1.2.orig/src/luaconf.h lua-5.1.2/src/luaconf.h
77 --- lua-5.1.2.orig/src/luaconf.h 2007-03-24 04:01:55.000000000 +0100
78 +++ lua-5.1.2/src/luaconf.h 2007-04-09 20:01:00.274480800 +0200
80 ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
83 -#define LUA_ROOT "/usr/local/"
84 +#define LUA_ROOT "/usr/"
85 #define LUA_LDIR LUA_ROOT "share/lua/5.1/"
86 #define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
87 #define LUA_PATH_DEFAULT \