diff options
author | David Elsing <david.elsing@posteo.net> | 2023-11-01 22:57:15 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-12-02 12:25:46 +0100 |
commit | 808f919063c1cebd2c0ff17984e2d40d4406691a (patch) | |
tree | e730f2676e092db7c699373d38b6941be5cb3d8f /gnu/packages/patches | |
parent | aa4959e602998e753f12a99ab38c4a8ab19e2171 (diff) | |
download | guix-808f919063c1cebd2c0ff17984e2d40d4406691a.tar.gz guix-808f919063c1cebd2c0ff17984e2d40d4406691a.zip |
gnu: igraph: Update to 0.10.7.
* gnu/packages/graph.scm (igraph): Update to 0.10.7.
[source]: Use git-fetch. Apply patch.
<snippet>: Remove the entire "vendor" and "src/isomorphism/bliss" directories.
Patch CMakeLists.txt to not build and use vendored dependencies.
[arguments]: Add -DIGRAPH_INTEGER_SIZE=64 to #:configure-flags. Add phases to
use unbundled libraries and build documentation.
[native-inputs]: Add bison, docbook-xml-4.3, docbook-xsl, flex, pcg-c, python,
source-highlight and xmlto.
[inputs]: Remove gmp and libxml2. Add bliss and suitesparse-cxsparse.
* gnu/packages/patches/igraph-fix-varargs-integer-size.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/igraph-fix-varargs-integer-size.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/patches/igraph-fix-varargs-integer-size.patch b/gnu/packages/patches/igraph-fix-varargs-integer-size.patch new file mode 100644 index 0000000000..2d7ffd7e68 --- /dev/null +++ b/gnu/packages/patches/igraph-fix-varargs-integer-size.patch @@ -0,0 +1,39 @@ +If the size of int is different from IGRAPH_INTEGER_SIZE, the integer size +passed to these vararg arguments is different from the assumed one, +leading to undefined behavior. +Submitted upstream: https://github.com/igraph/igraph/pull/2423 + + +diff -ur a/examples/simple/igraph_union.c b/examples/simple/igraph_union.c +--- a/examples/simple/igraph_union.c ++++ b/examples/simple/igraph_union.c +@@ -103,7 +103,7 @@ + igraph_vector_ptr_init(&glist, 10); + for (i = 0; i < igraph_vector_ptr_size(&glist); i++) { + VECTOR(glist)[i] = calloc(1, sizeof(igraph_t)); +- igraph_vector_int_init_int_end(&v, -1, i, i + 1, 1, 0, -1); ++ igraph_vector_int_init_int_end(&v, -1, (int) i, (int) i + 1, 1, 0, -1); + igraph_create(VECTOR(glist)[i], &v, 0, IGRAPH_DIRECTED); + igraph_vector_int_destroy(&v); + } +@@ -123,7 +123,7 @@ + igraph_vector_ptr_init(&glist, 10); + for (i = 0; i < igraph_vector_ptr_size(&glist); i++) { + VECTOR(glist)[i] = calloc(1, sizeof(igraph_t)); +- igraph_vector_int_init_int_end(&v, -1, i, i + 1, 1, 0, -1); ++ igraph_vector_int_init_int_end(&v, -1, (int) i, (int) i + 1, 1, 0, -1); + igraph_create(VECTOR(glist)[i], &v, 0, IGRAPH_UNDIRECTED); + igraph_vector_int_destroy(&v); + } +diff -ur a/src/core/matrix.pmt b/src/core/matrix.pmt +--- a/src/core/matrix.pmt ++++ b/src/core/matrix.pmt +@@ -1863,7 +1863,7 @@ + #ifdef FPRINTFUNC_ALIGNED + FPRINTFUNC_ALIGNED(file, VECTOR(column_width)[j], MATRIX(*m, i, j)); + #else +- fprintf(file, format, VECTOR(column_width)[j], MATRIX(*m, i, j)); ++ fprintf(file, format, (int) VECTOR(column_width)[j], MATRIX(*m, i, j)); + #endif + } + fprintf(file, "\n"); |