]> granicus.if.org Git - graphviz/commitdiff
towards a fix for the tclstring problem (and strings in other bindings)
authorellson <devnull@localhost>
Tue, 19 Aug 2008 19:14:29 +0000 (19:14 +0000)
committerellson <devnull@localhost>
Tue, 19 Aug 2008 19:14:29 +0000 (19:14 +0000)
configure.ac
graphviz.spec.in
lib/Makefile.am
plugin/Makefile.am
tclpkg/Makefile.am
tclpkg/gdtclft/Makefile.am
tclpkg/gv/Makefile.am
tclpkg/tcldot/Makefile.am
tclpkg/tcldot/tcldot.c
tclpkg/tclpathplan/Makefile.am
tclpkg/tkspline/Makefile.am

index 3b017b7fd28520405ff0de519c12eb932d7fce63..0854c4528f5b1a055ac57c461c11787211f07d49 100644 (file)
@@ -1409,6 +1409,8 @@ if test "x$use_tcl" = "x"; then
   if test "x${TCL_SUPPORTS_STUBS}" = "x1"; then
     use_tcl="Yes"
     TCL_CFLAGS="${TCL_CFLAGS} -DUSE_TCL_STUBS"
+    AC_DEFINE_UNQUOTED(HAVE_TCL,1,
+       [Define if you have the tcl library])
   else
     AC_MSG_WARN([Tcl does not have STUBs support, perhaps it is too old?  The Tcl packages will not be built])
     use_tcl="No (no STUBs support)"
