mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-04-30 04:47:28 -07:00
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
117 lines
2.9 KiB
Diff
117 lines
2.9 KiB
Diff
--- 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) -------------------------------------------- */
|