From patchwork Tue Jul 18 11:28:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Distopico X-Patchwork-Id: 51767 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 7966C27BBEA; Tue, 18 Jul 2023 12:31:46 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 2918A27BBE2 for ; Tue, 18 Jul 2023 12:31:43 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLivP-0004ae-97; Tue, 18 Jul 2023 07:31:27 -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 1qLiv4-0004Y8-UV for guix-patches@gnu.org; Tue, 18 Jul 2023 07:31:07 -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 1qLiv2-0001V4-HT for guix-patches@gnu.org; Tue, 18 Jul 2023 07:31:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qLiv0-0000lg-Ef; Tue, 18 Jul 2023 07:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64688] [PATCH v2] gnu: Add calc. References: <87edl6bctv.fsf@riseup.net> In-Reply-To: <87edl6bctv.fsf@riseup.net> Resent-From: Distopico Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, efraim@flashner.co.il, bavier@posteo.net, guix-patches@gnu.org Resent-Date: Tue, 18 Jul 2023 11:31:02 +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: 64688@debbugs.gnu.org Cc: Distopico , andreas@enge.fr, efraim@flashner.co.il, bavier@posteo.net X-Debbugs-Original-Xcc: andreas@enge.fr, efraim@flashner.co.il, bavier@posteo.net Received: via spool by 64688-submit@debbugs.gnu.org id=B64688.168967981929300 (code B ref 64688); Tue, 18 Jul 2023 11:31:02 +0000 Received: (at 64688) by debbugs.gnu.org; 18 Jul 2023 11:30:19 +0000 Received: from localhost ([127.0.0.1]:51730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLiuI-0007b4-Pu for submit@debbugs.gnu.org; Tue, 18 Jul 2023 07:30:19 -0400 Received: from mx1.riseup.net ([198.252.153.129]:42826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLiuE-0006ws-AL for 64688@debbugs.gnu.org; Tue, 18 Jul 2023 07:30:16 -0400 Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4R4xZR23sSzDqxG for <64688@debbugs.gnu.org>; Tue, 18 Jul 2023 11:30:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1689679807; bh=JtCRF0g7xZhZ3OV86hm+yYMXAfE0Pd5HIfKMgaut+gw=; h=From:To:Cc:Subject:Date:From; b=GFbpIpFNJZSXt/AWtM7AqKXxMeywJcNE50CBeQcRr/6KOR5VP99jUMx/qsdbSPZBZ ydNQb46+W24SlLh1BLpG5RUmiu3UOWAgsVhS3lRqAuh+j/F/SYaoyt6bliJl1MTllW j5Wx8L4pfyxDX/doEC7SWRMRuidOAvVPU+ZYcN2E= X-Riseup-User-ID: F2979B6E713B15178821F9B750B9475977A5476AE3AEC36E63CCC8D630B78849 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4R4xZQ4R5pzFqPN; Tue, 18 Jul 2023 11:30:06 +0000 (UTC) From: Distopico Date: Tue, 18 Jul 2023 06:28:14 -0500 Message-ID: <20230718112911.31050-1-distopico@riseup.net> 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 * gnu/packages/maths.scm (calc): New variable. --- Remove unnecesary open/libre substitute. gnu/packages/maths.scm | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index b9b63c81c1..a8ddf0a514 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,56 @@ (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.1.6") + (source (origin + (method url-fetch) + (uri (string-append "http://www.isthe.com/chongo/src/calc/calc-" + version ".tar.bz2")) + (sha256 + (base32 + "0h3zsqwpbwddv28khg1fk00ydk6sxvdig085lvi1s63d544b6nff")))) + (build-system gnu-build-system) + (inputs (list readline)) + (native-inputs (list util-linux)) + (outputs '("out")) + (arguments + '(#:make-flags (let ((out (assoc-ref %outputs "out"))) + (list "DEBUG=" + "USE_READLINE=-DUSE_READLINE" + "READLINE_LIB=-lreadline" + "READLINE_EXTRAS=-lhistory -lncurses" + (string-append "DEFAULT_LIB_INSTALL_PATH=" out + "/lib") + (string-append "T=" out))) + #:phases (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'patch-makefile-ldflags + (lambda _ + (substitute* "Makefile" + (("\\$\\{CC\\}\\s+\\$\\{LIBCALC_SHLIB\\}") + "${CC} ${LDFLAGS} ${LIBCALC_SHLIB}")) + (substitute* "custom/Makefile" + (("\\$\\{CC\\}\\s+\\$\\{LIBCUSTCALC_SHLIB\\}") + "${CC} ${LDFLAGS} ${LIBCUSTCALC_SHLIB}")))) + (add-before 'build 'patch-makefile-prefix + (lambda _ + (substitute* "Makefile" + ;; Replace becase there is more or less + ;; 5 Makefile vars with /usr as default prefix + (("=\\s?/usr/") + "= /"))))))) + (synopsis "Arbitrary precision console calculator") + (description + "Calc is an arbitrary precision arithmetic system that uses a C-like language, +It's useful as a calculator, an algorithm prototyper and as a mathematical research tool. +More importantly, calc provides one with a machine independent means of computation. +Calc comes with a rich set of builtin mathematical and programmatic functions.") + (home-page "http://www.isthe.com/chongo/tech/comp/calc/") + (license license:lgpl2.1))) + (define-public coda (package (name "coda")