@@ -2866,6 +2868,8 @@ AC_CONFIG_FILES(Makefile
        lib/xdot/Makefile
        lib/topfish/Makefile
        lib/glcomp/Makefile
+       lib/tclstubs/Makefile
+       lib/tkstubs/Makefile
        macosx/Info.plist
        macosx/build/graphviz.pmdoc/01local.xml
        macosx/build/graphviz.pmdoc/02graphviz.xml
@@ -2874,18 +2878,19 @@ AC_CONFIG_FILES(Makefile
        plugin/Makefile
        plugin/core/Makefile
        plugin/devil/Makefile
-       plugin/gdk_pixbuf/Makefile
-       plugin/rsvg/Makefile
        plugin/gd/Makefile
-       plugin/pango/Makefile
-       plugin/ming/Makefile
-       plugin/quartz/Makefile
+       plugin/gdk_pixbuf/Makefile
        plugin/gdiplus/Makefile
        plugin/glitz/Makefile
+       plugin/gtk/Makefile
+       plugin/ming/Makefile
+       plugin/pango/Makefile
+       plugin/quartz/Makefile
+       plugin/rsvg/Makefile
+       plugin/tcl/Makefile
+       plugin/xlib/Makefile
        plugin/dot_layout/Makefile
        plugin/neato_layout/Makefile
-       plugin/xlib/Makefile
-       plugin/gtk/Makefile
        cmd/Makefile
        cmd/dot/Makefile
        cmd/tools/Makefile
@@ -2904,8 +2909,6 @@ AC_CONFIG_FILES(Makefile
         cmd/dotty/Makefile
         cmd/smyrna/Makefile
        tclpkg/Makefile
-       tclpkg/tclstubs/Makefile
-       tclpkg/tkstubs/Makefile
        tclpkg/tclhandle/Makefile
        tclpkg/gdtclft/Makefile
        tclpkg/gdtclft/demo/Makefile
@@ -2993,10 +2996,11 @@ echo "  gdiplus:       $use_gdiplus"
 echo "  gdk_pixbuf:    $use_gdk_pixbuf"
 echo "  glitz:         $use_glitz"
 echo "  gtk:           $use_gtk"
-echo "  pangocairo:    $use_pangocairo"
 echo "  ming:          $use_ming"
+echo "  pangocairo:    $use_pangocairo"
 echo "  quartz:        $use_quartz"
 echo "  rsvg:          $use_rsvg"
+echo "  tcl:           $use_tcl"
 echo "  xlib:          $use_xlib"
 echo ""
 echo "language extensions:"
index e11c21b5310cca1b1a5cc9b0edee1c92067d219d..71b647e9539680e464c75901e69dd128f8af6d67 100644 (file)
@@ -310,6 +310,7 @@ fi
 %{_datadir}/graphviz/smyrna
 %{_datadir}/graphviz/examples
 %endif
+%exclude %{_libdir}/graphviz/libgvplugin_tcl.*
 
 #-- graphviz-gd rpm --------------------------------------------------
 %package gd
@@ -590,6 +591,7 @@ Various tcl packages (extensions) for the graphviz tools.
 %defattr(-,root,root,-)
 %dir %{_libdir}/graphviz/tcl
 %{_libdir}/graphviz/tcl/*
+%{_libdir}/graphviz/libgvplugin_tcl.*
 %{_libdir}/tcl*/*
 %{_datadir}/graphviz/demo/*.tcl*
 %{_datadir}/graphviz/demo/*_data
@@ -599,6 +601,13 @@ Various tcl packages (extensions) for the graphviz tools.
 %{_mandir}/mann/tkspline.n*
 %endif
 
+# run "dot -c" to generate plugin config in %{_libdir}/graphviz/config
+%post tcl
+LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
+
+%postun tcl
+[ -x $RPM_INSTALL_PREFIX0/bin/dot ] && LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c || :
+
 #-- graphviz-devel rpm --------------------------------------------
 %package devel
 Group:          Development/Libraries
index 6aaf34e53eaa56454e5e4d7aa4210e94cadd3afe..d33209629fad0e570fed2fc2bdd1e1f6bba5ecf6 100644 (file)
@@ -3,6 +3,7 @@
 
 SUBDIRS = cdt graph agraph gd pathplan agutil sfio vmalloc ast vpsc \
        circogen dotgen fdpgen neatogen twopigen sparse sfdpgen \
-       patchwork common pack gvc ingraphs expr cgraph xdot topfish glcomp
+       patchwork common pack gvc ingraphs expr cgraph xdot topfish glcomp \
+       tclstubs tkstubs
 
 EXTRA_DIST = Makefile.old
index 677aae06b5b403f706a9b49c7091ce8476e6ca91..02b60153ec8b9d4998799c24ad74930f60788ea7 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$ $Revision$
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = core gd pango dot_layout neato_layout xlib gtk ming devil gdk_pixbuf rsvg quartz gdiplus glitz
+SUBDIRS = core devil gd gdk_pixbuf gdiplus glitz gtk ming pango quartz rsvg tcl xlib dot_layout neato_layout
 
 EXTRA_DIST = Makefile.old
index a9ce0a63817d4006f09b71ccc5124d229e5b8b3b..6533e3f0d227e4124296e15d8c2b288a23fa0faa 100644 (file)
@@ -22,7 +22,7 @@ if WITH_TCL
 pkgindex_DATA = pkgIndex.tcl
 endif
 
-SUBDIRS = tclstubs tkstubs tclhandle gdtclft tcldot tclpathplan tkspline gv
+SUBDIRS = tclhandle gdtclft tcldot tclpathplan tkspline gv
 
 pkgIndex.tcl: @TCL_PKGINDEX@ @TCL_PKGINDEX_GD@ @TCL_PKGINDEX_SWIG@ @TK_PKGINDEX@
        echo "# end" >end
index 2bfed87cbfca259afc0217e32c05bbaa61329615..be74bfa25573315ade5e6690e0159d3d91ac73e2 100644 (file)
@@ -34,13 +34,13 @@ if WITH_LIBGD
 if WITH_MYLIBGD
 libgdtclft_la_LIBADD = \
        $(top_builddir)/tclpkg/tclhandle/libtclhandle_C.la \
-       $(top_builddir)/tclpkg/tclstubs/libtclstubs_C.la \
+       $(top_builddir)/lib/tclstubs/libtclstubs_C.la \
        $(top_builddir)/lib/gd/libgvgd_C.la \
        @ICONV_LIBS@ @FONTCONFIG_LIBS@ @FREETYPE2_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @Z_LIBS@ @MATH_LIBS@
 else
 libgdtclft_la_LIBADD = \
        $(top_builddir)/tclpkg/tclhandle/libtclhandle_C.la \
-       $(top_builddir)/tclpkg/tclstubs/libtclstubs_C.la \
+       $(top_builddir)/lib/tclstubs/libtclstubs_C.la \
        @GD_LIBS@ @ICONV_LIBS@ @FONTCONFIG_LIBS@ @FREETYPE2_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @Z_LIBS@ @MATH_LIBS@
 endif
 
index 4e1349eac315f830596d03e27e96df50717f4139..8124ef4824edef7c6e1eca6e243cce1419128ef7 100644 (file)
@@ -191,7 +191,7 @@ pkgtcldir = $(pkglibdir)/tcl
 TCL_data = 
 nodist_libgv_tcl_la_SOURCES = gv_tcl.cpp $(TCL_data)
 libgv_tcl_la_SOURCES = $(BASESOURCES) gv_dummy_init.cpp
-libgv_tcl_la_LIBADD = $(top_builddir)/tclpkg/tclstubs/libtclstubs_C.la $(BASELIBS) $(TCL_LIBS)
+libgv_tcl_la_LIBADD = $(top_builddir)/lib/tclstubs/libtclstubs_C.la $(BASELIBS) $(TCL_LIBS)
 libgv_tcl_la_LDFLAGS = -module -avoid-version
 libgv_tcl_la_CPPFLAGS = $(AM_CPPFLAGS) $(TCL_INCLUDES)
 $(TCL_data): gv_tcl.cpp
index 41c0e12297f1f5077a2bc248dd8edeba72f2277e..355535851aa003c021e7743f9a5f9668108fce55 100644 (file)
@@ -41,7 +41,7 @@ libtcldot_la_SOURCES = tcldot.c $(CODEGENS) $(GDTCLFT)
 libtcldot_la_LDFLAGS = -no-undefined 
 
 libtcldot_la_LIBADD = $(top_builddir)/tclpkg/tclhandle/libtclhandle_C.la \
-       $(top_builddir)/tclpkg/tclstubs/libtclstubs_C.la \
+       $(top_builddir)/lib/tclstubs/libtclstubs_C.la \
        $(top_builddir)/lib/gvc/libgvc.la 
 
 # GDTCLFT requires gd libs to be builtin
@@ -64,10 +64,9 @@ libtcldot_builtin_la_LDFLAGS =
 
 libtcldot_builtin_la_LIBADD = \
        $(top_builddir)/tclpkg/tclhandle/libtclhandle_C.la \
-       $(top_builddir)/tclpkg/tclstubs/libtclstubs_C.la \
        $(top_builddir)/plugin/dot_layout/libgvplugin_dot_layout_C.la \
        $(top_builddir)/plugin/neato_layout/libgvplugin_neato_layout_C.la \
-       $(top_builddir)/plugin/core/libgvplugin_core_C.la \
+       $(top_builddir)/plugin/tcl/libgvplugin_tcl_C.la \
        $(top_builddir)/lib/gvc/libgvc_C.la \
        $(top_builddir)/lib/graph/libgraph_C.la \
        $(top_builddir)/lib/cdt/libcdt_C.la \
index 96a0464893f58b0621f142320bf2c9c7cf31021c..8327b2267a5b72801909564bf58bcc87f65e9f35 100644 (file)
@@ -1080,9 +1080,9 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp,
            }
 #endif
        }
-        rc = gvjobs_output_langname(gvc, "tk");
+        rc = gvjobs_output_langname(gvc, "tcl_string:tk");
        if (rc == NO_SUPPORT) {
-           Tcl_AppendResult(interp, " Format: \"tk\" not recognized.\n",
+           Tcl_AppendResult(interp, " Format: \"tcl_string:tk\" not recognized.\n",
                                      (char *) 0);
            return TCL_ERROR;
        }
@@ -1091,6 +1091,7 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp,
        job->imagedata = canvas;
        job->context = (void *)interp;
        job->external_context = TRUE;
+       job->output_file = stdout;
 
        /* make sure that layout is done */
        g = g->root;
index 589c746074cd33adaa854b77bb9d2e16c9d72379..9867c8a6f819478843fc0eeb15bb333627dff34b 100644 (file)
@@ -21,7 +21,7 @@ libtclplan_la_SOURCES = find_ints.c intersect.c makecw.c tclpathplan.c wrapper.c
 libtclplan_la_LDFLAGS = -no-undefined
 libtclplan_la_LIBADD = \
        $(top_builddir)/tclpkg/tclhandle/libtclhandle_C.la \
-       $(top_builddir)/tclpkg/tclstubs/libtclstubs_C.la \
+       $(top_builddir)/lib/tclstubs/libtclstubs_C.la \
        $(top_builddir)/lib/pathplan/libpathplan.la
 
 if WITH_TCL
index 3321343c0b0d0e1feb3e64862d091fbc003e2cfd..9f595887b00984290c428f02bccc6181927530e3 100644 (file)
@@ -14,7 +14,7 @@ AM_CPPFLAGS = \
        -I@TK_SRC_DIR@/generic \
        -I@TCL_SRC_DIR@/generic \
        @TCL_INCLUDES@ @TCLINT_INCLUDES@ \
-       @TK_INCLUDES@ @TKINT_INCLUDES@ -I$(top_srcdir)/tclpkg/tkstubs
+       @TK_INCLUDES@ @TKINT_INCLUDES@ -I$(top_srcdir)/lib/tkstubs
 
 AM_CFLAGS = @X_CFLAGS@ @TCL_CFLAGS@  @TK_CFLAGS@ @TK_DEFS@ \
        -UPACKAGE_NAME -UPACKAGE_STRING -UPACKAGE_TARNAME -UPACKAGE_VERSION
@@ -28,8 +28,8 @@ endif
 libtkspline_la_LDFLAGS = -no-undefined 
 libtkspline_la_SOURCES = tkspline.c
 libtkspline_la_LIBADD = \
-       $(top_builddir)/tclpkg/tkstubs/libtkstubs_C.la \
-       $(top_builddir)/tclpkg/tclstubs/libtclstubs_C.la @TK_LIB_SPEC@
+       $(top_builddir)/lib/tkstubs/libtkstubs_C.la \
+       $(top_builddir)/lib/tclstubs/libtclstubs_C.la @TK_LIB_SPEC@
 
 if WITH_TK
 all-local: pkgIndex.tcl