Package: hivex Severity: normal Version: 1.3.6-2 User: debian-pyt...@lists.debian.org Usertags: python3.3 Tags: patch
Please apply below patch, or fix building against multiple support python3 versions & python3.3 in some other way. Please note that python3.3 has two include paths, instead of one.
diff -Nru hivex-1.3.6/debian/changelog hivex-1.3.6/debian/changelog --- hivex-1.3.6/debian/changelog 2012-06-14 21:39:50.000000000 +0000 +++ hivex-1.3.6/debian/changelog 2012-10-24 23:01:48.000000000 +0000 @@ -1,3 +1,9 @@ +hivex (1.3.6-2.1) UNRELEASED; urgency=low + + * Fix FTBFS against python3.3. + + -- Dmitrijs Ledkovs <dmitrij.led...@ubuntu.com> Thu, 25 Oct 2012 00:01:32 +0100 + hivex (1.3.6-2) unstable; urgency=low * [7de8ea3] changed pattern in .install files so that the multiarch diff -Nru hivex-1.3.6/debian/control hivex-1.3.6/debian/control --- hivex-1.3.6/debian/control 2012-06-13 12:41:13.000000000 +0000 +++ hivex-1.3.6/debian/control 2012-10-24 23:02:08.000000000 +0000 @@ -1,10 +1,10 @@ Source: hivex Section: libs Priority: extra Maintainer: Debian Libvirt Maintainers <pkg-libvirt-maintain...@lists.alioth.debian.org> Uploaders: Hilko Bengen <ben...@debian.org> Build-Depends: debhelper (>= 8.1.3~), - autotools-dev, + dh-autoreconf, pkg-config, libxml2-dev, libreadline-dev, diff -Nru hivex-1.3.6/debian/patches/fit-ftbfs-python3.3.patch hivex-1.3.6/debian/patches/fit-ftbfs-python3.3.patch --- hivex-1.3.6/debian/patches/fit-ftbfs-python3.3.patch 1970-01-01 00:00:00.000000000 +0000 +++ hivex-1.3.6/debian/patches/fit-ftbfs-python3.3.patch 2012-10-24 23:30:26.000000000 +0000 @@ -0,0 +1,83 @@ +Description: fix FTBFS against python3.3 + Python3.3 in Debian/Ubuntu has two include locations, not one. + Detect and use both of them. +Author: Dmitrijs Ledkovs <dmitrij.led...@ubuntu.com> +Forwarded: not yet +Last-Update: 2012-10-25 + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -249,7 +249,7 @@ + dnl Check for Python (optional, for Python bindings). + PYTHON_PREFIX= + PYTHON_VERSION= +-PYTHON_INCLUDEDIR= ++PYTHON_CFLAGS= + PYTHON_INSTALLDIR= + + AC_CHECK_PROG([PYTHON],[python],[python],[no]) +@@ -266,12 +266,18 @@ + AC_MSG_RESULT([$PYTHON_VERSION]) + + AC_MSG_CHECKING([for Python include path]) +- if test -z "$PYTHON_INCLUDEDIR"; then ++ if test -z "$PYTHON_CFLAGS"; then + python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc ());"` +- PYTHON_INCLUDEDIR=$python_path ++ python_platpath=`$PYTHON -c "import distutils.sysconfig; \ ++ print (distutils.sysconfig.get_python_inc (plat_specific=1));"` ++ if test "$python_path" = "$python_platpath"; then ++ PYTHON_CFLAGS=-I$python_path ++ else ++ PYTHON_CFLAGS="-I$python_path -I$python_platpath" ++ fi + fi +- AC_MSG_RESULT([$PYTHON_INCLUDEDIR]) ++ AC_MSG_RESULT([$PYTHON_CFLAGS]) + + AC_ARG_WITH([python-installdir], + [AS_HELP_STRING([--with-python-installdir], +@@ -293,8 +299,11 @@ + dnl Look for libpython and some optional symbols in it. + old_LIBS="$LIBS" + if test "x$PYTHON_VERSION_MAJOR" = "x3"; then +- dnl libpython3 is called "libpython3.Xmu.so" +- LIBPYTHON="python${PYTHON_VERSION}mu" ++ dnl libpython3 has a buildflag suffix ++ python_buildflag=`$PYTHON -c "import distutils.sysconfig; \ ++ print (distutils.sysconfig.build_flags);"` ++ ++ LIBPYTHON="python${PYTHON_VERSION}$python_buildflag" + else + LIBPYTHON="python$PYTHON_VERSION" + fi +@@ -308,11 +317,11 @@ + + AC_SUBST(PYTHON_PREFIX) + AC_SUBST(PYTHON_VERSION) +-AC_SUBST(PYTHON_INCLUDEDIR) ++AC_SUBST(PYTHON_CFLAGS) + AC_SUBST(PYTHON_INSTALLDIR) + + AM_CONDITIONAL([HAVE_PYTHON], +- [test "x$PYTHON" != "xno" && test "x$PYTHON_INCLUDEDIR" != "x" && test "x$PYTHON_INSTALLDIR" != "x"]) ++ [test "x$PYTHON" != "xno" && test "x$PYTHON_CFLAGS" != "x" && test "x$PYTHON_INSTALLDIR" != "x"]) + + dnl Check for Ruby and rake (optional, for Ruby bindings). + AC_ARG_ENABLE([ruby], +Index: b/python/Makefile.am +=================================================================== +--- a/python/Makefile.am ++++ b/python/Makefile.am +@@ -33,7 +33,7 @@ + python_LTLIBRARIES = libhivexmod.la + + libhivexmod_la_SOURCES = hivex-py.c +-libhivexmod_la_CFLAGS = -Wall -I$(PYTHON_INCLUDEDIR) \ ++libhivexmod_la_CFLAGS = -Wall $(PYTHON_CFLAGS) \ + -I$(top_srcdir)/lib -I$(top_builddir)/lib + libhivexmod_la_LIBADD = $(top_builddir)/lib/libhivex.la + libhivexmod_la_LDFLAGS = -avoid-version -shared diff -Nru hivex-1.3.6/debian/patches/series hivex-1.3.6/debian/patches/series --- hivex-1.3.6/debian/patches/series 2012-06-13 16:48:07.000000000 +0000 +++ hivex-1.3.6/debian/patches/series 2012-10-24 23:14:38.000000000 +0000 @@ -1,3 +1,3 @@ 0001-ruby-find-files-to-install-in-correct-directory.patch 0002-ruby-install-to-vendor-directories.patch -0003-autoreconf.patch +fit-ftbfs-python3.3.patch diff -Nru hivex-1.3.6/debian/rules hivex-1.3.6/debian/rules --- hivex-1.3.6/debian/rules 2012-06-13 17:05:32.000000000 +0000 +++ hivex-1.3.6/debian/rules 2012-10-24 23:07:10.000000000 +0000 @@ -8,16 +8,16 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +export AUTOPOINT=true -PYTHONS := $(shell pyversions --installed; py3versions --installed) +PYTHONS := $(shell pyversions --supported; py3versions --supported) PYTHON_DEFAULT := $(shell pyversions --default) RUBIES := $(shell find /usr/bin/ -name ruby1\* | xargs -n1 readlink -f | xargs -n1 basename) RUBY_DEFAULT := $(shell which ruby | xargs readlink -f | xargs basename) %: dh $@ \ - --without python-support \ - --with autotools-dev,ocaml,python2,python3,ruby + --with autoreconf,ocaml,python2,python3,ruby override_dh_auto_configure: dh_auto_configure --builddir=$(CURDIR)/debian/build-default \
Regards, Dmitrijs.