fe6147e7f2e0a059d6a222f060524c7a6a5177d9
[openwrt/svn-archive/archive.git] / lang / lua / patches / lua-5.1.1-so.patch
1 diff -urN lua-5.1.1/Makefile lua-5.1.1.new/Makefile
2 --- lua-5.1.1/Makefile 2006-06-02 12:53:38.000000000 +0200
3 +++ lua-5.1.1.new/Makefile 2006-12-28 01:40:18.000000000 +0100
4 @@ -42,7 +42,7 @@
5 # What to install.
6 TO_BIN= lua luac
7 TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
8 -TO_LIB= liblua.a
9 +TO_LIB= liblua.a liblualib.a liblua.so liblua.so.$R liblualib.so.$R
10 TO_MAN= lua.1 luac.1
11
12 # Lua version and release.
13 diff -urN lua-5.1.1/src/Makefile lua-5.1.1.new/src/Makefile
14 --- lua-5.1.1/src/Makefile 2006-03-22 01:41:49.000000000 +0100
15 +++ lua-5.1.1.new/src/Makefile 2006-12-28 01:39:29.000000000 +0100
16 @@ -23,6 +23,7 @@
17 PLATS= aix ansi bsd generic linux macosx mingw posix solaris
18
19 LUA_A= liblua.a
20 +LUA_SO= liblua.so
21 CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
22 lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
23 lundump.o lvm.o lzio.o
24 @@ -36,8 +37,9 @@
25 LUAC_O= luac.o print.o
26
27 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
28 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
29 +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
30 ALL_A= $(LUA_A)
31 +ALL_SO= $(LUA_SO)
32
33 default: $(PLAT)
34
35 @@ -47,10 +49,19 @@
36
37 a: $(ALL_A)
38
39 +so: $(ALL_SO)
40 +
41 $(LUA_A): $(CORE_O) $(LIB_O)
42 $(AR) $@ $?
43 + $(AR) liblualib.a $?
44 $(RANLIB) $@
45 + $(RANLIB) liblualib.a
46
47 +$(LUA_SO): $(CORE_O) $(LIB_O)
48 + $(LD) -o $@.$(PKG_VERSION) -shared -soname="$@.$(PKG_VERSION)" $?
49 + $(LD) -o liblualib.so.$(PKG_VERSION) -shared -soname="liblualib.so.$(PKG_VERSION)" $?
50 + ln -fs $@.$(PKG_VERSION) $@; ln -fs liblualib.so.$(PKG_VERSION) liblualib.so
51 +
52 $(LUA_T): $(LUA_O) $(LUA_A)
53 $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
54
55 @@ -92,7 +103,7 @@
56 $(MAKE) all MYCFLAGS=
57
58 linux:
59 - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
60 + $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
61
62 macosx:
63 $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX