aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorDavid Elsing <david.elsing@posteo.net>2023-10-05 21:35:00 +0000
committerLudovic Courtès <ludo@gnu.org>2023-10-06 12:26:46 +0200
commit730241267665ab0758206b6510da533a010332c2 (patch)
tree703a5a91fb78cb3baa93777fc50a90fbfa552235 /gnu/packages
parent9dde72a23cf628ec0663567cb98846771a0d4a04 (diff)
downloadguix-730241267665ab0758206b6510da533a010332c2.tar.gz
guix-730241267665ab0758206b6510da533a010332c2.zip
gnu: Add suitesparse-mongoose.
* gnu/packages/maths.scm (suitesparse-mongoose): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/maths.scm75
1 files changed, 75 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2cb1f01358..9a013825de 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5722,6 +5722,81 @@ code.")
for reading and writing sparse matrices in the Rutherford/Boeing format.")
(license license:gpl2+)))
+(define-public suitesparse-mongoose
+ (package
+ (name "suitesparse-mongoose")
+ (version "3.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "Mongoose")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ ;; XeLaTeX fails with .eps graphics
+ (with-directory-excursion "../Mongoose/Doc"
+ (for-each
+ (lambda (name)
+ (invoke "epstopdf" name))
+ (find-files "Figures" "\\.eps$"))
+ (substitute* "Mongoose_UserGuide.tex"
+ (("\\.eps") ".pdf"))
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../Mongoose/Doc/Mongoose_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../Mongoose/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (native-inputs
+ (list texlive-epstopdf
+ (texlive-updmap.cfg
+ (list texlive-algorithmicx
+ texlive-booktabs
+ texlive-lastpage
+ texlive-multirow
+ texlive-pgf
+ texlive-caption
+ texlive-etoolbox
+ texlive-csquotes
+ texlive-fancybox
+ texlive-enumitem
+ texlive-microtype
+ texlive-cancel
+ texlive-sourcecodepro
+ texlive-xkeyval
+ texlive-fontspec
+ texlive-wasy
+ texlive-wasysym
+ texlive-float
+ texlive-tcolorbox
+ texlive-environ
+ texlive-xcolor
+ texlive-xetex
+ texlive-listings))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Graph partitioning library")
+ (description "Mongoose is a library for graph partitioning by computing
+edge cuts using a coarsening and refinement framework.")
+ (license license:gpl3)))
+
(define-public suitesparse
(package
(name "suitesparse")