From e759be5de947a36eabe1dcf0bde3eeeb3848b4f6 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Sat, 8 Aug 2015 09:59:25 +0800 Subject: Fix using .dot/graphviz on ubuntu 14.04 64-bit --- .gitignore | 2 ++ graphviz.lua | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc84959 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/ + diff --git a/graphviz.lua b/graphviz.lua index a30fff6..785e325 100644 --- a/graphviz.lua +++ b/graphviz.lua @@ -34,7 +34,14 @@ extern int gvFreeLayout(GVC_t *context, graph_t *g); extern int gvFreeContext(GVC_t *context); ]] graphvizOk, graphviz = pcall(function() return ffi.load('libgvc') end) + if not graphvizOk then + graphvizOk, graphviz = pcall(function() return ffi.load('libgvc.so.6') end) + end + cgraphOk, cgraph = pcall(function() return ffi.load('libcgraph') end) + if not cgraphOk then + cgraphOk, cgraph = pcall(function() return ffi.load('libcgraph.so.6') end) + end else graphvizOk = false cgraphOk = false -- cgit v1.2.3