unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Paul A. Patience" <paul@apatience.com>
To: 55179@debbugs.gnu.org
Cc: "Paul A. Patience" <paul@apatience.com>
Subject: [bug#55179] [WIP PATCH 07/30] gnu: rakudo: Update to 2022.04.
Date: Fri, 29 Apr 2022 05:17:42 +0000	[thread overview]
Message-ID: <20220429051700.373076-7-paul@apatience.com> (raw)
In-Reply-To: <20220429051700.373076-1-paul@apatience.com>

* gnu/packages/perl6.scm (rakudo): Update to 2022.04.
[source]: Add snippet to delete bundled 3rdparty directory.
[arguments]: Add 'remove-calls-to-git', 'fix-paths' and
'disable-failing-tests' phases. Remove 'patch-source-date' phase. Adjust
files in 'patch-more-shebangs' phase and sort them. Remove redundant
'./' from 'configure' phase. Replace Perl extensions and paths with Raku
equivalents in 'install-dist-tool' phase.
[native-inputs]: Add nqp-configure.
[synopsis, description]: Replace mentions of Perl with Raku.

* guix/build/rakudo-build-system.scm (install): Replace Perl extension
with Raku extension.
---
 gnu/packages/perl6.scm             | 71 +++++++++++++++++++++---------
 guix/build/rakudo-build-system.scm |  2 +-
 2 files changed, 50 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/perl6.scm b/gnu/packages/perl6.scm
index 0e0c352892..3dfdeec4f1 100644
--- a/gnu/packages/perl6.scm
+++ b/gnu/packages/perl6.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages perl6)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls))

@@ -220,48 +222,73 @@ (define-public nqp
 (define-public rakudo
   (package
     (name "rakudo")
-    (version "2019.03.1")
+    (version "2022.04")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://rakudo.perl6.org/downloads/rakudo/rakudo-"
-                           version ".tar.gz"))
+       (uri (string-append "https://github.com/rakudo/rakudo/releases/download/"
+                           version "/rakudo-" version ".tar.gz"))
        (sha256
-        (base32
-         "1nllf69v8xr6v3kkj7pmryg11n5m3ajfkr7j72pvhrgnjy8lv3r1"))))
+        (base32 "0x0w5b8g5kna1mlvsli9dqmnwvqalrar3cgpixmyiyvyjb6ah4vy"))
+       (modules '((guix build utils)))
+       (snippet
+        '(delete-file-recursively "3rdparty"))))
     (build-system perl-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-source-date
+         (add-after 'unpack 'remove-calls-to-git
            (lambda _
-             (substitute* "tools/build/gen-version.pl"
-               (("gmtime") "gmtime(0)"))))
+             (invoke "perl" "-ni" "-e" "print if not /^BEGIN {/ .. /^}/"
+                     "Configure.pl")))
+         (add-after 'remove-calls-to-git 'fix-paths
+           (lambda _
+             (substitute* "tools/templates/Makefile-common-macros.in"
+               (("NQP_CONFIG_DIR = .*")
+                (string-append "NQP_CONFIG_DIR = "
+                               (assoc-ref %build-inputs "nqp-configure")
+                               "/lib/perl5/site_perl/"
+                               ,(package-version perl)
+                               "\n")))))
+         ;; These tests pass when run manually.
+         (add-after 'fix-paths 'disable-failing-tests
+           (lambda _
+             (substitute* "t/02-rakudo/repl.t"
+               (("^plan 47;\n") "plan 46;\n"))
+             (invoke "perl" "-ni" "-e"
+                     "printf if not /^    \\(temp %\\*ENV\\)/ .. /^    }/"
+                     "t/02-rakudo/repl.t")
+             (substitute* "t/09-moar/01-profilers.t"
+               (("^plan 12;\n") "plan 10;\n")
+               (("^ok \\$htmlpath\\.IO\\.f, .*") "")
+               (("^ok \\(try \\$htmlpath\\.IO\\.s .*") ""))))
          (add-after 'patch-source-shebangs 'patch-more-shebangs
            (lambda _
-             (substitute* '("tools/build/create-js-runner.pl"
-                            "tools/build/create-moar-runner.p6"
-                            "tools/build/create-jvm-runner.pl"
-                            "src/core/Proc.pm6")
+             (substitute* '("src/core.c/Proc.pm6"
+                            "t/spec/S29-os/system.t"
+                            "tools/build/create-js-runner.pl"
+                            "tools/build/create-jvm-runner.pl")
                (("/bin/sh") (which "sh")))))
          (replace 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
                    (nqp (assoc-ref inputs "nqp")))
-               (invoke "perl" "./Configure.pl"
+               (invoke "perl" "Configure.pl"
                        "--backend=moar"
                        "--with-nqp" (string-append nqp "/bin/nqp")
                        "--prefix" out))))
-         ;; This is the recommended tool for distro maintainers to install perl6
+         ;; This is the recommended tool for distro maintainers to install Raku
          ;; modules systemwide.  See: https://github.com/ugexe/zef/issues/117
          (add-after 'install 'install-dist-tool
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (dest (string-append out "/share/perl6/tools")))
-               (install-file "tools/install-dist.p6" dest)
-               (substitute* (string-append dest "/install-dist.p6")
-                 (("/usr/bin/env perl6")
-                  (string-append out "/bin/perl6")))))))))
+               (install-file "tools/install-dist.raku" dest)
+               (substitute* (string-append dest "/install-dist.raku")
+                 (("/usr/bin/env raku")
+                  (string-append out "/bin/raku")))))))))
+    (native-inputs
+     (list nqp-configure))
     (inputs
      (list moarvm nqp openssl))
     (home-page "https://rakudo.org/")
