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.

75 lines
2.6 KiB

  1. (define-module (gn packages maths)
  2. #:use-module (gnu packages)
  3. #:use-module (guix packages)
  4. #:use-module (guix download)
  5. #:use-module (guix utils)
  6. #:use-module (gnu packages base)
  7. #:use-module (gnu packages gperf)
  8. #:use-module (gnu packages maths)
  9. #:use-module (gnu packages texinfo)
  10. #:use-module (srfi srfi-1))
  11. (define-public octave-3.4.3
  12. (package
  13. (inherit octave-cli)
  14. (name "octave")
  15. (version "3.4.3")
  16. (source
  17. (origin
  18. (method url-fetch)
  19. (uri (string-append "mirror://gnu/octave/octave-"
  20. version ".tar.gz"))
  21. (sha256
  22. (base32
  23. "04lh3crzwpramvfvxq34n2r29pmfl37rssj853nz9a3pyq7wrrir"))
  24. (patches (search-patches "gnulib-gets.patch"
  25. "octave-nested-class.patch"))))
  26. (arguments
  27. (substitute-keyword-arguments (package-arguments octave-cli)
  28. ((#:configure-flags cf)
  29. `(cons "--enable-docs=no" ; docs fail to build
  30. ,cf))
  31. ((#:phases phases)
  32. `(modify-phases ,phases
  33. (add-after 'unpack 'patch-configure-script
  34. (lambda _
  35. (substitute* '("configure"
  36. "src/DLD-FUNCTIONS/__delaunayn__.cc"
  37. "src/DLD-FUNCTIONS/__voronoi__.cc"
  38. "src/DLD-FUNCTIONS/convhulln.cc")
  39. (("qhull/qhull.h") "libqhull/libqhull.h")
  40. (("qhull/qhull_a.h") "libqhull/qhull_a.h"))
  41. #t))
  42. (replace 'configure-makeinfo
  43. (lambda* (#:key inputs #:allow-other-keys)
  44. (substitute* "src/help.cc"
  45. (("\"makeinfo\"")
  46. (string-append
  47. "\"" (assoc-ref inputs "texinfo") "/bin/makeinfo\"")))
  48. #t))))))
  49. (native-inputs
  50. `(("glibc-2.27" ,glibc-2.27) ; works around fseeko.c problem in gnulib
  51. ,@(fold alist-delete (package-native-inputs octave-cli)
  52. '("lzip"))))
  53. (inputs
  54. `(("glpk" ,glpk-4.48)
  55. ("gperf" ,gperf)
  56. ,@(fold alist-delete (package-inputs octave-cli)
  57. ;; suitesparse provides cholmod_common_struct, may need older version
  58. '("glpk" "suitesparse"))))))
  59. ;; 4.49 is the last version with _glp_lpx_simplex exported
  60. ;; 4.49 is the version where all lpx_ routines were removed
  61. (define-public glpk-4.48
  62. (package
  63. (inherit glpk)
  64. (version "4.48")
  65. (source
  66. (origin
  67. (method url-fetch)
  68. (uri (string-append "mirror://gnu/glpk/glpk-"
  69. version ".tar.gz"))
  70. (sha256
  71. (base32
  72. "1cddqsdcfwavdklg7hsfifppsry81dx3c17wzk6r22mjjpwcihmb"))))))