unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: guix-devel@gnu.org
Subject: [PATCH 1/1] gnu: lua: Build with dynamic library support.
Date: Mon, 26 Oct 2015 23:56:09 -0400	[thread overview]
Message-ID: <45ab1898e5c08ef1f8c7070eae77c58e5dd40296.1445918045.git.leo@famulari.name> (raw)
In-Reply-To: <cover.1445918045.git.leo@famulari.name>
In-Reply-To: <cover.1445918045.git.leo@famulari.name>

* gnu/packages/lua.scm (lua, lua-5.1)[arguments]: Set the make flags
  properly for each version of lua.
---
 gnu/packages/lua.scm | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 87f53d1..7699a91 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -24,6 +24,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages readline))
 
@@ -47,7 +48,7 @@
        #:test-target "test"
        #:phases (alist-replace
                  'build
-                 (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux")))
+                 (lambda _ (zero? (system* "make" "MYCFLAGS=-fPIC" "linux")))
                  (alist-replace
                   'install
                   (lambda* (#:key outputs #:allow-other-keys)
@@ -77,7 +78,23 @@ for configuration, scripting, and rapid prototyping.")
                                  version ".tar.gz"))
              (sha256
               (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16"))
-             (patches (list (search-patch "lua51-liblua-so.patch")))))))
+             (patches (list (search-patch "lua51-liblua-so.patch")))))
+    (arguments
+      (substitute-keyword-arguments (package-arguments lua)
+        ((#:phases lua-phases)
+          `(modify-phases ,lua-phases
+             (replace
+               'build
+               (lambda _
+                 (and
+                  (zero? (system* "make" (string-append
+                                    "MYCFLAGS="
+                                    (string-join '("-fPIC "
+                                                   "-DLUA_USE_LINUX "
+                                                   "MYLIBS=-Wl,-E "
+                                                   "-ldl -lreadline "
+                                                   "-lhistory -lncurses")))
+                                    "linux")))))))))))
 
 (define-public luajit
   (package
@@ -89,8 +106,8 @@ for configuration, scripting, and rapid prototyping.")
                                   version ".tar.gz"))
               (sha256
                (base32 "0ydxpqkmsn2c341j4r2v6r5r0ig3kbwv3i9jran3iv81s6r6rgjm"))
-	      (patches (list (search-patch "luajit-symlinks.patch")
-			     (search-patch "luajit-no_ldconfig.patch")))))
+              (patches (list (search-patch "luajit-symlinks.patch")
+                             (search-patch "luajit-no_ldconfig.patch")))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f                      ;luajit is distributed without tests
-- 
2.6.1

  reply	other threads:[~2015-10-27  3:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27  3:56 [PATCH 0/1] lua: Build with dynamic library support Leo Famulari
2015-10-27  3:56 ` Leo Famulari [this message]
2015-10-27 12:47   ` [PATCH 1/1] gnu: " Ludovic Courtès
2015-10-27 14:13     ` Leo Famulari
2015-10-27 15:48       ` Ludovic Courtès
2015-10-28  3:32         ` Leo Famulari
2015-10-28 22:47           ` Leo Famulari
2015-10-29 20:49             ` Ludovic Courtès
2015-10-29 20:46           ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45ab1898e5c08ef1f8c7070eae77c58e5dd40296.1445918045.git.leo@famulari.name \
    --to=leo@famulari.name \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).