gnu: calc: Update to 2.15.1.1.

* gnu/packages/maths.scm (calc): Update to 2.15.1.1.
[native-inputs]: Add man-db.
[arguments]<#:phases>{patch-makefile}: Add substitutions.

Change-Id: I8904a49d89bb9fb21207a0cf16193c6fcfd74b37
Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
Distopico 2025-09-22 00:51:37 -05:00 committed by Andreas Enge
parent c03d68ca62
commit 57eddd2821
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -61,7 +61,7 @@
;;; Copyright © 2022, 2023 Nicolas Graves <ngraves@ngraves.fr> ;;; Copyright © 2022, 2023 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2022 Roman Scherer <roman.scherer@burningswell.com> ;;; Copyright © 2022 Roman Scherer <roman.scherer@burningswell.com>
;;; Copyright © 2023 Jake Leporte <jakeleporte@outlook.com> ;;; Copyright © 2023 Jake Leporte <jakeleporte@outlook.com>
;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net> ;;; Copyright © 2023, 2025 Camilo Q.S. (Distopico) <distopico@riseup.net>
;;; Copyright © 2023, 2025 David Elsing <david.elsing@posteo.net> ;;; Copyright © 2023, 2025 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2024 Herman Rimm <herman@rimm.ee> ;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;; Copyright © 2024 Foundation Devices, Inc. <hello@foundation.xyz> ;;; Copyright © 2024 Foundation Devices, Inc. <hello@foundation.xyz>
@ -289,27 +289,35 @@ interactive dialogs to guide them.")
(define-public calc (define-public calc
(package (package
(name "calc") (name "calc")
(version "2.14.2.1") (version "2.15.1.1")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://www.isthe.com/chongo/src/calc/calc-" (uri (string-append "http://www.isthe.com/chongo/src/calc/calc-"
version ".tar.bz2")) version ".tar.bz2"))
(sha256 (sha256
(base32 "1swalx3cxjcx4aprnchb2jf0wig89ggvxjzzzx488r115w58lxnr")))) (base32 "1710wsyjg3k6qx5xaa5fa1r81izpgjiy676ayznd2p42rn3czmm2"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (list readline)) (inputs (list readline))
(native-inputs (list util-linux)) ; for col (native-inputs (list man-db util-linux)) ;for col
(arguments (arguments
(list #:phases #~(modify-phases %standard-phases (list
(delete 'configure) #:phases
(add-before 'build 'patch-makefile #~(modify-phases %standard-phases
(lambda _ (delete 'configure)
(substitute* "Makefile" (add-before 'build 'patch-makefile
(("^PREFIX= /usr/local") (lambda _
(string-append "PREFIX=" #$output)) (substitute* "Makefile.config"
(("=\\s?/usr") (("^PREFIX= /usr/local")
"= ${PREFIX}"))))))) (string-append "PREFIX="
#$output))
(("=\\s?/usr")
"= ${PREFIX}"))
(substitute* "Makefile.target"
(("LIBCALC_SHLIB=")
"LIBCALC_SHLIB= -Wl,-rpath='$$ORIGIN'")
(("LIBCUSTCALC_SHLIB=")
"LIBCUSTCALC_SHLIB= -Wl,-rpath='$$ORIGIN'")))))))
(synopsis "Arbitrary precision console calculator") (synopsis "Arbitrary precision console calculator")
(description (description
"Calc is an arbitrary precision arithmetic system that uses a C-like "Calc is an arbitrary precision arithmetic system that uses a C-like