unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Martin Becze <mjbecze@riseup.net>
To: 43183@debbugs.gnu.org
Cc: Martin Becze <mjbecze@riseup.net>
Subject: [bug#43183] [PATCH v2 2/5] gnu: guile-pfds: When using Guile 3, compile as a r6rs library.
Date: Fri,  4 Sep 2020 15:25:14 -0500	[thread overview]
Message-ID: <20200904202517.6131-3-mjbecze@riseup.net> (raw)
In-Reply-To: <20200904202517.6131-1-mjbecze@riseup.net>

This allow the package to be resused by r6rs compliant scheme implementations
that expect *.sls files.

* gnu/packages/guile-xyz.scm (guile2.2-pfds): Rename *.sls files to *.scm
since Guile 2 does not support the sls extension.
(guile-pfds): Removed the renaming of files to *.sls to *.scm.
---
 gnu/packages/guile-xyz.scm | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index fa6855f43d..308ce0ad59 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -798,6 +798,7 @@ using Guile's foreign function interface.")
     (build-system guile-build-system)
     (arguments
      '(#:source-directory "src"
+       #:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
        #:phases (modify-phases %standard-phases
                   (add-after 'unpack 'move-files-around
                     (lambda _
@@ -806,8 +807,7 @@ using Guile's foreign function interface.")
                       (mkdir-p "src/pfds")
                       (for-each (lambda (file)
                                   (rename-file file
-                                               (string-append "src/pfds/"
-                                                              file)))
+                                    (string-append "src/pfds/" file)))
                                 '("bbtrees.sls"
                                   "deques"
                                   "deques.sls"
@@ -821,15 +821,6 @@ using Guile's foreign function interface.")
                                   "queues.sls"
                                   "sequences.sls"
                                   "sets.sls"))
-
-                      ;; In Guile <= 2.2.4, there's no way to tell 'guild
-                      ;; compile' to accept the ".sls" extension.  So...
-                      (for-each (lambda (file)
-                                  (rename-file file
-                                               (string-append
-                                                (string-drop-right file 4)
-                                                ".scm")))
-                                (find-files "." "\\.sls$"))
                       #t)))))
     (native-inputs
      `(("guile" ,guile-3.0)))
@@ -862,7 +853,18 @@ Vicare Scheme and IronScheme.  Right now it contains:
      (substitute-keyword-arguments (package-arguments guile-pfds)
        ((#:phases phases)
         `(modify-phases ,phases
-           (delete 'work-around-guile-bug)))))))
+           (delete 'work-around-guile-bug)
+           (add-after 'move-files-around 'sls->scm
+             (lambda _
+               ;; In Guile <= 2.2.4, there's no way to tell 'guild
+               ;; compile' to accept the ".sls" extension.  So...
+               (for-each (lambda (file)
+                           (rename-file file
+                                        (string-append
+                                         (string-drop-right file 4)
+                                         ".scm")))
+                         (find-files "." "\\.sls$"))
+               #t))))))))
 
 (define-public guile3.0-pfds
   (deprecated-package "guile3.0-pfds" guile-pfds))
-- 
2.28.0





  parent reply	other threads:[~2020-09-04 21:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 15:02 [bug#43183] [PATCH] gnu: Add loko-scheme Martin Becze
2020-09-04  6:43 ` Mathieu Othacehe
2020-09-04  6:49   ` Martin Becze
2020-09-04  7:16     ` Mathieu Othacehe
2020-09-04  7:33       ` Ricardo Wurmus
2020-09-04 20:25 ` [bug#43183] [PATCH v2 0/5] " Martin Becze
2020-09-04 20:25   ` [bug#43183] [PATCH v2 1/5] " Martin Becze
2020-09-04 20:25   ` Martin Becze [this message]
2020-09-07  6:30     ` [bug#43183] [PATCH v2 2/5] gnu: guile-pfds: When using Guile 3, compile as a r6rs library Mathieu Othacehe
2020-09-04 20:25   ` [bug#43183] [PATCH v2 3/5] gnu: Add guile-struct-pack Martin Becze
2020-09-07  6:30     ` Mathieu Othacehe
2020-09-08 16:04       ` Martin Becze
2020-09-10  7:37         ` bug#43183: " Mathieu Othacehe
2020-09-04 20:25   ` [bug#43183] [PATCH v2 4/5] gnu: Add guile-machine-code Martin Becze
2020-09-04 20:25   ` [bug#43183] [PATCH v2 5/5] gnu: Add guile-laesare Martin Becze
2020-09-08 15:59 ` [bug#43183] [PATCH v3 0/4] Add loko-scheme Martin Becze
2020-09-08 15:59   ` [bug#43183] [PATCH v3 1/4] gnu: Add guile-struct-pack Martin Becze
2020-09-08 15:59   ` [bug#43183] [PATCH v3 2/4] gnu: Add guile-machine-code Martin Becze
2020-09-08 15:59   ` [bug#43183] [PATCH v3 3/4] gnu: Add guile-laesare Martin Becze
2020-09-08 15:59   ` [bug#43183] [PATCH v3 4/4] gnu: Add loko-scheme Martin Becze

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=20200904202517.6131-3-mjbecze@riseup.net \
    --to=mjbecze@riseup.net \
    --cc=43183@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).