unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 6b029dec4f9a81cce897ae3844e58da26b7c98a5 2235 bytes (raw)
name: gnu/packages/patches/lua51-liblua-so.patch 	 # note: path name is non-authoritative(*)

 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
 
From 115e612016fe615e6c895af8df7db646114a9860 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Mon, 2 Nov 2015 03:29:47 -0500
Subject: [PATCH] lua-5.1: Changes to Makefile patches

Install liblua.so with execute bit.
Don't set -fPIC from here. It will be set in the make flags.

Patch the two Makefile to also create liblua.so
Original patch by Allan McRae <allan@archlinux.org>
for Archlinux
---
 Makefile     |  6 +++---
 src/Makefile | 10 +++++++++-
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 209a132..653dbed 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
 # 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 @@ R= 5.1.5
 all:	$(PLAT)
 
 $(PLATS) clean:
-	cd src && $(MAKE) $@
+	cd src && $(MAKE) $@ V=$(V) R=$(R)
 
 test:	dummy
 	src/lua test/hello.lua
@@ -62,7 +62,7 @@ install: dummy
 	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
 	cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
 	cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
-	cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
+	cd src && $(INSTALL_EXEC) $(TO_LIB) $(INSTALL_LIB)
 	cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
 
 ranlib:
diff --git a/src/Makefile b/src/Makefile
index e0d4c9f..ebc17e9 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -34,9 +34,10 @@ LUA_O=	lua.o
 
 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 @@ $(LUA_T): $(LUA_O) $(LUA_A)
 $(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)
 
-- 
2.6.1


debug log:

solving 6b029de ...
found 6b029de in https://yhetil.org/guix-devel/32ad29a8032709e56545e5a4cacde27069b3ce0f.1450076086.git.leo@famulari.name/ ||
	https://yhetil.org/guix-devel/fadbe5c0eb063ae24e6f36afdc08e58ec554628e.1446485963.git.leo@famulari.name/
found 6795f10 in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 6795f10ac73681e123b49a68097992ea38f03093	gnu/packages/patches/lua51-liblua-so.patch

applying [1/1] https://yhetil.org/guix-devel/32ad29a8032709e56545e5a4cacde27069b3ce0f.1450076086.git.leo@famulari.name/
diff --git a/gnu/packages/patches/lua51-liblua-so.patch b/gnu/packages/patches/lua51-liblua-so.patch
index 6795f10..6b029de 100644

1:54: space before tab in indent.
 	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
1:55: space before tab in indent.
 	cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
1:56: space before tab in indent.
 	cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
1:59: space before tab in indent.
 	cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
1:90: trailing whitespace.
-- 
Checking patch gnu/packages/patches/lua51-liblua-so.patch...
Applied patch gnu/packages/patches/lua51-liblua-so.patch cleanly.
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.

skipping https://yhetil.org/guix-devel/fadbe5c0eb063ae24e6f36afdc08e58ec554628e.1446485963.git.leo@famulari.name/ for 6b029de
index at:
100644 6b029dec4f9a81cce897ae3844e58da26b7c98a5	gnu/packages/patches/lua51-liblua-so.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).