unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#65504] [PATCH] gnu: emilua: Update to 0.4.3
@ 2023-08-24 11:15 Valter Sage
  2023-09-13  8:35 ` bug#65504: " Christopher Baines
  0 siblings, 1 reply; 2+ messages in thread
From: Valter Sage @ 2023-08-24 11:15 UTC (permalink / raw)
  To: 65504


[-- Attachment #1.1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #1.2: Type: text/html, Size: 26 bytes --]

[-- Attachment #2: 0001-gnu-emilua-Update-to-0.4.3.patch --]
[-- Type: text/x-patch, Size: 6170 bytes --]

From 4417bd5f9a945a003417d46739454e4c0049a981 Mon Sep 17 00:00:00 2001
From: Valter Nazianzeno <manipuladordedados@gmail.com>
Date: Thu, 24 Aug 2023 08:08:25 -0300
Subject: [PATCH] gnu: emilua: Update to 0.4.3

---
 gnu/packages/lua.scm | 92 +++++++++++++++++++++++++++++++-------------
 1 file changed, 66 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 405f8511cb..9d194a7928 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 Valter Nazianzeno <manipuladordedados@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -64,6 +65,11 @@ (define-module (gnu packages lua)
   #:use-module (gnu packages vim)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
+  #:use-module (gnu packages rdf)
+  #:use-module (gnu packages gperf)
+  #:use-module (gnu packages gawk)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages linux)
   #:use-module (srfi srfi-1))
 
 (define-public lua
@@ -1130,49 +1136,83 @@ (define-public lua-resty-shell
 (define-public emilua
   (package
    (name "emilua")
-   (version "0.3.2")
+   (version "0.4.3")
    (source (origin
             (method git-fetch)
             (uri (git-reference
                   (url "https://gitlab.com/emilua/emilua.git")
-                  (commit (string-append "v" version))
-                  ;; Current version requires Trial.Protocol and the HTTP lib
-                  ;; developed as part of GSoC 2014 for Boost, and these are
-                  ;; dependencies unlikely to be "unbundled" in future releases.
-                  (recursive? #t)))
+                  (commit (string-append "v" version))))
             (file-name (git-file-name name version))
             (sha256
              (base32
-              "1999bgrh52124a5g4qizav3x257ff2brjr855srpm1jv1nxzbygv"))))
+              "1dwag2pyqc0g86rris4w4fzafmz9a6kiqd47vdq7hl3a1lyi74mx"))))
    (build-system meson-build-system)
    (arguments
-    `(;; Tests are disabled for now due to an issue that affecs guix:
-      ;; <https://gitlab.com/emilua/emilua/-/issues/22>
+   	`(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack
+           (lambda* (#:key inputs #:allow-other-keys)
+           	 (use-modules (guix build utils))
+           	 (substitute* "src/emilua_gperf.awk" (("/usr/bin/env") (which "env")))
+           	 (substitute* "src/system.cpp" (("P_PIDFD") "P_PID"))
+             (copy-recursively (assoc-ref inputs "emilua-http")
+                               "emilua-http")
+             (copy-recursively (assoc-ref inputs "trial-protocol")
+                               "trial-protocol")                              
+             (chdir "subprojects")
+             (symlink "../emilua-http" "emilua-http")
+             (copy-file "packagefiles/emilua-http/meson.build" "emilua-http/meson.build")
+             (symlink "../trial-protocol" "trial-protocol")
+             (copy-file "packagefiles/trial.protocol/meson.build" "trial-protocol/meson.build")
+             (chdir "../")                                           
+             #t)))
       #:configure-flags
+      ;; Tests are disabled for now due to an issue that affecs guix:
+      ;; <https://gitlab.com/emilua/emilua/-/issues/22>
+      ;; Linux namespaces are disabled for now due to conflict with some packages in guix.
       (list "-Denable_http=true"
+      		"-Denable_file_io=true"
+      		"-Denable_io_uring=true"
+      		"-Denable_linux_namespaces=false"
             "-Denable_tests=false"
             "-Denable_manpages=false"
-            "-Dversion_suffix=-guix1")))
+            "-Dversion_suffix=-guix1")))            
    (native-inputs
     (list luajit-lua52-openresty
-          pkg-config
           re2c
-          xxd))
+          gperf
+          gawk
+          xxd
+          pkg-config))
    (inputs
-    (list boost
-          boost-static
-          fmt-7
-          ;; LuaJIT has a 2GiB addressing limit[1] that has been fixed on OpenResty
-          ;; fork. Emilua is severely affected by this limit, so the upstream package
-          ;; is avoided. Emilua also depends on the -DLUAJIT_ENABLE_LUA52COMPAT
-          ;; configure flag[2] for some features to work (e.g. __pairs on HTTP
-          ;; headers).
-          ;;
-          ;; [1] <http://hacksoflife.blogspot.com/2012/12/integrating-luajit-with-x-plane-64-bit.html>
-          ;; [2] <http://luajit.org/extensions.html#lua52>
-          luajit-lua52-openresty
-          ncurses
-          openssl))
+   	`(("emilua-http" ,(origin
+                        (method git-fetch)
+                        (uri (git-reference
+                              (url "https://github.com/BoostGSoC14/boost.http")
+                              (commit "93ae527c89ffc517862e1f5f54c8a257278f1195")))
+                        (sha256
+                         (base32
+                         "0jm7fw0cjd3s9zkkvyh6mcj6z32hcy7l9bszv74l92qk15ivvp9h")))
+                         )
+       ("trial-protocol" ,(origin
+                           (method git-fetch)
+                           (uri (git-reference
+                                 (url "https://github.com/breese/trial.protocol")
+                                 (commit "79149f604a49b8dfec57857ca28aaf508069b669")))
+                           (sha256
+                         	(base32
+                             "0k42i5b4v3zz5x0r3dssiymgmn2x8zg4fzdksya9aggxgigippsx"))))                                                  
+    ("boost" ,boost)     
+	("boost-static" ,boost-static)
+	("fmt-8" ,fmt-8)
+	("gcc-12" ,gcc-12)
+	("luajit-lua52-openresty" ,luajit-lua52-openresty)
+	("ncurses" ,ncurses)
+	("serd" ,serd)
+	("sord" ,sord)
+	("libcap" ,libcap)
+	("liburing" ,liburing)
+	("openssl" ,openssl)))
    (native-search-paths
     (list
      (search-path-specification

base-commit: 39fa1ef033fda82cb1d122e0d1675b51acb1db34
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#65504: [PATCH] gnu: emilua: Update to 0.4.3
  2023-08-24 11:15 [bug#65504] [PATCH] gnu: emilua: Update to 0.4.3 Valter Sage
@ 2023-09-13  8:35 ` Christopher Baines
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Baines @ 2023-09-13  8:35 UTC (permalink / raw)
  To: Valter Sage; +Cc: 65504-done

[-- Attachment #1: Type: text/plain, Size: 3225 bytes --]

Hi Valter,

I started looking at this as it had passed QA, although while it
arguably hadn't made the situation worse, the package looks to have been
failing to build before, and it was still failing to build with these
changes.

guix lint also was reporting a load of new issues:

→ ./pre-inst-env guix lint emilua
gnu/packages/lua.scm:1188:8: emilua@0.4.3: label 'fmt-8' does not match package name 'fmt'
gnu/packages/lua.scm:1188:8: emilua@0.4.3: label 'gcc-12' does not match package name 'gcc'
gnu/packages/lua.scm:1151:8: emilua@0.4.3: invalid phase clause
gnu/packages/lua.scm:1151:3: emilua@0.4.3: tabulation on line 1151, column 3
gnu/packages/lua.scm:1155:11: emilua@0.4.3: tabulation on line 1155, column 11
gnu/packages/lua.scm:1156:11: emilua@0.4.3: tabulation on line 1156, column 11
gnu/packages/lua.scm:1157:11: emilua@0.4.3: tabulation on line 1157, column 11
gnu/packages/lua.scm:1161:0: emilua@0.4.3: trailing white space on line 1161
gnu/packages/lua.scm:1166:0: emilua@0.4.3: line 1166 is way too long (95 characters)
gnu/packages/lua.scm:1167:0: emilua@0.4.3: trailing white space on line 1167
gnu/packages/lua.scm:1174:6: emilua@0.4.3: tabulation on line 1174, column 6
gnu/packages/lua.scm:1175:6: emilua@0.4.3: tabulation on line 1175, column 6
gnu/packages/lua.scm:1176:6: emilua@0.4.3: tabulation on line 1176, column 6
gnu/packages/lua.scm:1179:0: emilua@0.4.3: trailing white space on line 1179
gnu/packages/lua.scm:1188:3: emilua@0.4.3: tabulation on line 1188, column 3
gnu/packages/lua.scm:1196:0: emilua@0.4.3: parentheses feel lonely, move to the previous or next line
gnu/packages/lua.scm:1203:25: emilua@0.4.3: tabulation on line 1203, column 25
gnu/packages/lua.scm:1204:0: emilua@0.4.3: trailing white space on line 1204
gnu/packages/lua.scm:1204:0: emilua@0.4.3: line 1204 is way too long (137 characters)
gnu/packages/lua.scm:1205:0: emilua@0.4.3: trailing white space on line 1205
gnu/packages/lua.scm:1206:0: emilua@0.4.3: tabulation on line 1206, column 0
gnu/packages/lua.scm:1207:0: emilua@0.4.3: tabulation on line 1207, column 0
gnu/packages/lua.scm:1208:0: emilua@0.4.3: tabulation on line 1208, column 0
gnu/packages/lua.scm:1209:0: emilua@0.4.3: tabulation on line 1209, column 0
gnu/packages/lua.scm:1210:0: emilua@0.4.3: tabulation on line 1210, column 0
gnu/packages/lua.scm:1211:0: emilua@0.4.3: tabulation on line 1211, column 0
gnu/packages/lua.scm:1212:0: emilua@0.4.3: tabulation on line 1212, column 0
gnu/packages/lua.scm:1213:0: emilua@0.4.3: tabulation on line 1213, column 0
gnu/packages/lua.scm:1214:0: emilua@0.4.3: tabulation on line 1214, column 0
gnu/packages/lua.scm:1215:0: emilua@0.4.3: tabulation on line 1215, column 0


I've now gone through and fixed all these, the "invalid build clause" as
mentioned by guix lint was what was causing the package to fail to
build. Luckily, I also saw the patch posted to #65515, so I've merged
those changes in here.

Other small tweaks I made include using with-directory-excursion in the
arguments, and removing gawk as a native-input (I think the build system
provides gawk).

I've pushed this to master as 10bc07671e2a3a699d4f56e405f50d766323319a.

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-13  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 11:15 [bug#65504] [PATCH] gnu: emilua: Update to 0.4.3 Valter Sage
2023-09-13  8:35 ` bug#65504: " Christopher Baines

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).