gnu: python-babel: Update to 2.7.0.
[guix.git] / gnu / packages / patches / lua51-liblua-so.patch
blob6795f10ac73681e123b49a68097992ea38f03093
2 Patch the two Makefile to also create liblua.so
3 Original patch by Allan McRae <allan@archlinux.org>
4 for Archlinux
7 diff -ruN lua-5.1.5/Makefile lua-5.1.5-new/Makefile
8 --- lua-5.1.5/Makefile 2012-02-10 10:50:23.000000000 +0100
9 +++ lua-5.1.5-new/Makefile 2014-09-10 20:17:28.913951433 +0200
10 @@ -43,7 +43,7 @@
11 # What to install.
12 TO_BIN= lua luac
13 TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
14 -TO_LIB= liblua.a
15 +TO_LIB= liblua.a liblua.so liblua.so.${V}
16 TO_MAN= lua.1 luac.1
18 # Lua version and release.
19 @@ -53,7 +53,7 @@
20 all: $(PLAT)
22 $(PLATS) clean:
23 - cd src && $(MAKE) $@
24 + cd src && $(MAKE) $@ V=$(V) R=$(R)
26 test: dummy
27 src/lua test/hello.lua
28 diff -ruN lua-5.1.5/src/Makefile lua-5.1.5-new/src/Makefile
29 --- lua-5.1.5/src/Makefile 2012-02-13 21:41:22.000000000 +0100
30 +++ lua-5.1.5-new/src/Makefile 2014-09-10 20:16:09.982952152 +0200
31 @@ -8,7 +8,7 @@
32 PLAT= none
34 CC= gcc
35 -CFLAGS= -O2 -Wall $(MYCFLAGS)
36 +CFLAGS= -O2 -Wall $(MYCFLAGS) -fPIC
37 AR= ar rcu
38 RANLIB= ranlib
39 RM= rm -f
40 @@ -34,9 +34,10 @@
42 LUAC_T= luac
43 LUAC_O= luac.o print.o
44 +LUA_SO= liblua.so
46 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
47 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
48 +ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
49 ALL_A= $(LUA_A)
51 default: $(PLAT)
52 @@ -57,6 +58,13 @@
53 $(LUAC_T): $(LUAC_O) $(LUA_A)
54 $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
56 +$(LUA_SO): $(CORE_O) $(LIB_O)
57 + $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
58 + ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
59 + ln -sf $(LUA_SO).$(R) $(LUA_SO)
63 clean:
64 $(RM) $(ALL_T) $(ALL_O)