@@ -272,9 +299,9 @@ (define-public rakudo
             (files '("share/perl6/lib"
                      "share/perl6/site/lib"
                      "share/perl6/vendor/lib")))))
-    (synopsis "Perl 6 Compiler")
-    (description "Rakudo Perl is a compiler that implements the Perl 6
-specification and runs on top of several virtual machines.")
+    (synopsis "Raku Compiler")
+    (description "Rakudo is a compiler that implements the Raku specification
+and runs on top of several virtual machines.")
     (license license:artistic2.0)))

 (define-public perl6-grammar-debugger
diff --git a/guix/build/rakudo-build-system.scm b/guix/build/rakudo-build-system.scm
index 5cf1cc55bc..642cc570d1 100644
--- a/guix/build/rakudo-build-system.scm
+++ b/guix/build/rakudo-build-system.scm
@@ -59,7 +59,7 @@ (define* (install #:key inputs outputs with-zef? #:allow-other-keys)
           #t)
         (begin
           (let ((inst (string-append (assoc-ref inputs "rakudo")
-                                     "/share/perl6/tools/install-dist.p6")))
+                                     "/share/perl6/tools/install-dist.raku")))
             (setenv "RAKUDO_RERESOLVE_DEPENDENCIES" "0")
             (setenv "RAKUDO_MODULE_DEBUG" "1") ; be verbose while building
             (invoke inst (string-append "--to=" perl6) "--for=site"))))))
--
2.36.0






  parent reply	other threads:[~2022-04-29  5:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29  5:14 [bug#55179] [WIP PATCH 00/30] gnu: rakudo: Update to 2022.04 and packages too Paul A. Patience
2022-04-29  5:17 ` [bug#55179] [WIP PATCH 01/30] gnu: moarvm: Remove trailing boolean Paul A. Patience
2022-04-29  5:17   ` [bug#55179] [WIP PATCH 02/30] gnu: nqp: Remove trailing booleans Paul A. Patience
2022-04-29  5:17   ` [bug#55179] [WIP PATCH 03/30] gnu: rakudo: " Paul A. Patience
2022-04-29  5:17   ` [bug#55179] [WIP PATCH 04/30] gnu: moarvm: Update to 2022.04 Paul A. Patience
2022-04-29  5:17   ` [bug#55179] [WIP PATCH 05/30] gnu: Add nqp-configure Paul A. Patience
2022-04-29  5:17   ` [bug#55179] [WIP PATCH 06/30] gnu: nqp: Update to 2022.04 Paul A. Patience
2022-04-29  5:17   ` Paul A. Patience [this message]
2022-04-29  5:17   ` [bug#55179] [WIP PATCH 08/30] gnu: perl6-tap-harness: Update to 0.3.5 Paul A. Patience
2022-04-29  5:17   ` [bug#55179] [WIP PATCH 09/30] gnu: perl6-zef: Update to 0.13.8 Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 10/30] gnu: perl6-terminal-ansicolor: Perl -> Raku Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 11/30] gnu: perl6-grammar-debugger: " Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 12/30] gnu: perl6-grammar-profiler-simple: " Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 13/30] gnu: perl6-json: " Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 14/30] gnu: perl6-json-fast: Update to 0.17 Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 15/30] gnu: Add perl6-json-optin Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 16/30] gnu: perl6-json-name: Update to 0.0.6 Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 17/30] gnu: perl6-json-marshal: Update to 0.0.23 Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 18/30] gnu: perl6-json-unmarshal: Reindent Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 19/30] gnu: perl6-json-class: Update to 0.0.18 Paul A. Patience
2022-04-29  5:18   ` [bug#55179] [WIP PATCH 20/30] gnu: perl6-license-spdx: Update to 3.16.0 Paul A. Patience
2022-04-29  5:19   ` [bug#55179] [WIP PATCH 21/30] gnu: perl6-meta6: Update to 0.0.26 Paul A. Patience
2022-04-29  5:19   ` [bug#55179] [WIP PATCH 22/30] gnu: perl6-mime-base64: Update to 1.2.3 Paul A. Patience
2022-04-29  5:19   ` [bug#55179] [WIP PATCH 23/30] gnu: perl6-oo-monitors: Update to 1.1.1 Paul A. Patience
2022-04-29  5:19   ` [bug#55179] [WIP PATCH 24/30] gnu: perl6-xml-writer: Perl -> Raku Paul A. Patience
2022-04-29  5:19   ` [bug#55179] [WIP PATCH 25/30] gnu: perl6-svg: " Paul A. Patience
2022-04-29  5:19   ` [bug#55179] [WIP PATCH 26/30] gnu: perl6-svg-plot: " Paul A. Patience
2022-04-29  5:19   ` [bug#55179] [WIP PATCH 27/30] gnu: perl6-uri: Update to 0.3.5 Paul A. Patience
2022-04-29  5:19   ` [bug#55179] [WIP PATCH 28/30] gnu: perl6-test-meta: Update to 0.0.17 Paul A. Patience
2022-04-29  5:19   ` [bug#55179] [WIP PATCH 29/30] gnu: perl6-test-mock: Update to 1.5-0.1130427 Paul A. Patience
2022-04-29  5:19   ` [bug#55179] [WIP PATCH 30/30] gnu: Add perl6-format-lisp Paul A. Patience
2024-03-04  9:54 ` bug#55179: [WIP PATCH 00/30] gnu: rakudo: Update to 2022.04 and packages too Efraim Flashner

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=20220429051700.373076-7-paul@apatience.com \
    --to=paul@apatience.com \
    --cc=55179@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).