proj/gentoo: Initial commit

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
This commit is contained in:
Robin H. Johnson
2015-08-08 13:49:04 -07:00
commit 56bd759df1
97532 changed files with 3536859 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
DIST py2cairo-1.10.0.tar.bz2 402070 SHA256 d30439f06c2ec1a39e27464c6c828b6eface3b22ee17b2de05dc409e429a7431 SHA512 cb3d54de9af4134460ce731da8166a3127a642c8a2e6184109437ddec115cd55b8dd2413a5c81700277bfe2f22fcfe268db4f3ba0f7649751e85bb34295f79fc WHIRLPOOL 60b57d55b27f06acd62714ac6ad7973ab973d42995fb536ae800263a2e8c7451a24ccafd96fe30f5bfa26e1ae218934d4fafaafec3e9666a39b33c78672407e2
DIST pycairo-1.10.0.tar.bz2 246556 SHA256 9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be SHA512 a03db6f04cea504985f390b0734042390f491f32ae2bee1299dabbafd369fde36bb506ebb941d22bbc11b0d008c4f758baeacf309a7336880529455092db829f WHIRLPOOL e779d56d67ef18bbd052d81acb38d8b610ca4bbf787f4b0e3982633de55ff54d6dfa3e5ce1957321fba09f0ec2d12ce12057335de9d5ff3f84c2bc0530415e76

View File

@@ -0,0 +1,18 @@
inspired by:
http://groups.google.com/group/waf-users/browse_thread/thread/2bd6774056c850bc/
27bfdcac2fb9ec05?lnk=gst#27bfdcac2fb9ec05
we cannot "fix" the buildsystem, since it's bzip2-tarred *sigh*
--- waf
+++ waf
@@ -154,6 +154,8 @@
wafdir = find_lib()
sys.path.insert(0, wafdir)
+from waflib.Tools.c_config import MACRO_TO_DESTOS
+MACRO_TO_DESTOS['__POWERPC__'] = 'darwin'
if __name__ == '__main__':
import waflib.extras.compat15

View File

@@ -0,0 +1,126 @@
--- src/cairomodule.c
+++ src/cairomodule.c
@@ -127,7 +127,7 @@
#else
0,
#endif
-#ifdef CAIRO_HAS_SVG_SURFACE
+#ifdef PYCAIRO_ENABLE_SVG
&PycairoSVGSurface_Type,
#else
0,
@@ -223,7 +223,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
@@ -305,7 +305,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
@@ -379,7 +379,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
@@ -182,7 +182,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
@@ -83,7 +83,7 @@
type = &PycairoPSSurface_Type;
break;
#endif
-#if CAIRO_HAS_SVG_SURFACE
+#if PYCAIRO_ENABLE_SVG
case CAIRO_SURFACE_TYPE_SVG:
type = &PycairoSVGSurface_Type;
break;
@@ -1015,7 +1015,7 @@
/* Class SVGSurface(Surface) ----------------------------------------------- */
-#ifdef CAIRO_HAS_SVG_SURFACE
+#ifdef PYCAIRO_ENABLE_SVG
#include <cairo-svg.h>
static PyObject *
@@ -1125,7 +1125,7 @@
0, /* tp_is_gc */
0, /* tp_bases */
};
-#endif /* CAIRO_HAS_SVG_SURFACE */
+#endif /* PYCAIRO_ENABLE_SVG */
#if CAIRO_HAS_WIN32_SURFACE
--- wscript
+++ wscript
@@ -1,6 +1,7 @@
# -*- python -*-
import os
+import subprocess
top = '.'
out = 'build_directory'
@@ -11,6 +12,17 @@
cairo_version_required = '1.10.0'
+def check_svg():
+ if os.environ.get('PYCAIRO_DISABLE_SVG', None) is None:
+ return_code = subprocess.call(['pkg-config', '--exists', 'cairo-svg'])
+ if return_code == 0:
+ return True
+ else:
+ return False
+ else:
+ return False
+
+
def options(ctx):
print(' %s/options()' %d)
ctx.tool_options('gnu_dirs')
@@ -39,6 +51,8 @@
ctx.define('PYCAIRO_VERSION_MAJOR', version[0])
ctx.define('PYCAIRO_VERSION_MINOR', version[1])
ctx.define('PYCAIRO_VERSION_MICRO', version[2])
+ if check_svg():
+ ctx.define('PYCAIRO_ENABLE_SVG', 1)
ctx.write_config_header('src/config.h')

