From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: Fwd: Re: gnu: Have lua-5.1 compile a .so Date: Thu, 11 Sep 2014 01:19:23 +0200 Message-ID: <5410DC7B.1040905@gmail.com> References: <20140910231515.GG31169@luwin.ulrar.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080301080604090407010902" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRrAh-0001u2-3p for guix-devel@gnu.org; Wed, 10 Sep 2014 19:19:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRrAc-0008Ja-Jb for guix-devel@gnu.org; Wed, 10 Sep 2014 19:19:31 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:47803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRrAc-0008IQ-9U for guix-devel@gnu.org; Wed, 10 Sep 2014 19:19:26 -0400 Received: by mail-wi0-f171.google.com with SMTP id bs8so19834wib.16 for ; Wed, 10 Sep 2014 16:19:25 -0700 (PDT) Received: from [192.168.0.10] (tal33-3-82-233-82-24.fbx.proxad.net. [82.233.82.24]) by mx.google.com with ESMTPSA id a5sm20199782wje.17.2014.09.10.16.19.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Sep 2014 16:19:24 -0700 (PDT) In-Reply-To: <20140910231515.GG31169@luwin.ulrar.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel This is a multi-part message in MIME format. --------------080301080604090407010902 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Forwarding to the list as this is obviously not meant to be private :) -------- Forwarded Message -------- Subject: Re: gnu: Have lua-5.1 compile a .so Date: Thu, 11 Sep 2014 01:15:15 +0200 From: lemonnierk@ulrar.net To: Cyril Roelandt That's true, thought about doing that at one point, then it must have slipped my mind :). I also removed the useless patch-flags as mentionned by Eric Bavier. >From 81f659884cf02d0d63846b45be5f93d794a9e092 Mon Sep 17 00:00:00 2001 From: Kevin Lemonnier Date: Thu, 11 Sep 2014 03:12:39 +0200 Subject: [PATCH] gnu: Have lua-5.1 compile a .so * gnu/packages/patches/lua51-liblua-so.patch: New file * gnu/packages/lua.scm: Use of lua51-liblua-so.patch in lua-5.1 --- gnu/packages/lua.scm | 3 +- gnu/packages/patches/lua51-liblua-so.patch | 65 ++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/lua51-liblua-so.patch diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index a85c120..92ffc22 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -75,7 +75,8 @@ for configuration, scripting, and rapid prototyping.") (uri (string-append "http://www.lua.org/ftp/lua-" version ".tar.gz")) (sha256 - (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16")))))) + (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16")) + (patches (list (search-patch "lua51-liblua-so.patch"))))))) (define-public luajit (package diff --git a/gnu/packages/patches/lua51-liblua-so.patch b/gnu/packages/patches/lua51-liblua-so.patch new file mode 100644 index 0000000..4442858 --- /dev/null +++ b/gnu/packages/patches/lua51-liblua-so.patch @@ -0,0 +1,65 @@ +# +# Patch the two Makefile to also create liblua.so +# Original patch by Allan McRae +# 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) + -- 1.8.4 On Thu, Sep 11, 2014 at 12:42:29AM +0200, Cyril Roelandt wrote: > On 09/11/2014 12:31 AM, lemonnierk@ulrar.net wrote: > > Hi, > > > > Hi, > > > While working on getting weechat to build with the lua plugin enabled, > > I noticed the lua package doesn't produce a liblua.so file. So here is > > a patch to make it do so. It's basically the same patch as in ArchLinux, > > with a few differences like actually installing the .so file. > > > > Maybe you could mention in the diff header that the patch comes from > Arch, and give credit to the author :) Also, it would make it easier for > us to track newer versions of this patch, should it be modified in Arch. > > Cyril. > > -- Kevin Lemonnier PGP Fingerprint : C123 47CA 9E64 FCF0 3907 --------------080301080604090407010902 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjIKCmlRSWNC QUVCQWdBR0JRSlVFTnVEQUFvSkVFZktubVQ4OERrSHljNFAvMUcxOTlrUmNZZFVYWFA4bUcw MjA1eW8KdDFCRURvbzNVamUxU05mNmxMVEtIYnhreVZhWjFYL1B2QU81cENId3Q0UW10dVZ0 QkRPeUpYclVkY3hLSHpTWgprSGhDTFUvT2l2Y1YxbklDNEUzTE1kb0UwQUlEQjBpWmVPSUFh d2pndVFRbmpGS0ZGeTZWTzZZMS95Ly9MNzZKCnlxUW00U0dVQWJtSFFwY21pOVFpajhGQ2ZC WjRBTU5CaG9QRkRZSjZ1TUxLUjk0S1pjK3RiM04xQmMvenNRRzgKWGVyOXR4di9tWXE3c1pt RzR6dS9JNXQ3dWZEVWtBdDV6b3F6UEdHOFBJRVhkRWU0Y2dRZUxwL1pNYzBwUzdwdApOaFNl TElLaUxPVVJTY0J2OGVOTVpsalh5NGtWS1dMUlRmRytwZjdHY1FtK1pWeFJnNTArSGM1RWVk TEM3SXBmClAyMklVV2FreExlZnRvSVIxckNaa2ZRTHg3UjZpRkxtQlZnNThRMjJHM0Q0VlVC YVVhU0ZZWWVtUmVvYW82SmIKNjNBK0E0MVNjbEJobDE3ajc2ajFhYmxzNDBjYWVjRUVMUndR RmV3c01XeCs3MGxZTEhvN3JlUlRpTUgyOENEYQpOQUlESWRiYzVmLzBtZFVJMzBIdnlJOGNo ZTB5b3lnbXJqOW9mdHBzaGdMenBhQU1UdzhGVkhZU05XZXo4TFc5CkpwWVB4VEtCWFZlNExm NzBkN1dSQ1c0aUk3Q3VhK3p6Z3dVeTR2MEdNTFlZLytiL3dEWlZ4YmJMMHBUWDZKeXcKdjR3 R29MZE9xV1M2WlVlWlcySkpjNmVpNVA5ZnNVc1ZPU0lsVDM2SVhJYlRKVVJMZk4wejByalVN dWowQ3h3WgpBT0lvVk0xVVc4Vyt3S1VOWkI4aQo9ckhmcwotLS0tLUVORCBQR1AgU0lHTkFU VVJFLS0tLS0KCg== --------------080301080604090407010902--