Subject: [bug#57365] [PATCH] gnu: guile-smc: Update to 0.5.0

From: "Artyom V. Poptsov" <[email-masked]>
Date: Fri, 02 Sep 2022 09:20:13 +0300

Hello,

I released Guile-SMC 0.5.2:
  https://lists.gnu.org/archive/html/guile-user/2022-09/msg00002.html

And Guile-INI 0.5.1:
  https://lists.gnu.org/archive/html/guile-user/2022-09/msg00003.html

So I updated both Guile-SMC and Guile-INI package definitions
accordingly.

Not sure if I should create a new thread in the mailing list for this.

For now please find updated patches attached below.

From 44c116ba5935b925fe976a720283a19f53128906 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <[email-masked]>
Date: Tue, 23 Aug 2022 21:10:13 +0300
Subject: [PATCH 1/2] gnu: guile-smc: Update to 0.5.2.

* gnu/packages/guile-xyz.scm (guile-smc): Update to 0.5.2.
  [native-inputs]: Add "help2man" and "which".
  [inputs]: Use the new inputs style.
---
 gnu/packages/guile-xyz.scm | 31 +++++++------------------------
 1 file changed, 7 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 8ba38c87d8..11fa92d08a 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -4864,7 +4864,7 @@ (define-public guile-gitlab
 (define-public guile-smc
   (package
     (name "guile-smc")
-    (version "0.3.0")
+    (version "0.5.2")
     (source
      (origin
        (method git-fetch)
@@ -4874,7 +4874,7 @@ (define-public guile-smc
        (file-name (string-append name "-" version))
        (sha256
         (base32
-         "0szkjmasi70m1vppck7nhdxg4lnxzjq6mihi6r1552s8sxm5z008"))))
+         "05q20vi59whjs7jb8bgcxnnfy6c3wx26m5ps2fwlsz52nggarxzb"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags '("GUILE_AUTO_COMPILE=0")     ;to prevent guild warnings
@@ -4886,23 +4886,6 @@ (define-public guile-smc
        #:phases
        (modify-phases %standard-phases
          (delete 'strip)
-         (add-after 'configure 'patch
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (substitute* "modules/smc/core/log.scm"
-               (("  #:use-module \\(logging logger\\)")
-                (string-append
-                 "  #:use-module (logging logger)\n"
-                 "  #:use-module (logging rotating-log)"))
-               (("#:init-value \"logger\"")
-                (format #f
-                        "#:init-value \"~a/bin/logger\""
-                        (assoc-ref inputs "inetutils")))
-             (("\\(add-handler! %logger %syslog\\)")
-              (string-append
-               "(add-handler! %logger\n"
-               "              (make <rotating-log>\n"
-               "                    #:file-name \"smc.log\"))\n")))
-             #t))
          (add-after 'install 'wrap-program
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out       (assoc-ref outputs "out"))
@@ -4922,12 +4905,12 @@ (define-public guile-smc
                     ,(string-append guile-lib go)))))
              #t)))))
     (native-inputs
-     (list autoconf automake pkg-config texinfo))
+     (list autoconf automake pkg-config texinfo help2man which))
     (inputs
-     `(("bash"      ,bash-minimal)
-       ("guile"     ,guile-3.0)
-       ("guile-lib" ,guile-lib)
-       ("inetutils" ,inetutils)))
+     (list bash-minimal
+           guile-3.0
+           guile-lib
+           inetutils))
     (home-page "https://github.com/artyom-poptsov/guile-smc")
     (synopsis "GNU Guile state machine compiler")
     (description
-- 
2.34.1

From a9eff226c36bf0a8a1356da17f5ca1434fa9d593 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <[email-masked]>
Date: Tue, 23 Aug 2022 21:41:47 +0300
Subject: [PATCH 2/2] gnu: guile-ini: Update to 0.5.1.

* gnu/packages/guile-xyz.scm (guile-ini): Update to 0.5.1.
---
 gnu/packages/guile-xyz.scm | 45 +++++++++++++++++++++-----------------
 1 file changed, 25 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 11fa92d08a..7df3012568 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -4931,28 +4931,33 @@ (define-public guile-smc
 (define-public guile-ini
   (package
     (name "guile-ini")
-    (version "0.3.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/artyom-poptsov/guile-ini")
-             (commit (string-append "v" version))))
-       (file-name (string-append name "-" version))
-       (sha256
-        (base32
-         "0injn60530valhx3gsmdp72g6z886yf0n08hscky21h3dafm14kc"))))
+    (version "0.5.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/artyom-poptsov/guile-ini")
+                    (commit (string-append "v" version))))
+              (file-name (string-append name "-" version))
+              (sha256
+               (base32
+                "0ky7sffxywc2p84q5kdsphr99q0g5gy45rj0vx7f77hwpfm2093x"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:make-flags '("GUILE_AUTO_COMPILE=0")))     ;to prevent guild warnings
-    (native-inputs
-     (list autoconf automake pkg-config texinfo))
-    (inputs
-     `(("bash" ,bash-minimal)
-       ("guile" ,guile-3.0)
-       ("guile-lib" ,guile-lib)))
-    (propagated-inputs
-     (list guile-smc))
+     `(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
+       #:phases (modify-phases %standard-phases
+                  (delete 'strip)
+                  (add-before 'build 'generate-fsm-context
+                    ;; Make sure the intermediate FSM context is present
+                    ;; before the build.
+                    (lambda _
+                      (let ((cwd (getcwd)))
+                        (chdir "modules/ini/")
+                        (invoke "make" "GUILE_AUTO_COMPILE=0"
+                                "fsm-context.scm")
+                        (chdir cwd)))))))
+    (native-inputs (list autoconf automake pkg-config texinfo))
+    (inputs (list bash-minimal guile-3.0 guile-lib))
+    (propagated-inputs (list guile-smc))
     (home-page "https://github.com/artyom-poptsov/guile-ini")
     (synopsis "Guile library for INI format support")
     (description
-- 
2.34.1

Thanks,

- Artyom
  
-- 
Artyom "avp" Poptsov <[email-masked]>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F