tags 623165 + patch
thanks

On 04/22/2011 02:16 AM, David Claughton wrote:

Hope you're having a happy Easter (you too Seb).

I've just pushed some changes to the git repo to fix the recent FTBFS
which was caused by the introduction of python 2.7 to the archive.

I've thrown in a couple of other things including a patch for Hurd
which was submitted - just so you know I have no way to test this so
I'm just taking a flyer on it.

Could you please take a look and (assuming it looks OK) upload it
for me?


I'm sorry but 65883762c382d200cc5001433d060474045c7e30 looks wrong.
If python 2.7 is set as default python interpreter, libgv-python will be
useless, unless you install python2.6.

Barry Warsaw kindly proposed a patch [1] in this bugreport, which was
applied in Ubuntu. Did you test it? Did you have a look at it?

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=40;bug=623165

I've been able to build the package using Barry's patch, and
successfully tested the python binary package produced. So, ok
upstream's Graphviz doesn't have Python 2.7 support… but you can hack
configure.ac a bit to get that working. Attached is a debdiff between
sid's version and mine (well, with Barry's patch). Please consider
applying it.

Regards,

--
Mehdi Dogguy مهدي الدڤي
http://dogguy.org/
diff -Nru graphviz-2.26.3/debian/changelog graphviz-2.26.3/debian/changelog
--- graphviz-2.26.3/debian/changelog    2010-07-04 11:12:32.000000000 +0200
+++ graphviz-2.26.3/debian/changelog    2011-04-22 21:18:01.000000000 +0200
@@ -1,3 +1,13 @@
+graphviz (2.26.3-5.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add Python 2.7 support (Closes: #623165). Thanks for Barry Warsaw
+    for the patch.
+    - Added dh-autoreconf as a Build-Dependency
+    - Added patch python27-support
+
+ -- Mehdi Dogguy <me...@debian.org>  Fri, 22 Apr 2011 21:11:53 +0200
+
 graphviz (2.26.3-5) unstable; urgency=low
 
   [ David Claughton ]
diff -Nru graphviz-2.26.3/debian/control graphviz-2.26.3/debian/control
--- graphviz-2.26.3/debian/control      2010-07-04 11:12:32.000000000 +0200
+++ graphviz-2.26.3/debian/control      2011-04-22 21:17:19.000000000 +0200
@@ -41,6 +41,7 @@
  python-support,
  chrpath,
  dh-ocaml (>= 0.9.1),
+ dh-autoreconf,
  libgtk2.0-dev,
  libgnomeui-dev
 Build-Conflicts: tcl8.3, tcl8.4
diff -Nru graphviz-2.26.3/debian/libgv-python.install 
graphviz-2.26.3/debian/libgv-python.install
--- graphviz-2.26.3/debian/libgv-python.install 2010-07-04 11:09:19.000000000 
+0200
+++ graphviz-2.26.3/debian/libgv-python.install 2011-04-22 21:17:19.000000000 
+0200
@@ -1,4 +1,5 @@
 usr/lib/graphviz/python
 usr/lib/graphviz/python25
 usr/lib/graphviz/python26
+usr/lib/graphviz/python27
 usr/share/man/man3/gv.3python
diff -Nru graphviz-2.26.3/debian/patches/python27-support 
graphviz-2.26.3/debian/patches/python27-support
--- graphviz-2.26.3/debian/patches/python27-support     1970-01-01 
01:00:00.000000000 +0100
+++ graphviz-2.26.3/debian/patches/python27-support     2011-04-22 
21:17:19.000000000 +0200
@@ -0,0 +1,245 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1357,6 +1357,70 @@
+ AM_CONDITIONAL(WITH_PYTHON26, [test "x$use_python26" = "xYes"])
+ 
+ dnl -----------------------------------
++dnl INCLUDES and LIBS for PYTHON27
++
++AC_ARG_ENABLE(python27,
++  [AS_HELP_STRING([--enable-python27=no],[python27 language bindings])],
++  [], [enable_python27=no])
++
++if test "x$enable_python27" != "xyes"; then
++  use_python27="No (disabled by default - for multiversion installs)"
++else
++  if test "x$use_swig" != "xYes"; then
++    use_python27="No (swig not available)"
++  else
++    if test `$SWIG -help 2>&1 | $GREP -c '\-python *- Generate'` = 0; then
++      use_python27="No (swig does not support -python option)"
++    else
++      AC_CHECK_PROG(PYTHON27,python2.7,python2.7)
++      if test "x$PYTHON27" = "x"; then
++        use_python27="No (python27 not available)"
++      else
++        PYTHON27_VERSION=`$PYTHON27 -V 2>&1 | $GREP Python | cut -d ' ' -f 2`
++        if test "x$PYTHON27_VERSION" = "x"; then
++          PYTHON27=
++        else
++          PYTHON27_VERSION_MAJOR=`echo $PYTHON27_VERSION | cut -d '.' -f 1`
++          PYTHON27_VERSION_MINOR=`echo $PYTHON27_VERSION | cut -d '.' -f 2`
++          
PYTHON27_VERSION_SHORT=$PYTHON27_VERSION_MAJOR.$PYTHON27_VERSION_MINOR
++          if test $PYTHON27_VERSION_MAJOR -lt 3; then
++            if test $PYTHON27_VERSION_MAJOR -lt 2; then
++            PYTHON27=
++            else
++              if test $PYTHON27_VERSION_MINOR -lt 5; then
++              PYTHON27=
++              fi
++            fi
++          fi
++        fi
++      fi
++      if test "x$PYTHON27" = "x"; then
++      use_python27="No (python2.7 is too old)"
++      else
++        PYTHON27_PREFIX=`$PYTHON27 -c "import sys; print sys.prefix"`
++        
PYTHON27_INCLUDES=-I$PYTHON27_PREFIX/include/python$PYTHON27_VERSION_SHORT
++        PYTHON24_LIBS="-lpython$PYTHON_VERSION_SHORT"
++        PYTHON27_INSTALL_DIR="`$PYTHON27 $srcdir/config/config_python.py 
archsitelib`"
++        save_CPPFLAGS=$CPPFLAGS
++        CPPFLAGS="$CPPFLAGS $PYTHON27_INCLUDES"
++        AC_CHECK_HEADER(Python.h,,[
++          use_python27="No (missing header)"
++          PYTHON27=
++        ])
++        CPPFLAGS=$save_CPPFLAGS
++      if test "x$PYTHON27" != "x"; then
++        use_python27="Yes"
++          AC_SUBST(PYTHON27_INSTALL_DIR)
++          AC_SUBST(PYTHON27_INCLUDES)
++          AC_SUBST(PYTHON27_LIBS)
++        fi
++      fi
++    fi
++  fi
++fi
++AM_CONDITIONAL(WITH_PYTHON27, [test "x$use_python27" = "xYes"])
++
++dnl -----------------------------------
+ dnl INCLUDES and LIBS for R
+ 
+ AC_ARG_ENABLE(r,
+@@ -3240,6 +3304,7 @@
+ echo "  gv_python24:   $use_python24"
+ echo "  gv_python25:   $use_python25"
+ echo "  gv_python26:   $use_python26"
++echo "  gv_python27:   $use_python27"
+ echo "  gv_R:          $use_r"
+ echo "  gv_ruby:       $use_ruby"
+ echo "  gv_tcl:        $use_gv_tcl"
+--- a/tclpkg/Makefile.am
++++ b/tclpkg/Makefile.am
+@@ -13,6 +13,8 @@
+ pkgpython23dir = $(pkglibdir)/python23
+ pkgpython24dir = $(pkglibdir)/python24
+ pkgpython25dir = $(pkglibdir)/python25
++pkgpython26dir = $(pkglibdir)/python26
++pkgpython27dir = $(pkglibdir)/python27
+ pkgRdir = $(pkglibdir)/R
+ pkgrubydir = $(pkglibdir)/ruby
+ pkgtcldir = $(pkglibdir)/tcl
+@@ -117,6 +119,28 @@
+               echo "Skipping system installation of python25 binding."; \
+       fi
+ endif
++if WITH_PYTHON26
++      -mkdir -p $(DESTDIR)@PYTHON26_INSTALL_DIR@;
++      if test -w $(DESTDIR)@PYTHON26_INSTALL_DIR@; then \
++              (cd $(DESTDIR)@PYTHON26_INSTALL_DIR@; \
++                      $(LN_S) -f $(pkgpython26dir)/libgv_python26.so _gv.so; \
++                      $(LN_S) -f $(pkgpython26dir)/gv.py gv.py;) \
++      else \
++              echo "Warning: @PYTHON26_INSTALL_DIR@ is not writable."; \
++              echo "Skipping system installation of python26 binding."; \
++      fi
++endif
++if WITH_PYTHON27
++      -mkdir -p $(DESTDIR)@PYTHON27_INSTALL_DIR@;
++      if test -w $(DESTDIR)@PYTHON27_INSTALL_DIR@; then \
++              (cd $(DESTDIR)@PYTHON27_INSTALL_DIR@; \
++                      $(LN_S) -f $(pkgpython27dir)/libgv_python27.so _gv.so; \
++                      $(LN_S) -f $(pkgpython27dir)/gv.py gv.py;) \
++      else \
++              echo "Warning: @PYTHON27_INSTALL_DIR@ is not writable."; \
++              echo "Skipping system installation of python27 binding."; \
++      fi
++endif
+ if WITH_RUBY
+       -mkdir -p $(DESTDIR)@RUBY_INSTALL_DIR@;
+       if test -w $(DESTDIR)@RUBY_INSTALL_DIR@; then \
+@@ -160,6 +184,10 @@
+       -rm -rf $(DESTDIR)@PYTHON24_INSTALL_DIR@/_gv.so 
$(DESTDIR)@PYTHON_INSTALL_DIR@/gv.py;
+       rm -rf $(DESTDIR)$(pkgpython25dir);
+       -rm -rf $(DESTDIR)@PYTHON25_INSTALL_DIR@/_gv.so 
$(DESTDIR)@PYTHON_INSTALL_DIR@/gv.py;
++      rm -rf $(DESTDIR)$(pkgpython26dir);
++      -rm -rf $(DESTDIR)@PYTHON26_INSTALL_DIR@/_gv.so 
$(DESTDIR)@PYTHON_INSTALL_DIR@/gv.py;
++      rm -rf $(DESTDIR)$(pkgpython27dir);
++      -rm -rf $(DESTDIR)@PYTHON27_INSTALL_DIR@/_gv.so 
$(DESTDIR)@PYTHON_INSTALL_DIR@/gv.py;
+       rm -rf $(DESTDIR)$(pkgRdir);
+       rm -rf $(DESTDIR)$(pkgrubydir);
+       -rm -rf $(DESTDIR)@RUBY_INSTALL_DIR@/gv.so;
+--- a/tclpkg/gv/Makefile.am
++++ b/tclpkg/gv/Makefile.am
+@@ -198,6 +198,17 @@
+ gv_python26.cpp: gv.i
+       $(SWIG) -c++ -python -o gv_python26.cpp $(srcdir)/gv.i
+ 
++pkgpython27dir = $(pkglibdir)/python27
++PYTHON27_data = gv.py
++nodist_libgv_python27_la_SOURCES = gv_python27.cpp $(PYTHON27_data)
++libgv_python27_la_SOURCES = $(BASESOURCES) gv_dummy_init.c
++libgv_python27_la_LIBADD = $(BASELIBS) $(PYTHON27_LIBS)
++libgv_python27_la_LDFLAGS = -module -avoid-version
++libgv_python27_la_CPPFLAGS = $(BASECPPFLAGS) $(PYTHON27_INCLUDES)
++# $(PYTHON_data): gv_python.cpp
++gv_python27.cpp: gv.i
++      $(SWIG) -c++ -python -o gv_python27.cpp $(srcdir)/gv.i
++
+ pkgRdir = $(pkglibdir)/R
+ R_data = 
+ nodist_libgv_R_la_SOURCES = gv_R.cpp $(R_data)
+@@ -295,39 +306,46 @@
+ endif
+ if WITH_PYTHON
+ pkgpython_DATA = $(PYTHON_data)
+-man_MANS += gv.3python
+-pdf_DATA += gv.3python.pdf
++py_mans ?= gv.3python
++py_data ?= gv.3python.pdf
+ pkgpython_LTLIBRARIES = libgv_python.la
+ DEVTSTS += test_python
+ endif
+ if WITH_PYTHON23
+ pkgpython23_DATA = $(PYTHON23_data)
+-man_MANS += gv.3python
+-pdf_DATA += gv.3python.pdf
++py_mans ?= gv.3python
++py_data ?= gv.3python.pdf
+ pkgpython23_LTLIBRARIES = libgv_python23.la
+ #DEVTSTS += test_python23
+ endif
+ if WITH_PYTHON24
+ pkgpython24_DATA = $(PYTHON24_data)
+-man_MANS += gv.3python
+-pdf_DATA += gv.3python.pdf
++py_mans ?= gv.3python
++py_data ?= gv.3python.pdf
+ pkgpython24_LTLIBRARIES = libgv_python24.la
+ #DEVTSTS += test_python24
+ endif
+ if WITH_PYTHON25
+ pkgpython25_DATA = $(PYTHON25_data)
+-man_MANS += gv.3python
+-pdf_DATA += gv.3python.pdf
++py_mans ?= gv.3python
++py_data ?= gv.3python.pdf
+ pkgpython25_LTLIBRARIES = libgv_python25.la
+ #DEVTSTS += test_python25
+ endif
+ if WITH_PYTHON26
+ pkgpython26_DATA = $(PYTHON26_data)
+-man_MANS += gv.3python
+-pdf_DATA += gv.3python.pdf
++py_mans ?= gv.3python
++py_data ?= gv.3python.pdf
+ pkgpython26_LTLIBRARIES = libgv_python26.la
+ #DEVTSTS += test_python26
+ endif
++if WITH_PYTHON27
++pkgpython27_DATA = $(PYTHON27_data)
++py_mans ?= gv.3python
++py_data ?= gv.3python.pdf
++pkgpython27_LTLIBRARIES = libgv_python27.la
++#DEVTSTS += test_python27
++endif
+ if WITH_R
+ pkgR_DATA = $(R_data)
+ man_MANS += gv.3r
+@@ -349,6 +367,9 @@
+ pkgtcl_LTLIBRARIES = libgv_tcl.la
+ DEVTSTS += test_tcl
+ 
++man_MANS += $(py_mans)
++pdf_DATA += $(py_data)
++
+ all-local: pkgIndex.tcl
+ 
+ pkgIndex.tcl: libgv_tcl.la
+@@ -428,6 +449,9 @@
+ if WITH_PYTHON26
+       (cd $(DESTDIR)$(pkgpython26dir); rm -f _gv.so; $(LN_S) 
libgv_python26.so _gv.so;)
+ endif
++if WITH_PYTHON27
++      (cd $(DESTDIR)$(pkgpython27dir); rm -f _gv.so; $(LN_S) 
libgv_python27.so _gv.so;)
++endif
+ if WITH_R
+       (cd $(DESTDIR)$(pkgRdir);   rm -f gv.so;  $(LN_S) libgv_R.so gv.so;)
+ endif
+@@ -447,6 +471,7 @@
+       rm -rf $(DESTDIR)$(pkgpython24dir);
+       rm -rf $(DESTDIR)$(pkgpython25dir);
+       rm -rf $(DESTDIR)$(pkgpython26dir);
++      rm -rf $(DESTDIR)$(pkgpython27dir);
+       rm -rf $(DESTDIR)$(pkgRdir);
+       rm -rf $(DESTDIR)$(pkgrubydir);
+       rm -rf $(DESTDIR)$(pkgtcldir);
+@@ -558,6 +583,7 @@
+       gv_python24.cpp $(PYTHON24_data) gv.pyc \
+       gv_python25.cpp $(PYTHON25_data) gv.pyc \
+       gv_python26.cpp $(PYTHON26_data) gv.pyc \
++      gv_python27.cpp $(PYTHON27_data) gv.pyc \
+       gv_R.cpp $(R_data) \
+       gv_ruby.cpp $(RUBY_data) \
+       gv_tcl.cpp $(TCL_data) pkgIndex.tcl
diff -Nru graphviz-2.26.3/debian/patches/series 
graphviz-2.26.3/debian/patches/series
--- graphviz-2.26.3/debian/patches/series       2010-07-04 11:09:19.000000000 
+0200
+++ graphviz-2.26.3/debian/patches/series       2011-04-22 21:17:19.000000000 
+0200
@@ -8,3 +8,4 @@
 3_fix_dot_output
 3_fix_circo_segfault
 3_fix_vimdot_bashism
+python27-support
diff -Nru graphviz-2.26.3/debian/rules graphviz-2.26.3/debian/rules
--- graphviz-2.26.3/debian/rules        2010-07-04 11:12:32.000000000 +0200
+++ graphviz-2.26.3/debian/rules        2011-04-22 21:17:19.000000000 +0200
@@ -47,6 +47,7 @@
        done
 
        # Configure the package
+       dh_autoreconf autoreconf --
        ./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
        --prefix=/usr \
        --datadir=\$${prefix}/share \
@@ -110,6 +111,7 @@
 
        dh_clean $(CONFIG_SCRIPTS) \
                tclpkg/gv/gv.R tclpkg/gv/php_gv.h
+       dh_autoreconf_clean
 
 install: build
        dh_testdir

Reply via email to