[flowcanvas/f19] fix build with libcgraph
Tom Callaway
spot at fedoraproject.org
Tue Apr 23 20:26:37 UTC 2013
commit ad7fad6c148d24370fb8d6eb66d1c44e064952c2
Author: Tom Callaway <spot at fedoraproject.org>
Date: Tue Apr 23 16:25:58 2013 -0400
fix build with libcgraph
flowcanvas-0.7.1-graphviz23.patch | 58 +++++++++++++++++++++++++++++++++++++
flowcanvas.spec | 11 +++++--
2 files changed, 66 insertions(+), 3 deletions(-)
---
diff --git a/flowcanvas-0.7.1-graphviz23.patch b/flowcanvas-0.7.1-graphviz23.patch
new file mode 100644
index 0000000..f0d20e5
--- /dev/null
+++ b/flowcanvas-0.7.1-graphviz23.patch
@@ -0,0 +1,58 @@
+diff -up flowcanvas-0.7.1/src/Canvas.cpp.graphviz23 flowcanvas-0.7.1/src/Canvas.cpp
+--- flowcanvas-0.7.1/src/Canvas.cpp.graphviz23 2013-04-23 16:03:00.704493594 -0400
++++ flowcanvas-0.7.1/src/Canvas.cpp 2013-04-23 16:04:55.025489508 -0400
+@@ -1253,21 +1253,21 @@ Canvas::layout_dot(bool use_length_hints
+ */
+
+ 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 @@ Canvas::layout_dot(bool use_length_hints
+
+ 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 @@ Canvas::layout_dot(bool use_length_hints
+ 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);
+ }
+ }
+
+diff -up flowcanvas-0.7.1/wscript.graphviz23 flowcanvas-0.7.1/wscript
+--- flowcanvas-0.7.1/wscript.graphviz23 2013-04-23 16:05:07.326489068 -0400
++++ flowcanvas-0.7.1/wscript 2013-04-23 16:06:29.683486124 -0400
+@@ -39,6 +39,7 @@ def configure(conf):
+ autowaf.configure(conf)
+ autowaf.display_header('FlowCanvas Configuration')
+ conf.check_tool('compiler_cxx')
++ conf.env['LIB_AGRAPH'] = ['cgraph' if l == 'graph' else l for l in conf.env['LIB_AGRAPH']]
+ autowaf.check_pkg(conf, 'libgvc', uselib_store='AGRAPH',
+ atleast_version='2.8', mandatory=False)
+ autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GLIBMM',
diff --git a/flowcanvas.spec b/flowcanvas.spec
index b2d51c2..9ecfa33 100644
--- a/flowcanvas.spec
+++ b/flowcanvas.spec
@@ -1,16 +1,16 @@
Name: flowcanvas
Summary: Interactive widget for "boxes and lines" environments
Version: 0.7.1
-Release: 9%{?dist}
+Release: 10%{?dist}
Group: Development/Libraries
License: GPLv2+
URL: http://drobilla.net/software/flowcanvas/
Source0: http://download.drobilla.net/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
+Patch0: flowcanvas-0.7.1-graphviz23.patch
BuildRequires: boost-devel
BuildRequires: doxygen
-BuildRequires: graphviz-devel
+BuildRequires: graphviz-devel >= 2.3
BuildRequires: libgnomecanvasmm26-devel
@@ -38,10 +38,12 @@ This package contains the headers and development libraries for FlowCanvas.
%prep
%setup -q
+%patch0 -p1 -b .graphviz23
%build
export CXXFLAGS="$RPM_OPT_FLAGS"
+export LIB_AGRAPH="cgraph"
./waf configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
@@ -80,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Apr 23 2013 Tom Callaway <spot at fedoraproject.org> - 0.7.1-10
+- rebuild against new libcgraph
+
* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora at m4x.org> - 0.7.1-9
- Rebuild for Boost-1.53.0
More information about the scm-commits
mailing list