GNU bug report logs - #64687
[PATCH] gnu: Add calc.

Previous Next

Package: guix-patches;

Reported by: Distopico <distopico <at> riseup.net>

Date: Mon, 17 Jul 2023 18:42:02 UTC

Severity: normal

Tags: patch

Done: Distopico <distopico <at> riseup.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64687 in the body.
You can then email your comments to 64687 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#64687; Package guix-patches. (Mon, 17 Jul 2023 18:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Distopico <distopico <at> riseup.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 17 Jul 2023 18:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Distopico <distopico <at> riseup.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add calc.
Date: Mon, 17 Jul 2023 12:05:52 -0500
Adds `calc` package, an console calculator and mathematical tool.

* gnu/packages/maths.scm (calc): New variable.
---
 gnu/packages/maths.scm | 58 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b9b63c81c1..c5e0da4328 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -60,6 +60,7 @@
 ;;; Copyright © 2022 Akira Kyle <akira <at> akirakyle.com>
 ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com>
 ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com>
+;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico <at> riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -261,6 +262,63 @@ (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-guixnization
+                    (lambda _
+                      (for-each (lambda (file)
+                                  (substitute* file
+                                    (("(open source|open software)")
+                                     "Free Software")))
+                                (list "calc.c" "version.c" "calc.man"))))
+                  (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")
-- 
2.41.0





Reply sent to Distopico <distopico <at> riseup.net>:
You have taken responsibility. (Mon, 17 Jul 2023 19:27:02 GMT) Full text and rfc822 format available.

Notification sent to Distopico <distopico <at> riseup.net>:
bug acknowledged by developer. (Mon, 17 Jul 2023 19:27:02 GMT) Full text and rfc822 format available.

Message #10 received at 64687-done <at> debbugs.gnu.org (full text, mbox):

From: Distopico <distopico <at> riseup.net>
To: 64687-done <at> debbugs.gnu.org.
Date: Mon, 17 Jul 2023 14:25:07 -0500
Duplicated with 64688




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 15 Aug 2023 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.