aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/lua51-liblua-so.patch
blob: 6795f10ac73681e123b49a68097992ea38f03093 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

Patch the two Makefile to also create liblua.so
Original patch by Allan McRae <allan@archlinux.org>
for Archlinux


diff -ruN lua-5.1.5/Makefile lua-5.1.5-new/Makefile
--- lua-5.1.5/Makefile	2012-02-10 10:50:23.000000000 +0100
+++ lua-5.1.5-new/Makefile	2014-09-10 20:17:28.913951433 +0200
@@ -43,7 +43,7 @@
 # What to install.
 TO_BIN= lua luac
 TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
-TO_LIB= liblua.a
+TO_LIB= liblua.a liblua.so liblua.so.${V}
 TO_MAN= lua.1 luac.1
 
 # Lua version and release.
@@ -53,7 +53,7 @@
 all:	$(PLAT)
 
 $(PLATS) clean:
-	cd src && $(MAKE) $@
+	cd src && $(MAKE) $@ V=$(V) R=$(R)
 
 test:	dummy
 	src/lua test/hello.lua
diff -ruN lua-5.1.5/src/Makefile lua-5.1.5-new/src/Makefile
--- lua-5.1.5/src/Makefile	2012-02-13 21:41:22.000000000 +0100
+++ lua-5.1.5-new/src/Makefile	2014-09-10 20:16:09.982952152 +0200
@@ -8,7 +8,7 @@
 PLAT= none
 
 CC= gcc
-CFLAGS= -O2 -Wall $(MYCFLAGS)
+CFLAGS= -O2 -Wall $(MYCFLAGS) -fPIC
 AR= ar rcu
 RANLIB= ranlib
 RM= rm -f
@@ -34,9 +34,10 @@
 
 LUAC_T=	luac
 LUAC_O=	luac.o print.o
+LUA_SO= liblua.so
 
 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
 ALL_A= $(LUA_A)
 
 default: $(PLAT)
@@ -57,6 +58,13 @@
 $(LUAC_T): $(LUAC_O) $(LUA_A)
 	$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
 
+$(LUA_SO): $(CORE_O) $(LIB_O)
+	$(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
+	ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
+	ln -sf $(LUA_SO).$(R) $(LUA_SO)
+
+
+
 clean:
 	$(RM) $(ALL_T) $(ALL_O)
 
/span>system: Handle 'setuid-programs' deprecation handling as a field sanitizer....Ludovic Courtès 2021-07-29services: setuid: More configurable setuid support....Chris Lemmer-Webber 2021-05-11gnu: Allow services to install kernel-loadable modules....raid5atemyhomework 2021-04-12services: Support DELETE in MODIFY-SERVICES macro....Ricardo Wurmus 2021-03-09gnu: services: Add activate script to the profile system directory....Brice Waegeneire 2020-12-01services: profile: Create manifest at monadic-bind time....Ludovic Courtès 2020-10-16services: provenance: Wrap config file name in 'assume-valid-file-name'....Ludovic Courtès 2020-08-25Remove "guile-zlib" extension when unused....Mathieu Othacehe 2020-08-25linux-libre: Support module compression....Mathieu Othacehe 2020-07-27machine: ssh: Check for potential system downgrades....Ludovic Courtès 2020-07-25Use 'formatted-message' instead of '&message' where appropriate....Ludovic Courtès 2020-07-15services: Add 'system-provenance' procedure....Ludovic Courtès 2020-07-01services: provenance: Save channel introductions....Ludovic Courtès 2020-06-08gnu: services: Add %hurd-startup-service....Jan (janneke) Nieuwenhuizen 2020-06-08system: examples: Add bare-hurd.tmpl....Jan (janneke) Nieuwenhuizen 2020-04-26services: system: Initial entries are non-monadic....Ludovic Courtès 2020-04-26services: profile: Use a declarative profile....Ludovic Courtès 2020-04-21services: etc: Detect and report duplicate entries....Ludovic Courtès 2020-04-05services: Allow modprobe to use "/etc/modprobe.d"....Brice Waegeneire 2020-04-02services: Accumulate builds for 'system' entries....Ludovic Courtès 2019-12-07services: Add 'provenance-service-type'....Ludovic Courtès 2019-11-09services: 'fold-services' memoizes service values....Ludovic Courtès 2019-08-14remote: Remove '--system' argument....Jakob L. Kreuze 2019-05-10services: 'gc-root-service-type' now has a default value....Ludovic Courtès