View File

@@ -0,0 +1,38 @@
--- py2cairo-1.10.0/wscript
+++ py2cairo-1.10.0/wscript
@@ -10,6 +10,7 @@
APPNAME='py2cairo'
VERSION='1.10.0'
cairo_version_required = '1.10.0'
+xpyb_version_required = '1.3'
def check_svg():
@@ -23,6 +24,17 @@
return False
+def check_xpyb():
+ if os.environ.get('PYCAIRO_DISABLE_XPYB', None) is None:
+ return_code = subprocess.call(['pkg-config', '--exists', 'xpyb'])
+ if return_code == 0:
+ return True
+ else:
+ return False
+ else:
+ return False
+
+
def options(ctx):
print(' %s/options()' %d)
ctx.tool_options('gnu_dirs')
@@ -41,6 +53,9 @@
ctx.check_python_headers()
ctx.check_cfg(package='cairo', atleast_version=cairo_version_required,
args='--cflags --libs')
+ if check_xpyb():
+ ctx.check_cfg(package='xpyb', atleast_version=xpyb_version_required,
+ args='--cflags --libs', mandatory=False)
# add gcc options
if env['CC_NAME'] == 'gcc':

View File

@@ -0,0 +1,126 @@
--- src/cairomodule.c
+++ src/cairomodule.c
@@ -116,7 +116,7 @@
#else
0,
#endif
-#ifdef CAIRO_HAS_SVG_SURFACE
+#ifdef PYCAIRO_ENABLE_SVG
&PycairoSVGSurface_Type,
#else
0,
@@ -247,7 +247,7 @@
if (PyType_Ready(&PycairoPSSurface_Type) < 0)
return NULL;
#endif
-#ifdef CAIRO_HAS_SVG_SURFACE
+#ifdef PYCAIRO_ENABLE_SVG
if (PyType_Ready(&PycairoSVGSurface_Type) < 0)
return NULL;
#endif
@@ -337,7 +337,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
@@ -399,7 +399,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
@@ -75,7 +75,7 @@
extern PyTypeObject PycairoPSSurface_Type;
#endif
-#if CAIRO_HAS_SVG_SURFACE
+#if PYCAIRO_ENABLE_SVG
extern PyTypeObject PycairoSVGSurface_Type;
#endif
--- src/py3cairo.h
+++ src/py3cairo.h
@@ -171,7 +171,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
@@ -72,7 +72,7 @@
type = &PycairoPSSurface_Type;
break;
#endif
-#if CAIRO_HAS_SVG_SURFACE
+#if PYCAIRO_ENABLE_SVG
case CAIRO_SURFACE_TYPE_SVG:
type = &PycairoSVGSurface_Type;
break;
@@ -1022,7 +1022,7 @@
/* Class SVGSurface(Surface) ----------------------------------------------- */
-#ifdef CAIRO_HAS_SVG_SURFACE
+#ifdef PYCAIRO_ENABLE_SVG
#include <cairo-svg.h>
static PyObject *
@@ -1133,7 +1133,7 @@
0, /* tp_is_gc */
0, /* tp_bases */
};
-#endif /* CAIRO_HAS_SVG_SURFACE */
+#endif /* PYCAIRO_ENABLE_SVG */
#if CAIRO_HAS_WIN32_SURFACE
--- wscript
+++ wscript
@@ -1,6 +1,7 @@
# -*- python -*-
import os
+import subprocess
top = '.'
out = 'build_directory'
@@ -11,6 +12,17 @@
cairo_version_required = '1.10.0'
+def check_svg():
+ if os.environ.get('PYCAIRO_DISABLE_SVG', None) is None:
+ return_code = subprocess.call(['pkg-config', '--exists', 'cairo-svg'])
+ if return_code == 0:
+ return True
+ else:
+ return False
+ else:
+ return False
+
+
def options(ctx):
print(' %s/options()' %d)
ctx.tool_options('gnu_dirs')
@@ -39,6 +51,8 @@
ctx.define('PYCAIRO_VERSION_MAJOR', version[0])
ctx.define('PYCAIRO_VERSION_MINOR', version[1])
ctx.define('PYCAIRO_VERSION_MICRO', version[2])
+ if check_svg():
+ ctx.define('PYCAIRO_ENABLE_SVG', 1)
ctx.write_config_header('src/config.h')

