gnu: SuiteSparse: Update to 5.7.1.

* gnu/packages/maths.scm (suitesparse): Update to 5.7.1.
[source]: The latest releases of SuiteSparse have only been published on GitHub.
Fetch from git tag as GitHub releases page only contains autogenerated tarballs
that guix lint complains about. Apply new patch for Mongoose's CMakeList.txt to
find SuiteSparse_config.
[arguments]: Add CMake flags used by new components GraphBLAS and Mongoose.
[native-inputs]: Add CMake and m4 needed to build GraphBLAS and Mongoose.
* gnu/packages/patches/suitesparse-mongoose-cmake.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Leo Famulari <leo@famulari.name>
This commit is contained in:
Felix Gruber 2020-03-04 22:41:08 +01:00 committed by Leo Famulari
parent c2d7e800e6
commit aac148a87b
No known key found for this signature in database
GPG key ID: 2646FA30BACA7F08
3 changed files with 48 additions and 6 deletions

View file

@ -1408,6 +1408,7 @@ dist_patch_DATA = \
%D%/packages/patches/soundconverter-remove-gconf-dependency.patch \ %D%/packages/patches/soundconverter-remove-gconf-dependency.patch \
%D%/packages/patches/spice-fix-test-armhf.patch \ %D%/packages/patches/spice-fix-test-armhf.patch \
%D%/packages/patches/steghide-fixes.patch \ %D%/packages/patches/steghide-fixes.patch \
%D%/packages/patches/suitesparse-mongoose-cmake.patch \
%D%/packages/patches/superlu-dist-awpm-grid.patch \ %D%/packages/patches/superlu-dist-awpm-grid.patch \
%D%/packages/patches/superlu-dist-scotchmetis.patch \ %D%/packages/patches/superlu-dist-scotchmetis.patch \
%D%/packages/patches/supertux-unbundle-squirrel.patch \ %D%/packages/patches/supertux-unbundle-squirrel.patch \

View file

@ -34,6 +34,7 @@
;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com> ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
;;; Copyright © 2019 Robert Smith <robertsmith@posteo.net> ;;; Copyright © 2019 Robert Smith <robertsmith@posteo.net>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Felix Gruber <felgru@posteo.net>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -3405,16 +3406,18 @@ (define-public openspecfun
(define-public suitesparse (define-public suitesparse
(package (package
(name "suitesparse") (name "suitesparse")
(version "4.5.5") (version "5.7.1")
(source (source
(origin (origin
(method url-fetch) (method git-fetch)
(uri (string-append (uri (git-reference
"http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-" (url "https://github.com/DrTimothyAldenDavis/SuiteSparse.git")
version ".tar.gz")) (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1dnr6pmjzc2qmbkmb4shigx1l74ilf6abn7svyd6brxgvph8vadr")) "174p3l78kv9gaa0i5hflyai2ydwnjzh34k9938sl4aa3li0543s8"))
(patches (search-patches "suitesparse-mongoose-cmake.patch"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
;; Remove bundled metis source ;; Remove bundled metis source
@ -3429,6 +3432,14 @@ (define-public suitesparse
"BLAS=-lblas" "BLAS=-lblas"
"TBB=-ltbb" "TBB=-ltbb"
"MY_METIS_LIB=-lmetis" "MY_METIS_LIB=-lmetis"
;; Flags for cmake (required to build GraphBLAS and Mongoose)
(string-append "CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX="
(assoc-ref %outputs "out")
" -DCMAKE_VERBOSE_MAKEFILE=ON"
" -DCMAKE_C_FLAGS_RELEASE=\"$(CFLAGS) $(CPPFLAGS)\""
" -DCMAKE_CXX_FLAGS_RELEASE=\"$(CXXFLAGS) $(CPPFLAGS)\""
" -DCMAKE_SKIP_RPATH=TRUE"
" -DCMAKE_BUILD_TYPE=Release")
(string-append "INSTALL_LIB=" (string-append "INSTALL_LIB="
(assoc-ref %outputs "out") "/lib") (assoc-ref %outputs "out") "/lib")
(string-append "INSTALL_INCLUDE=" (string-append "INSTALL_INCLUDE="
@ -3441,6 +3452,9 @@ (define-public suitesparse
`(("tbb" ,tbb) `(("tbb" ,tbb)
("lapack" ,lapack) ("lapack" ,lapack)
("metis" ,metis))) ("metis" ,metis)))
(native-inputs
`(("cmake" ,cmake)
("m4" ,m4)))
(home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html") (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html")
(synopsis "Suite of sparse matrix software") (synopsis "Suite of sparse matrix software")
(description (description

View file

@ -0,0 +1,27 @@
Fix required by suitesparse to build Mongoose
The CMakeLists.txt of Mongoose assumes that SuiteSparse_config has been
installed into the suitesparse source directory, which is not the case
for us, as we are building suitesparse out-of-tree.
SuiteSparse_config can instead be found in the ${CMAKE_INSTALL_PREFIX}
directory.
diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt
index 7e134ab..76fa9e2 100644
--- a/Mongoose/CMakeLists.txt
+++ b/Mongoose/CMakeLists.txt
@@ -148,10 +148,10 @@ set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_CXX_STANDARD_REQUIRED ON)
# determine which SuiteSparse_config to use
-if (EXISTS ${PROJECT_SOURCE_DIR}/../SuiteSparse_config)
- message(STATUS "External ../SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
+if (EXISTS ${CMAKE_INSTALL_PREFIX})
+ message(STATUS "External SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
set ( SUITESPARSE_CONFIG_DIR ${PROJECT_SOURCE_DIR}/../SuiteSparse_config )
- link_directories ( ${PROJECT_SOURCE_DIR}/../lib )
+ link_directories ( ${CMAKE_INSTALL_PREFIX}/lib )
message ( STATUS "Note: ../SuiteSparse_config must be compiled before compiling Mongoose" )
set ( SUITESPARSE_CONFIG_LIBRARY suitesparseconfig )
else ()