diff --git a/bin/graph_flow.pl b/bin/graph_flow.pl index fe77ea59..7da82626 100755 --- a/bin/graph_flow.pl +++ b/bin/graph_flow.pl @@ -23,7 +23,6 @@ use strict; use warnings; use Cwd 'abs_path'; use Data::Dumper; -use GraphViz; use Getopt::Long; use English; @@ -46,6 +45,14 @@ if($#ARGV!=1) die(usage()); } +my $rc = eval +{ + require GraphViz; + GraphViz->import(); + 1; +}; +return unless $rc; + my $g = GraphViz->new(); my $filename = abs_path($ARGV[0]); my $outfilename = $ARGV[1]; diff --git a/debian/control b/debian/control index cede06c5..d436df72 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,6 @@ Build-Depends: debhelper (>= 9), devscripts, libconfig-tiny-perl, - libgraphviz-perl, libhash-merge-perl, libjson-perl, liblist-allutils-perl, @@ -15,6 +14,8 @@ Build-Depends: libtext-csv-perl, libyaml-libyaml-perl, python, +Recommends: + libgraphviz-perl, Standards-Version: 3.9.8 Homepage: https://www.sipwise.com/ @@ -24,7 +25,6 @@ Depends: curl, libconfig-tiny-perl, libfile-slurp-perl, - libgraphviz-perl, libhash-merge-perl, libio-compress-perl, libjson-perl, @@ -42,5 +42,7 @@ Depends: tcpdump, ${misc:Depends}, ${perl:Depends}, +Recommends: + libgraphviz-perl, Description: Kamailio configuration tests Scripts and tests scenarios to check Kamailio configuration.