diff --git a/gnu/local.mk b/gnu/local.mk index 29237b1138..376ee715b9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1829,6 +1829,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-nettle-sys-disable-vendor.patch \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ %D%/packages/patches/rust-wl-clipboard-rs-newer-wl.patch \ + %D%/packages/patches/rw-igraph-0.10.patch \ %D%/packages/patches/sbc-fix-build-non-x86.patch \ %D%/packages/patches/sbcl-aserve-add-HTML-5-elements.patch \ %D%/packages/patches/sbcl-aserve-fix-rfe12668.patch \ diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm index 5633dfdea6..d89c5d41e0 100644 --- a/gnu/packages/graph.scm +++ b/gnu/packages/graph.scm @@ -572,19 +572,18 @@ (define-public rw (name "rw") ;; There is a version 0.8, but the tarball is broken with symlinks ;; to /usr/share. - (version "0.7") + (version "0.9") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/rankwidth/" "rw-" version ".tar.gz")) - (sha256 - (base32 - "1rv2v42x2506x7f10349m1wpmmfxrv9l032bkminni2gbip9cjg0")))) + (sha256 + (base32 + "0hdlxxmlccb6fp7g58zv0rdzpbyjn9bgqlf052sgrk95zq33bq61")) + (patches (search-patches "rw-igraph-0.10.patch")))) (build-system gnu-build-system) - (native-inputs - (list pkg-config)) - (inputs - (list igraph)) + (native-inputs (list pkg-config)) + (inputs (list igraph)) (home-page "https://sourceforge.net/projects/rankwidth/") (synopsis "Rank-width and rank-decomposition of graphs") (description "rw computes rank-width and rank-decompositions diff --git a/gnu/packages/patches/rw-igraph-0.10.patch b/gnu/packages/patches/rw-igraph-0.10.patch new file mode 100644 index 0000000000..3544196660 --- /dev/null +++ b/gnu/packages/patches/rw-igraph-0.10.patch @@ -0,0 +1,17 @@ +Fix the build when using igraph >= 0.10. +Retrieved from: https://sourceforge.net/p/rankwidth/tickets/2/. + +--- rw-0.9/simplerw.c.newigraph 2017-02-14 00:20:35.000000000 +0900 ++++ rw-0.9/simplerw.c 2022-09-11 19:39:47.033917305 +0900 +@@ -134,7 +134,11 @@ int read_graph(const char *format, const + igraph_destroy(&igraph); + return(-1); + } ++#if (IGRAPH_VERSION_MAJOR >= 1) || ((IGRAPH_VERSION_MAJOR == 0) && (IGRAPH_VERSION_MINOR >= 10)) ++ igraph_get_adjacency(&igraph, &imatrix, IGRAPH_GET_ADJACENCY_BOTH, NULL, IGRAPH_LOOPS_ONCE); ++#else + igraph_get_adjacency(&igraph, &imatrix, IGRAPH_GET_ADJACENCY_BOTH, 0); ++#endif + igraph_destroy(&igraph); + if(igraph_matrix_nrow(&imatrix) > MAX_VERTICES) + {