diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-09-19 13:50:04 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-09-19 13:50:04 +0000 |
commit | 67eedb914170ba3f0f997feba1d4f169f4479ea3 (patch) | |
tree | 39b1fb400e1f4c7e66230ec13cbc1921e2d96e54 /dev-python | |
parent | Bump to 1.4.0, fixes #284733 (diff) | |
download | gentoo-2-67eedb914170ba3f0f997feba1d4f169f4479ea3.tar.gz gentoo-2-67eedb914170ba3f0f997feba1d4f169f4479ea3.tar.bz2 gentoo-2-67eedb914170ba3f0f997feba1d4f169f4479ea3.zip |
Improve dependencies (bug #269682).
(Portage version: 14280-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/pycairo/ChangeLog | 6 | ||||
-rw-r--r-- | dev-python/pycairo/files/pycairo-1.8.8-svg_check.patch | 116 | ||||
-rw-r--r-- | dev-python/pycairo/pycairo-1.8.8.ebuild | 9 |
3 files changed, 128 insertions, 3 deletions
diff --git a/dev-python/pycairo/ChangeLog b/dev-python/pycairo/ChangeLog index ad3b4cfd5f57..fc652050329b 100644 --- a/dev-python/pycairo/ChangeLog +++ b/dev-python/pycairo/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/pycairo # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/ChangeLog,v 1.75 2009/09/17 10:54:35 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/ChangeLog,v 1.76 2009/09/19 13:50:04 arfrever Exp $ + + 19 Sep 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + pycairo-1.8.8.ebuild, +files/pycairo-1.8.8-svg_check.patch: + Improve dependencies (bug #269682). 17 Sep 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> pycairo-1.8.8.ebuild: diff --git a/dev-python/pycairo/files/pycairo-1.8.8-svg_check.patch b/dev-python/pycairo/files/pycairo-1.8.8-svg_check.patch new file mode 100644 index 000000000000..78dc13bd1749 --- /dev/null +++ b/dev-python/pycairo/files/pycairo-1.8.8-svg_check.patch @@ -0,0 +1,116 @@ +--- setup.py ++++ setup.py +@@ -29,6 +30,16 @@ + print pipe.stderr.read() + raise SystemExit('Error: %s >= %s not found' % (pkg, version)) + ++def pkg_config_svg_check(): ++ if os.environ.get('PYCAIRO_DISABLE_SVG', None) is None: ++ pipe = call('pkg-config --exists cairo-svg') ++ if pipe.returncode == 0: ++ return [('PYCAIRO_ENABLE_SVG', None)] ++ else: ++ return [] ++ else: ++ return [] ++ + def pkg_config_parse(opt, pkg): + pipe = call("pkg-config %s %s" % (opt, pkg)) + output = pipe.stdout.read() +@@ -94,6 +105,7 @@ + 'src/pattern.c', + 'src/surface.c', + ], ++ define_macros = pkg_config_svg_check(), + include_dirs = pkg_config_parse('--cflags-only-I', 'cairo'), + library_dirs = pkg_config_parse('--libs-only-L', 'cairo'), + libraries = pkg_config_parse('--libs-only-l', 'cairo'), +--- src/cairomodule.c ++++ src/cairomodule.c +@@ -122,7 +122,7 @@ + #else + 0, + #endif +-#ifdef CAIRO_HAS_SVG_SURFACE ++#ifdef PYCAIRO_ENABLE_SVG + &PycairoSVGSurface_Type, + #else + 0, +@@ -209,7 +209,7 @@ + if (PyType_Ready(&PycairoPSSurface_Type) < 0) + return; + #endif +-#ifdef CAIRO_HAS_SVG_SURFACE ++#ifdef PYCAIRO_ENABLE_SVG + if (PyType_Ready(&PycairoSVGSurface_Type) < 0) + return; + #endif +@@ -285,7 +285,7 @@ + PyModule_AddObject(m, "PSSurface", (PyObject *)&PycairoPSSurface_Type); + #endif + +-#ifdef CAIRO_HAS_SVG_SURFACE ++#ifdef PYCAIRO_ENABLE_SVG + Py_INCREF(&PycairoSVGSurface_Type); + PyModule_AddObject(m, "SVGSurface", (PyObject *)&PycairoSVGSurface_Type); + #endif +@@ -350,7 +350,7 @@ + #else + PyModule_AddIntConstant(m, "HAS_PS_SURFACE", 0); + #endif +-#if CAIRO_HAS_SVG_SURFACE ++#if PYCAIRO_ENABLE_SVG + PyModule_AddIntConstant(m, "HAS_SVG_SURFACE", 1); + #else + PyModule_AddIntConstant(m, "HAS_SVG_SURFACE", 0); +--- src/private.h ++++ src/private.h +@@ -86,7 +86,7 @@ + extern PyTypeObject PycairoPSSurface_Type; + #endif + +-#if CAIRO_HAS_SVG_SURFACE ++#if PYCAIRO_ENABLE_SVG + extern PyTypeObject PycairoSVGSurface_Type; + #endif + +--- src/pycairo.h ++++ src/pycairo.h +@@ -178,7 +178,7 @@ + #define PycairoPSSurface_Type *(Pycairo_CAPI->PSSurface_Type) + #endif + +-#if CAIRO_HAS_SVG_SURFACE ++#if PYCAIRO_ENABLE_SVG + #define PycairoSVGSurface_Type *(Pycairo_CAPI->SVGSurface_Type) + #endif + +--- src/surface.c ++++ src/surface.c +@@ -80,7 +80,7 @@ + type = &PycairoPSSurface_Type; + break; + #endif +-#if CAIRO_HAS_SVG_SURFACE ++#if PYCAIRO_ENABLE_SVG + case CAIRO_SURFACE_TYPE_SVG: + type = &PycairoSVGSurface_Type; + break; +@@ -965,7 +965,7 @@ + + + /* Class SVGSurface(Surface) ----------------------------------------------- */ +-#ifdef CAIRO_HAS_SVG_SURFACE ++#ifdef PYCAIRO_ENABLE_SVG + #include <cairo-svg.h> + + static PyObject * +@@ -1067,7 +1067,7 @@ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + }; +-#endif /* CAIRO_HAS_SVG_SURFACE */ ++#endif /* PYCAIRO_ENABLE_SVG */ + + + /* Class Win32Surface(Surface) -------------------------------------------- */ diff --git a/dev-python/pycairo/pycairo-1.8.8.ebuild b/dev-python/pycairo/pycairo-1.8.8.ebuild index 9e8ce50d1540..0c772c20767d 100644 --- a/dev-python/pycairo/pycairo-1.8.8.ebuild +++ b/dev-python/pycairo/pycairo-1.8.8.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/pycairo-1.8.8.ebuild,v 1.6 2009/09/18 03:07:55 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/pycairo-1.8.8.ebuild,v 1.7 2009/09/19 13:50:04 arfrever Exp $ EAPI="2" @@ -18,7 +18,7 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" IUSE="doc examples svg" -RDEPEND=">=x11-libs/cairo-1.8.8[svg=]" +RDEPEND=">=x11-libs/cairo-1.8.8[svg?]" DEPEND="${RDEPEND} dev-util/pkgconfig doc? ( >=dev-python/sphinx-0.6 )" @@ -35,12 +35,17 @@ src_prepare() { src/Makefile.in || die "sed in src/Makefile.in failed" epatch "${FILESDIR}/${P}-pkgconfig_dir.patch" + epatch "${FILESDIR}/${P}-svg_check.patch" } src_configure() { if use doc; then econf fi + + if ! use svg; then + export PYCAIRO_DISABLE_SVG="1" + fi } src_compile() { |