Source: ggz-python Version: 0.0.14.1-1 Severity: serious Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu natty ubuntu-patch User: vor...@debian.org Usertags: multiarch
Hi guys, ggz-python fails to build from source in unstable currently, because it uses a wrong path when looking for the rsvg headers: [...] checking for rsvg_pixbuf_from_file_at_size in -lrsvg-2... yes checking librsvg-2/librsvg/librsvg-features.h usability... no checking librsvg-2/librsvg/librsvg-features.h presence... no checking for librsvg-2/librsvg/librsvg-features.h... no configure: error: The RSVG library is not or incompletely installed. make: *** [debian/stamp-autotools] Error 1 dpkg-buildpackage: error: debian/rules build gave error exit status 2 [...] Furthermore, the current distutils handling will begin to fail once libraries such as glib start to switch to multiarch, because pyrsvgsdl/setup.py.in hard-codes the assumption that the glib headers are relative to the rsvg install dir, which won't be true at various points while transitioning to multiarch. The attached patch from Ubuntu should correct both of these failures: the first by using the librsvg-2.0/librsvg header path instead of librsvg-2/librsvg, and the second by invoking pkg-config directly from setup.py (which at that point doesn't need to be 'setup.py.in' anymore, but that's not worth diverging from upstream on here). Please consider applying this patch, and adding a build-dependency on pkg-config, to ggz-python in Debian. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nur -x '*.orig' -x '*~' ggz-python-0.0.14.1//configure ggz-python-0.0.14.1.new//configure --- ggz-python-0.0.14.1//configure 2011-04-09 07:23:39.752974175 +0000 +++ ggz-python-0.0.14.1.new//configure 2011-04-09 07:23:41.462983745 +0000 @@ -4980,7 +4980,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <librsvg-2/librsvg/librsvg-features.h> +#include <librsvg-2.0/librsvg/librsvg-features.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -5020,7 +5020,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <librsvg-2/librsvg/librsvg-features.h> +#include <librsvg-2.0/librsvg/librsvg-features.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in diff -Nur -x '*.orig' -x '*~' ggz-python-0.0.14.1//configure.ac ggz-python-0.0.14.1.new//configure.ac --- ggz-python-0.0.14.1//configure.ac 2011-04-09 07:23:39.752974175 +0000 +++ ggz-python-0.0.14.1.new//configure.ac 2011-04-09 07:23:41.462983745 +0000 @@ -102,7 +102,7 @@ ) if test "$rsvg_found" = "yes"; then AC_CHECK_HEADER( - [librsvg-2/librsvg/librsvg-features.h], + [librsvg-2.0/librsvg/librsvg-features.h], [rsvg_found=yes], [rsvg_found=no] ) diff -Nur -x '*.orig' -x '*~' ggz-python-0.0.14.1//pyrsvgsdl/setup.py.in ggz-python-0.0.14.1.new//pyrsvgsdl/setup.py.in --- ggz-python-0.0.14.1//pyrsvgsdl/setup.py.in 2011-04-09 07:23:39.752974175 +0000 +++ ggz-python-0.0.14.1.new//pyrsvgsdl/setup.py.in 2011-04-09 07:26:44.974009741 +0000 @@ -4,6 +4,14 @@ # Installation: python setup.py install [--prefix=<prefix>] from distutils.core import setup, Extension +import commands + +def pkgconfig(*packages, **kw): + flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'} + for token in commands.getoutput("pkg-config --libs --cflags %s" % ' '.join(packages)).split(): + if flag_map.get(token[:2]) is not None: + kw.setdefault(flag_map.get(token[:2]), []).append(token[2:]) + return kw setup( name = "RSVGSDL", @@ -15,14 +23,7 @@ ext_modules = [ Extension('rsvgsdl', ['src/pyrsvgsdl.c'], - include_dirs = [ - '@rsvg_includes@/librsvg-2', - '@rsvg_includes@/gtk-2.0', - '@rsvg_includes@/glib-2.0', - '@rsvg_libraries@/glib-2.0/include' - ], - libraries = ['rsvg-2'], - library_dirs = ["@rsvg_libraries@"]) + **pkgconfig('librsvg-2.0')) ] )
signature.asc
Description: Digital signature