gnu: ruby: Update to 2.3.1.
[jackhill/guix/guix.git] / gnu / packages / patches / lua52-liblua-so.patch
1 From 7a1b4e0829124976878ca2765a8e546667a92ceb Mon Sep 17 00:00:00 2001
2 From: Leo Famulari <leo@famulari.name>
3 Date: Fri, 30 Oct 2015 19:11:31 -0400
4 Subject: [PATCH] apply existing non-executable library patch and install
5 libraries as executable
6
7 ---
8 Makefile | 6 +++---
9 src/Makefile | 8 +++++++-
10 2 files changed, 10 insertions(+), 4 deletions(-)
11
12 diff --git a/Makefile b/Makefile
13 index 1aea8e6..bfcfed9 100644
14 --- a/Makefile
15 +++ b/Makefile
16 @@ -44,7 +44,7 @@ INTERPRETER= lua
17 COMPILER= luac
18 TO_BIN= $(INTERPRETER) $(COMPILER)
19 TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
20 -TO_LIB= liblua.a
21 +TO_LIB= liblua.a liblua.so liblua.so.${V}
22 TO_PC= lua-$(V).pc
23 TO_MAN= lua.1 luac.1
24
25 @@ -56,7 +56,7 @@ R= $V.3
26 all: $(PLAT)
27
28 $(PLATS):
29 - cd src && $(MAKE) $@
30 + cd src && $(MAKE) $@ V=$(V) R=$(R)
31
32 clean:
33 cd src && $(MAKE) $@
34 @@ -69,7 +69,7 @@ install: dummy $(TO_PC)
35 cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_PC) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
36 cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
37 cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
38 - cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
39 + cd src && $(INSTALL_EXEC) $(TO_LIB) $(INSTALL_LIB)
40 cd src && $(INSTALL_DATA) ../$(TO_PC) $(INSTALL_PC)
41 cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
42
43 diff --git a/src/Makefile b/src/Makefile
44 index 7b4b2b7..c86476e 100644
45 --- a/src/Makefile
46 +++ b/src/Makefile
47 @@ -29,6 +29,7 @@ MYOBJS=
48 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
49
50 LUA_A= liblua.a
51 +LUA_SO= liblua.so
52 CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
53 lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
54 ltm.o lundump.o lvm.o lzio.o
55 @@ -43,7 +44,7 @@ LUAC_T= luac
56 LUAC_O= luac.o
57
58 ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
59 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
60 +ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
61 ALL_A= $(LUA_A)
62
63 # Targets start here.
64 @@ -55,6 +56,11 @@ o: $(ALL_O)
65
66 a: $(ALL_A)
67
68 +$(LUA_SO): $(CORE_O) $(LIB_O)
69 + $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
70 + ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
71 + ln -sf $(LUA_SO).$(R) $(LUA_SO)
72 +
73 $(LUA_A): $(BASE_O)
74 $(AR) $@ $(BASE_O)
75 $(RANLIB) $@
76 --
77 2.6.1
78