unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Bruno Victal <mirai@makinata.eu>
To: 64449@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#64449] [PATCH v2 2/4] gnu: lua-ossl: Use G-expressions.
Date: Thu, 31 Aug 2023 16:03:40 +0100	[thread overview]
Message-ID: <da165140212215746cb48733e7b85f486ff4ca3a.1693494137.git.mirai@makinata.eu> (raw)
In-Reply-To: <cover.1688422815.git.mirai@makinata.eu>

Dropped obsolete flag due to <https://github.com/wahern/luaossl/pull/61>.

* gnu/packages/lua.scm (make-lua-ossl): Use G-Expressions.
[arguments]<#:make-flags>: Drop obsolete flag.
<#:phases>: Add 'remove-luajit-test and 'remove-cqueues-test.
---
 gnu/packages/lua.scm | 99 ++++++++++++++++++++++++--------------------
 1 file changed, 55 insertions(+), 44 deletions(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index f98999efc0..8726b7a8db 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -19,6 +19,7 @@
 ;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
 ;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
 ;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -368,54 +369,64 @@ (define-public lua5.2-filesystem
   (make-lua-filesystem "lua5.2-filesystem" lua-5.2))
 
 (define (make-lua-ossl name lua)
-  (package
-    (name name)
-    (version "20220711")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/wahern/luaossl")
-                    (commit (string-append "rel-" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "1a9pgmc6fbhgh1m9ksz9fq057yzz46npqgakcsy9vngg47xacfdb"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:make-flags
-       (let ((out (assoc-ref %outputs "out"))
-             (lua-api-version ,(version-major+minor (package-version lua))))
-         (list ,(string-append "CC=" (cc-for-target))
-               "CFLAGS='-D HAVE_SYS_SYSCTL_H=0'" ; sys/sysctl.h is deprecated
-               (string-append "prefix=" out)
-               (string-append "LUA_APIS=" lua-api-version)))
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (delete 'check)
-         (add-after 'install 'check
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (lua-version ,(version-major+minor (package-version lua))))
-               (setenv "LUA_CPATH"
-                       (string-append out "/lib/lua/" lua-version "/?.so;;"))
-               (setenv "LUA_PATH"
-                       (string-append out "/share/lua/" lua-version "/?.lua;;"))
-               (with-directory-excursion "regress"
-                 (for-each (lambda (f)
-                             (invoke "lua" f))
-                           (find-files "." "^[0-9].*\\.lua$"))))
-             #t)))))
-    (inputs
-     (list lua openssl))
-    (home-page "https://25thandclement.com/~william/projects/luaossl.html")
-    (synopsis "OpenSSL bindings for Lua")
-    (description "The luaossl extension module for Lua provides comprehensive,
+  (let ((lua-api-version (version-major+minor (package-version lua))))
+    (package
+      (name name)
+      (version "20220711")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/wahern/luaossl")
+                      (commit (string-append "rel-" version))))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1a9pgmc6fbhgh1m9ksz9fq057yzz46npqgakcsy9vngg47xacfdb"))))
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        #:make-flags
+        #~(list #$(string-append "CC=" (cc-for-target))
+                #$(string-append "LUA_APIS=" lua-api-version)
+                (string-append "prefix=" #$output))
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'remove-luajit-test
+              (lambda _
+                ;; This test is only meaningful for luajit.
+                ;; <https://lua-users.org/lists/lua-l/2021-01/msg00324.html>
+                (unless (string-prefix? "luajit" #$(package-name lua))
+                  (delete-file "regress/104-interposition-discarded.lua"))))
+            (add-after 'unpack 'remove-cqueues-test
+              (lambda _
+                ;; XXX: This test depends on cqueues and cqueues has a test
+                ;; that depends on lua-ossl.
+                (delete-file "regress/148-custom-extensions.lua")))
+            (delete 'configure)
+            (delete 'check)  ; place 'check after 'install
+            (add-after 'install 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (setenv "LUA_CPATH"
+                          (string-append #$output "/lib/lua/"
+                                         #$lua-api-version "/?.so;;"))
+                  (setenv "LUA_PATH"
+                          (string-append #$output "/share/lua/"
+                                         #$lua-api-version "/?.lua;;"))
+                  (with-directory-excursion "regress"
+                    (for-each (lambda (f)
+                                (invoke "lua" f))
+                              (find-files "." "^[0-9].*\\.lua$")))))))))
+      (inputs
+       (list lua openssl))
+      (home-page "https://25thandclement.com/~william/projects/luaossl.html")
+      (synopsis "OpenSSL bindings for Lua")
+      (description "The luaossl extension module for Lua provides comprehensive,
 low-level bindings to the OpenSSL library, including support for certificate and
 key management, key generation, signature verification, and deep bindings to the
 distinguished name, alternative name, and X.509v3 extension interfaces.  It also
 binds OpenSSL's bignum, message digest, HMAC, cipher, and CSPRNG interfaces.")
-    (license license:expat)))
+      (license license:expat))))
 
 (define-public lua-ossl
   (make-lua-ossl "lua-ossl" lua))
-- 
2.40.1





  parent reply	other threads:[~2023-08-31 15:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03 22:26 [bug#64449] [PATCH 0/4] Fix lua-cqueues build failure Bruno Victal
2023-07-03 22:28 ` [bug#64449] [PATCH 1/4] gnu: lua-ossl: Update to 20220711 Bruno Victal
2023-08-30 19:54   ` [bug#64449] [PATCH 0/4] Fix lua-cqueues build failure Maxim Cournoyer
2023-07-03 22:28 ` [bug#64449] [PATCH 2/4] gnu: lua-ossl: Use G-expressions Bruno Victal
2023-08-30 19:55   ` [bug#64449] [PATCH 0/4] Fix lua-cqueues build failure Maxim Cournoyer
2023-07-03 22:28 ` [bug#64449] [PATCH 3/4] gnu: lua-cqueues: Update to 20200726 Bruno Victal
2023-08-30 19:57   ` [bug#64449] [PATCH 0/4] Fix lua-cqueues build failure Maxim Cournoyer
2023-07-03 22:28 ` [bug#64449] [PATCH 4/4] gnu: lua-cqueues: Refactor package definition Bruno Victal
2023-08-30 19:57   ` [bug#64449] [PATCH 0/4] Fix lua-cqueues build failure Maxim Cournoyer
2023-08-31 15:03 ` [bug#64449] [PATCH v2 1/4] gnu: lua-ossl: Update to 20220711 Bruno Victal
2023-08-31 15:03 ` Bruno Victal [this message]
2023-08-31 15:03 ` [bug#64449] [PATCH v2 3/4] gnu: lua-cqueues: Update to 20200726 Bruno Victal
2023-08-31 15:03 ` [bug#64449] [PATCH v2 4/4] gnu: lua-cqueues: Refactor package definition Bruno Victal
2023-10-09  0:51 ` [bug#64449] [PATCH 0/4] Fix lua-cqueues build failure Bruno Victal

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=da165140212215746cb48733e7b85f486ff4ca3a.1693494137.git.mirai@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=64449@debbugs.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).