2012-03-14 09:02:18 +01:00
|
|
|
diff -aur lua-5.2.0.orig/Makefile lua-5.2.0/Makefile
|
|
|
|
--- lua-5.2.0.orig/Makefile 2011-11-16 00:38:12.000000000 +0100
|
|
|
|
+++ lua-5.2.0/Makefile 2012-03-14 09:00:52.823998608 +0100
|
|
|
|
@@ -10,7 +10,7 @@
|
|
|
|
# so take care if INSTALL_TOP is not an absolute path. See the local target.
|
|
|
|
# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
|
|
|
|
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
|
|
|
|
-INSTALL_TOP= /usr/local
|
|
|
|
+INSTALL_TOP= /usr
|
|
|
|
INSTALL_BIN= $(INSTALL_TOP)/bin
|
|
|
|
INSTALL_INC= $(INSTALL_TOP)/include
|
|
|
|
INSTALL_LIB= $(INSTALL_TOP)/lib
|
|
|
|
@@ -41,7 +41,7 @@
|
2007-04-09 21:32:46 +02:00
|
|
|
# What to install.
|
|
|
|
TO_BIN= lua luac
|
2012-03-14 09:02:18 +01:00
|
|
|
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
|
2007-04-09 21:32:46 +02:00
|
|
|
-TO_LIB= liblua.a
|
2012-03-14 09:02:18 +01:00
|
|
|
+TO_LIB= liblua.a liblua.so.5.2
|
2007-04-09 21:32:46 +02:00
|
|
|
TO_MAN= lua.1 luac.1
|
|
|
|
|
|
|
|
# Lua version and release.
|
2012-03-14 09:02:18 +01:00
|
|
|
@@ -63,6 +63,7 @@
|
|
|
|
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
|
2007-04-09 21:32:46 +02:00
|
|
|
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
|
|
|
|
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
|
2012-03-14 09:02:18 +01:00
|
|
|
+ ln -s liblua.so.5.2 $(INSTALL_LIB)/liblua.so
|
2007-04-09 21:32:46 +02:00
|
|
|
|
2012-03-14 09:02:18 +01:00
|
|
|
uninstall:
|
|
|
|
cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
|
|
|
|
@@ -103,10 +104,14 @@
|
2010-06-17 07:45:08 +02:00
|
|
|
|
2012-03-14 09:02:18 +01:00
|
|
|
# echo pkg-config data
|
|
|
|
pc:
|
|
|
|
- @echo "version=$R"
|
|
|
|
@echo "prefix=$(INSTALL_TOP)"
|
|
|
|
@echo "libdir=$(INSTALL_LIB)"
|
|
|
|
@echo "includedir=$(INSTALL_INC)"
|
|
|
|
+ @echo "Name: Lua"
|
|
|
|
+ @echo "Description: An Extensible Extension Language"
|
|
|
|
+ @echo "Version: $R"
|
2012-03-14 18:28:14 +01:00
|
|
|
+ @echo "Libs: -L$(INSTALL_LIB) -llua -lm"
|
2012-03-14 09:02:18 +01:00
|
|
|
+ @echo "Cflags: -I$(INSTALL_INC)"
|
2007-04-09 21:32:46 +02:00
|
|
|
|
2012-03-14 09:02:18 +01:00
|
|
|
# list targets that do not create files (but not all makes understand .PHONY)
|
|
|
|
.PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho
|
|
|
|
diff -aur lua-5.2.0.orig/src/Makefile lua-5.2.0/src/Makefile
|
|
|
|
--- lua-5.2.0.orig/src/Makefile 2011-09-19 14:45:14.000000000 +0200
|
|
|
|
+++ lua-5.2.0/src/Makefile 2012-03-14 08:41:50.374000136 +0100
|
|
|
|
@@ -7,7 +7,8 @@
|
2007-04-09 21:32:46 +02:00
|
|
|
PLAT= none
|
|
|
|
|
|
|
|
CC= gcc
|
2012-03-14 09:02:18 +01:00
|
|
|
-CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
|
2007-04-09 21:32:46 +02:00
|
|
|
+CFLAGS ?= -O2 -Wall
|
2012-03-14 09:02:18 +01:00
|
|
|
+CFLAGS += -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
|
|
|
|
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
|
|
|
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
|
|
|
|
|
|
|
@@ -29,6 +30,7 @@
|
2007-04-09 21:32:46 +02:00
|
|
|
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
|
|
|
|
|
|
|
LUA_A= liblua.a
|
|
|
|
+LUA_SO= liblua.so
|
2012-03-14 09:02:18 +01:00
|
|
|
CORE_O= lapi.o lcode.o lctype.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 lundump.o lvm.o lzio.o
|
|
|
|
@@ -43,7 +45,7 @@
|
|
|
|
LUAC_O= luac.o
|
2007-04-09 21:32:46 +02:00
|
|
|
|
2012-03-14 09:02:18 +01:00
|
|
|
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
2007-04-09 21:32:46 +02:00
|
|
|
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
|
|
|
+ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
|
|
|
|
ALL_A= $(LUA_A)
|
|
|
|
|
2012-03-14 09:02:18 +01:00
|
|
|
# Targets start here.
|
|
|
|
@@ -59,6 +61,10 @@
|
2007-04-09 21:32:46 +02:00
|
|
|
$(AR) $@ $?
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
|
|
|
+$(LUA_SO): $(CORE_O) $(LIB_O)
|
2012-03-14 09:02:18 +01:00
|
|
|
+ $(CC) -shared -Wl,-soname,liblua.so -o $@.5.2 $? $(MYLDFLAGS)
|
|
|
|
+ ln -s $@.5.2 $@
|
2007-04-09 21:32:46 +02:00
|
|
|
+
|
|
|
|
$(LUA_T): $(LUA_O) $(LUA_A)
|
2012-03-14 09:02:18 +01:00
|
|
|
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
2007-04-09 21:32:46 +02:00
|
|
|
|
2012-03-14 09:02:18 +01:00
|
|
|
diff -aur lua-5.2.0.orig/src/luaconf.h lua-5.2.0/src/luaconf.h
|
|
|
|
--- lua-5.2.0.orig/src/luaconf.h 2011-12-06 17:58:36.000000000 +0100
|
|
|
|
+++ lua-5.2.0/src/luaconf.h 2012-03-14 08:42:10.370999861 +0100
|
|
|
|
@@ -100,7 +100,7 @@
|
|
|
|
#else /* }{ */
|
2007-04-09 21:32:46 +02:00
|
|
|
|
2012-03-14 09:02:18 +01:00
|
|
|
#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
|
2007-04-09 21:32:46 +02:00
|
|
|
-#define LUA_ROOT "/usr/local/"
|
|
|
|
+#define LUA_ROOT "/usr/"
|
2012-03-14 09:02:18 +01:00
|
|
|
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR
|
|
|
|
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR
|
2007-04-09 21:32:46 +02:00
|
|
|
#define LUA_PATH_DEFAULT \
|