diff -Nru dia-0.97.2/debian/changelog dia-0.97.2/debian/changelog diff -Nru dia-0.97.2/debian/patches/python-multiarch.patch dia-0.97.2/debian/patches/python-multiarch.patch --- dia-0.97.2/debian/patches/python-multiarch.patch 1970-01-01 02:00:00.000000000 +0200 +++ dia-0.97.2/debian/patches/python-multiarch.patch 2013-04-08 15:17:50.000000000 +0200 @@ -0,0 +1,86 @@ +Author: Robie Basak +Description: use python-config for python include and library paths + This fixes an FTBFS due to non-multiarch assumptions. +Bug: https://bugzilla.gnome.org/show_bug.cgi?id=697364 +Last-Update: 2013-04-05 + +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -201,12 +201,16 @@ + [AC_REQUIRE([AM_PATH_PYTHON]) + AC_MSG_CHECKING(for headers required to compile python extensions) + dnl deduce PYTHON_INCLUDES +-py_prefix=`$PYTHON -c "import sys; print sys.prefix"` +-py_lib=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,1)" | cut -d '/' -f 3` +-py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` +-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" +-if test "$py_prefix" != "$py_exec_prefix"; then +- PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" ++if command -v python-config >/dev/null 2>&1; then ++ PYTHON_INCLUDES="$PYTHON_INCLUDES $(python-config --includes)" ++else ++ py_prefix=`$PYTHON -c "import sys; print sys.prefix"` ++ py_lib=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,1)" | cut -d '/' -f 3` ++ py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` ++ PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" ++ if test "$py_prefix" != "$py_exec_prefix"; then ++ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" ++ fi + fi + AC_SUBST(PYTHON_INCLUDES) + dnl check if the headers exist: +@@ -224,29 +228,33 @@ + [AC_REQUIRE([AM_PATH_PYTHON]) + AC_REQUIRE([AM_CHECK_PYTHON_HEADERS]) + +-AC_MSG_CHECKING(for libpython${PYTHON_VERSION}.a) +- +-py_config_dir="$py_prefix/$py_lib/python${PYTHON_VERSION}/config" +- +-py_makefile="${py_config_dir}/Makefile" +-if test -f "$py_makefile"; then +-dnl extra required libs +- py_basemodlibs=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $py_makefile` +- py_other_libs=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $py_makefile` +- +-dnl now the actual libpython +- if test -e "$PYTHON_PREFIX/${py_lib}/libpython${PYTHON_VERSION}.so"; then +- PYTHON_LIBS="-L${py_config_dir} -lpython${PYTHON_VERSION} $py_basemodlibs $py_other_libs" +- AC_MSG_RESULT(found) +- elif test -e "${py_prefix}/${py_lib}/libpython${PYTHON_VERSION}.a"; then +- dnl Same as above, but looking into the previous location: bug #581533 +- PYTHON_LIBS="-L${py_config_dir} -lpython${PYTHON_VERSION} $py_basemodlibs $py_other_libs" +- AC_MSG_RESULT(found) ++if command -v python-config >/dev/null 2>&1; then ++ PYTHON_LIBS=$(python-config --ldflags) ++else ++ AC_MSG_CHECKING(for libpython${PYTHON_VERSION}.a) ++ ++ py_config_dir="$py_prefix/$py_lib/python${PYTHON_VERSION}/config" ++ ++ py_makefile="${py_config_dir}/Makefile" ++ if test -f "$py_makefile"; then ++ dnl extra required libs ++ py_basemodlibs=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $py_makefile` ++ py_other_libs=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $py_makefile` ++ ++ dnl now the actual libpython ++ if test -e "$PYTHON_PREFIX/${py_lib}/libpython${PYTHON_VERSION}.so"; then ++ PYTHON_LIBS="-L${py_config_dir} -lpython${PYTHON_VERSION} $py_basemodlibs $py_other_libs" ++ AC_MSG_RESULT(found) ++ elif test -e "${py_prefix}/${py_lib}/libpython${PYTHON_VERSION}.a"; then ++ dnl Same as above, but looking into the previous location: bug #581533 ++ PYTHON_LIBS="-L${py_config_dir} -lpython${PYTHON_VERSION} $py_basemodlibs $py_other_libs" ++ AC_MSG_RESULT(found) ++ else ++ AC_MSG_RESULT(not found lib) ++ fi + else +- AC_MSG_RESULT(not found lib) ++ AC_MSG_RESULT(not found config) + fi +-else +- AC_MSG_RESULT(not found config) + fi + AC_SUBST(PYTHON_LIBS)]) + diff -Nru dia-0.97.2/debian/patches/series dia-0.97.2/debian/patches/series --- dia-0.97.2/debian/patches/series 2013-04-04 11:39:12.000000000 +0200 +++ dia-0.97.2/debian/patches/series 2013-04-08 15:18:22.000000000 +0200 @@ -15,3 +15,4 @@ fix-cast-warnings.patch fix-include-glib-headers.patch fix-crash-due-to-new-glib.patch +python-multiarch.patch