summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2013-01-13 12:54:24 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2013-01-13 12:54:24 +0000
commit23d7df78822184e5ba385b66a1c746ba02555ea1 (patch)
tree50cede5bf3a7d4e15eb7294aa986d4b171321ac1 /dev-python/pycairo
parentadd ~arm, bug #449762 (diff)
downloadgentoo-2-23d7df78822184e5ba385b66a1c746ba02555ea1.tar.gz
gentoo-2-23d7df78822184e5ba385b66a1c746ba02555ea1.tar.bz2
gentoo-2-23d7df78822184e5ba385b66a1c746ba02555ea1.zip
Switch to EAPI=5 and python-r1.eclass.
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key C6085806)
Diffstat (limited to 'dev-python/pycairo')
-rw-r--r--dev-python/pycairo/ChangeLog8
-rw-r--r--dev-python/pycairo/pycairo-1.10.0-r4.ebuild125
2 files changed, 132 insertions, 1 deletions
diff --git a/dev-python/pycairo/ChangeLog b/dev-python/pycairo/ChangeLog
index 7cb56c5291ae..339f2ebcae20 100644
--- a/dev-python/pycairo/ChangeLog
+++ b/dev-python/pycairo/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/pycairo
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/ChangeLog,v 1.126 2013/01/06 09:29:29 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/ChangeLog,v 1.127 2013/01/13 12:54:24 eva Exp $
+
+*pycairo-1.10.0-r4 (13 Jan 2013)
+
+ 13 Jan 2013; Gilles Dartiguelongue <eva@gentoo.org>
+ +pycairo-1.10.0-r4.ebuild:
+ Switch to EAPI=5 and python-r1.eclass.
06 Jan 2013; Agostino Sarubbo <ago@gentoo.org> pycairo-1.10.0-r3.ebuild:
Add ~sparc, wrt bug #449220
diff --git a/dev-python/pycairo/pycairo-1.10.0-r4.ebuild b/dev-python/pycairo/pycairo-1.10.0-r4.ebuild
new file mode 100644
index 000000000000..1f7301fa33dc
--- /dev/null
+++ b/dev-python/pycairo/pycairo-1.10.0-r4.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2013 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-r4.ebuild,v 1.1 2013/01/13 12:54:24 eva Exp $
+
+EAPI="5"
+PYTHON_COMPAT=( python2_{6,7} python3_{1,2} )
+
+inherit eutils python-r1 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 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc examples +svg test xcb"
+
+RDEPEND="
+ >=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}"/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 [[ ${EPYTHON} == python3.* ]]; then
+ cp -r "${WORKDIR}/pycairo-${PYCAIRO_PYTHON3_VERSION}" "${BUILD_DIR}" || die
+ else
+ cp -r "${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
+
+ # 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}${EPREFIX}${PYTHON_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
+ insinto /usr/share/doc/${PF}/html
+ doins -r [a-z]* _static
+ popd > /dev/null
+ 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_SITEDIR}/cairo/_cairo.bundle"
+ install_name_tool -id "${EPREFIX}${x}" "${ED}${x}"
+ }
+ python_foreach_impl fix_darwin_install_names
+ fi
+}
+
+run_in_build_dir() {
+ pushd "${BUILD_DIR}" > /dev/null || die
+ "$@"
+ popd > /dev/null
+}