From patchwork Wed Jul 26 09:52:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Enge X-Patchwork-Id: 52191 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 F31ED27BBE9; Wed, 26 Jul 2023 10:53:21 +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.9 required=5.0 tests=BAYES_00,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 0C6EF27BBE2 for ; Wed, 26 Jul 2023 10:53:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qObCa-0001EZ-HX; Wed, 26 Jul 2023 05:53:04 -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 1qObCY-0001ER-QC for guix-patches@gnu.org; Wed, 26 Jul 2023 05:53:02 -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 1qObCY-0003ww-Ht for guix-patches@gnu.org; Wed, 26 Jul 2023 05:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qObCY-0007zD-0s for guix-patches@gnu.org; Wed, 26 Jul 2023 05:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64688] [PATCH v4] gnu: Add calc. Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 26 Jul 2023 09:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Distopico Cc: 64688@debbugs.gnu.org Received: via spool by 64688-submit@debbugs.gnu.org id=B64688.169036516130669 (code B ref 64688); Wed, 26 Jul 2023 09:53:01 +0000 Received: (at 64688) by debbugs.gnu.org; 26 Jul 2023 09:52:41 +0000 Received: from localhost ([127.0.0.1]:47586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qObCC-0007yb-Lo for submit@debbugs.gnu.org; Wed, 26 Jul 2023 05:52:41 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:43616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qObC8-0007yL-83 for 64688@debbugs.gnu.org; Wed, 26 Jul 2023 05:52:38 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 285B81AD5; Wed, 26 Jul 2023 11:52:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1Jl3-ixMIBbN; Wed, 26 Jul 2023 11:52:29 +0200 (CEST) Received: from jurong (unknown [IPv6:2001:861:c4:f2f0::c64]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 3352819D8; Wed, 26 Jul 2023 11:52:29 +0200 (CEST) Date: Wed, 26 Jul 2023 11:52:27 +0200 From: Andreas Enge Message-ID: References: <20230724153210.12545-1-distopico@riseup.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230724153210.12545-1-distopico@riseup.net> 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 Hello, as there has been a new stable release in the meantime, I updated to this. I also simplified the package a bit, maybe due to the new release one substitute did not apply any more, another one did not seem to be necessary regardless, and several "substitute*" on the same file can be combined into one expression. I then set PREFIX and used it in a substitution, which makes some CFLAGS unnecessary, and others are there by default in the current Makefile. Finally I made the description a bit more neutral. The resulting calc binary seems to work, if you are happy with the package, I could push it. Andreas From e73a154f281e81f9c2bb9c4655dada1ef7df0e48 Mon Sep 17 00:00:00 2001 Message-ID: From: Distopico Date: Mon, 24 Jul 2023 10:31:24 -0500 Subject: [PATCH] gnu: Add calc. * gnu/packages/maths.scm (calc): New variable. Co-authored-by: Andreas Enge --- gnu/packages/maths.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) base-commit: 713dca1399cda2439af75989510f86718741a4ff diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 8c30e49d8f..dd17141c28 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -60,6 +60,7 @@ ;;; Copyright © 2022 Akira Kyle ;;; Copyright © 2022 Roman Scherer ;;; Copyright © 2023 Jake Leporte +;;; Copyright © 2023 Camilo Q.S. (Distopico) ;;; ;;; This file is part of GNU Guix. ;;; @@ -261,6 +262,39 @@ (define-public c-graph (license license:gpl3+) (home-page "https://www.gnu.org/software/c-graph/"))) +(define-public calc + (package + (name "calc") + (version "2.14.2.0") + (source (origin + (method url-fetch) + (uri (string-append "http://www.isthe.com/chongo/src/calc/calc-" + version ".tar.bz2")) + (sha256 + (base32 + "0kg7cqhq70dlj7k8mrl0dbps1yvflfhri7c1gvm9nh4g2adlkxkf")))) + (build-system gnu-build-system) + (inputs (list readline)) + (native-inputs (list util-linux)) ; for col + (arguments + (list #:phases #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'patch-makefile + (lambda _ + (substitute* "Makefile" + (("^PREFIX= /usr/local") + (string-append "PREFIX=" #$output)) + (("=\\s?/usr") + "= ${PREFIX}"))))))) + (synopsis "Arbitrary precision console calculator") + (description + "Calc is an arbitrary precision arithmetic system that uses a C-like +language. It can be used as a calculator, an algorithm prototyper and as +a mathematical research tool, and it comes with built in mathematical and +programmatic functions.") + (home-page "http://www.isthe.com/chongo/tech/comp/calc/") + (license license:lgpl2.1))) + (define-public coda (package (name "coda")