You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.6 KiB

(define-module (gn packages maths)
#:use-module (gnu packages)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (gnu packages base)
#:use-module (gnu packages gperf)
#:use-module (gnu packages maths)
#:use-module (gnu packages texinfo)
#:use-module (srfi srfi-1))
(define-public octave-3.4.3
(inherit octave-cli)
(name "octave")
(version "3.4.3")
(method url-fetch)
(uri (string-append "mirror://gnu/octave/octave-"
version ".tar.gz"))
(patches (search-patches "gnulib-gets.patch"
(substitute-keyword-arguments (package-arguments octave-cli)
((#:configure-flags cf)
`(cons "--enable-docs=no" ; docs fail to build
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'patch-configure-script
(lambda _
(substitute* '("configure"
(("qhull/qhull.h") "libqhull/libqhull.h")
(("qhull/qhull_a.h") "libqhull/qhull_a.h"))
(replace 'configure-makeinfo
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/"
"\"" (assoc-ref inputs "texinfo") "/bin/makeinfo\"")))
`(("glibc-2.27" ,glibc-2.27) ; works around fseeko.c problem in gnulib
,@(fold alist-delete (package-native-inputs octave-cli)
`(("glpk" ,glpk-4.48)
("gperf" ,gperf)
,@(fold alist-delete (package-inputs octave-cli)
;; suitesparse provides cholmod_common_struct, may need older version
'("glpk" "suitesparse"))))))
;; 4.49 is the last version with _glp_lpx_simplex exported
;; 4.49 is the version where all lpx_ routines were removed
(define-public glpk-4.48
(inherit glpk)
(version "4.48")
(method url-fetch)
(uri (string-append "mirror://gnu/glpk/glpk-"
version ".tar.gz"))