Package: libgv-tcl Version: 2.20.2-3 Severity: important Tags: patch
Well, the problem from subject. It could be checked by attempting to run doted from graphviz examples on any example graph. Nothing will appear on screen, but canvas code is printed to console. Indeed, tcldot calls "tk" renderer, assuming that it will be tkgen.c code. That code have all the needed to return it's canvas paint strings to TCL. However, now "tk" renderer is also available from the common plugins of libgv. By default it just prints it's results to stdout. The simplest method of fixing it is to change name of internal tcldot renderer from "tk" to "tkgen". Also, changed renderer type from API_render to API_device -- all other codegen_t renderers are API_device, and without it attempting to call gvjobs_output_langname would fail. Attached patch implements this method. There could be another way of fixing -- to add hook to gvc device to write all rendering results via Tcl_AppendResult in tcldot.c. This would allow to use standard "tk" rendering backend. However, this is less simple and, as I saw in "tk" plugin code -- it appears to have less features then tkgen. -- System Information: Debian Release: 5.0 APT prefers oldstable APT policy: (500, 'oldstable'), (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores) Locale: LANG=ru_RU.koi8-r, LC_CTYPE=ru_RU.koi8-r (charmap=KOI8-R) Shell: /bin/sh linked to /bin/bash Versions of packages libgv-tcl depends on: ii libc6 2.7-18 GNU C Library: Shared libraries ii libcairo2 1.6.4-7 The Cairo 2D vector graphics libra ii libexpat1 2.0.1-4 XML parsing C library - runtime li ii libfontconfig1 2.6.0-3 generic font configuration library ii libfreetype6 2.3.7-2 FreeType 2 font engine, shared lib ii libgcc1 1:4.3.3-3 GCC support library ii libgd2-xpm 2.0.36~rc1~dfsg-3 GD Graphics Library version 2 ii libglib2.0-0 2.16.6-1 The GLib library of C routines ii libgraphviz4 2.20.2-3 rich set of graph drawing tools ii libjpeg62 6b-14 The Independent JPEG Group's JPEG ii libltdl3 1.5.26-4 A system independent dlopen wrappe ii libpango1.0-0 1.20.5-3 Layout and rendering of internatio ii libpng12-0 1.2.27-2 PNG library - runtime ii libstdc++6 4.3.3-3 The GNU Standard C++ Library v3 ii libx11-6 2:1.1.5-2 X11 client-side library ii libxpm4 1:3.5.7-1 X11 pixmap library ii tk8.4 8.4.19-2 Tk toolkit for Tcl and X11, v8.4 - ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime libgv-tcl recommends no packages. libgv-tcl suggests no packages. -- no debconf information
--- graphviz-2.20.2/tclpkg/tcldot/tcldot.c 2008-04-29 21:31:05.000000000 +0400 +++ graphviz-2.20.2.patched/tclpkg/tcldot/tcldot.c 2009-03-28 13:26:00.350041677 +0300 @@ -53,7 +53,7 @@ #ifdef WITH_CODEGENS extern codegen_t TK_CodeGen; -static codegen_info_t cg[] = { {&TK_CodeGen, "tk", TK}, +static codegen_info_t cg[] = { {&TK_CodeGen, "tkgen", TK}, {NULL, NULL, 0}, }; #endif @@ -1084,9 +1084,9 @@ } tkgendata.interp = interp; - rc = gvjobs_output_langname(gvc, "tk"); + rc = gvjobs_output_langname(gvc, "tkgen"); if (rc == NO_SUPPORT) { - Tcl_AppendResult(interp, " Format: \"tk\" not recognized.\n", + Tcl_AppendResult(interp, " Format: \"tkgen\" not recognized.\n", (char *) 0); return TCL_ERROR; } @@ -1672,9 +1672,10 @@ gvconfig(gvc, FALSE); #ifdef WITH_CODEGENS /* additional codegens */ - for (p = cg; p->name; ++p) - gvplugin_install(gvc, API_render, p->name, 0, "cg", NULL, + for (p = cg; p->name; ++p) { + gvplugin_install(gvc, API_device, p->name, 0, "cg", NULL, (gvplugin_installed_t *) p); + }; #endif #ifndef TCLOBJ