me
/
guix
Archived
1
0
Fork 0

gnu: igraph: Update to 0.10.4.

* gnu/packages/graph.scm (igraph): Update to 0.10.4.
[source]: Modify to preserve the bundled cs and pcg libraries, which cannot be
used from the system.
[arguments]: Use gexps, and provide the #:test-target argument.
[inputs]: Delete suitesparse.
[propagated-inputs]: New field.
Maxim Cournoyer 2023-01-27 12:07:32 -05:00
parent 5ebbedea58
commit a8754d3160
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 26 additions and 20 deletions

View File

@ -8,7 +8,7 @@
;;; Copyright © 2020 Pierre Langlois <pierre.langlos@gmx.com> ;;; Copyright © 2020 Pierre Langlois <pierre.langlos@gmx.com>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net> ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Alexandre Hannud Abdo <abdo@member.fsf.org> ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo@member.fsf.org>
;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
@ -91,35 +91,40 @@ distributions in empirical data. SIAM Review 51, 661-703 (2009)}).")
(define-public igraph (define-public igraph
(package (package
(name "igraph") (name "igraph")
(version "0.9.8") (version "0.10.4")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://github.com/igraph/igraph/releases/" (uri (string-append "https://github.com/igraph/igraph/releases/"
"download/" version "/igraph-" version ".tar.gz")) "download/" version "/igraph-" version ".tar.gz"))
(modules '((guix build utils))) (modules '((guix build utils)
(ice-9 ftw)
(srfi srfi-26)))
(snippet '(begin (snippet '(begin
;; Fully unbundle igraph (see: ;; igraph insists on building its own copy of CxSparse
;; https://github.com/igraph/igraph/issues/1897). ;; (see: https://github.com/igraph/igraph/commit/\
(delete-file-recursively "vendor") ;; 334318b7dfe46501236272ca336580f4748114b0) and the build
(substitute* "CMakeLists.txt" ;; has no support to use a system provided 'pcg'.
(("add_subdirectory\\(vendor\\).*") (define keep-libraries '("cs" "pcg"))
"")) (define keep (append '("." ".." "CMakeLists.txt")
;; Help CMake to find our plfit headers. keep-libraries))
(substitute* "etc/cmake/FindPLFIT.cmake" (define keep? (cut member <> keep))
(("^ NAMES plfit.h.*" all) (with-directory-excursion "vendor"
(string-append all (for-each delete-file-recursively
" PATH_SUFFIXES plfit"))) (scandir "." (negate keep?))))
(call-with-output-file "vendor/CMakeLists.txt"
(cut format <> "~{add_subdirectory(~a)~%~}"
keep-libraries))
(substitute* '("src/CMakeLists.txt" (substitute* '("src/CMakeLists.txt"
"etc/cmake/benchmark_helpers.cmake") "etc/cmake/benchmark_helpers.cmake")
;; Remove bundling related variables. ;; Remove extraneous bundling related variables.
((".*_IS_VENDORED.*") ((".*_IS_VENDORED.*")
"")))) ""))))
(sha256 (sha256
(base32 "15v3ydq95gahnas37cip637hvc2nwrmk76xp0nv3gq53rrrk9a7r")))) (base32 "1z1ay3l1h64jc2igbl2ibvi20sswy56v2yk3ykhis7jzijsh0mxa"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON")
'(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"))) #:test-target "check"))
(native-inputs (list pkg-config)) (native-inputs (list pkg-config))
(inputs (inputs
(list arpack-ng (list arpack-ng
@ -128,8 +133,9 @@ distributions in empirical data. SIAM Review 51, 661-703 (2009)}).")
libxml2 libxml2
lapack lapack
openblas openblas
plfit plfit))
suitesparse)) ;; libxml2 is in the 'Requires.private' of igraph.pc.
(propagated-inputs (list libxml2))
(home-page "https://igraph.org") (home-page "https://igraph.org")
(synopsis "Network analysis and visualization") (synopsis "Network analysis and visualization")
(description (description