diff options
author | Paul A. Patience <paul@apatience.com> | 2022-04-29 05:17:42 +0000 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2024-03-04 09:21:56 +0200 |
commit | 6a80ac450c835c146a2b5102d36e9af17a1d1d2d (patch) | |
tree | 9c9de30567584d5213d3501f87476e3b697ee179 | |
parent | f3f39988b5da46ff7010179626f530471f9c7d5d (diff) |
gnu: rakudo: Update to 2022.04.
* 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.
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
-rw-r--r-- | gnu/packages/perl6.scm | 71 | ||||
-rw-r--r-- | 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 @@ #: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 @@ regular expression engine for the virtual machine.") (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 @@ regular expression engine for the virtual machine.") (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 @@ #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")))))) |