package graphviz tags 542979 + patch thanks Hi, I am attaching a couple of patches I had to apply to make graphviz compile.
30_fix_ftbfs_gv_i.patch fixes the problem described in this bug. Some code processed by swig has to be moved at the beginning out of the { } block. However, the package will still FTBFS because of a changed parameter of swig (-php, instead of -php5). See patch 40_swig_php_param.patch I was not able to recover since which version swig changed that option. It would be wise to put that version in the Build-Depends. As a final note: graphviz will FTBFS also if tcl8.4 or previous are installed, so Build-Conflicts: tcl8.4, tcl8.3 should be added to the control file. Thanks, Ludovico
Description: fix swig-processed file Author: Ludovico Cavedon <ludovico.cave...@gmail.com> Forwarded: not-needed Index: graphviz-2.20.2/tclpkg/gv/gv.i =================================================================== --- graphviz-2.20.2.orig/tclpkg/gv/gv.i 2009-09-22 00:57:05.000000000 -0700 +++ graphviz-2.20.2/tclpkg/gv/gv.i 2009-09-22 00:57:21.000000000 -0700 @@ -15,6 +15,20 @@ **********************************************************/ %module gv + +#ifdef SWIGTCL +// A typemap telling SWIG to ignore an argument for input +// However, we still need to pass a pointer to the C function +%typemap(in,numinputs=0) char *outdata (char *temp) { + $1 = &temp; +} +// A typemap defining how to return an argument by appending it to the result +%typemap(argout) char *outdata { + Tcl_Obj *o = Tcl_NewStringObj($1); + Tcl_ListObjAppendElement(interp,$result,o); +} +#endif + %{ /* some language headers (e.g. php.h, ruby.h) leave these defined */ @@ -371,18 +385,4 @@ extern bool write(Agraph_t *g, char *filename); extern bool write(Agraph_t *g, FILE *f); - -#ifdef SWIGTCL -// A typemap telling SWIG to ignore an argument for input -// However, we still need to pass a pointer to the C function -%typemap(in,numinputs=0) char *outdata (char *temp) { - $1 = &temp; -} -// A typemap defining how to return an argument by appending it to the result -%typemap(argout) char *outdata { - Tcl_Obj *o = Tcl_NewStringObj($1); - Tcl_ListObjAppendElement(interp,$result,o); -} -#endif - %}
Description: use -php instead of -php5 with swig Author: Ludovico Cavedon <ludovico.cave...@gmail.com> Index: graphviz-2.20.2/tclpkg/gv/Makefile.am =================================================================== --- graphviz-2.20.2.orig/tclpkg/gv/Makefile.am 2008-04-29 11:19:41.000000000 -0700 +++ graphviz-2.20.2/tclpkg/gv/Makefile.am 2009-09-22 01:36:54.000000000 -0700 @@ -131,7 +131,7 @@ gv.php: gv_php.cpp php_gv.h: gv_php.cpp gv_php.cpp: gv.i - $(SWIG) -c++ -php5 -o gv_php.cpp $(srcdir)/gv.i + $(SWIG) -c++ -php -o gv_php.cpp $(srcdir)/gv.i pkgpythondir = $(pkglibdir)/python PYTHON_data = gv.py Index: graphviz-2.20.2/tclpkg/gv/Makefile.in =================================================================== --- graphviz-2.20.2.orig/tclpkg/gv/Makefile.in 2008-06-25 16:20:31.000000000 -0700 +++ graphviz-2.20.2/tclpkg/gv/Makefile.in 2009-09-22 01:36:54.000000000 -0700 @@ -2521,7 +2521,7 @@ gv.php: gv_php.cpp php_gv.h: gv_php.cpp gv_php.cpp: gv.i - $(SWIG) -c++ -php5 -o gv_php.cpp $(srcdir)/gv.i + $(SWIG) -c++ -php -o gv_php.cpp $(srcdir)/gv.i $(PYTHON_data): gv_python.cpp gv_python.cpp: gv.i $(SWIG) -c++ -python -o gv_python.cpp $(srcdir)/gv.i Index: graphviz-2.20.2/configure =================================================================== --- graphviz-2.20.2.orig/configure 2009-09-22 01:37:20.000000000 -0700 +++ graphviz-2.20.2/configure 2009-09-22 01:37:29.000000000 -0700 @@ -27290,8 +27290,8 @@ if test "x$use_swig" != "xYes"; then use_php="No (swig not available)" else - if test `$SWIG -help 2>&1 | $GREP -c '\-php5 *- Generate'` = 0; then - use_php="No (swig does not support -php5 option)" + if test `$SWIG -help 2>&1 | $GREP -c '\-php *- Generate'` = 0; then + use_php="No (swig does not support -php option)" else # Extract the first word of "php", so it can be a program name with args. set dummy php; ac_word=$2 Index: graphviz-2.20.2/configure.ac =================================================================== --- graphviz-2.20.2.orig/configure.ac 2009-09-22 01:37:03.000000000 -0700 +++ graphviz-2.20.2/configure.ac 2009-09-22 01:37:18.000000000 -0700 @@ -946,8 +946,8 @@ if test "x$use_swig" != "xYes"; then use_php="No (swig not available)" else - if test `$SWIG -help 2>&1 | $GREP -c '\-php5 *- Generate'` = 0; then - use_php="No (swig does not support -php5 option)" + if test `$SWIG -help 2>&1 | $GREP -c '\-php *- Generate'` = 0; then + use_php="No (swig does not support -php option)" else AC_CHECK_PROG(PHP,php,php) if test "x$PHP" = "x"; then