From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20=C4=8Cech?= Subject: [PATCH] gnu: luajit: install symlinks for libluajit library Date: Tue, 3 Feb 2015 01:08:55 +0100 Message-ID: <1422922135-2788-1-git-send-email-sleep_walker@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIR3D-0005vd-VH for guix-devel@gnu.org; Mon, 02 Feb 2015 19:09:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIR3A-00071d-Jp for guix-devel@gnu.org; Mon, 02 Feb 2015 19:09:07 -0500 Received: from cantor2.suse.de ([195.135.220.15]:45169 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIR3A-00071Y-AZ for guix-devel@gnu.org; Mon, 02 Feb 2015 19:09:04 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 818F2AAD1 for ; Tue, 3 Feb 2015 00:09:03 +0000 (UTC) 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 * gnu/packages/lua.scm (luajit): don't require ldconfig - add "LDCONFIG=3D= true" to make command line, add luajit-2.0.3-symlink.patch so both symlinks a= re created * gnu/packages/patches/luajit-2.0.3-symlink.patch: New file * gnu-system.am (dist_patch_DATA): Adjust accordingly. Install phase of luajit contained: ldconfig /gnu/store/=E2=80=A6-luajit-2.0.3/lib && \ ln -sf libluajit-5.1.so.2.0.3 /gnu/store/=E2=80=A6-luajit-2.0.3/lib/liblu= ajit-5.1.so && \ ln -sf libluajit-5.1.so.2.0.3 /gnu/store/=E2=80=A6-luajit-2.0.3/lib/liblu= ajit-5.1.so || : 1) When ldconfig is missing, symlinks are not created but whole expressio= n returns no error. This cause linker not to find proper library when building package against luajit and libluajit-5.1.a is used instead. W= ith 'LDCONFIG=3Dtrue' it ommits the problem. 2) same symlink is created twice, luajit-2.0.3-symlink.patch fixes that. --- gnu-system.am | 1 + gnu/packages/lua.scm | 7 +++++-- gnu/packages/patches/luajit-2.0.3-symlink.patch | 12 ++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/luajit-2.0.3-symlink.patch diff --git a/gnu-system.am b/gnu-system.am index 706ad57..45f03fe 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -421,6 +421,7 @@ dist_patch_DATA =3D \ gnu/packages/patches/libssh-CVE-2014-0017.patch \ gnu/packages/patches/lm-sensors-hwmon-attrs.patch \ gnu/packages/patches/lua51-liblua-so.patch \ + gnu/packages/patches/luajit-2.0.3-symlink.patch \ gnu/packages/patches/luit-posix.patch \ gnu/packages/patches/m4-gets-undeclared.patch \ gnu/packages/patches/make-impure-dirs.patch \ diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index eda69f9..8379419 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -87,12 +87,15 @@ for configuration, scripting, and rapid prototyping."= ) (uri (string-append "http://luajit.org/download/LuaJIT-" version ".tar.gz")) (sha256 - (base32 "0ydxpqkmsn2c341j4r2v6r5r0ig3kbwv3i9jran3iv81s6r6= rgjm")))) + (base32 "0ydxpqkmsn2c341j4r2v6r5r0ig3kbwv3i9jran3iv81s6r6= rgjm")) + (patches (list (search-patch "luajit-2.0.3-symlink.patch")= )))) (build-system gnu-build-system) (arguments '(#:tests? #f ;luajit is distributed without t= ests #:phases (alist-delete 'configure %standard-phases) - #:make-flags (list (string-append "PREFIX=3D" (assoc-ref %outputs= "out"))))) + ; poorly formulated expression doesn't create symlinks for dynami= c library on ldconfig failure + ; ldconfig is useless anyway so success always with `true' + #:make-flags (list "LDCONFIG=3Dtrue" (string-append "PREFIX=3D" (= assoc-ref %outputs "out"))))) (home-page "http://www.luajit.org/") (synopsis "Just in time compiler for Lua programming language versio= n 5.1") (description diff --git a/gnu/packages/patches/luajit-2.0.3-symlink.patch b/gnu/packag= es/patches/luajit-2.0.3-symlink.patch new file mode 100644 index 0000000..c6b4eec --- /dev/null +++ b/gnu/packages/patches/luajit-2.0.3-symlink.patch @@ -0,0 +1,12 @@ +diff -up LuaJIT-2.0.3/Makefile.orig LuaJIT-2.0.3/Makefile +--- LuaJIT-2.0.3/Makefile.orig 2014-03-12 13:10:00.000000000 +0100 ++++ LuaJIT-2.0.3/Makefile 2015-02-02 23:52:30.774723789 +0100 +@@ -56,7 +56,7 @@ INSTALL_PCNAME=3D luajit.pc + INSTALL_STATIC=3D $(INSTALL_LIB)/$(INSTALL_ANAME) + INSTALL_DYN=3D $(INSTALL_LIB)/$(INSTALL_SONAME) + INSTALL_SHORT1=3D $(INSTALL_LIB)/$(INSTALL_SOSHORT) +-INSTALL_SHORT2=3D $(INSTALL_LIB)/$(INSTALL_SOSHORT) ++INSTALL_SHORT2=3D $(INSTALL_LIB)/$(INSTALL_SOSHORT).$(MAJVER) + INSTALL_T=3D $(INSTALL_BIN)/$(INSTALL_TNAME) + INSTALL_TSYM=3D $(INSTALL_BIN)/$(INSTALL_TSYMNAME) + INSTALL_PC=3D $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME) --=20 2.0.5