aboutsummaryrefslogtreecommitdiff
path: root/gn/packages/maths.scm
diff options
context:
space:
mode:
authorEfraim Flashner2019-07-01 07:28:36 -0500
committerEfraim Flashner2019-07-01 12:42:54 -0500
commit22dd59cd672d876a99c719087117b19074cd0d49 (patch)
tree13454ffd9b4fe9086219df76e414438dcd15c74f /gn/packages/maths.scm
parentfaedb91fb2aa57e482841f18ac869223990f820b (diff)
downloadguix-bioinformatics-22dd59cd672d876a99c719087117b19074cd0d49.tar.gz
gn: Add octave@3.4.3.
Add two upstream patches and package glpk@4.48 for octave to use.
Diffstat (limited to 'gn/packages/maths.scm')
-rw-r--r--gn/packages/maths.scm74
1 files changed, 74 insertions, 0 deletions
diff --git a/gn/packages/maths.scm b/gn/packages/maths.scm
new file mode 100644
index 0000000..f57459d
--- /dev/null
+++ b/gn/packages/maths.scm
@@ -0,0 +1,74 @@
+(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
+ (package
+ (inherit octave-cli)
+ (name "octave")
+ (version "3.4.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/octave/octave-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "04lh3crzwpramvfvxq34n2r29pmfl37rssj853nz9a3pyq7wrrir"))
+ (patches (search-patches "gnulib-gets.patch"
+ "octave-nested-class.patch"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments octave-cli)
+ ((#:configure-flags cf)
+ `(cons "--enable-docs=no" ; docs fail to build
+ ,cf))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'patch-configure-script
+ (lambda _
+ (substitute* '("configure"
+ "src/DLD-FUNCTIONS/__delaunayn__.cc"
+ "src/DLD-FUNCTIONS/__voronoi__.cc"
+ "src/DLD-FUNCTIONS/convhulln.cc")
+ (("qhull/qhull.h") "libqhull/libqhull.h")
+ (("qhull/qhull_a.h") "libqhull/qhull_a.h"))
+ #t))
+ (replace 'configure-makeinfo
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/help.cc"
+ (("\"makeinfo\"")
+ (string-append
+ "\"" (assoc-ref inputs "texinfo") "/bin/makeinfo\"")))
+ #t))))))
+ (native-inputs
+ `(("glibc-2.27" ,glibc-2.27) ; works around fseeko.c problem in gnulib
+ ,@(fold alist-delete (package-native-inputs octave-cli)
+ '("lzip"))))
+ (inputs
+ `(("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
+ (package
+ (inherit glpk)
+ (version "4.48")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/glpk/glpk-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1cddqsdcfwavdklg7hsfifppsry81dx3c17wzk6r22mjjpwcihmb"))))))