View File

@@ -0,0 +1,11 @@
--- a/waflib/Tools/python.py
+++ b/waflib/Tools/python.py
@@ -169,7 +169,7 @@
conf.find_program('python-config-%s'%num,var='PYTHON_CONFIG',mandatory=False)
includes=[]
if conf.env.PYTHON_CONFIG:
- for incstr in conf.cmd_and_log(conf.env.PYTHON+[conf.env.PYTHON_CONFIG,'--includes']).strip().split():
+ for incstr in conf.cmd_and_log([conf.env.PYTHON_CONFIG,'--includes']).strip().split():
if(incstr.startswith('-I')or incstr.startswith('/I')):
incstr=incstr[2:]
if incstr not in includes:

View File

@@ -0,0 +1,12 @@
--- a/waf
+++ b/waf
@@ -153,6 +153,9 @@
return dir
wafdir = find_lib()
+if sys.argv[1:] == ['unpack']:
+ print(wafdir)
+ exit()
sys.path.insert(0, wafdir)
from waflib.Tools.c_config import MACRO_TO_DESTOS
MACRO_TO_DESTOS['__POWERPC__'] = 'darwin'

View File

@@ -0,0 +1,41 @@
--- pycairo-1.10.0/wscript
+++ pycairo-1.10.0/wscript
@@ -10,6 +10,7 @@
APPNAME='pycairo'
VERSION='1.10.0'
cairo_version_required = '1.10.0'
+xpyb_version_required = '1.3' # optional
def check_svg():
@@ -23,6 +24,17 @@
return False
+def check_xpyb():
+ if os.environ.get('PYCAIRO_DISABLE_XPYB', None) is None:
+ return_code = subprocess.call(['pkg-config', '--exists', 'xpyb'])
+ if return_code == 0:
+ return True
+ else:
+ return False
+ else:
+ return False
+
+
def options(ctx):
print(' %s/options()' %d)
ctx.tool_options('gnu_dirs')
@@ -42,6 +54,12 @@
ctx.check_cfg(package='cairo', atleast_version=cairo_version_required,
args='--cflags --libs')
+# xpyb for Python 3 is not available yet.
+# the Python 3 version should probably have a different name than 'xpyb'
+# if check_xpyb():
+# ctx.check_cfg(package='xpyb', atleast_version=xpyb_version_required,
+# args='--cflags --libs', mandatory=False)
+
# add gcc options
if env['CC_NAME'] == 'gcc':
env.append_unique('CCFLAGS', ['-std=c99', '-Wall'])

View File

@@ -0,0 +1,11 @@
--- setup.py
+++ setup.py
@@ -109,7 +109,7 @@
ext_modules = [cairo],
data_files = [
('include/pycairo', ['src/pycairo.h']),
- ('lib/pkgconfig', [pkgconfig_file]),
+ (os.environ.get('PKGCONFIG_DIR', 'lib/pkgconfig'), [pkgconfig_file]),
(os.path.join(dsy.get_python_lib(), 'cairo'),
['src/__init__.py']),
],

View File

@@ -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) -------------------------------------------- */

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>python</herd>
</pkgmetadata>

View File

