CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
dropbear: moved from core collection
[attic/ports/opt-cross.git] / lua / lua.diff
1 Somewhat based on Arch Linux' Lua patch.
2
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
6 @@ -43,7 +43,7 @@
7 # What to install.
8 TO_BIN= lua luac
9 TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
10 -TO_LIB= liblua.a
11 +TO_LIB= liblua.a liblua.so.5.1
12 TO_MAN= lua.1 luac.1
13
14 # Lua version and release.
15 @@ -65,6 +65,7 @@
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
19
20 ranlib:
21 cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
22
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
26 @@ -8,7 +8,7 @@
27 R= 5.1.2
28
29 # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
30 -prefix= /usr/local
31 +prefix= /usr
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
38 @@ -8,7 +8,8 @@
39 PLAT= none
40
41 CC= gcc
42 -CFLAGS= -O2 -Wall $(MYCFLAGS)
43 +CFLAGS ?= -O2 -Wall
44 +CFLAGS += $(MYCFLAGS)
45 AR= ar rcu
46 RANLIB= ranlib
47 RM= rm -f
48 @@ -23,6 +24,7 @@
49 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
50
51 LUA_A= liblua.a
52 +LUA_SO= liblua.so
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
56 @@ -36,7 +38,7 @@
57 LUAC_O= luac.o print.o
58
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)
62 ALL_A= $(LUA_A)
63
64 default: $(PLAT)
65 @@ -51,6 +53,10 @@
66 $(AR) $@ $?
67 $(RANLIB) $@
68
69 +$(LUA_SO): $(CORE_O) $(LIB_O)
70 + $(CC) -shared -Wl,-soname,liblua.so -o $@.5.1 $? $(MYLDFLAGS)
71 + ln -s $@.5.1 $@
72 +
73 $(LUA_T): $(LUA_O) $(LUA_A)
74 $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
75
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
79 @@ -94,7 +94,7 @@
80 ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
81
82 #else
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 \