From patchwork Sun Feb 25 13:26:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 61106 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 E1DFB27BBE2; Sun, 25 Feb 2024 13:26:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=no 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 51E4027BBE9 for ; Sun, 25 Feb 2024 13:26:58 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reEWe-0003TY-S4; Sun, 25 Feb 2024 08:26:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reEWc-0003Sp-Gr for guix-patches@gnu.org; Sun, 25 Feb 2024 08:26:38 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reEWc-00035j-7x for guix-patches@gnu.org; Sun, 25 Feb 2024 08:26:38 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1reEX0-0005kf-Ek for guix-patches@gnu.org; Sun, 25 Feb 2024 08:27:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69380] [PATCH] gnu: guile-irregex: Update to 0.9.11. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Feb 2024 13:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69380 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69380@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170886761322075 (code B ref -1); Sun, 25 Feb 2024 13:27:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Feb 2024 13:26:53 +0000 Received: from localhost ([127.0.0.1]:44807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reEWr-0005jx-0V for submit@debbugs.gnu.org; Sun, 25 Feb 2024 08:26:53 -0500 Received: from lists.gnu.org ([209.51.188.17]:47118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1reEWn-0005je-Ue for submit@debbugs.gnu.org; Sun, 25 Feb 2024 08:26:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1reEWO-0003Oe-KC for guix-patches@gnu.org; Sun, 25 Feb 2024 08:26:24 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1reEWL-00033Q-7q for guix-patches@gnu.org; Sun, 25 Feb 2024 08:26:24 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 4198F27271F; Sun, 25 Feb 2024 13:26:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708867576; bh=ulLdDQKWnM1A76Ey2aFnfpiO4HuVKDTPW0ySDHbCybY=; h=From:To:Cc:Subject:Date; b=pK+yULyWDtwIXXFaftGt5uWoJREPPU/DLesNWsU5S4hMgtuUoWA8pCEu0Odmw7PRo lLtyPA8q1rhu5DeTmelmWax8IB5SHdHMpxsPYR5R5dcx2ydjJlHR76YPe/qLMqi584 HTzaiJ79CsDtg3klCSjZ1Fjvd0exR6hTTAApXtIi4q9tHCWp24hc+9SHJGx/rMJjq4 uQfGHdxwEcBSE1e1YUnTBtfrwGgVPcWT0YMK+NlT17srGVGT2p5g8ip9RrKabLAU6C /ka4eaMLczbUZdL9AUSFFV8tdFbKWU++FNLaGmrNcNhsRmCQcON5fbIAFxv26IHRnk eFKE5wczt/g19GywMKnvg9diD2nK30jVCrkPfdpdbb9Bqn9M+kMTD91xgg/Eaognto DRcPUG/BPLmvdnEIPQkzU3P617QwK1r/QSM43QIB33233N1RrhZys8ZAtnOPnkO83W ueyKrTJ4yMKR/OjKEayXxP1oxjtT5965b1+QxWfewnyD12XEgfrONF2gKcm14S3/zJ OknmSyI3rl2vt0Y8tRSW86r2LfmA4M6CGlvGka8HL9XuNtnQEG3OH9oTP2hV5bAQ1q rHlWSwX5RZ8D3gU0TEW/QcxZqofkcqrLGmMQ3lFRHwX6kYFCtHbSfZk2fPwuLRKAEZ BVPpcLxE0teDBfV7eiKjqnUc= Received: from localhost (unknown [193.32.127.144]) by wolfsden.cz (Postfix) with ESMTPSA id 19B17257EEB; Sun, 25 Feb 2024 13:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708867572; bh=ulLdDQKWnM1A76Ey2aFnfpiO4HuVKDTPW0ySDHbCybY=; h=From:To:Cc:Subject:Date; b=YyuU4KP09WlMdTwdEv0JJuX5/KJaugJCboVZmWh1vRNCQ/wwGREcQL8YdVq5S7HAq lZTHbTJtnUCsOfZd3kQB8AoM1FS4AE7IKyrN0LxTiKuogia6aCzIGNRsISb9FLqD2B 0tsS/7KF9KiQjzbTPRrWN5G1hLg4TPMpj6QjJshCgEVWK19F4eQar1HDE/4q0nnC14 sTwIlHjGHHSGn2msbDwWIdRlJEIB0mwtScr183SKe5ItjTAMAHbuG0b0PqTdRc/sXC MWPpTCNeCiY+kxr7MOOW8uZk5VpKhWzjAjAF/YNDVr7V6CZSB+n3F98N5aNAmKCy1L BA+UK+blMCzAl85jnzCaIaE7dc93IGpzSZAhGl0amPq0Hr+d3NMphUzVBRxdxZ344W NKNu53FqV4YmJ73ovk43uh2nX2ANsovI8GPjg0riDQRW1a/8iVbjrKav4a7uhMeqZY YrPb2zsTlzuV9RaWJsqBK8qOHtDUHEzlFXEfwUASjx0UsoYFIt58rqv3WVcD1BmfZN JmTgLYD0V7FY4MgP0XUqNomjkBlNAVBmARD/o0GEeeyTNklO6Pczo3M/1iDvyTUpYu xSAx/FBg+GYlj12sKu02T8FGguDPrsbmyXYlQkSIaY1I6GafNkL7YHOg450dwdThP1 tvcVivjxc+PuWTeKV3f9Aek8= From: Tomas Volf <~@wolfsden.cz> Date: Sun, 25 Feb 2024 14:26:08 +0100 Message-ID: <3ad16a6c2b1f0a7213c491570f438db81f3fe863.1708867568.git.~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Since upstream now provides tests for guile, they are executed, both before install (testing the internals) and after install (making sure the guile module and everything works well). Guile 2.0 for some reason cannot load "foo.scm" using (load-from-path "foo"), so symlinks are created to work around that. * gnu/packages/guile-xyz.scm (guile-irregex)[version]: Update to 0.9.11. [arguments]: Convert to gexp. <#:phases>{'move-files-around}: Copy files instead of moving. {'check, 'check-installed}: New phases. (guile2.0-irregex)[arguments]: Add 'create-symlinks phase. Change-Id: Ib9d4e9c24475aa8e7fc1e70b868b690eaf6ad42e --- gnu/packages/guile-xyz.scm | 78 +++++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 18 deletions(-) base-commit: aefc7428203203ae88c64cc4769113453c01a185 diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index b34472d5bd..9d683199ac 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2895,7 +2895,7 @@ (define-public guile2.2-minikanren (define-public guile-irregex (package (name "guile-irregex") - (version "0.9.6") + (version "0.9.11") (source (origin (method url-fetch) (uri (string-append @@ -2903,25 +2903,46 @@ (define-public guile-irregex version ".tar.gz")) (sha256 (base32 - "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq")))) + "026kzl96pmwbjqdc7kh8rdh8ng813sjvdsik0dag5acza20sjm19")))) (build-system guile-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'move-files-around - (lambda _ - ;; Move the relevant source files to src/ and create the - ;; rx/ directory to match the expected module hierarchy. - (mkdir-p "src/rx/source") - (rename-file "irregex-guile.scm" - "src/rx/irregex.scm") - (rename-file "irregex.scm" - "src/rx/source/irregex.scm") - ;; Not really reachable via guile's packaging system, - ;; but nice to have around. - (rename-file "irregex-utils.scm" - "src/rx/source/irregex-utils.scm") - #t))) - #:source-directory "src")) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'move-files-around + (lambda _ + ;; Copy the relevant source files to src/ and create the + ;; rx/ directory to match the expected module hierarchy. + (mkdir-p "src/rx/source") + (copy-file "irregex-guile.scm" + "src/rx/irregex.scm") + (copy-file "irregex.scm" + "src/rx/source/irregex.scm") + + (mkdir-p "src/rx/irregex") + (copy-file "irregex-utils-guile.scm" + "src/rx/irregex/utils.scm") + (copy-file "irregex-utils.scm" + "src/rx/source/irregex-utils.scm"))) + (add-after 'build 'check + (lambda _ + (for-each (lambda (f) + (invoke "guile" "--no-auto-compile" "-L" "." "-s" f)) + (find-files "tests" "^guile-.*\\.scm")))) + (add-after 'install 'check-installed + (lambda _ + (define-values (scm go) (target-guile-scm+go #$output)) + (for-each + (lambda (f) + (substitute* f + (("\\(load-from-path \"irregex\"\\)") + "(use-modules (rx irregex))") + (("\\(load-from-path \"irregex-utils\"\\)") + "(use-modules (rx irregex utils))")) + (invoke "guile" "-L" scm "-C" go "-L" "tests" f)) + (delete "tests/guile-cset.scm" ; Tests non-exported API + (find-files "tests" "^guile-.*\\.scm")))))) + #:source-directory "src")) (native-inputs (list guile-3.0)) (home-page "https://synthcode.com/scheme/irregex") @@ -2936,6 +2957,27 @@ (define-public guile2.0-irregex (package (inherit guile-irregex) (name "guile2.0-irregex") + (arguments + (substitute-keyword-arguments (package-arguments guile-irregex) + ((#:phases phases) + #~(modify-phases #$phases + ;; For some reason guile 2.0 cannot load foo.scm using + ;; (load-from-path "foo"). So create symlinks to work around it. + (add-before 'check 'create-symlinks + (lambda _ + (use-modules (ice-9 regex)) + (for-each + (lambda (f) + (symlink (regexp-substitute #f (string-match "/([^/]+)$" f) + 1 ".scm") + f)) + '("tests/guile/test-support" + "tests/test-cset" + "tests/test-irregex" + "tests/test-irregex-from-gauche" + "tests/test-irregex-pcre" + "tests/test-irregex-scsh" + "tests/test-irregex-utf8")))))))) (native-inputs (list guile-2.0)))) (define-public guile2.2-irregex