From patchwork Fri Apr 29 05:17:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 39002 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7E71027BBEA; Fri, 29 Apr 2022 06:18:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C85FD27BBE9 for ; Fri, 29 Apr 2022 06:18:49 +0100 (BST) Received: from localhost ([::1]:35240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkJ1k-0007bx-Vl for patchwork@mira.cbaines.net; Fri, 29 Apr 2022 01:18:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkJ13-00073C-G1 for guix-patches@gnu.org; Fri, 29 Apr 2022 01:18:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkJ13-0000c2-46 for guix-patches@gnu.org; Fri, 29 Apr 2022 01:18:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nkJ12-00078W-Uy for guix-patches@gnu.org; Fri, 29 Apr 2022 01:18:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55179] [WIP PATCH 07/30] gnu: rakudo: Update to 2022.04. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 29 Apr 2022 05:18:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55179 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55179@debbugs.gnu.org Cc: "Paul A. Patience" Received: via spool by 55179-submit@debbugs.gnu.org id=B55179.165120948427423 (code B ref 55179); Fri, 29 Apr 2022 05:18:04 +0000 Received: (at 55179) by debbugs.gnu.org; 29 Apr 2022 05:18:04 +0000 Received: from localhost ([127.0.0.1]:50581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkJ0t-00077E-3L for submit@debbugs.gnu.org; Fri, 29 Apr 2022 01:18:03 -0400 Received: from mail-4018.proton.ch ([185.70.40.18]:29977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkJ0p-00076h-Am for 55179@debbugs.gnu.org; Fri, 29 Apr 2022 01:17:52 -0400 Date: Fri, 29 Apr 2022 05:17:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1651209465; bh=PGEo80yliTATIJBmOasmSvtsASs9q2xMlN3bzBspuBs=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=plu2ny6FrJn1xAktZ5OJTDasf4LC93RhtrfrA8WyZQobWpYz+qqcLwiWe1M0sb50g BSFOi8ACXK0zdyN5GJE8iODc5JSlIRGZmYUl74X5v4aA0/TgSe8tDv86IpvQrj6ocL oat0iqgPXX7VReMjLaxT4palEp0ME6zVibIRcc/E/x03pxiOmx7vsHmMTVWcxv9dTM nUR5XWrs++8K2Di0uk6j80GyBr8FYKL/H1jzs4w++3ZLcjT9GbJiFlayXcJAUY+pDf 25cJi/RgTNG/30olVZ6kaFUsWpfX0QwrVfE3NLel/VWfBH5369Tb4suDDROdccxtEI LZgs1Vp5gdDxw== From: "Paul A. Patience" Message-ID: <20220429051700.373076-7-paul@apatience.com> In-Reply-To: <20220429051700.373076-1-paul@apatience.com> References: <20220429051700.373076-1-paul@apatience.com> Feedback-ID: 19227857:user:proton MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: "Paul A. Patience" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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(-) -- 2.36.0 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 ;;; Copyright © 2019 Tobias Geerinckx-Rice +;;; Copyright © 2022 Paul A. Patience ;;; ;;; 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"))))))