]> granicus.if.org Git - graphviz/commitdiff
exclude ocaml since it is not available on distro used to generate src.rpm
authorellson <devnull@localhost>
Mon, 28 Mar 2005 15:42:46 +0000 (15:42 +0000)
committerellson <devnull@localhost>
Mon, 28 Mar 2005 15:42:46 +0000 (15:42 +0000)
start on some demo scripts that use bindings after installation

graphviz.spec.in
tclpkg/gv/Makefile.am
tclpkg/gv/demo/demo.pl [new file with mode: 0755]
tclpkg/gv/demo/demo.py [new file with mode: 0755]
tclpkg/gv/demo/demo.tcl [new file with mode: 0755]
tclpkg/gv/demo/hello.dot [new file with mode: 0644]

index 0db59582ffb3b88fc667aea6c6a84dc74ac048f1..0da09418f12eb4599335a14cd31fafae3188d090 100644 (file)
@@ -43,8 +43,9 @@ of graphs (as in nodes and edges, not as in barcharts).
 %{_bindir}/*
 %dir %{_libdir}/%{name}
 %{_libdir}/%{name}/*.so.*
-%{_libdir}/%{name}/*.ml
-%{_libdir}/%{name}/*.mli
+#%{_libdir}/%{name}/*.io
+#%{_libdir}/%{name}/*.ml
+#%{_libdir}/%{name}/*.mli
 %{_libdir}/%{name}/*.php
 %{_libdir}/%{name}/*.h
 %{_libdir}/%{name}/*.pm
index da19a3daf054dd97dab561788fca9f355a1b9719..2affc4d12aa1892dfcc30c9fa169fc8ca755168b 100644 (file)
@@ -97,8 +97,8 @@ gv_guile.cpp: gv.i
 gv_java.cpp: gv.i
        $(SWIG) -c++ -java -o gv_java.cpp gv.i
 
-gv_ocaml.cpp: gv.i
-       $(SWIG) -c++ -ocaml -o gv_ocaml.cpp gv.i
+#gv_ocaml.cpp: gv.i
+#      $(SWIG) -c++ -ocaml -o gv_ocaml.cpp gv.i
 
 gv_perl.cpp: gv.i
        $(SWIG) -c++ -perl -o gv_perl.cpp gv.i
@@ -118,12 +118,12 @@ gv_tcl.cpp: gv.i
 install-exec-hook:
        cp $(top_srcdir)/tclpkg/gv/*.cs $(DESTDIR)/$(libdir)/@PACKAGE@/
        cp $(top_srcdir)/tclpkg/gv/*.java $(DESTDIR)/$(libdir)/@PACKAGE@/
-       cp $(top_srcdir)/tclpkg/gv/*.ml $(DESTDIR)/$(libdir)/@PACKAGE@/
-       cp $(top_srcdir)/tclpkg/gv/*.mli $(DESTDIR)/$(libdir)/@PACKAGE@/
        cp $(top_srcdir)/tclpkg/gv/*.php $(DESTDIR)/$(libdir)/@PACKAGE@/
        cp $(top_srcdir)/tclpkg/gv/php_gv.h $(DESTDIR)/$(libdir)/@PACKAGE@/
        cp $(top_srcdir)/tclpkg/gv/*.pm $(DESTDIR)/$(libdir)/@PACKAGE@/
        cp $(top_srcdir)/tclpkg/gv/*.py $(DESTDIR)/$(libdir)/@PACKAGE@/
+#      cp $(top_srcdir)/tclpkg/gv/*.ml $(DESTDIR)/$(libdir)/@PACKAGE@/
+#      cp $(top_srcdir)/tclpkg/gv/*.mli $(DESTDIR)/$(libdir)/@PACKAGE@/
        
 if WITH_TCL
 all-local: pkgIndex.tcl
@@ -163,12 +163,12 @@ test_java: libgv_java.la
                javac *.java; \
                LD_LIBRARY_PATH=. java test)
 
-test_ocaml: libgv_ocaml.la
-       (cd ocaml; \
-               ln -fs ../.libs/libgv_ocaml.so libgv.so; \
-               cp -f ../*.ocaml .; \
-               ocamlc *.ocaml; \
-               LD_LIBRARY_PATH=. ocaml test)
+#test_ocaml: libgv_ocaml.la
+#      (cd ocaml; \
+#              ln -fs ../.libs/libgv_ocaml.so libgv.so; \
+#              cp -f ../*.ocaml .; \
+#              ocamlc *.ocaml; \
+#              LD_LIBRARY_PATH=. ocaml test)
 
 test_perl: libgv_perl.la
        (cd perl; \
@@ -206,7 +206,8 @@ EXTRA_DIST = gv.i \
        gv.pm \
        gv.php php_gv.h \
        gv.py \
-       gv.ml gv.mli
+       gv.ml gv.mli \
+       demo/*
        
 
 CLEANFILES = csharp/SWIG*.cs csharp/gv*.cs csharp/*.dot csharp/*.png csharp/*.so \
diff --git a/tclpkg/gv/demo/demo.pl b/tclpkg/gv/demo/demo.pl
new file mode 100755 (executable)
index 0000000..483587e
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use gv;
+
+$g = gv::digraph "G";
+print gv::set($g, "aaa", "xxx"), "\n";
+print gv::set($g, "aaa"), "\n";
+$n = gv::node $g, "hello";
+print gv::set($n,"label"), "\n";
+print gv::set($n, "aaa", "xxx"), "\n";
+print gv::set($n, "aaa"), "\n";
+$m = gv::node $g, "world";
+print gv::set($m, "aaa"), "\n";
+$e = gv::edge $n, $m;
+print gv::set($e, "aaa", "xxx"), "\n";
+print gv::set($e, "aaa"), "\n";
+gv::rm $e;
+gv::rm $n;
+gv::rm $m;
+gv::rm $g;
+
+$g = gv::stringgraph "digraph G {a->b}";
+gv::rm $g;
+
+$g = gv::readgraph "../hello.dot";
+gv::layout($g, "dot");
+gv::writegraph($g, "hello.png", "png");
+gv::rm $g;
diff --git a/tclpkg/gv/demo/demo.py b/tclpkg/gv/demo/demo.py
new file mode 100755 (executable)
index 0000000..03f64bd
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+import gv
+
+g = gv.digraph("G")
+print gv.set(g,"aaa","xxx")
+print gv.set(g,"aaa")
+n = gv.node(g,"hello")
+print gv.set(n,"label")
+print gv.set(n,"aaa","xxx")
+print gv.set(n,"aaa")
+m = gv.node(g,"world")
+print gv.set(m,"aaa")
+e = gv.edge(n,m)
+print gv.set(e,"aaa","xxx")
+print gv.set(e,"aaa")
+gv.rm(e)
+gv.rm(m)
+gv.rm(n)
+gv.rm(g)
+
+g = gv.stringgraph("digraph G {a->b}")
+gv.rm(g)
+
+g = gv.readgraph("hello.dot")
+gv.layout(g, "dot")
+gv.writegraph(g, "hello.png", "png")
+gv.rm(g)
diff --git a/tclpkg/gv/demo/demo.tcl b/tclpkg/gv/demo/demo.tcl
new file mode 100755 (executable)
index 0000000..7bf1286
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/tclsh
+
+package require gv
+
+set g [gv::digraph G]
+puts [gv::set $g aaa xxx]
+puts [gv::set $g aaa]
+set sg [gv::graph $g SG]
+set n [gv::node $g hello]
+puts [gv::set $n label]
+puts [gv::set $n aaa xxx]
+puts [gv::set $n aaa]
+set m [gv::node $g world]
+puts [gv::set $m aaa]
+set e [gv::edge $n $m]
+puts [gv::set $e aaa xxx]
+puts [gv::set $e aaa]
+gv::rm $e
+gv::rm $n
+gv::rm $m
+gv::rm $g
+
+set g [gv::stringgraph "digraph G {a->b}"]
+gv::rm $g
+
+set g [gv::readgraph hello.dot]
+gv::layout $g dot
+gv::writegraph $g hello.png png
diff --git a/tclpkg/gv/demo/hello.dot b/tclpkg/gv/demo/hello.dot
new file mode 100644 (file)
index 0000000..31df713
--- /dev/null
@@ -0,0 +1 @@
+digraph G {hello->world}