diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2011-07-06 19:49:41 +0000 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2011-07-06 19:49:41 +0000 |
commit | 32bff05999a3c3561ecf88fd8da10baaa0cf96df (patch) | |
tree | 4ce064d782d63f216d61e9d75cb7c2be104d782f /dev-python | |
parent | Version bump eric to 5.1.4 (bug 372207). (diff) | |
download | gentoo-2-32bff05999a3c3561ecf88fd8da10baaa0cf96df.tar.gz gentoo-2-32bff05999a3c3561ecf88fd8da10baaa0cf96df.tar.bz2 gentoo-2-32bff05999a3c3561ecf88fd8da10baaa0cf96df.zip |
Remove config.h to fix SVG (bug 368601).
(Portage version: 2.1.10.4/cvs/Linux x86_64)
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/pycairo/ChangeLog | 7 | ||||
-rw-r--r-- | dev-python/pycairo/pycairo-1.10.0-r2.ebuild | 101 |
2 files changed, 107 insertions, 1 deletions
diff --git a/dev-python/pycairo/ChangeLog b/dev-python/pycairo/ChangeLog index a731f370aba4..77128d356de8 100644 --- a/dev-python/pycairo/ChangeLog +++ b/dev-python/pycairo/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-python/pycairo # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/ChangeLog,v 1.100 2011/05/08 21:28:41 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/ChangeLog,v 1.101 2011/07/06 19:49:41 djc Exp $ + +*pycairo-1.10.0-r2 (06 Jul 2011) + + 06 Jul 2011; Dirkjan Ochtman <djc@gentoo.org> +pycairo-1.10.0-r2.ebuild: + Remove config.h to fix SVG (bug 368601). *pycairo-1.10.0-r1 (08 May 2011) diff --git a/dev-python/pycairo/pycairo-1.10.0-r2.ebuild b/dev-python/pycairo/pycairo-1.10.0-r2.ebuild new file mode 100644 index 000000000000..2a5e628dc59c --- /dev/null +++ b/dev-python/pycairo/pycairo-1.10.0-r2.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/pycairo-1.10.0-r2.ebuild,v 1.1 2011/07/06 19:49:41 djc Exp $ + +EAPI="3" +PYTHON_DEPEND="2:2.6 3:3.1" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="2.4 2.5 3.0 *-jython" + +inherit eutils python waf-utils + +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 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="doc examples +svg test" + +RDEPEND=">=x11-libs/cairo-1.10.0[svg?]" +DEPEND="${RDEPEND} + dev-util/pkgconfig + test? ( dev-python/pytest )" + +PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") + +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" + 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" + popd > /dev/null + + preparation() { + if [[ "${PYTHON_ABI}" == 3.* ]]; then + cp -r "${WORKDIR}/pycairo-${PYCAIRO_PYTHON3_VERSION}" "${WORKDIR}/${P}-${PYTHON_ABI}" + else + cp -r "${WORKDIR}/py2cairo-${PYCAIRO_PYTHON2_VERSION}" "${WORKDIR}/${P}-${PYTHON_ABI}" + fi + } + python_execute_function preparation +} + +src_configure() { + if ! use svg; then + export PYCAIRO_DISABLE_SVG="1" + fi + + python_execute_function -s waf-utils_src_configure --nopyc --nopyo +} + +src_compile() { + python_execute_function -s waf-utils_src_compile +} + +src_test() { + test_installation() { + ./waf install --destdir="${T}/tests/${PYTHON_ABI}" + } + python_execute_function -q -s test_installation + + python_execute_py.test -P '${T}/tests/${PYTHON_ABI}${EPREFIX}$(python_get_sitedir)' -s +} + +src_install() { + python_execute_function -s waf-utils_src_install + + dodoc AUTHORS NEWS README || die "dodoc failed" + + if use doc; then + pushd doc/_build/html > /dev/null + insinto /usr/share/doc/${PF}/html + doins -r [a-z]* _static || die "Installation of documentation failed" + popd > /dev/null + fi + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins -r examples/* || die "Installation of examples failed" + fi +} + +pkg_postinst() { + python_mod_optimize cairo +} + +pkg_postrm() { + python_mod_cleanup cairo +} |