From patchwork Thu Sep 14 14:12:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 53907 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 38E2927BBEA; Thu, 14 Sep 2023 15:13:31 +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=ham 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 5183B27BBE2 for ; Thu, 14 Sep 2023 15:13:30 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgn5Z-0001Gx-IS; Thu, 14 Sep 2023 10:13:01 -0400 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 1qgn5V-0001A1-Db for guix-patches@gnu.org; Thu, 14 Sep 2023 10:12:58 -0400 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 1qgn5V-0003Qx-5j for guix-patches@gnu.org; Thu, 14 Sep 2023 10:12:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgn5a-0007WY-Ka for guix-patches@gnu.org; Thu, 14 Sep 2023 10:13:02 -0400 Subject: bug#65494: [PATCH] gnu: Add stklos. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Thu, 14 Sep 2023 14:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 65494 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ramin Honary Cc: 65494-done@debbugs.gnu.org Mail-Followup-To: 65494@debbugs.gnu.org, ludo@gnu.org, ramin.honary@gmail.com Received: via spool by 65494-done@debbugs.gnu.org id=D65494.169470075628868 (code D ref 65494); Thu, 14 Sep 2023 14:13:02 +0000 Received: (at 65494-done) by debbugs.gnu.org; 14 Sep 2023 14:12:36 +0000 Received: from localhost ([127.0.0.1]:40707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgn5A-0007VX-4i for submit@debbugs.gnu.org; Thu, 14 Sep 2023 10:12:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgn55-0007VG-9M for 65494-done@debbugs.gnu.org; Thu, 14 Sep 2023 10:12:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgn4s-0003N5-Cg; Thu, 14 Sep 2023 10:12:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=OzTLohWIgQGSrGftIfb86pKV9kHKUC9AJTZR5fvrxS4=; b=P8iFvT3Pu8nn7gQS3HRv BCeImpFagH6+DzWYROPkxmvXnJw7RCsBycA6T5itfpxI0FGtWiMMsxsbOu1WmJLzRsouRK3fAPq2l i+DMSeG980t+sPJKXlg26qW55pxJGkvMxgA4ss3j4G/aMV9G0fpJZOkxTOvz6w20lFF7kLHJIpsrp MmmcSD1qca2SAqLr1xtYwp/Iz9hJy2QWIBk3eZreYuVx8Pk71yIanpCooDnB74LP0cS2HS8rfLPdX hbseoW+36odBstLGHF3yk89IeBteu6BBxQlh3vdr3nPDgtshIG5YRcVUqquz1GoBwbqnNu7gk2zEn yaHPa4KqmRpaYA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= References: Date: Thu, 14 Sep 2023 16:12:11 +0200 In-Reply-To: (Ramin Honary's message of "Thu, 24 Aug 2023 18:05:26 +0900") Message-ID: <877cosc090.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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: , 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 Hi Romain, Ramin Honary skribis: > From 465538f4b2824f49d99e4eef799f25f644a37bbc Mon Sep 17 00:00:00 2001 > Message-Id: <465538f4b2824f49d99e4eef799f25f644a37bbc.1692867653.git.ramin.honary@cross-compass.com> > From: Ramin Honary > Date: Thu, 24 Aug 2023 17:57:51 +0900 > Subject: [PATCH] gnu: Add stklos. > > * gnu/packages/scheme.scm (stklos): New variable. I went ahead and committed with the changes below. I used ‘which’ instead of ‘(search-input-file inputs …)’ because we really want the native bash and rm here. The license is GPLv2+ because files under lib/ explicitly say “or any later version”. Last, I noticed that the tarball comes with copies of libgc, libffi, and PCRE. Could you send patches to “unbundle” them—i.e., add these packages to the ‘inputs’ field and ensure the build system picks them up? Thanks! Ludo’. diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index 0165875b93..ad06d7db06 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -1242,6 +1242,7 @@ (define-public stklos (version "1.70") (source (origin (method url-fetch) + ;; TODO: Unbundle pcre, libgc, and libffi. (uri (string-append "https://stklos.net/download/stklos-" version ".tar.gz")) (sha256 @@ -1254,22 +1255,18 @@ (define-public stklos ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases - (add-before 'configure 'patch-sh-paths + (add-before 'configure 'patch-sh-references (lambda* (#:key inputs #:allow-other-keys) - (let ((bash-bin (search-input-file inputs "/bin/bash"))) + (let ((bash (which "bash"))) (substitute* "configure" - (("/bin/sh") bash-bin))))) - (add-after 'configure 'patch-rm-paths - (lambda* (#:key inputs #:allow-other-keys) - (let ((rm-bin (search-input-file inputs "/bin/rm"))) - (ftw "." - (lambda (filename stat-info f) - (when (and - (equal? f 'regular) - (string=? (basename filename) "Makefile")) - (substitute* filename - (("/bin/rm") rm-bin))) - #t)))))))) + (("/bin/sh") bash))))) + (add-after 'configure 'patch-rm-references + (lambda _ + (let ((rm (which "rm"))) + (substitute* (find-files "." "^Makefile$") + (("/bin/rm") rm)))))))) + (properties + '((release-monitoring-url . "https://stklos.net/download.html"))) (home-page "https://stklos.net") (synopsis "R7RS Scheme with CLOS-like object system") (description @@ -1278,4 +1275,4 @@ (define-public stklos as well as light. The implementation is based on an ad-hoc Virtual Machine. STklos can also be compiled as a library and embedded in an application.") - (license gpl2))) + (license gpl2+)))