From mboxrd@z Thu Jan 1 00:00:00 1970 From: lemonnierk@ulrar.net Subject: gnu: Have lua-5.1 compile a .so Date: Thu, 11 Sep 2014 00:31:35 +0200 Message-ID: <20140910223135.GF31169@luwin.ulrar.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OzxllxdKGCiKxUZM" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRqQV-0005fB-EM for guix-devel@gnu.org; Wed, 10 Sep 2014 18:31:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRqQN-0003uG-JG for guix-devel@gnu.org; Wed, 10 Sep 2014 18:31:47 -0400 Received: from luwin.ulrar.net ([46.105.101.59]:49160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRqQN-0003u0-66 for guix-devel@gnu.org; Wed, 10 Sep 2014 18:31:39 -0400 Received: from localhost (localhost [127.0.0.1]) by luwin.ulrar.net (Postfix) with ESMTP id 65880414AD for ; Thu, 11 Sep 2014 00:31:38 +0200 (CEST) Received: from luwin.ulrar.net ([127.0.0.1]) by localhost (luwin.ulrar.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VOea2OsMNec3 for ; Thu, 11 Sep 2014 00:31:36 +0200 (CEST) Received: from luwin.ulrar.net (luwin.ulrar.net [46.105.101.59]) by luwin.ulrar.net (Postfix) with ESMTPSA id DB7CD3FF33 for ; Thu, 11 Sep 2014 00:31:36 +0200 (CEST) Content-Disposition: inline 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@gnu.org --OzxllxdKGCiKxUZM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. =46rom 85a422fb581650542644b711b180bc95a47c990d Mon Sep 17 00:00:00 2001 =46rom: Kevin Lemonnier Date: Thu, 11 Sep 2014 02:22:10 +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 | 4 +- gnu/packages/patches/lua51-liblua-so.patch | 59 ++++++++++++++++++++++++++= ++++ 2 files changed, 62 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..7d68dba 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -75,7 +75,9 @@ for configuration, scripting, and rapid prototyping.") (uri (string-append "http://www.lua.org/ftp/lua-" version ".tar.gz")) (sha256 - (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh1= 6")))))) + (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh1= 6")) + (patches (list (search-patch "lua51-liblua-so.patch"))) + (patch-flags '("-p1")))))) =20 (define-public luajit (package diff --git a/gnu/packages/patches/lua51-liblua-so.patch b/gnu/packages/patc= hes/lua51-liblua-so.patch new file mode 100644 index 0000000..9cfcb93 --- /dev/null +++ b/gnu/packages/patches/lua51-liblua-so.patch @@ -0,0 +1,59 @@ +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=3D lua luac + TO_INC=3D lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp +-TO_LIB=3D liblua.a ++TO_LIB=3D liblua.a liblua.so liblua.so.${V} + TO_MAN=3D lua.1 luac.1 +=20 + # Lua version and release. +@@ -53,7 +53,7 @@ + all: $(PLAT) +=20 + $(PLATS) clean: +- cd src && $(MAKE) $@ ++ cd src && $(MAKE) $@ V=3D$(V) R=3D$(R) +=20 + 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=3D none +=20 + CC=3D gcc +-CFLAGS=3D -O2 -Wall $(MYCFLAGS) ++CFLAGS=3D -O2 -Wall $(MYCFLAGS) -fPIC + AR=3D ar rcu + RANLIB=3D ranlib + RM=3D rm -f +@@ -34,9 +34,10 @@ +=20 + LUAC_T=3D luac + LUAC_O=3D luac.o print.o ++LUA_SO=3D liblua.so +=20 + ALL_O=3D $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) +-ALL_T=3D $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T=3D $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) + ALL_A=3D $(LUA_A) +=20 + default: $(PLAT) +@@ -57,6 +58,13 @@ + $(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) +=20 ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFL= AGS) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO) ++ ++ ++ + clean: + $(RM) $(ALL_T) $(ALL_O) +=20 --=20 1.8.4 --=20 Kevin Lemonnier PGP Fingerprint : C123 47CA 9E64 FCF0 3907 --OzxllxdKGCiKxUZM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUENFHAAoJEEfKnmT88DkHbAIP/06fJ+3sizPd0A/Fom5uG8iy RI3F8UuR6zcVQcxIoJ3Lv9h+TVKPpMHINPDQP5QQCiFWwR57XV7D51haMoi8gV83 PuK/RG/nKtb5Z05RoOc2HFHiR2PZdnILpRfacReFm+jMNN7zXcZI1nCkzdEAbR2t z1/GRsVsRaXfET0jRSu0Z+Uuq7z4A5sqwy3rYUxx0aC3Nt49bw/k3jN97eP+HsQ9 4izHEAUidNYfUSsI305aAF9/nkX/QMlMYNKbKg6Y9r/WQ+9eMpunHya8MyMFtyrX Afhpc0ZgdkkpxempLqeWtjSOZjZNN2DC0MXbVyzcm5LFz5QTfCdcTvAI4TR0ZS6D vfDeXqu71gy3ybOtBflZad2BEwqfND0l1T3khKzujvRMsq1OZC/q+8m1BY7fVbPP TG1de4+knkufDgItmVSQ3pKVzb6WnlMJgV7z/Xtu0q0z5D4/Ev9oUrP8O6udDJx5 KBkUn9vDugS0WH3HEP/kuTgWXI3BcvajMw3f3vswtwuwpXPS5WfOnvcNO+p3rj1a AuOFlYGKDGp3pcjVCMFfM2G7TiQFgUWOGOVFNUBz9znsxPP8qDuxf9iMEE06vAVK 9vPGFWNxu65FVfb7TdrWNFmq6flIb0lLq/HXSb1ZTbucuFDrAxECrfH5cgNpA7Jd VloESRG2faIVoPEWMIZr =OlPV -----END PGP SIGNATURE----- --OzxllxdKGCiKxUZM--