summaryrefslogtreecommitdiff
path: root/community/flowcanvas/graphviz-2.30.patch
blob: 1338a6832864d5911ff3c90874160d01217a9da8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- src/Canvas.cpp.orig	2011-01-10 00:19:58.000000000 +0100
+++ src/Canvas.cpp	2013-03-16 13:45:17.797462753 +0100
@@ -1253,21 +1253,21 @@
 	 */

 	GVC_t* gvc = gvContext();
-	Agraph_t* G = agopen((char*)"g", AGDIGRAPH);
+	Agraph_t* G = agopen((char*)"g", Agdirected, NULL);

 	nodes.gvc = gvc;
 	nodes.G = G;

 	if (_direction == HORIZONTAL)
-		agraphattr(G, (char*)"rankdir", (char*)"LR");
+		agattr(G, AGRAPH, (char*)"rankdir", (char*)"LR");
 	else
-		agraphattr(G, (char*)"rankdir", (char*)"TD");
+		agattr(G, AGRAPH, (char*)"rankdir", (char*)"TD");

 	unsigned id = 0;
 	for (ItemList::const_iterator i = _items.begin(); i != _items.end(); ++i) {
 		std::ostringstream ss;
 		ss << "n" << id++;
-		Agnode_t* node = agnode(G, strdup(ss.str().c_str()));
+		Agnode_t* node = agnode(G, strdup(ss.str().c_str()), true);
 		if (boost::dynamic_pointer_cast<Module>(*i)) {
 			ss.str("");
 			ss << (*i)->width() / 96.0;
@@ -1310,7 +1310,7 @@

 		assert(src_node && dst_node);

-		Agedge_t* edge = agedge(G, src_node, dst_node);
+		Agedge_t* edge = agedge(G, src_node, dst_node, NULL, true);

 		if (use_length_hints && c->length_hint() != 0) {
 			std::ostringstream len_ss;
@@ -1325,7 +1325,7 @@
 		if (partner) {
 			GVNodes::iterator p = nodes.find(partner);
 			if (p != nodes.end())
-				agedge(G, i->second, p->second);
+				agedge(G, i->second, p->second, NULL, true);
 		}
 	}

--- wscript.orig	2011-01-12 00:09:31.000000000 +0100
+++ wscript	2013-03-16 14:19:43.577462602 +0100
@@ -41,6 +41,7 @@
 	conf.check_tool('compiler_cxx')
 	autowaf.check_pkg(conf, 'libgvc', uselib_store='AGRAPH',
 	                  atleast_version='2.8', mandatory=False)
+	conf.env['LIB_AGRAPH'] = ['cgraph' if l == 'graph' else l for l in conf.env['LIB_AGRAPH']]
 	autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GLIBMM',
 	                  atleast_version='2.10.0', mandatory=True)
 	autowaf.check_pkg(conf, 'libgnomecanvasmm-2.6', uselib_store='GNOMECANVASMM',