@@ -0,0 +1,138 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_3,3_4} )
PYTHON_REQ_USE='threads(+)'
inherit eutils python-r1 waf-utils toolchain-funcs
PYCAIRO_PYTHON2_VERSION="${PV}"
PYCAIRO_PYTHON3_VERSION="${PV}"
DESCRIPTION="Python bindings for the cairo library"
HOMEPAGE="http://cairographics.org/pycairo/ http://pypi.python.org/pypi/pycairo"
SRC_URI="http://cairographics.org/releases/py2cairo-${PYCAIRO_PYTHON2_VERSION}.tar.bz2
http://cairographics.org/releases/pycairo-${PYCAIRO_PYTHON3_VERSION}.tar.bz2"
# LGPL-3 for pycairo 1.10.0.
# || ( LGPL-2.1 MPL-1.1 ) for pycairo 1.8.10.
LICENSE="LGPL-3 || ( LGPL-2.1 MPL-1.1 )"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="doc examples +svg test xcb"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
# Note: xpyb is used as the C header, not Python modules
RDEPEND="${PYTHON_DEPS}
>=x11-libs/cairo-1.10.0[svg?,xcb?]
xcb? ( x11-libs/xpyb )"
DEPEND="${RDEPEND}
virtual/pkgconfig
test? ( dev-python/pytest[${PYTHON_USEDEP}] )
"
src_prepare() {
pushd "${WORKDIR}/pycairo-${PYCAIRO_PYTHON3_VERSION}" > /dev/null
rm -f src/config.h || die
epatch "${FILESDIR}/${PN}-1.10.0-svg_check.patch"
epatch "${FILESDIR}/${PN}-1.10.0-xpyb.patch"
epatch "${FILESDIR}/${PN}-1.10.0-waf-unpack.patch"
epatch "${FILESDIR}"/py2cairo-1.10.0-ppc-darwin.patch
popd > /dev/null
pushd "${WORKDIR}/py2cairo-${PYCAIRO_PYTHON2_VERSION}" > /dev/null
rm -f src/config.h || die
epatch "${FILESDIR}/py2cairo-1.10.0-svg_check.patch"
epatch "${FILESDIR}/py2cairo-1.10.0-xpyb.patch"
epatch "${FILESDIR}"/py2cairo-1.10.0-ppc-darwin.patch
popd > /dev/null
preparation() {
if python_is_python3; then
cp -r -l "${WORKDIR}/pycairo-${PYCAIRO_PYTHON3_VERSION}" "${BUILD_DIR}" || die
pushd "${BUILD_DIR}" > /dev/null
wafdir="$(./waf unpack)"
pushd "${wafdir}" > /dev/null
epatch "${FILESDIR}/${PN}-1.10.0-waf-py3_4.patch"
popd > /dev/null
popd > /dev/null
else
cp -r -l "${WORKDIR}/py2cairo-${PYCAIRO_PYTHON2_VERSION}" "${BUILD_DIR}" || die
fi
}
python_foreach_impl preparation
}
src_configure() {
if ! use svg; then
export PYCAIRO_DISABLE_SVG=1
fi
if ! use xcb; then
export PYCAIRO_DISABLE_XPYB=1
fi
tc-export PKG_CONFIG
# Also export the var with the slightly diff name that waf uses for no good reason.
export PKGCONFIG=${PKG_CONFIG}
# Added by grobian:
# If WAF_BINARY is an absolute path, the configure is different and fails to
# find Python.h due to a compiler misconfiguration. If WAF_BINARY is just
# ./waf or python waf, it works fine. Hooray for reinvented buildsystems
# floppym:
# pycairo and py2cairo bundle different versions of waf (bug 447856)
WAF_BINARY="./waf"
python_foreach_impl run_in_build_dir waf-utils_src_configure --nopyc --nopyo
}
src_compile() {
python_foreach_impl run_in_build_dir waf-utils_src_compile
}
src_test() {
test_installation() {
./waf install --destdir="${T}/tests/${BUILD_DIR}"
PYTHONPATH="${T}/tests/${BUILD_DIR}$(python_get_sitedir)" py.test -v
}
python_foreach_impl run_in_build_dir test_installation
}
src_install() {
python_foreach_impl run_in_build_dir waf-utils_src_install
dodoc AUTHORS NEWS README
if use doc; then
pushd doc/_build/html > /dev/null || die
dohtml -r [a-z]* _static
popd > /dev/null || die
fi
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins -r examples/*
fi
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_names; next to waf producing dylibs (not bundles) and
# calling them .bundle, it also has no idea what it should do to create
# proper ones (dylibs)
fix_darwin_install_names() {
local x="$(python_get_sitedir)/cairo/_cairo.bundle"
install_name_tool -id "${x}" "${ED}${x}"
}
python_foreach_impl fix_darwin_install_names
fi
}
run_in_build_dir() {
pushd "${BUILD_DIR}" > /dev/null || die
"$@"
popd > /dev/null || die
}