[med-svn] [r-cran-igraph] 03/03: New upstream version. This unfortunately causes a strange error.
Andreas Tille
tille at debian.org
Thu Sep 7 08:45:32 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository r-cran-igraph.
commit 3b8a34ed4c531d8cedf9a7c4a5eef24a48f68ba5
Author: Andreas Tille <tille at debian.org>
Date: Thu Sep 7 10:43:27 2017 +0200
New upstream version. This unfortunately causes a strange error.
---
debian/changelog | 7 +++
debian/control | 3 +-
debian/patches/gcc-7.patch | 39 +++++++++++++
debian/patches/no_pkg_config_dependency.patch | 24 ++++++++
debian/patches/remove_arpack_test.patch | 83 ---------------------------
debian/patches/remove_failing_tests.patch | 83 ---------------------------
debian/patches/series | 4 +-
7 files changed, 74 insertions(+), 169 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 6d59b89..0a0bec1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+r-cran-igraph (1.1.2-1) UNRELEASED; urgency=medium
+
+ * New upstream version
+ * Build-Depends: pkg-config
+
+ -- Andreas Tille <tille at debian.org> Thu, 07 Sep 2017 09:28:22 +0200
+
r-cran-igraph (1.0.1-1) unstable; urgency=medium
* New upstream version
diff --git a/debian/control b/debian/control
index d0840c1..89f6d14 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,8 @@ Build-Depends: debhelper (>= 9),
r-cran-matrix,
r-cran-magrittr,
r-cran-nmf,
- r-cran-irlba
+ r-cran-irlba,
+ pkg-config
Standards-Version: 3.9.8
Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/r-cran-igraph.git
Vcs-Git: https://anonscm.debian.org/git/debian-med/r-cran-igraph.git
diff --git a/debian/patches/gcc-7.patch b/debian/patches/gcc-7.patch
new file mode 100644
index 0000000..788ce07
--- /dev/null
+++ b/debian/patches/gcc-7.patch
@@ -0,0 +1,39 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 07 Sep 2017 09:28:22 +0200
+Description: Fix some spurious printf statements which are broken with gcc-7
+ Unfortunately this patch does not work since it ends up in
+ .
+ gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -DUSING_R -I. -Iinclude -Ics -Iglpk -Iplfit -ICHOLMOD/Include -IAMD/Include -ICOLAMD/Include -ISuiteSparse_config -g -O2 -fdebug-prefix-map=/build/r-base-5SFKJ
+ foreign-graphml.c: In function 'igraph_write_graph_graphml':
+ foreign-graphml.c:1408:53: error: 'GRAPHML_NAMESPACE_URI' undeclared (first use in this function); did you mean '__USING_NAMESPACE_STD'?
+ ret=fprintf(outstream, "<graphml xmlns=\"%s\"\n", GRAPHML_NAMESPACE_URI);
+ ^~~~~~~~~~~~~~~~~~~~~
+ __USING_NAMESPACE_STD
+ foreign-graphml.c:1408:53: note: each undeclared identifier is reported only once for each function it appears in
+ .
+ despite there is
+ .
+ /r-cran-igraph(master) $ grep "^#define.*GRAPHML_NAMESPACE_URI" src/foreign-graphml.c
+ #define GRAPHML_NAMESPACE_URI "http://graphml.graphdrawing.org/xmlns"
+ .
+ (not encapsulated in any conditional statement)
+
+--- a/src/foreign-graphml.c
++++ b/src/foreign-graphml.c
+@@ -1405,13 +1405,13 @@ int igraph_write_graph_graphml(const igr
+
+ ret=fprintf(outstream, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ if (ret<0) IGRAPH_ERROR("Write failed", IGRAPH_EFILE);
+- ret=fprintf(outstream, "<graphml xmlns=\"" GRAPHML_NAMESPACE_URI "\"\n");
++ ret=fprintf(outstream, "<graphml xmlns=\"%s\"\n", GRAPHML_NAMESPACE_URI);
+ if (ret<0) IGRAPH_ERROR("Write failed", IGRAPH_EFILE);
+ ret=fprintf(outstream, " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n");
+ if (ret<0) IGRAPH_ERROR("Write failed", IGRAPH_EFILE);
+- ret=fprintf(outstream, " xsi:schemaLocation=\"" GRAPHML_NAMESPACE_URI "\n");
++ ret=fprintf(outstream, " xsi:schemaLocation=\"%s\n", GRAPHML_NAMESPACE_URI);
+ if (ret<0) IGRAPH_ERROR("Write failed", IGRAPH_EFILE);
+- ret=fprintf(outstream, " " GRAPHML_NAMESPACE_URI "/1.0/graphml.xsd\">\n");
++ ret=fprintf(outstream, " %s/1.0/graphml.xsd\">\n", GRAPHML_NAMESPACE_URI);
+ if (ret<0) IGRAPH_ERROR("Write failed", IGRAPH_EFILE);
+ ret=fprintf(outstream, "<!-- Created by igraph -->\n");
+ if (ret<0) IGRAPH_ERROR("Write failed", IGRAPH_EFILE);
diff --git a/debian/patches/no_pkg_config_dependency.patch b/debian/patches/no_pkg_config_dependency.patch
new file mode 100644
index 0000000..dcfb1aa
--- /dev/null
+++ b/debian/patches/no_pkg_config_dependency.patch
@@ -0,0 +1,24 @@
+--- a/DESCRIPTION
++++ b/DESCRIPTION
+@@ -7,8 +7,7 @@ Description: Routines for simple graphs
+ handle large graphs very well and provides functions for generating random
+ and regular graphs, graph visualization, centrality methods and much more.
+ Depends: methods
+-Imports: graphics, grDevices, irlba, magrittr, Matrix, pkgconfig (>=
+- 2.0.0), stats, utils
++Imports: graphics, grDevices, irlba, magrittr, Matrix, stats, utils
+ Suggests: ape, graph, igraphdata, NMF, rgl, scales, stats4, tcltk,
+ testthat
+ License: GPL (>= 2)
+--- a/NAMESPACE
++++ b/NAMESPACE
+@@ -891,9 +891,6 @@ importFrom(graphics,text)
+ importFrom(graphics,xspline)
+ importFrom(graphics,xyinch)
+ importFrom(magrittr,"%>%")
+-importFrom(pkgconfig,get_config)
+-importFrom(pkgconfig,set_config)
+-importFrom(pkgconfig,set_config_in)
+ importFrom(stats,IQR)
+ importFrom(stats,as.dendrogram)
+ importFrom(stats,as.hclust)
diff --git a/debian/patches/remove_arpack_test.patch b/debian/patches/remove_arpack_test.patch
deleted file mode 100644
index 6674ec0..0000000
--- a/debian/patches/remove_arpack_test.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Changed: Thu, 25 Sep 2014 18:00:25 +0200
-Description: Remove ARPACK test
- Upstream says: "an issue that has come up a couple of times so far with
- ARPACK, but I don't know how to fix it in this case, I can't seem to
- be able to reproduce it.
- .
- So for the moment this test is disabled and the issue delayed for further
- investigation.
-
---- a/inst/tests/test_arpack.R
-+++ /dev/null
-@@ -1,70 +0,0 @@
--
--context("arpack")
--
--test_that("arpack works for identity matrix", {
-- library(igraph)
-- f <- function(x, extra=NULL) x
-- res <- arpack(f, options=list(n=10, nev=2, ncv=4), sym=TRUE)
-- expect_that(res$values, equals(c(1,1)))
--})
--
--test_that("arpack works on the Laplacian of a star", {
-- library(igraph)
-- f <- function(x, extra=NULL) {
-- y <- x
-- y[1] <- (length(x)-1)*x[1] - sum(x[-1])
-- for (i in 2:length(x)) {
-- y[i] <- x[i] - x[1]
-- }
-- y
-- }
--
-- r1 <- arpack(f, options=list(n=10, nev=1, ncv=3), sym=TRUE)
-- r2 <- eigen(laplacian_matrix(make_star(10, mode="undirected")))
--
-- correctSign <- function(x) { if (x[1]<0) { -x } else { x } }
-- expect_that(r1$values, equals(r2$values[1]))
-- expect_that(correctSign(r1$vectors), equals(correctSign(r2$vectors[,1])))
--})
--
--####
--# Complex case
--
--test_that("arpack works for non-symmetric matrices", {
-- library(igraph)
-- A <- structure(c(-6, -6, 7, 6, 1, -9, -3, 2, -9, -7, 0, 1, -7, 8,
-- -7, 10, 0, 0, 1, 1, 10, 0, 8, -4, -4, -5, 8, 9, -6, 9, 3, 8,
-- 6, -1, 9, -9, -6, -3, -1, -7, 8, -4, -4, 10, 0, 5, -2, 0, 7,
-- 10, 1, 4, -8, 3, 5, 3, -7, -9, 10, -1, -4, -7, -1, 7, 5, -5,
-- 1, -4, 9, -2, 10, 1, -7, 7, 6, 7, -3, 0, 9, -5, -8, 1, -3,
-- -3, -8, -7, -8, 10, 8, 7, 0, 6, -7, -8, 10, 10, 1, 0, -2, 6),
-- .Dim = c(10L, 10L))
--
-- f <- function(x, extra=NULL) A %*% x
-- res <- arpack(f, options=list(n=10, nev=3, ncv=7), sym=FALSE)
-- ## This is needed because they might return a different complex conjugate
-- expect_that(abs(res$values/eigen(A)$values[1:3]), equals(c(1,1,1)))
-- expect_that((res$values[1] * res$vectors[,1]) / (A %*% res$vectors[,1]),
-- equals(cbind(rep(1+0i, nrow(A)))))
-- expect_that((res$values[2] * res$vectors[,2]) / (A %*% res$vectors[,2]),
-- equals(cbind(rep(1+0i, nrow(A)))))
-- expect_that(abs((res$values[3] * res$vectors[,3]) / (A %*% res$vectors[,3])),
-- equals(cbind(rep(1, nrow(A)))))
--
-- f <- function(x, extra=NULL) A %*% x
-- res <- arpack(f, options=list(n=10, nev=4, ncv=9), sym=FALSE)
-- ## This is needed because they might return a different complex conjugate
-- expect_that(abs(res$values/eigen(A)$values[1:4]), equals(rep(1, 4)))
-- expect_that((res$values[1] * res$vectors[,1]) / (A %*% res$vectors[,1]),
-- equals(cbind(rep(1+0i, nrow(A)))))
-- expect_that((res$values[2] * res$vectors[,2]) / (A %*% res$vectors[,2]),
-- equals(cbind(rep(1+0i, nrow(A)))))
-- expect_that(abs((res$values[3] * res$vectors[,3]) / (A %*% res$vectors[,3])),
-- equals(cbind(rep(1, nrow(A)))))
-- expect_that(abs((res$values[4] * res$vectors[,4]) / (A %*% res$vectors[,4])),
-- equals(cbind(rep(1, nrow(A)))))
--})
--
--####
--
--# TODO: further tests for typically hard cases
diff --git a/debian/patches/remove_failing_tests.patch b/debian/patches/remove_failing_tests.patch
deleted file mode 100644
index 716becb..0000000
--- a/debian/patches/remove_failing_tests.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Changed: Thu, 25 Sep 2014 18:00:25 +0200
-Description: Remove leading.eigenvector.community test
- Upstream says: "I can reproduce, and it will be fixed in the next version of igraph.
- Don't wait, because it might not happen soon.
- .
- So for the moment this test is disabled and the issue delayed for further
- investigation.
-
---- a/inst/tests/test_leading.eigenvector.community.R
-+++ /dev/null
-@@ -1,71 +0,0 @@
--
--context("leading.eigenvector.community")
--
--test_that("leading.eigenvector.community works", {
--
-- library(igraph)
--
-- ## Check-test
--
-- f <- function(membership, community, value, vector, multiplier, extra) {
-- M <- sapply(1:length(vector), function(x) {
-- v <- rep(0, length(vector))
-- v[x] <- 1
-- multiplier(v)
-- })
-- ev <- eigen(M)
-- ret <- 0
-- expect_that(ev$values[1], equals(value))
-- if (sign(ev$vectors[1,1]) != sign(vector[1])) {
-- ev$vectors <- -ev$vectors
-- }
-- expect_that(ev$vectors[,1], equals(vector))
-- }
--
-- g <- graph.famous("Zachary")
-- lc <- leading.eigenvector.community(g, callback=f)
--
-- expect_that(lc$modularity, equals(modularity(g, lc$membership)))
-- expect_that(membership(lc),
-- equals(c(1, 3, 3, 3, 1, 1, 1, 3, 2, 2, 1, 1, 3, 3, 2, 2,
-- 1, 3, 2, 3, 2, 3, 2, 4, 4, 4, 2, 4, 4, 2, 2, 4,
-- 2, 2)))
-- expect_that(length(lc), equals(4))
-- expect_that(sizes(lc),
-- equals(structure(c(7L, 12L, 9L, 6L), .Dim = 4L, .Dimnames =
-- structure(list(`Community sizes` =
-- c("1", "2", "3", "4")),
-- .Names = "Community sizes"),
-- class = "table")))
--
-- ## Check that the modularity matrix is correct
--
-- f <- function(membership, community, value, vector, multiplier, extra) {
-- M <- sapply(1:length(vector), function(x) {
-- v <- rep(0, length(vector))
-- v[x] <- 1
-- multiplier(v)
-- })
-- myc <- membership==community
-- B <- A[myc,myc] - (deg[myc] %*% t(deg[myc]))/2/ec
-- BG <- B-diag(rowSums(B))
--
-- expect_that(M, equals(BG))
-- }
--
-- g <- graph.famous("Zachary")
-- A <- get.adjacency(g, sparse=FALSE)
-- ec <- ecount(g)
-- deg <- degree(g)
-- lc <- leading.eigenvector.community(g, callback=f)
--
-- ## Stress-test
--
-- for (i in 1:100) {
-- g <- erdos.renyi.game(20, sample(5:40, 1), type="gnm")
-- lec1 <- leading.eigenvector.community(g)
-- lec2 <- leading.eigenvector.community(g)
-- expect_that(membership(lec1), equals(membership(lec2)))
-- }
--
--})
diff --git a/debian/patches/series b/debian/patches/series
index e7bf170..0b7e77f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,2 @@
-remove_arpack_test.patch
-# remove_failing_tests.patch
+no_pkg_config_dependency.patch
+gcc-7.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-cran-igraph.git
More information about the debian-med-commit
mailing list